You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Davy Vermeir <co...@hotmail.com> on 2007/02/28 17:24:55 UTC

tabbedPane backing bean not updated with multiple tabs

Hi,

I'm having a page with 2 components: a "save" button and a tabbedPane with
serverSideTabSwitch set to "true".
The tabbedpane contains 2 tabs and in each tab there is an inputfield whose
value is linked to a backing bean.

If the user enters a value in the input field of the first tab, then clicks
the second tab, enters a value in the input field of the second tab and then
clicks the "save" button, only the value entered in the last chosen tab is
set in the backing bean (and thus saved)

Is there a solution for this problem , so that the information in all tabs
is set in the backing bean (and also validated) ?

A snippet of my JSP:
...
<h:form>
<h:commandButton action="#{testtabBean.save}" value="Save" />
</h:form>
<t:panelTabbedPane serverSideTabSwitch="true" >
	<t:panelTab id="tab1" label="Tab1">
		<h:inputText value="#{testtabBean.text1}"></h:inputText>
		
	</t:panelTab>
	<t:panelTab id="tab2" label="Tab2">
		<h:inputText value="#{testtabBean.text2}"></h:inputText>
	</t:panelTab>		
</t:panelTabbedPane>
...

My backing bean:

public class TestTabBean {
	
	private String text1;
	private String text2;
	
	public String getText1() {
		return text1;
	}
	public void setText1(String text1) {
		this.text1 = text1;
	}
	public String getText2() {
		return text2;
	}
	public void setText2(String text2) {
		this.text2 = text2;
	}
	public String save() {
		return null;
	}
}

I'm using myfaces 1.1.4 and tomahawk 1.1.5-snapshot. 

Greetings, 

Davy
-- 
View this message in context: http://www.nabble.com/tabbedPane-backing-bean-not-updated-with-multiple-tabs-tf3309951.html#a9207151
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: tabbedPane backing bean not updated with multiple tabs

Posted by lifer <ee...@detica.com>.
Has anyone come up with a solution for this issue yet?

Please help!
-- 
View this message in context: http://www.nabble.com/tabbedPane-backing-bean-not-updated-with-multiple-tabs-tp9207151p14738449.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Solved] tabbedPane backing bean not updated with multiple tabs

Posted by Davy Vermeir <co...@hotmail.com>.
Hi,

I'm still facing this problem. Somebody have a solution for it or an idea of
what i a doing wrong ?

Greetings
-- 
View this message in context: http://www.nabble.com/tabbedPane-backing-bean-not-updated-with-multiple-tabs-tf3309951.html#a9370008
Sent from the MyFaces - Users mailing list archive at Nabble.com.