Skip to content

Instantly share code, notes, and snippets.

@bryceosterhaus
Created October 6, 2016 17:57
Show Gist options
  • Select an option

  • Save bryceosterhaus/fcfd19e58e50d006e3363bb9bf63ae9e to your computer and use it in GitHub Desktop.

Select an option

Save bryceosterhaus/fcfd19e58e50d006e3363bb9bf63ae9e to your computer and use it in GitHub Desktop.
public void index() throws Exception {
JSONArray loopJobTitleCompositesJSONArray = JSONFactoryUtil.createJSONArray();
List<LoopJobTitleComposite> loopJobTitleComposites = LoopJobTitleUtil.getLoopJobTitleComposites(themeDisplay);
for (LoopJobTitleComposite loopJobTitleComposite : loopJobTitleComposites) {
loopJobTitleCompositesJSONArray.put(loopJobTitleComposite.getJSONObject());
}
renderRequest.setAttribute("loopJobTitleCompositesJSONArray", loopJobTitleCompositesJSONArray);
renderRequest.setAttribute("loopJobTitleCount", getBaseModelsCount(null, null));
if (!isRespondingTo("json")) {
return;
}
respondWith(loopJobTitleCompositesJSONArray);
}
@bryceosterhaus
Copy link
Author

Line 13 -> 18 is new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment