I have page with a list of products and links to edit that particular
product.

                <tr>
                    <td class="listtablecell leftpadding"><s:property
value="name"/></td>
                    <td class="listtablecell leftpadding"><s:property
value="color"/></td>
                    <td class="listtablecell leftpadding"><s:property
value="design"/></td>
                    <td class="listtablecell leftpadding"><s:property
value="material"/></td>
                    <td class="listtablecell leftpadding"><s:property
value="size"/></td>
                    <td class="listtablecell rightpadding
numeric"><s:property value="price"/></td>
                    <td class="listtablecell rightpadding numeric"><s:url
id="editUrl" value="editproduct.action">
                     <s:param name="productId" value="id"/></s:url><s:a
href="%{editUrl}">Edit</s:a></td>
                </tr>

My ProductAction class implements preparable interface in the manner below

    public void prepare() throws Exception {
        if(productId == 0)
        {
            product = new Product();
        }
        else
        {
            product = ProductManager.findProduct(productId);
        }
    }

with product being the model class with the customary name, price,
description etc, etc fields.


Running the code through the debugger I notice that the prepare method gets
invoked with the right productId  and product is Initialized by the
ProductManager  with the correct values for all it's fields.  However after
prepare method has been executed the doIntercept() of the PrepareInterceptor
gets invoked after which the product model  which was already initialized
correctly has been completly blammed with all of the fields set to null.
-- 
View this message in context: 
http://www.nabble.com/ParamPrepareParamsStack-interceptor-%2C-how-does-this-work----tp18184535p18184535.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to