Re: [Wicket-user] Overriding ID attributes

2007-07-19 Thread Johan Compagner
i just always overwrite getMarkupId()

but a setter is also fine to have. We store it anyway.

johan

On 7/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> On 7/18/07, mperham <[EMAIL PROTECTED]> wrote:
> >
> >
> > 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:
> >
> > 
> > Business
> > Service
> > 
> > 
> >   
> > Choose One
> > http://www.test-sdk/sdkl#Fetch_COB";>Fetch
> COB
> > http://www.test-sdk/sdkl#Status_Visibility";>Status
> > Visibility
> > http://www.test-sdk/sdkl#Claims_Submission";>Claims
> > Submission
> >   
> > 
> >
> > 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?
>
>
> not right now, but creating setMarkupId() wont be very difficult. please
> add
> a jira request.
>
> -igor
>
>
> mike
> > --
> > View this message in context:
> > http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675275
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding ID attributes

2007-07-18 Thread Igor Vaynberg
i dont remember how similar the markup id handling code is between the two
versions, but all i did was add this:

/**
 * Sets this component's markup id to a user defined value. It is up to
the
 * user to ensure this value is unique.
 * 
 * The recommended way is to let wicket generate the value
automatically,
 * this method is here to serve as an override for that value in cases
where
 * a specific id must be used.
 * 
 * If null is passed in the user defined value is cleared and markup id
 * value will fall back on automatically generated value
 *
 * @see #getMarkupId()
 *
 * @param markupId
 *markup id value or null to clear any previous user defined
 *value
 */
public void setMarkupId(String markupId)
{
if (markupId != null && Strings.isEmpty(markupId))
{
throw new IllegalArgumentException("Markup id cannot be an empty
string");
}
setMetaData(MARKUP_ID_KEY, markupId);

}


-igor


On 7/18/07, mperham <[EMAIL PROTECTED]> wrote:
>
>
> Igor, could you please attach a diff of your impl to WICKET-766?  I'm
> going
> to need to backport it to our private fork of 1.2.6.
>
> mike
>
>
> igor.vaynberg wrote:
> >
> >>
> >> 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?
> >
> >
> > not right now, but creating setMarkupId() wont be very difficult. please
> > add
> > a jira request.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675528
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding ID attributes

2007-07-18 Thread mperham

Igor, could you please attach a diff of your impl to WICKET-766?  I'm going
to need to backport it to our private fork of 1.2.6.

mike


igor.vaynberg wrote:
> 
>>
>> 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?
> 
> 
> not right now, but creating setMarkupId() wont be very difficult. please
> add
> a jira request.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675528
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding ID attributes

2007-07-18 Thread Igor Vaynberg
On 7/18/07, mperham <[EMAIL PROTECTED]> wrote:
>
>
> 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:
>
> 
> Business
> Service
> 
> 
>   
> Choose One
> http://www.test-sdk/sdkl#Fetch_COB";>Fetch COB
> http://www.test-sdk/sdkl#Status_Visibility";>Status
> Visibility
> http://www.test-sdk/sdkl#Claims_Submission";>Claims
> Submission
>   
> 
>
> 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?


not right now, but creating setMarkupId() wont be very difficult. please add
a jira request.

-igor


mike
> --
> View this message in context:
> http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675275
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Overriding ID attributes

2007-07-18 Thread mperham

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:


Business Service


  
Choose One
http://www.test-sdk/sdkl#Fetch_COB";>Fetch COB
http://www.test-sdk/sdkl#Status_Visibility";>Status
Visibility
http://www.test-sdk/sdkl#Claims_Submission";>Claims
Submission
  


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?

mike
-- 
View this message in context: 
http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675275
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user