struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Riedling, Michael" <Michael.Riedl...@ids.de>
Subject <logic:match> How to compare a Bean with a request parameter?
Date Thu, 02 Dec 2004 15:24:22 GMT
hello

I have a problem with my website navigation logic. There are rootnodes and nodes, when rootnodes
is klicked it should appear all the nodes under the specific rootnode in the menu.
i have two Beans, one for rootnodes and one for nodes. The parameter nodeId specifics the
rootnode.

i have implemented it so far:

<logic:present name="rootNodes" scope="session">
    <FONT face="arial" SIZE=2 color="black"><b><bean:message key="header.nodes"
/></b>:<br><br></font>
    <logic:iterate id="element" name="rootNodes" scope="session">
        <html:link styleClass="subnav" page="/view.do" paramId="nodeId" paramName="element"
paramProperty="nodeName">
            <li><bean:write name="element" property="nodeName" /><br>
            

		<logic:match name="element" property="nodeName" value="Hauptkategorie2">
			<logic:present name="nodes" scope="session">
				<logic:iterate id="element" name="nodes" scope="session">
					<html:link styleClass="subnav" page="/view.do" paramId="nodeId" paramName="element"
paramProperty="nodeName">
						<bean:write name="element" property="nodeName" /><br>
	             			</html:link>
				</logic:iterate>
			</logic:present>
		</logic:match>


        </html:link>
    </logic:iterate>
</logic:present>

My question is about the <logic:match> tag:
I want to compare the parameter "nodeId" with the iterated property of the Bean to show only
the subnodes of the requested rootnode! How can i do that?

It seems that i can only compare a constant value with the property of the bean (at the moment
i manually compare the value "Hauptkategorie2" with the beanproperty for testing).

Please ask me if my problem was explained not clear enough ;)


Thanks in advance

Michael Riedling

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message