| Author |
how to combine html:text and bean:write
|
surendar prabu
Ranch Hand
Joined: Jul 24, 2006
Posts: 102
|
|
My view is a jsp page which has a table whose fields are text boxes. each cell in the table is a text box. now i want present them with an initial value that i have retrieved from data base. can i have <html:text property="author" value= <bean:write id="" property=""> the bean tag is populated by a collection that is available in my actionform. my code is working with <input type=text value="<bean:write name='bookForm' property='author' />"> please tell me can i have the same with <html:text>
|
SCJP 1.4
|
 |
Shilpa Tendulkar
Ranch Hand
Joined: Jul 29, 2001
Posts: 75
|
|
Hi , if your form elements are associate with bean, then value of those elements will be populated directly. you dont have to specify the value. You just have to use: <html:form action="someaction" name="formbean"> <html:text property="propname"/> </html:form> [ August 18, 2006: Message edited by: Shilpa Tendulkar ]
|
SCJP5
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
|
In this situation, you would want to use "indexed properties". Here is a link explaining how indexed properties work. Also see this thread.
|
Merrill
Consultant, Sima Solutions
|
 |
surendar prabu
Ranch Hand
Joined: Jul 24, 2006
Posts: 102
|
|
Thanks Shilpa and merill. But, in this <html:form action="someaction" name="formbean"> <html:text property="propname"/> </html:form> the <html:form> tag does not have "name" attribute. this is resolved by the <logic:iterate name="formbean">
|
 |
 |
|
|
subject: how to combine html:text and bean:write
|
|
|