Hallo All
I am new to CAF and working in portlet development.
I am using the Toogle tabs control.
Triyng to get the id of the selected tab
How can i get the generated id of the contorl in CAF.
thank you in advance
kothapalle
Hallo All
I am new to CAF and working in portlet development.
I am using the Toogle tabs control.
Triyng to get the id of the selected tab
How can i get the generated id of the contorl in CAF.
thank you in advance
kothapalle
Are you trying to get the selected tab on the client-side with javascript running in the browser? Or are you trying to get the selected tab on the server-side from custom java code?
Hey,
I add a sample project that I made, I hopes that will help you.
Best regards
Ismael
toggleTab_sample.zip (15.2 KB)
Hallo all
Thank you for the help.
I was trying to get the client id of the selected tab in the javascript.I imlemented it by iterating the tablist.
regards
kothapalle
Ok. For javascript, the client-side model for the tab control has a ‘selected()’ method that would return the selected tab.
The javascript snippet would look something like this:
var m = CAF.model('#{caf:cid("tab_control_id_here")}');
var selectedTabModel = m.selected()[0]; //first entry in selected array
var selectedTabValue = selectedTabModel.getValue();