There is a value attribute in the <html:hidden> tag
>From what I understand you have a form bean that has id and parentId
as properties.
You have a child object with an id property, and you have a parent
object with an id property.
So you could have
<html-el:hidden property="id" value="${CHILD_OBJECT.id}" />
and
<html-el:hidden property="parentId" value="${PARENT_OBJECT.id}" />
That is, you can do this if you use JSTL. You can do the same without
-el tags and with code snippets but I just don't even want to think
about those.
Denis
On Fri, 09 Jul 2004 12:06:36 -0400, FlyingElvi <[EMAIL PROTECTED]> wrote:
> Hi !
>
> I wanted to know if there was any direct way to use a input field
> getting the value from a request bean that has a different property name
> than the form bean.
>
> for example : Form Bean has 2 property id and parentId
>
> in my JSP page request I have 2 objects of the same type and I want to
> populate the input field with the Id of both objects.
>
> <html:hidden property="id" name="CHILD_OBJECT" /> // this works because
> my CHILD OBJECT has a method getId()
> <html:hidden property="parentId" name="PARENT_OBJECT" /> // this doesn't
> work because I need to call getId()
> // and not
> getParentId().
>
> So is there any way to get it directly without having to do something
> like this ?
> <bean:define id="parentId" name="PARENT_OBJECT" property="id"/>
> <html:hidden property="parentId" value="<%=parentId + ""%>" />
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]