[ 
https://issues.apache.org/jira/browse/WICKET-766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg resolved WICKET-766.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-beta3

> Allowing overriding of wicket's generated ID
> --------------------------------------------
>
>                 Key: WICKET-766
>                 URL: https://issues.apache.org/jira/browse/WICKET-766
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.2.6
>            Reporter: Mike Perham
>             Fix For: 1.3.0-beta3
>
>
> http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675410
> We are migrating our existing application from UI framework XXX to Wicket and 
> we have a boatload of UI automated tests which depend on the ID attribute of 
> our form inputs to drive the tests.  I'm trying to figure out how to get 
> Wicket to use the exact same IDs when it generates the HTML as with our old 
> system.  Here's an example of the generated HTML where I have a DropDown 
> within a Form:
> <td class="label">
>     <div><label for="form_selBusinessService">Business Service</label></div>
> </td>
> <td class="input">
>   <select name="selBusinessService" id="form_selBusinessService">
>     <option selected="selected" value="">Choose One</option>
>     <option value="http://www.test-sdk/sdkl#Fetch_COB";>Fetch COB</option>
>     <option value="http://www.test-sdk/sdkl#Status_Visibility";>Status 
> Visibility</option>
>     <option value="http://www.test-sdk/sdkl#Claims_Submission";>Claims 
> Submission</option>
>   </select>
> </td>
> Now the actual ID of the select should be "selBusinessService" and that's the 
> wicket:id of the component in Java but Wicket prepends the component 
> hierarchy, I guess, when auto-generating the id attribute in HTML.  Now I can 
> use an AttributeModifier to adjust the value of the ID but the 
> SimpleFormComponentLabel does NOT reflect that change in the for attribute.
> Is it possible to do this?  Can I completely override Wicket's ID handling 
> and just have it use my specified ID?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to