Nondescripthandle
Programmer
I'm trying to build a section of a page which is a bit like an explorer, although just a list of child "nodes" that can be opened by clicking on the link. I've figured out how to get all my Node objects into a Hashmap, and iterate through them using logic:iterate. Where the problem arises is that for each node, the link is the same, i.e. same arguments for each link, but not necessarily the same each time, but each one has a final argument called 'path' which is different for each link in the list.
The html:link tag allows one to insert a single argument or many, but in the case of many, you have to pack them into a hashmap first, and the two don't work together (i.e. if I put all the common arguments into a hashmap, but put the differeing one into paramId, paramName, it will only pick up the latter, and the rest will be dropped.
I also noted that you can't stick <%=jspvalue%> tags into struts attributes. If you can, can somebody give me the correct syntax?
Ideally, I want to do something where I have a HashMap of child nodes called childNodes in the request, also a Hashmap with the common attributes and I do something like:
<logic:iterate id="subnodes" indexId="idx" name="childNodes" scope="request">
<bean:define id="subnode" name="subnodes" property="value"/>
<html:link page="/main.do" map="commonAttrs
paramId="path" paramName="subnode" property="path">
</html:link>
</logic:iterate>
Obviously this on its own won't work, but you get the idea.
Cheers
-Hugh
The html:link tag allows one to insert a single argument or many, but in the case of many, you have to pack them into a hashmap first, and the two don't work together (i.e. if I put all the common arguments into a hashmap, but put the differeing one into paramId, paramName, it will only pick up the latter, and the rest will be dropped.
I also noted that you can't stick <%=jspvalue%> tags into struts attributes. If you can, can somebody give me the correct syntax?
Ideally, I want to do something where I have a HashMap of child nodes called childNodes in the request, also a Hashmap with the common attributes and I do something like:
<logic:iterate id="subnodes" indexId="idx" name="childNodes" scope="request">
<bean:define id="subnode" name="subnodes" property="value"/>
<html:link page="/main.do" map="commonAttrs
paramId="path" paramName="subnode" property="path">
</html:link>
</logic:iterate>
Obviously this on its own won't work, but you get the idea.
Cheers
-Hugh