Wicket panel - call jQuery

2013-03-21 Thread mac
Hi,
I have a panel component containing
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel(s):

Java (my component constructor):
ListTab tabs = new ArrayList();
...
add( new AjaxTabbedPanel( menu, tabs ) );

HTML:
div id=menu
   div class=tab-row
  ...
   /div
   div class=tab-panel
  ...
   /div
   ...
/div

I need to add a css class to tab-row and tab-panel selectors (by jQuery
I suppouse). 
I tried calling 
response.render( JavaScriptHeaderItem.forScript( $(#menu 
.tab-row).addClass(myClass);, someId ) );
inside myComponent#renderHead but without any success.

Maybe my way is not correct? Thanks for any help.

mac



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-panel-call-jQuery-tp4657401.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket panel - call jQuery

2013-03-21 Thread Ernesto Reinaldo Barreiro
try with DomReadyHederItem to see if you get a different behavior.

On Thu, Mar 21, 2013 at 3:44 PM, mac gmaci...@gmail.com wrote:

 Hi,
 I have a panel component containing
 org.apache.wicket.extensions.markup.html.tabs.TabbedPanel(s):

 Java (my component constructor):
 ListTab tabs = new ArrayList();
 ...
 add( new AjaxTabbedPanel( menu, tabs ) );

 HTML:
 div id=menu
div class=tab-row
   ...
/div
div class=tab-panel
   ...
/div
...
 /div

 I need to add a css class to tab-row and tab-panel selectors (by jQuery
 I suppouse).
 I tried calling
 response.render( JavaScriptHeaderItem.forScript( $(#menu 
 .tab-row).addClass(myClass);, someId ) );
 inside myComponent#renderHead but without any success.

 Maybe my way is not correct? Thanks for any help.

 mac



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-panel-call-jQuery-tp4657401.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ http://antiliasoft.com/antilia


Re: Wicket panel - call jQuery

2013-03-21 Thread Jered Myers
I am not positive, but your selector appears wrong to me.  Try 
response.render( DomReadyHeaderItem.forScript( 
$(\#menu\).find(\.tab-row\).addClass(\myClass\);, someId ) );


On 03/21/2013 07:50 AM, Ernesto Reinaldo Barreiro wrote:

try with DomReadyHederItem to see if you get a different behavior.

On Thu, Mar 21, 2013 at 3:44 PM, mac gmaci...@gmail.com wrote:


Hi,
I have a panel component containing
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel(s):

Java (my component constructor):
ListTab tabs = new ArrayList();
...
add( new AjaxTabbedPanel( menu, tabs ) );

HTML:
div id=menu
div class=tab-row
   ...
/div
div class=tab-panel
   ...
/div
...
/div

I need to add a css class to tab-row and tab-panel selectors (by jQuery
I suppouse).
I tried calling
response.render( JavaScriptHeaderItem.forScript( $(#menu 
.tab-row).addClass(myClass);, someId ) );
inside myComponent#renderHead but without any success.

Maybe my way is not correct? Thanks for any help.

mac



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Wicket-panel-call-jQuery-tp4657401.html
Sent from the Users forum mailing list archive at Nabble.com.

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







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



Re: Wicket panel - call jQuery

2013-03-21 Thread mac
Thanks, it workes perfectly.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-panel-call-jQuery-tp4657401p4657404.html
Sent from the Users forum mailing list archive at Nabble.com.

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