I have a javascript that makes a 'tree-view' for me. I managed to already get the tree-view to build trees whose values are taken from my db. The problem is, I want to be able to check the bean of the 'first' array such that if it equals the one located in the second array, it will print/iterate.
Here's a short explanation of my code: the changeItemProducts array is only used to get the 'subject' names. Inside each 'subject' are sub-entries. (For example, Paint has sub-entries like: watercolor, etc). Now, the changeItems array contains the sub-entries (I also added in this array from what 'subject' they come are from).
Now I want to check that if the value of the subject in the changeItems array = value of the subject in the changeItemProducts array, print all the sub-entries. If not, skip it (because it may not have any sub-entries yet in the db) and check the next entries.
Here's my Javascript code for it:
<logic:iterate id="changeItemProduct" name="changeItemProducts">
folCA = insFld(foldersTree, gFld("<bean:write name="changeItemProduct" property="productName" />", ""))
headCA = insDoc(folCA, gLnk("S", makeHeader("Title","#ccccc
c"), "",makeHeader("CR#","#cccc
cc"),makeH
eader("Dat
e Submitted","#cccccc"),make
Header("Ta
rget Date","#cccccc"),makeHeade
r("Phase",
"#cccccc")
))
headCA.iconSrc = ICONPATH + "ftv2blank.gif"
<logic:iterate id="changeItem" name="changeItems">
<logic:equal name="changeItem" property="productName" value="<bean:write name="changeItemProduct" property="productName" /> ">
insDoc(folCA, gLnk("S", "<bean:write name="changeItem" property="title" />", "/ADM/GetWorkOrders.do?cha
ngeItemNum
ber=<bean:
write name="changeItem" property="changeItemNumber
" />", "<bean:write name="changeItem" property="changeItemNumber
" />", "<bean:write name="changeItem" property="dateSubmitted" />", "<bean:write name="changeItem" property="targetDate" />", "<bean:write name="changeItem" property="phaseNumber" />"))
</logic:equal>
</logic:iterate>
</logic:iterate>
The error I get is: equal symbol expected
on this part of the code(at least I think it is this part of the code):
<logic:equal name="changeItem" property="productName" value="<bean:write name="changeItemProduct" property="productName" /> ">
I heard that nesting within a struts tag is not possible. Is there a way to do this? Thanks in advance!