myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Schneider <marc.schneide...@gmail.com>
Subject Re: Generation strategy of the j_id prefixes?
Date Tue, 09 Sep 2008 16:56:13 GMT
Hi,

Why don't you use a fixed id, like :
<h:commandButton id="updateButton" .../> ?

I use it for integration tests with Selenium and it works fine.

Marc.

Simon Lessard a écrit :
> Hi Felix,
> 
> I believe that it's controlled by the JSP 2.1 spec, but doesn't define
> the exact structure of the id. For instance, RI generates something like
> j_id__handler_XYZ. I'm really not an expert of that part of the
> specification so I may be wrong, but at least it gives you a place to
> start looking for an answer.
> 
> 
> Regards,
> 
> ~ Simon
> 
> On Tue, Sep 9, 2008 at 9:02 AM, <Felix.Becker@t-systems.com
> <mailto:Felix.Becker@t-systems.com>> wrote:
> 
>     Hi,
> 
>     i'm currently writing JMeter tests for a web frontend generated with
>     myfaces. I tried to identify the input fields, buttons and drop downs
>     via their html id attribute. For example the id of one of my input
>     fields was: j_id36:inputContentText. After redeploying the application
>     the id changed to j_id42 - and my JMeter script broke.
> 
>     In the same document the prefix of the id changes, too. So the id of an
>     input field at the beginning of the document begins with j_id36 and at
>     the end of the document the id of an button begins with j_id48:.
> 
>     How are this id's generated, is it possible to turn them off and is
>     there any spec which defines / explains the generation of this ids?
> 
>     Thank you,
> 
>     Felix Becker
> 
> 


Mime
View raw message