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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect & Instructor
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to