You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Allen Walker <aw...@mail.utexas.net> on 2001/03/22 08:43:30 UTC

<html:form action="/updateTotal">
<logic:iterate id="item" name="cart" property="items" scope="session">

ISBN: <bean:write name="item" property="isbn" filter="true"/>
<html:link page="/addItem.do" paramName="item" paramProperty="isbn">
<img src="images/trashCan.gif" width="18" height="26">
</html:link>

</logic:iterate>
</html:form>

-----------
Ok, the line: <bean:write name="item" property="isbn" filter="true"/> works 
fine, displays the value, but the line:

<html:link page="/addItem.do" paramName="item" paramProperty="isbn">

Doesnt add the isbn parameter, it renders it only as:
http://localhost:8080/test/addItem.do , I want it to render it as something 
like

http://localhost:8080/test/addItem.do?isbn="0000"

Thanks for any help.
-allen-


Re:

Posted by Jean-Noel Ribette <je...@improve.fr>.
Allen,

you need to specify the paramId attribute (paramId is the name of the parameter added to the link, paramName and
paramProperty are used to get the parameter value)

The correct tag is:

<html:link page="/addItem.do" paramId="isbn" paramName="item" paramProperty="isbn">
...
</html:link>

Jean-Noel

----- Original Message -----
From: Allen Walker <aw...@mail.utexas.net>
To: <st...@jakarta.apache.org>
Sent: Thursday, March 22, 2001 7:43 AM
Subject: <html:link>


> <html:form action="/updateTotal">
> <logic:iterate id="item" name="cart" property="items" scope="session">
>
> ISBN: <bean:write name="item" property="isbn" filter="true"/>
> <html:link page="/addItem.do" paramName="item" paramProperty="isbn">
> <img src="images/trashCan.gif" width="18" height="26">
> </html:link>
>
> </logic:iterate>
> </html:form>
>
> -----------
> Ok, the line: <bean:write name="item" property="isbn" filter="true"/> works
> fine, displays the value, but the line:
>
> <html:link page="/addItem.do" paramName="item" paramProperty="isbn">
>
> Doesnt add the isbn parameter, it renders it only as:
> http://localhost:8080/test/addItem.do , I want it to render it as something
> like
>
> http://localhost:8080/test/addItem.do?isbn="0000"
>
> Thanks for any help.
> -allen-
>
>