You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Wei, Mei" <Me...@isd.sccgov.org> on 2008/01/26 08:02:20 UTC

how to make ajax validation works with s:tabbedPanel in struts 2.0.11

Hi,

I would like to make a page has ajax validation and also display as
tabbedPanel.

 

I am using struts 2.0.11, and learned from 

http://java-x.blogspot.com/2006/11/struts-2-validation.html

that to use ajax validation, in the jsp file, I can not have <s:head
theme="ajax"/>.

 

But to display tabbedPanel, I need to have <s:head theme="ajax"/> in the
jsp.

 

So I can not make tabbedPanel and ajax validation work on one page.

 

Does anyone have any experience about this?

 

Any help are appreciated.

 

Thanks,

Mei


RE: how to make ajax validation works with s:tabbedPanel in struts 2.0.11

Posted by "Wei, Mei" <Me...@isd.sccgov.org>.
Is there anyway to work around this bug for now?

Thanks,
Mei

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Sunday, January 27, 2008 8:25 AM
To: Struts Users Mailing List
Subject: Re: how to make ajax validation works with s:tabbedPanel in
struts 2.0.11

appears to be a bug in s:component not loading the
/template/${theme}/tabbedpanel:ftl

Anyone else?
M-
----- Original Message -----
From: "Wei, Mei" <Me...@isd.sccgov.org>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Sunday, January 27, 2008 1:10 AM
Subject: RE: how to make ajax validation works with s:tabbedPanel in
struts
2.0.11


Yes, I have theme='ajax' set for each href.
Below is my sample code, the problem is when the save button is clicked,
it does not go to the "success" page. If I take out <s:head
theme="ajax"/>, then it will go, but does not display as tabbedPanel any
more.
What can I do to make these two works together?

<%@ taglib prefix="s" uri="/struts-tags"%>

<s:head theme="ajax"/>

<s:tabbedPanel id="test2" theme="ajax">
<s:div id="left" label="%{getText('persondata.title')}"
theme="ajax">

<p><s:text name="persondata.title" /></p>
<s:form action="save" validate="true" theme="ajax">
<s:textfield id="id" name="person.id"
cssStyle="display:none" />

<s:textfield id="firstName"
label="%{getText('person.firstName')}"
name="person.firstName" />

<s:textfield id="lastName"
label="%{getText('person.lastName')}"
name="person.lastName" />
<s:textfield id="address"
label="%{getText('address')}"
name="address" />
<s:submit value="%{getText('save')}" />
</s:form>
</s:div>

<s:div id="middle" label="test2" theme="ajax">
                           I'm the other Tab!!!
    </s:div>

</s:tabbedPanel>

Thanks,
Mei
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Saturday, January 26, 2008 8:26 AM
To: Struts Users Mailing List
Subject: Re: how to make ajax validation works with s:tabbedPanel in
struts 2.0.11

http://struts.apache.org/2.x/docs/tabbedpanel.html
assuming your theme='ajax' be sure to set the href attribute for the
individual div tags for content from a valid URL

Martin
----- Original Message -----
From: "Wei, Mei" <Me...@isd.sccgov.org>
To: <us...@struts.apache.org>
Sent: Saturday, January 26, 2008 2:02 AM
Subject: how to make ajax validation works with s:tabbedPanel in struts
2.0.11


Hi,

I would like to make a page has ajax validation and also display as
tabbedPanel.



I am using struts 2.0.11, and learned from

http://java-x.blogspot.com/2006/11/struts-2-validation.html

that to use ajax validation, in the jsp file, I can not have <s:head
theme="ajax"/>.



But to display tabbedPanel, I need to have <s:head theme="ajax"/> in the
jsp.



So I can not make tabbedPanel and ajax validation work on one page.



Does anyone have any experience about this?



Any help are appreciated.



Thanks,

Mei



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to make ajax validation works with s:tabbedPanel in struts 2.0.11

Posted by Martin Gainty <mg...@hotmail.com>.
appears to be a bug in s:component not loading the
/template/${theme}/tabbedpanel:ftl

Anyone else?
M-
----- Original Message -----
From: "Wei, Mei" <Me...@isd.sccgov.org>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Sunday, January 27, 2008 1:10 AM
Subject: RE: how to make ajax validation works with s:tabbedPanel in struts
2.0.11


Yes, I have theme='ajax' set for each href.
Below is my sample code, the problem is when the save button is clicked,
it does not go to the "success" page. If I take out <s:head
theme="ajax"/>, then it will go, but does not display as tabbedPanel any
more.
What can I do to make these two works together?

<%@ taglib prefix="s" uri="/struts-tags"%>

<s:head theme="ajax"/>

<s:tabbedPanel id="test2" theme="ajax">
<s:div id="left" label="%{getText('persondata.title')}"
theme="ajax">

<p><s:text name="persondata.title" /></p>
<s:form action="save" validate="true" theme="ajax">
<s:textfield id="id" name="person.id"
cssStyle="display:none" />

<s:textfield id="firstName"
label="%{getText('person.firstName')}"
name="person.firstName" />

