javascript - <s:iterator not working properly for a list, i am using struts2 -


I have it: The iterator, which is iterating a property list, the property key, value for each item in the list and Category is. Depending on the category, I have to fill the values ​​defined in the frequencies within the divisions. I'm using the jquery tab here the itater is not running properly. Please understand the code, it is easy to understand

   

Change JSP

  & lt; Div id = "tab" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "# channel" & gt; Channel & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#connection" & gt; Connection & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Div id = "channel" & gt; & Lt; Table & gt; & Lt; S: subset source = "property" decider = "channelDecider" & gt; & Lt; S: Iterator var = "channel" & gt; & Lt; Tr & gt; & Lt; S: Hidden name = "property [% {property.indexOf (#channel)}] .key" /> & Lt; Td> & Lt; S: label value = "% {# channel.key}" & gt; & Lt; / S: Labels & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; S: Text file name = "property [% {property.indexOf (#channel)}]. Value" value = "% {# channel.value}" & gt; & Lt; / S: Text field & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / S: iterator & gt; & Lt; / S: Subset & gt; & Lt; / Table & gt; & Lt; / Div & gt; & Lt; Div id = "connection" & gt; & Lt; Table & gt; & Lt; S: subset source = "property" decider = "connectionDecider" & gt; & Lt; S: Itater var = "Connection" & gt; & Lt; Tr & gt; & Lt; S: Hidden name = "property [% {property.indexOf (#connection)}] .key" /> & Lt; Td> & Lt; S: label value = "% {# connection.key}" & gt; & Lt; / S: Labels & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; S: Text file name = "attribute [% {property.indexOf (#connection)}]. Value" value = "% {# connection.value}" & gt; & Lt; / S: Text field & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / S: iterator & gt; & Lt; / S: Subset & gt; & Lt; / Table & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

Make decisive

  Public Decree getChannelDecider () {New Critical Return () {Public Boolean Decision (object element) throws exceptions {Return (MyElement) Element) .category.equals ("channel"); }}; } Public decision-makers meet () (new conclusive return) {Public Boolean Decision (Object Element) throws exception {Returning (MyElement) element) Categor.equals ("Connection"); }}; }  

Note, MyElement is a list element type that has related properties


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -