You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by nino martinez wael <ni...@gmail.com> on 2009/05/03 10:46:58 UTC

Get tag type?

Hi

How do I get the underlying tag type of a component (the tag the
component are bound to)..

For example

<div wicket:id="mycomponent"></div>

I want to pickup "div"...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Get tag type?

Posted by nino martinez wael <ni...@gmail.com>.
So no way to make this a little more pretty?:

	public void onRendered(final Component component) {
		super.onRendered(component);
		HeaderResponse headerResponse=new HeaderResponse(){
		
			@Override
			protected Response getRealResponse() {
				return component.getResponse();
			}
		};
		headerResponse.renderOnDomReadyJavascript(getNiftyJS(tagName));
	}

What I had before was essentially this:

	@Override
	public void renderHead(IHeaderResponse response) {
		response.renderOnLoadJavascript(getNiftyJS(tagName));
}




2009/5/4 nino martinez wael <ni...@gmail.com>:
> Ohh ok thanks :)
>
> My memory are rusty:) I've done this before :)
>
>
> 2009/5/3 Johan Compagner <jc...@gmail.com>:
>> You only can know then when it is getting rendered so not before.
>>
>> So for example the onComponentTag methods of component/behavior
>>
>> On 03/05/2009, nino martinez wael <ni...@gmail.com> wrote:
>>> Hi
>>>
>>> How do I get the underlying tag type of a component (the tag the
>>> component are bound to)..
>>>
>>> For example
>>>
>>> <div wicket:id="mycomponent"></div>
>>>
>>> I want to pickup "div"...
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Get tag type?

Posted by nino martinez wael <ni...@gmail.com>.
Ohh ok thanks :)

My memory are rusty:) I've done this before :)


2009/5/3 Johan Compagner <jc...@gmail.com>:
> You only can know then when it is getting rendered so not before.
>
> So for example the onComponentTag methods of component/behavior
>
> On 03/05/2009, nino martinez wael <ni...@gmail.com> wrote:
>> Hi
>>
>> How do I get the underlying tag type of a component (the tag the
>> component are bound to)..
>>
>> For example
>>
>> <div wicket:id="mycomponent"></div>
>>
>> I want to pickup "div"...
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Get tag type?

Posted by Johan Compagner <jc...@gmail.com>.
You only can know then when it is getting rendered so not before.

So for example the onComponentTag methods of component/behavior

On 03/05/2009, nino martinez wael <ni...@gmail.com> wrote:
> Hi
>
> How do I get the underlying tag type of a component (the tag the
> component are bound to)..
>
> For example
>
> <div wicket:id="mycomponent"></div>
>
> I want to pickup "div"...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org