I was playing with jwebunit and saw that Juergen had to copy an entire class to wicket-examples to be able to test with it. I was just wondering, no serious need to replace actually.

In meantime, htmlunit treats wicket:id as id, and if they both exists in the same tag, he uses id. So, with htmlunit I use

        HtmlSubmitInput submit = (HtmlSubmitInput) _page.getHtmlElementById("actionButton");
        assertEquals("Save", submit.getValueAttribute());

for the corresponding tag

        <input wicket:id="actionButton" type="submit" value="Some label"/>

and I don't have to repeat the 'actionButton' in id attribute, that's why I made the question. The matter with htmlunit is that is a lot more verbose.

2005/10/11, Martijn Dashorst <[EMAIL PROTECTED]>:
You don't have to do anything with the html id if you wish. You are completely free to do anything you want with it: forget it (best option), or assign a value (should be unique across the whole document in order to validate against HTML 4 and or xhtml). Wicket doesn't require it.


Martijn


On 10/11/05, Eduardo Rocha <[EMAIL PROTECTED] > wrote:
I was wondering if I didn't need to repeat the same name in wicket:id and id.

2005/10/11, Martijn Dashorst < [EMAIL PROTECTED] >:
Why would you want to do this?

The nature of the wicket:id xml tag is such that it is not a great candidate for a HTML id. A html id is very handy for selecting in CSS, and you don't want version numbering in there.

Martijn



On 10/11/05, Eduardo Rocha <[EMAIL PROTECTED] > wrote:
Is there an easy way of replacing 'wicket:id' with 'id' instead of strip all the 'wicket:id'?




Reply via email to