Setting a user defined id for the fields in Dynaform

Community Driven Extensions Project
Posts: 20
Joined: 05 Aug 2010, 02:10

04 Nov 2012, 05:22

Thanks for your reply.

I am still not quite sure I can make sure of it in a Javascript to manipulate elements probably due to my lack of understanding of Javascript.

But after some experimenting, I figure a way to do what I think I wanted.
<pe:dynaFormControl type="input" for="txt">
<p:inputText widgetVar="#{data.widgetVar}" id="txt" value="#{data.value}" required="#{data.required}"/>

I added "widgetVar" so that I can refer this user defined variable in my pre-defined javascript to access the element I am interested in. Given the widgetVar I can get the namingContainer generated id and use the id to get the form element.

What do you think? Do you find any short fall in this approach? Could be a simpler way to do this but I am not strong in Javascript.


Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests