Custom DropDownChoice using HeaderItem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom DropDownChoice using HeaderItem

prasopes
Hi,
I'd like to have a DropDownChoice that gets transformed with Javascript on each rendering. The Javascript manipulates the option tags. Is it possible to achieve this using override of renderHead method?
I tried:
	@Override
	public void renderHead(IHeaderResponse response) {
		String js = getInitJavaScript();
		response.render(OnLoadHeaderItem.forScript(js));
	}
But when the Javascript gets called, the select has no options yet. Am I headed in a completely wrong direction?
Reply | Threaded
Open this post in threaded view
|

Re: Custom DropDownChoice using HeaderItem

Igor Vaynberg-2
use OnDomReadyHeaderItem

-igor

On Thu, Mar 21, 2013 at 10:16 AM, prasopes <[hidden email]> wrote:

> Hi,
> I'd like to have a DropDownChoice that gets transformed with Javascript on
> each rendering. The Javascript manipulates the option tags. Is it possible
> to achieve this using override of renderHead method?
> I tried:
>
> But when the Javascript gets called, the select has no options yet. Am I
> headed in a completely wrong direction?
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Custom-DropDownChoice-using-HeaderItem-tp4657418.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Custom DropDownChoice using HeaderItem

prasopes
That works perfectly, thank you!