I have this but its not setting the beans value <s:form action="petsearch" method="post"> <s:textfield label="Color" name="aTestBean.color"/> <br/> <s:submit/> </s:form>
public class PetFormAction extends BaseSupport { private ATestBean aTestBean; private boolean DEBUG = true; public String execute() throws Exception { return SUCCESS; } public ATestBean getATestBean() { return aTestBean; } public void setATestBean(ATestBean testBean) { //testBean.setColor(color) System.out.println(" Color is "+testBean.getColor()); aTestBean = testBean; } } <action name="petsearch" class="com.iqbalconsulting.work.web.PetFormAction" > <result name="success">/PetForm.jsp</result> </action> On Tue, May 19, 2009 at 9:50 AM, Matt Raible <m...@raibledesigns.com> wrote: > Can you rephrase your question or explain it with code? > > Thanks, > > Matt > > > On Mon, May 18, 2009 at 9:37 PM, Saeed Iqbal <saee...@gmail.com> wrote: > >> That was for a string. How do I use custom bean objects? >> >> Thanks, >> -saeed >> >> >> On Tue, May 19, 2009 at 9:14 AM, Saeed Iqbal <saee...@gmail.com> wrote: >> >>> It seems to work now. Thanks. >>> >>> Thanks, >>> -saeed >>> >>> >>> On Tue, May 19, 2009 at 9:02 AM, Matt Raible <m...@raibledesigns.com>wrote: >>> >>>> What is the code you're using to retrieve the value? You should be able >>>> to add a setter that matches the parameter name and it'll automatically be >>>> populated. >>>> >>>> Matt >>>> >>>> >>>> On Mon, May 18, 2009 at 9:11 PM, Saeed Iqbal <saee...@gmail.com> wrote: >>>> >>>>> How? I am trying but it is displaying as null >>>>> >>>>> Thanks, >>>>> -saeed >>>>> >>>>> >>>>> On Tue, May 19, 2009 at 8:55 AM, Matt Raible >>>>> <m...@raibledesigns.com>wrote: >>>>> >>>>>> You should be able to, yes. >>>>>> >>>>>> >>>>>> On Mon, May 18, 2009 at 9:08 PM, Saeed Iqbal <saee...@gmail.com>wrote: >>>>>> >>>>>>> I am trying to pass a search string. I know get is the preferred way >>>>>>> to do but can we pass it as post? >>>>>>> >>>>>>> Thanks, >>>>>>> -saeed >>>>>>> >>>>>>> >>>>>>> On Tue, May 19, 2009 at 8:51 AM, Matt Raible <m...@raibledesigns.com >>>>>>> > wrote: >>>>>>> >>>>>>>> Can you be more specific about what you're trying to do? >>>>>>>> >>>>>>>> >>>>>>>> On Mon, May 18, 2009 at 9:05 PM, Saeed Iqbal <saee...@gmail.com>wrote: >>>>>>>> >>>>>>>>> Hi >>>>>>>>> >>>>>>>>> I would like to know if passing string as method post is allowed in >>>>>>>>> struts? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> -saeed >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Saeed Iqbal >>>>>>> CEO - Iqbal Consulting >>>>>>> http://www.iqbalconsulting.com >>>>>>> +92-345-5444410 >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Saeed Iqbal >>>>> CEO - Iqbal Consulting >>>>> http://www.iqbalconsulting.com >>>>> +92-345-5444410 >>>>> >>>> >>>> >>> >>> >>> -- >>> Saeed Iqbal >>> CEO - Iqbal Consulting >>> http://www.iqbalconsulting.com >>> +92-345-5444410 >>> >> >> >> >> -- >> Saeed Iqbal >> CEO - Iqbal Consulting >> http://www.iqbalconsulting.com >> +92-345-5444410 >> > > -- Saeed Iqbal CEO - Iqbal Consulting http://www.iqbalconsulting.com +92-345-5444410