in struts how do you set the id property for html:hidden
Asked Answered
S

1

5

I want to put a hidden input onto my html form and am doing so with the following struts tag:

<html:hidden property="currentPage" value="page1"></html:hidden>

which renders this html:

<input type="hidden" value="page1" name="currentPage">

How do I set the id property on the html element? So I want the html to be rendered like:

<input type="hidden" value="page1" name="currentPage" id="currentPage">
Sheatfish answered 14/7, 2011 at 0:58 Comment(0)
P
7

Try this:

<html:hidden property="currentPage" value="page1" styleId="currentPage"></html:hidden>
Pandich answered 14/7, 2011 at 1:20 Comment(2)
In the end I couldn't get this working. Are you sure this works ?Sheatfish
Works for me.. the styleId will be converted to HTML id attributeRemembrancer

© 2022 - 2024 — McMap. All rights reserved.