struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aum strut <aum.str...@gmail.com>
Subject Re: Multiple Submit Buttons problem in Struts2
Date Mon, 03 Jan 2011 16:28:39 GMT
Scott,

that was a good way to go..

On Mon, Jan 3, 2011 at 3:59 AM, Dave Newton <davelnewton@gmail.com> wrote:

> Hmm, that looks like it might work ;)
>
> Your technique also avoids having to code the behavior into the action
> itself, decoupling things even more cleanly.
>
> (Another foot down the rabbit hole: "customer" namespace, so bits of CRUD
> can be reused across underlying models. I do both, and honestly, I'm not
> sure I care either way, especially if I'm not manually generating all the
> view-layer stuff.)
>
> Dave
>
> On Sun, Jan 2, 2011 at 5:20 PM, <stanlick@gmail.com> wrote:
>
> > How about something  like this?
> >
> > <s:form namespace="/customer" >
> > <s:hidden key="domain.id" />
> > <s:textfield key="domain.firstName" />
> > <s:textfield key="domain.lastName" />
> > <s:textfield key="domain.address1" />
> > <s:textfield key="domain.address2" />
> > <s:textfield key="domain.city" />
> > <s:textfield key="domain.state" />
> > <s:textfield key="domain.zip" />
> >
> >
> > <s:submit action="customer_cancel" value="Cancel"/>
> > <s:submit action="customer_save" value="Save"/>
> > <s:submit action="customer_print" value="Print"/>
> > </s:if>
> > </s:form>
> >
> > Scott
> >
> > On Sat, Jan 1, 2011 at 8:53 AM, aum strut <aum.struts@gmail.com> wrote:
> >
> > > Hi All,
> > >
> > > Trying to work with multiple submit buttons within a single form in
> > struts2
> > > application but not able to work. here is the jsp code i am using
> > >
> > > <tr>
> > >                                                <td
> > > class="button"><input type="submit" value="Import"
> > >
> > > name="destinationImport" class="button"></td>
> > >                                                <td
> > > class="button"><input type="submit" value="Export"
> > >
> > > name="destinationExport" class="button"></td>
> > >                                            </tr>
> > >
> > > here is the java part
> > >
> > > private boolean destinationImport;
> > >    private boolean destinationExport;
> > > and there respective setter and getter
> > >
> > > but i am sure is that Struts2 type convertor is having problem
> converting
> > > the String value to boolean do any one have idea how to achieve this
> > >
> > > i am using struts-2.2.1 version.
> > >
> > > Thanks in advance
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message