[richfaces-issues] [JBoss JIRA] Resolved: (RF-10327) tabPanel: can't change activeItem from outside the panel

Anton Belevich (JIRA) jira-events at lists.jboss.org
Thu Jan 27 10:46:04 EST 2011


     [ https://issues.jboss.org/browse/RF-10327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anton Belevich resolved RF-10327.
---------------------------------

    Resolution: Done


This issue is not a bug.

> tabPanel: can't change activeItem from outside the panel
> --------------------------------------------------------
>
>                 Key: RF-10327
>                 URL: https://issues.jboss.org/browse/RF-10327
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-panels-layout-themes
>    Affects Versions: 4.0.0.Milestone5
>            Reporter: Ilya Shaikovsky
>            Assignee: Anton Belevich
>             Fix For: 4.0.0.CR1
>
>
> Using the code below panel always "one step behind" the select. chaning first time - nothing, second time - first selection set and so on.. no js errors and nothing in log.
> Can't update the parent because of RF-10112
> 	<h:form>
> 		<a4j:region>
> 		<rich:panel style="width:500px">
> 			<h:selectOneRadio value="#{cityTabBean.city}"
> 				valueChangeListener="#{cityTabBean.changeCity}">
> 				<f:selectItem itemLabel="New York" itemValue="nyc" />
> 				<f:selectItem itemLabel="San Francisco" itemValue="sf" />
> 				<f:selectItem itemLabel="Los Angeles" itemValue="la" />
> 				<a4j:ajax event="change" render="cityTabs @this" />
> 			</h:selectOneRadio>
> 		</rich:panel>
> 		</a4j:region>
> 		<rich:panel style="width:500px" header="rich:tabPanel and rich:tab">
> 			<rich:tabPanel switchType="ajax" id="cityTabs"
> 				activeItem="#{cityTabBean.selectedTab}">
> 				<rich:tab header="New York City" name="nyc">
>                   Statue of Liberty
>               </rich:tab>
> 				<rich:tab header="San Francisco" name="sf">
>                   Golden Gate Bridge
>               </rich:tab> 
> 				<rich:tab header="Los Angeles" name="la">
>                   Hollywood
>               </rich:tab>
> 			</rich:tabPanel> 
> 		</rich:panel>
> 	</h:form>
> and 
> package org.richfaces.book.examples.tabpanel;
> import javax.faces.bean.ManagedBean;
> import javax.faces.bean.SessionScoped;
> import javax.faces.event.ValueChangeEvent;
> @ManagedBean
> @SessionScoped
> public class CityTabBean {
>     private String city = "sf";
>     private String selectedTab = "sf";
>     public void changeCity(ValueChangeEvent event) {
>         System.out.println("CityTabBean.changeCity()");
>         System.out.println(event.getNewValue());
>         selectedTab = city;
>     }
>     public String getCity() {
>         return city;
>     }
>     public void setCity(String city) {
>         this.city = city;
>     }
>     public String getSelectedTab() {
>         return selectedTab;
>     }
>     public void setSelectedTab(String selectedTab) {
>         this.selectedTab = selectedTab;
>     }
> }

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list