You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Steve Torrefranca <st...@branders.com> on 2007/02/09 10:44:06 UTC

Prevent MyFaces to autogen _idxx

How do we prevent MyFaces(tomahawk 1.1.5-SNAP) from adding a _idXX in 
between the form name and field id?

Like this:
<t:commandButton id="submit" value="Submit" 
action="#{spendReportingBean.generateReport}" />

Will render:

<input *id**=**"_formPage:_id1031:submit"* name="_formPage:_id1031:submit" 
type="submit" value="Submit" onclick="if(typeof window.clearFormHiddenParams__formPage!
='undefined'){clearFormHiddenParams__formPage('_formPage');}if(typeof window.getScrolling!
='undefined'){oamSetHiddenInput('_formPage','autoScroll',getScrolling());}" />

Thank you

-- Steve

Re: Prevent MyFaces to autogen _idxx

Posted by Mick Knutson <mi...@gmail.com>.
You need to have your page and your form define an id then it will be

"my_page:my_form:my_textfield"

I use only the form myself like this:

<h:form id="registrationForm">

then an input field is generated like:

<input id="registrationForm:firstName"
name="registrationForm:firstName" type="text" value="" size="30" />




On 2/9/07, Andrew Robinson <an...@gmail.com> wrote:
>
> Make sure that you don't have any naming containers that don't have an
> ID assigned. "_id\d{1,}" patterns are generated for all components
> that aren't given an ID in the xhtml/jsp files.
>
> On 2/9/07, Steve Torrefranca <st...@branders.com> wrote:
> > How do we prevent MyFaces(tomahawk 1.1.5-SNAP) from adding a _idXX in
> > between the form name and field id?
> >
> > Like this:
> > <t:commandButton id="submit" value="Submit"
> > action="#{spendReportingBean.generateReport}" />
> >
> > Will render:
> >
> > <input *id**=**"_formPage:_id1031:submit"*
> name="_formPage:_id1031:submit"
> > type="submit" value="Submit" onclick="if(typeof
> window.clearFormHiddenParams__formPage!
> > ='undefined'){clearFormHiddenParams__formPage('_formPage');}if(typeof
> window.getScrolling!
> >
> ='undefined'){oamSetHiddenInput('_formPage','autoScroll',getScrolling());}"
> />
> >
> > Thank you
> >
> > -- Steve
> >
>



-- 
---
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com
---

Re: Prevent MyFaces to autogen _idxx

Posted by Andrew Robinson <an...@gmail.com>.
Make sure that you don't have any naming containers that don't have an
ID assigned. "_id\d{1,}" patterns are generated for all components
that aren't given an ID in the xhtml/jsp files.

On 2/9/07, Steve Torrefranca <st...@branders.com> wrote:
> How do we prevent MyFaces(tomahawk 1.1.5-SNAP) from adding a _idXX in
> between the form name and field id?
>
> Like this:
> <t:commandButton id="submit" value="Submit"
> action="#{spendReportingBean.generateReport}" />
>
> Will render:
>
> <input *id**=**"_formPage:_id1031:submit"* name="_formPage:_id1031:submit"
> type="submit" value="Submit" onclick="if(typeof window.clearFormHiddenParams__formPage!
> ='undefined'){clearFormHiddenParams__formPage('_formPage');}if(typeof window.getScrolling!
> ='undefined'){oamSetHiddenInput('_formPage','autoScroll',getScrolling());}" />
>
> Thank you
>
> -- Steve
>

Re: Prevent MyFaces to autogen _idxx

Posted by Steve Torrefranca <st...@branders.com>.
Werner Punz wrote:
> Steve Torrefranca schrieb:
>   
>> How do we prevent MyFaces(tomahawk 1.1.5-SNAP) from adding a _idXX in
>> between the form name and field id?
>>
>> Like this:
>> <t:commandButton id="submit" value="Submit"
>> action="#{spendReportingBean.generateReport}" />
>>
>> Will render:
>>
>> <input *id**=**"_formPage:_id1031:submit"*
>> name="_formPage:_id1031:submit" type="submit" value="Submit"
>> onclick="if(typeof window.clearFormHiddenParams__formPage!
>> ='undefined'){clearFormHiddenParams__formPage('_formPage');}if(typeof
>> window.getScrolling!
>> ='undefined'){oamSetHiddenInput('_formPage','autoScroll',getScrolling());}"
>> />
>>
>> Thank you
>>
>> -- Steve
>>
>>     
> forceid = true ;-)
>
>
>   
tnx man!

Re: Prevent MyFaces to autogen _idxx

Posted by Werner Punz <we...@gmail.com>.
Steve Torrefranca schrieb:
> How do we prevent MyFaces(tomahawk 1.1.5-SNAP) from adding a _idXX in
> between the form name and field id?
> 
> Like this:
> <t:commandButton id="submit" value="Submit"
> action="#{spendReportingBean.generateReport}" />
> 
> Will render:
> 
> <input *id**=**"_formPage:_id1031:submit"*
> name="_formPage:_id1031:submit" type="submit" value="Submit"
> onclick="if(typeof window.clearFormHiddenParams__formPage!
> ='undefined'){clearFormHiddenParams__formPage('_formPage');}if(typeof
> window.getScrolling!
> ='undefined'){oamSetHiddenInput('_formPage','autoScroll',getScrolling());}"
> />
> 
> Thank you
> 
> -- Steve
> 
forceid = true ;-)