Re: [Wicket-user] How to set a markup ID of a HTML element to javascript

2007-01-28 Thread Carfield Yim
Thanks, just try it today, I have code like: dateField.setOutputMarkupId(true); final String javascript=Calendar.setup({ inputField : \+dateField.getMarkupId()+\, ifFormat : \%d-%b-%Y %H:%M\, button : \trigger\ });; However, the ID generated at input field is

Re: [Wicket-user] How to set a markup ID of a HTML element to javascript

2007-01-28 Thread Igor Vaynberg
in 1.x you cannot call getmarkupid() from the constructor, so you have to use an attribute modifier with imodel to retrieve the id during render time once all the components have been linked to their parents -igor On 1/28/07, Carfield Yim [EMAIL PROTECTED] wrote: Thanks, just try it today, I

Re: [Wicket-user] How to set a markup ID of a HTML element to javascript

2007-01-28 Thread Carfield Yim
Thanks, this work nice On 1/29/07, Igor Vaynberg [EMAIL PROTECTED] wrote: in 1.x you cannot call getmarkupid() from the constructor, so you have to use an attribute modifier with imodel to retrieve the id during render time once all the components have been linked to their parents -igor

[Wicket-user] How to set a markup ID of a HTML element to javascript

2007-01-26 Thread Carfield Yim
I found a datetime picket with is more suitable for my application and I would like to integrate that javascript to my application. I can get the markup id using getMarkId() method of Component. However I don't know how to press it to that javascript. I have talk of look of

Re: [Wicket-user] How to set a markup ID of a HTML element to javascript

2007-01-26 Thread Timo Rantalaiho
On Fri, 26 Jan 2007, Carfield Yim wrote: I found a datetime picket with is more suitable for my application and I would like to integrate that javascript to my application. I can get the markup id using getMarkId() method of Component. However I don't know how to press it to that javascript.

Re: [Wicket-user] How to set a markup ID of a HTML element to javascript

2007-01-26 Thread Carfield Yim
1) Why don't just just set the markup id in your markup? input id=timeField wicket:id=startTime ... Then you can access it normally with JavaScript. Wicket will honour HTML ids set in the HTML template. Because that component will use mulitple time in same page, if I do so that the ID

Re: [Wicket-user] How to set a markup ID of a HTML element to javascript

2007-01-26 Thread Timo Rantalaiho
On Fri, 26 Jan 2007, Carfield Yim wrote: Because that component will use mulitple time in same page, if I do so that the ID will be confilct each other How do you use the JavaScript component in your own code? Is this an example? input type=text wicket:id=date_textfield

Re: [Wicket-user] How to set a markup ID of a HTML element to javascript

2007-01-26 Thread Konstantinos Lazouras
- Original Message From: Carfield Yim [EMAIL PROTECTED] To: wicket-user@lists.sourceforge.net Sent: Friday, January 26, 2007 12:01:05 PM Subject: Re: [Wicket-user] How to set a markup ID of a HTML element to javascript 1) Why don't just just set the markup id in your markup?

Re: [Wicket-user] How to set a markup ID of a HTML element to javascript

2007-01-26 Thread Igor Vaynberg
Component c=... String javascript=calendar blah=new calendar(`+c.getmarkupid()+'`);...) new label(script, javascript).setescapemodelstrings(false); script wicket:id=script/script is the easiest way for very simple javascript stings there is also PackagedTextTemplate for more complex stings