|
@@ -31,6 +31,7 @@ import android.widget.TextView;
|
|
|
import com.usai.ratradefiling.R;
|
|
import com.usai.ratradefiling.R;
|
|
|
import com.usai.ratradefiling.dataprovider.RADataProvider;
|
|
import com.usai.ratradefiling.dataprovider.RADataProvider;
|
|
|
import com.usai.ratradefiling.detail.NewDetailActivity;
|
|
import com.usai.ratradefiling.detail.NewDetailActivity;
|
|
|
|
|
+import com.usai.ratradefiling.result.ResultActivity;
|
|
|
import com.usai.ratradefiling.swipemenulistview.BaseSwipListAdapter;
|
|
import com.usai.ratradefiling.swipemenulistview.BaseSwipListAdapter;
|
|
|
import com.usai.ratradefiling.swipemenulistview.SwipeMenu;
|
|
import com.usai.ratradefiling.swipemenulistview.SwipeMenu;
|
|
|
import com.usai.ratradefiling.swipemenulistview.SwipeMenuCreator;
|
|
import com.usai.ratradefiling.swipemenulistview.SwipeMenuCreator;
|
|
@@ -45,6 +46,7 @@ import org.json.JSONObject;
|
|
|
import java.net.URISyntaxException;
|
|
import java.net.URISyntaxException;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
|
+import java.util.Iterator;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
@@ -156,28 +158,71 @@ public class SavedDetailFragment extends TFListFragment
|
|
|
public void onListItemClick(ListView l, View v, int position, long id)
|
|
public void onListItemClick(ListView l, View v, int position, long id)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
- JSONArray actions = sectionModel.actions;
|
|
|
|
|
- if (actions == null) {
|
|
|
|
|
- actions = new JSONArray();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Intent intent = new Intent(getActivity(),NewDetailActivity.class);
|
|
|
|
|
+
|
|
|
|
|
+// String uri = (String) ;
|
|
|
|
|
+// String searchParms = (String) searchresult.getData().get(position).get("criterion");
|
|
|
|
|
+ try
|
|
|
|
|
+ {
|
|
|
|
|
+//
|
|
|
|
|
+// intent = Intent.parseUri(uri, 0);
|
|
|
|
|
+
|
|
|
|
|
+ Bundle parms = new Bundle();
|
|
|
|
|
+// parms.writeToParcel(parcel, flags)
|
|
|
|
|
+ JSONObject obj =(JSONObject) searchresult.getData().get(position).get("bundle_params");
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ Iterator<?> it = obj.keys();
|
|
|
|
|
+ while (it.hasNext())
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ String key = (String) it.next();
|
|
|
|
|
+ parms.putString(key, obj.getString(key));
|
|
|
|
|
+
|
|
|
|
|
+// obj.put(key, searchParms.get(key).toString());
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ String sub_type=(String)searchresult.getData().get(position).get("module_name");
|
|
|
|
|
+ JSONArray actions =obj.optJSONArray("actions");
|
|
|
|
|
|
|
|
- Intent intent = new Intent(mCtx, NewDetailActivity.class);
|
|
|
|
|
- intent.putExtra("sub_type", params.getString("sub_type"));
|
|
|
|
|
- intent.putExtra("actions_count", actions.length());
|
|
|
|
|
|
|
+ intent.putExtra("sub_type", sub_type);
|
|
|
|
|
+ intent.putExtra("actions_count", actions.length());
|
|
|
|
|
|
|
|
- intent.putExtra("bundle_params",params);
|
|
|
|
|
|
|
+ intent.putExtra("bundle_params",parms);
|
|
|
|
|
+
|
|
|
|
|
+ for (int i = 0; i < actions.length(); i++) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ String name = actions.getString(i);
|
|
|
|
|
+ intent.putExtra("action" + i, name);
|
|
|
|
|
+ } catch (JSONException e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+// parms.putString("columns",dbUtil.get_fields(ApexTrackingApplication.get_user(), (String) searchresult.getData().get(position).get("module_name")));
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ startActivity(intent);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ catch (Exception e)
|
|
|
|
|
+ {
|
|
|
|
|
+ // TODO Auto-generated catch block
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+// Intent intent = new Intent(mCtx, NewDetailActivity.class);
|
|
|
|
|
+// intent.putExtra("sub_type", params.getString("sub_type"));
|
|
|
|
|
+// intent.putExtra("actions_count", actions.length());
|
|
|
|
|
+//
|
|
|
|
|
+// intent.putExtra("bundle_params",params);
|
|
|
// intent.putExtra("_id",detail_id);
|
|
// intent.putExtra("_id",detail_id);
|
|
|
// if(_schema!=null)
|
|
// if(_schema!=null)
|
|
|
// intent.putExtra("_schema",_schema);
|
|
// intent.putExtra("_schema",_schema);
|
|
|
|
|
|
|
|
- for (int i = 0; i < actions.length(); i++) {
|
|
|
|
|
- try {
|
|
|
|
|
- String name = actions.getString(i);
|
|
|
|
|
- intent.putExtra("action" + i, name);
|
|
|
|
|
- } catch (JSONException e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
startActivity(intent);
|
|
startActivity(intent);
|
|
|
|
|
|
|
@@ -292,7 +337,7 @@ public class SavedDetailFragment extends TFListFragment
|
|
|
map.put("create_time", item.optString("current_date"));
|
|
map.put("create_time", item.optString("current_date"));
|
|
|
map.put("name", item.optString("name"));
|
|
map.put("name", item.optString("name"));
|
|
|
map.put("company_name", item.optString("company_name"));
|
|
map.put("company_name", item.optString("company_name"));
|
|
|
- map.put("params", item.optJSONObject("param"));
|
|
|
|
|
|
|
+ map.put("bundle_params", item.optJSONObject("bundle_params"));
|
|
|
map.put("module_name", item.optString("module"));
|
|
map.put("module_name", item.optString("module"));
|
|
|
datalist.add(map);
|
|
datalist.add(map);
|
|
|
}
|
|
}
|