<s:textfield id="lastName"
label="%{getText('person.lastName')}"
name="person.lastName" />
<s:textfield id="address"
label="%{getText('address')}"
name="address" />
<s:submit value="%{getText('save')}" />
</s:form>
</s:div>

<s:div id="middle" label="test2" theme="ajax">
                           I'm the other Tab!!!
    </s:div>

</s:tabbedPanel>

Thanks,
Mei
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Saturday, January 26, 2008 8:26 AM
To: Struts Users Mailing List
Subject: Re: how to make ajax validation works with s:tabbedPanel in
struts 2.0.11

http://struts.apache.org/2.x/docs/tabbedpanel.html
assuming your theme='ajax' be sure to set the href attribute for the
individual div tags for content from a valid URL

Martin
----- Original Message -----
From: "Wei, Mei" <Me...@isd.sccgov.org>
To: <us...@struts.apache.org>
Sent: Saturday, January 26, 2008 2:02 AM
Subject: how to make ajax validation works with s:tabbedPanel in struts
2.0.11


Hi,

I would like to make a page has ajax validation and also display as
tabbedPanel.



I am using struts 2.0.11, and learned from

http://java-x.blogspot.com/2006/11/struts-2-validation.html

that to use ajax validation, in the jsp file, I can not have <s:head
theme="ajax"/>.



But to display tabbedPanel, I need to have <s:head theme="ajax"/> in the
jsp.



So I can not make tabbedPanel and ajax validation work on one page.



Does anyone have any experience about this?



Any help are appreciated.



Thanks,

Mei



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: how to make ajax validation works with s:tabbedPanel in struts 2.0.11

Posted by "Wei, Mei" <Me...@isd.sccgov.org>.
Yes, I have theme='ajax' set for each href.
Below is my sample code, the problem is when the save button is clicked,
it does not go to the "success" page. If I take out <s:head
theme="ajax"/>, then it will go, but does not display as tabbedPanel any
more.
What can I do to make these two works together?

<%@ taglib prefix="s" uri="/struts-tags"%>

<s:head theme="ajax"/>

<s:tabbedPanel id="test2" theme="ajax">
	<s:div id="left" label="%{getText('persondata.title')}"
theme="ajax">

		<p><s:text name="persondata.title" /></p>
		<s:form action="save" validate="true" theme="ajax">
			<s:textfield id="id" name="person.id"
cssStyle="display:none" />

			<s:textfield id="firstName"
label="%{getText('person.firstName')}"
				name="person.firstName" />

			<s:textfield id="lastName"
label="%{getText('person.lastName')}"
				name="person.lastName" />
			<s:textfield id="address"
label="%{getText('address')}"
				name="address" />
			<s:submit value="%{getText('save')}" />
		</s:form>
	</s:div>

	<s:div id="middle" label="test2" theme="ajax">
                           I'm the other Tab!!!
    </s:div>

</s:tabbedPanel>

Thanks,
Mei
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Saturday, January 26, 2008 8:26 AM
To: Struts Users Mailing List
Subject: Re: how to make ajax validation works with s:tabbedPanel in
struts 2.0.11

http://struts.apache.org/2.x/docs/tabbedpanel.html
assuming your theme='ajax' be sure to set the href attribute for the
individual div tags for content from a valid URL

Martin
----- Original Message -----
From: "Wei, Mei" <Me...@isd.sccgov.org>
To: <us...@struts.apache.org>
Sent: Saturday, January 26, 2008 2:02 AM
Subject: how to make ajax validation works with s:tabbedPanel in struts
2.0.11


Hi,

I would like to make a page has ajax validation and also display as
tabbedPanel.



I am using struts 2.0.11, and learned from

http://java-x.blogspot.com/2006/11/struts-2-validation.html

that to use ajax validation, in the jsp file, I can not have <s:head
theme="ajax"/>.



But to display tabbedPanel, I need to have <s:head theme="ajax"/> in the
jsp.



So I can not make tabbedPanel and ajax validation work on one page.



Does anyone have any experience about this?



Any help are appreciated.



Thanks,

Mei



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to make ajax validation works with s:tabbedPanel in struts 2.0.11

Posted by Martin Gainty <mg...@hotmail.com>.
http://struts.apache.org/2.x/docs/tabbedpanel.html
assuming your theme='ajax' be sure to set the href attribute for the
individual div tags for content from a valid URL

Martin
----- Original Message -----
From: "Wei, Mei" <Me...@isd.sccgov.org>
To: <us...@struts.apache.org>
Sent: Saturday, January 26, 2008 2:02 AM
Subject: how to make ajax validation works with s:tabbedPanel in struts
2.0.11


Hi,

I would like to make a page has ajax validation and also display as
tabbedPanel.



I am using struts 2.0.11, and learned from

http://java-x.blogspot.com/2006/11/struts-2-validation.html

that to use ajax validation, in the jsp file, I can not have <s:head
theme="ajax"/>.



But to display tabbedPanel, I need to have <s:head theme="ajax"/> in the
jsp.



So I can not make tabbedPanel and ajax validation work on one page.



Does anyone have any experience about this?



Any help are appreciated.



Thanks,

Mei



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org