Re: Generated IDs

2017-02-06 Thread Martin Grigorov
Hi,

See MarkupSettings#setMarkupIdGenerator().

The default ids are not that random. For a given scenario that starts with
a new session the ids will be the same.

On Feb 6, 2017 6:27 PM, "Bas Gooren"  wrote:

You can always register a component instantiation listener (or on before
render listener etc) in development mode, and let it set markups ids in any
way you want to provide stable ids.

E.g. a configure listener, which listens for Page instances and runs a
visitor over all it’s components to set the markup id according to some
algorithm.

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 6 februari 2017 bij 17:25:21, Entropy (blmulholl...@gmail.com) schreef:

Yes, but we have a whole lot of existing pages and fields and links and
buttons. I was kind of hoping I could just get wicket's generated IDs to be
stable from page run to page run, and avoid getting a work request approved
to go back and tweak every field.

--
View this message in context: http://apache-wicket.1842946.
n4.nabble.com/Generated-IDs-tp4677000p4677002.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


Re: Generated IDs

2017-02-06 Thread Bas Gooren
You can always register a component instantiation listener (or on before render 
listener etc) in development mode, and let it set markups ids in any way you 
want to provide stable ids.

E.g. a configure listener, which listens for Page instances and runs a visitor 
over all it’s components to set the markup id according to some algorithm.

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 6 februari 2017 bij 17:25:21, Entropy (blmulholl...@gmail.com) schreef:

Yes, but we have a whole lot of existing pages and fields and links and  
buttons. I was kind of hoping I could just get wicket's generated IDs to be  
stable from page run to page run, and avoid getting a work request approved  
to go back and tweak every field.  

--  
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generated-IDs-tp4677000p4677002.html 
 
Sent from the Users forum mailing list archive at Nabble.com.  

-  
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org  
For additional commands, e-mail: users-h...@wicket.apache.org  



Re: Generated IDs

2017-02-06 Thread Entropy
Yes, but we have a whole lot of existing pages and fields and links and
buttons.  I was kind of hoping I could just get wicket's generated IDs to be
stable from page run to page run, and avoid getting a work request approved
to go back and tweak every field.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generated-IDs-tp4677000p4677002.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Generated IDs

2017-02-06 Thread Sebastien
Hi,

You can also set the html id directly if you don't need it to be
automatically generated
ie: div wicket:id="myId" id="myId"

Hope this helps,
Sebastien.


On Mon, Feb 6, 2017 at 4:58 PM, Entropy  wrote:

> Our test team wants to run selenium scripts against our pages, and wants
> stable IDs to go against.  Wicket tends to generate random, and most
> annoyingly, inconsistent ones that change with each run of the page.
>
> Obviously, we can setMarkupId on every component manually, but I was
> wondering if there is a way to get Wicket to generate Ids in a way that is
> more predictable, so that 1000 runs of the same page with the same code
> will
> always produce the same IDs, even if they are generated IDs?
>
> Like maybe some setting or overriding some class?
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Generated-IDs-tp4677000.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Generated IDs

2017-02-06 Thread Entropy
Our test team wants to run selenium scripts against our pages, and wants
stable IDs to go against.  Wicket tends to generate random, and most
annoyingly, inconsistent ones that change with each run of the page.

Obviously, we can setMarkupId on every component manually, but I was
wondering if there is a way to get Wicket to generate Ids in a way that is
more predictable, so that 1000 runs of the same page with the same code will
always produce the same IDs, even if they are generated IDs?

Like maybe some setting or overriding some class?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generated-IDs-tp4677000.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org