struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alvaro Sanchez-Mariscal" <alvaro.sanchezmaris...@gmail.com>
Subject Re: [S2][Tabbed panel] posting data from one tab
Date Sun, 19 Aug 2007 17:45:10 GMT
If the URL changes, then a normal http post is being fired, instead of
an ajax request.

What's your struts.ui.theme in struts.properties? If it is not "ajax",
try using theme="ajax" in the s:form and in the s:submit tags.

Did you included the s:head tag (http://struts.apache.org/2.x/docs/head.html)?

On 8/19/07, Eugen Stoianovici <eugen.stoianovici@gmail.com> wrote:
> Alvaro Sanchez-Mariscal wrote:
> > Try prepending an slash, ie, "/addProduct". Without it, it also didn't
> > worked to me.
> >
> > Also, what happens exactly? Javascript errors? Have you tried
> > inspecting it with firebug?
> >
> > Alvaro.
> >
> > On 8/19/07, Eugen Stoianovici <eugen.stoianovici@gmail.com> wrote:
> >
> I've tried it with /addProduct and i've also moved the products pane to
> to the addpo.jsp page (so now, it isn't a remote pane). There's nothing
> wrong happening, it just takes me to the first tab after i press the add
> button. I mean: the data gets posted, everything is in place...it's just
> that it displays the first tab instead of the 3th.
> The url changes from addpo.jsp to addproduct.action. Is this a problem?
>
> Here's the code:
> action mapping:
>         <action name="addproduct" class="addPoAction" method="addProduct">
>             <result>/popages/addpo.jsp</result>
>             <result name="input">/popages/addpo.jsp</result>
>         </action>
>
> The jsp:
>
> <!-- addpo.jsp-->
> <s:tabbedPanel id="tabbedpanel">
>     <s:div id="vendor" label="Vendor" href="%{#vendor_tab}" theme="ajax" />
>     <s:div id="shipment" label="Shipment" href="%{#shipment_tab}"
>         theme="ajax" />
>     <!-- the form-->
>     <s:div id="products" label="Products"
>         theme="ajax" listenTopics="/addProduct">
>         <div style="border-style: solid">
>         <p>Add new product to list</p>
>         <s:form action="addproduct" validate="true">
>             <s:textfield id="description" name="product.description"
>                 label="Description" />
>             <s:textfield id="quantity" name="product.quantity"
> label="Quantity" />
>             <s:textfield id="taxrate" name="product.taxRate" label="Tax
> Rate" />
>             <s:textfield id="unitprice" name="product.unitPrice"
>                 label="Unit Price" />
>             <s:submit value="Add" notifyTopics="/addProduct" />
>         </s:form></div>
>     </s:div>
> </s:tabbedPanel>
>
> jsp warnings: (there are no errors):
>
> Warning: Unknown property '_zoom'.  Declaration dropped.
> Source File: http://localhost:8080/POPSWeb/addproduct.action
> Line: 7
>
> Warning: Unknown property '_margin-bottom'.  Declaration dropped.
> Source File: http://localhost:8080/POPSWeb/addproduct.action
> Line: 24
>
> Warning: Error in parsing value for property 'display'.  Declaration
> dropped.
> Source File: http://localhost:8080/POPSWeb/addproduct.action
> Line: 47
>
> Warning: Expected ':' but found 'none'.  Declaration dropped.
> Source File: http://localhost:8080/POPSWeb/addproduct.action
> Line: 0
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect & Instructor
alvaro.sanchezmariscal@gmail.com

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


Mime
View raw message