You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by cree <vi...@oswego.edu> on 2008/04/23 21:39:58 UTC
Submitting to a div on a tabbedPanel
I have been laboring over this pretty much all day and have not come up with
any sort of solution heres my situation.
I have two JSPs. One contains the main tabbed panel with any number of divs
as tabs. One tab references an href like:
<s:div id="tabTwo" theme="ajax" label="Tab Two" href="someAction.action"/>
The someAction.action will point to another JSP. This one contains an
<s:form> that submits an action with its form data.
So this next jsp looks like
<s:form action="processAction" theme="ajax" >
...form data...
<s:submit theme="ajax" targets="tabTwo" value="Submit"/>
</s:form>
When I try to submit however nothing actually happens. No asynch call, or
reload of the tabTwo div.
I am sure that the s:div is accessible by this jsp though because I am able
to use an <s:a> with that target pointing to tabTwo and it works exactly how
I want it to just without the form data.
If there is something I am missing I would very much like to know.
Thanks in advance.
--
View this message in context: http://www.nabble.com/Submitting-to-a-div-on-a-tabbedPanel-tp16834783p16834783.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Submitting to a div on a tabbedPanel
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
cree wrote:
> I have been laboring over this pretty much all day and have not come up with
> any sort of solution heres my situation.
>
> I have two JSPs. One contains the main tabbed panel with any number of divs
> as tabs. One tab references an href like:
>
> <s:div id="tabTwo" theme="ajax" label="Tab Two" href="someAction.action"/>
>
> The someAction.action will point to another JSP. This one contains an
> <s:form> that submits an action with its form data.
>
> So this next jsp looks like
>
> <s:form action="processAction" theme="ajax" >
> ...form data...
>
> <s:submit theme="ajax" targets="tabTwo" value="Submit"/>
>
> </s:form>
>
> When I try to submit however nothing actually happens. No asynch call, or
> reload of the tabTwo div.
>
> I am sure that the s:div is accessible by this jsp though because I am able
> to use an <s:a> with that target pointing to tabTwo and it works exactly how
> I want it to just without the form data.
>
> If there is something I am missing I would very much like to know.
>
> Thanks in advance.
>
>
>
If you're using IE or allow your users to, ensure the showLoadingText
attribute is false. In IE, if the target div contains the source it
overwrites itself before posting. As you described, nothing happens.
In addition, if you need to use ajax tags inside an ajax result, ensure
the executeScripts attribute is true (and separateScripts, and
parseContent if they exist in your version).
Also, I always found targeting a tab did not work well. Instead put a
div inside the tab and target that inner div.
ie. remove the href from the tab an insert an additional ajax div with
an href inside the tab instead. make that inner div your target for
updates. Updates will be inserted into the body of the tab without
affecting the tab itself.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org