+ Start a Discussion

tab panel tabs need to select, using inputtext given value

Hi developers,


                     Need help regarding tabpanel tabs need to select when we given input name of the tab in inputtext of vfpage. I found this code in community & i modified slightly as per inputtext tag.


if i gave onetab in textfield then firsttab need to select

if i gave secondtab name in textfield the second tab need to select ...............so on.



<apex:page controller="testTabController" sidebar="false" showheader="true">
 <p>tabInFocus: &lt;{!TabInFocus}&gt;</p> <apex:tabPanel switchType="client" value="{!TabInFocus}" id="testTabs">    <apex:tab label="onetab" name="oneTab" id="tab1" >   <p>This is number one</p>  </apex:tab>    <apex:tab label="twotab" name="twoTab" id="tab2" >   <p>This is number two</p>  </apex:tab>    <apex:tab label="threetab" name="threeTab" id="tab3" >   <p>This is number three</p>  </apex:tab>   </apex:tabPanel><apex:form> <apex:inputText value="{!name}">  <apex:actionSupport event="onchange" action="{!display1}"/>  </apex:inputText></apex:form></apex:page>




public class testTabController { String inputValue = System.currentPageReference().getParameters().get('tab'); public string name{set;get;} public boolean display_form{set;get;} public boolean text2{set;get;} public String getinputValue() {  return inputValue; } public void setinputValue( String s1 ) {  this.inputValue = s1; } String tabInFocus = System.currentPageReference().getParameters().get('tab'); public String getTabInFocus() {  return tabInFocus; } public void setTabInFocus( String s ) {  this.tabInFocus = s; } public void display1(){text2=true;display_form=true;



please give me suggestions or modify my code as per my requirement if needed to solve my issue.