|
|
@@ -50,7 +50,9 @@ public class AMResultActivity extends SearchResultActivity {
|
|
|
String name = iterator.next();
|
|
|
fields = fields + name + ",";
|
|
|
}
|
|
|
- fields = fields.substring(0, fields.length() - 1);
|
|
|
+ if (fields.length() > 0) {
|
|
|
+ fields = fields.substring(0, fields.length() - 1);
|
|
|
+ }
|
|
|
mParams.putString("columns", fields);
|
|
|
}
|
|
|
super.loadData();
|
|
|
@@ -233,7 +235,7 @@ public class AMResultActivity extends SearchResultActivity {
|
|
|
|
|
|
try {
|
|
|
JSONArray arr_col = contentLayout().getJSONObject("header").getJSONArray("col");
|
|
|
- JSONArray item = contentData().getJSONArray("item_" + position);
|
|
|
+ JSONArray item = contentData().getJSONArray("item_" + (position - 1));
|
|
|
|
|
|
String module_name = mParams.getString("module_name");
|
|
|
String detail_id = item.getString(arr_col.length());
|
|
|
@@ -265,7 +267,7 @@ public class AMResultActivity extends SearchResultActivity {
|
|
|
Iterator<String> iterator = action.getJSONObject("params").keys();
|
|
|
while (iterator.hasNext()) {
|
|
|
String key = iterator.next();
|
|
|
- JSONArray item = contentData().getJSONArray("item_" + position);
|
|
|
+ JSONArray item = contentData().getJSONArray("item_" + (position - 1));
|
|
|
int idx = action.getJSONObject("params").getInt(key);
|
|
|
params.put(key,idx);
|
|
|
}
|