Hi Nick,

thanks very much for your very detailed response. I appreciate it very much.
I'm working through it. Glad to know that there's a solution.

cheers,
Brian

On Wed, Apr 21, 2010 at 12:26 PM, Nick Stuart
<nstu...@speranzasystems.com>wrote:

> Heh, must of been all the funny characters in it, and it was bit
> long.......
>
>
> On Apr 21, 2010, at 1:54 AM, Iwao AVE! wrote:
>
> > The previous Nick's post (the long one) shows you the detail.
> > I didn't read it as it was labeled as a spam by gmail for some
> > reasons, sorry.
> >
> > Regards,
> > Iwao
> >
> > on 10/04/21 13:13 Iwao AVE! said the following:
> >> Hi Brian,
> >>
> >> The feature I have mentioned is implemented in 1.5.3 (*1).
> >> But Stripes' wizard itself is a simple mechanism to carry request
> >> parameters over between pages and doesn't populate form elements for
> >> your domain object automatically.
> >>
> >> My recommendation is to pre-populate the 'user' object before each
> >> event as described in the 'Best Practice' page.
> >> Please see the usage of @Before method in my post you had found.
> >> You will need a hidden form element which holds the id of a user on
> >> each page for the pre-population.
> >>
> >> --
> >> *1) Related tickets:
> >> http://www.stripesframework.org/jira/browse/STS-647
> >> http://www.stripesframework.org/jira/browse/STS-726
> >>
> >> Hope this helps,
> >> Iwao
> >>
> >> on 10/04/21 3:59 brian.mcswee...@gmail.com said the following:
> >>> Hi guys,
> >>>
> >>> I'm new to stripes and I'm trying to do what should be super easy. I'm
> >>> trying to use a multipage wizard to edit an existing object.
> >>> This must be a pretty regular pattern. I've tried using startEvent and
> >>> saving the user that is retrieved from the database as follows.
> >>> However the values of "user" don't get persisted between steps in the
> >>> wizard...i've searched at length on the forums and found another
> >>> relevant entry that was never answered....
> >>>
> >>>
> http://www.mail-archive.com/stripes-users@lists.sourceforge.net/msg02020.html
> >>>
> >>> this should be simple surely, I'm new to stripes and want to give it a
> >>> proper go...but already not being able to do this is worrying...
> >>>
> >>> thanks for any help, my code is below
> >>>
> >>> brian
> >>>
> >>> @Wizard(startEvents="begin")
> >>> @UrlBinding("/register")
> >>> public class RegisterActionBean extends BaseActionBean {
> >>>
> >>> protected final Log log = LogFactory.getLog(getClass());
> >>> private UserManager um;
> >>>
> >>> /** Setter to allow the UserManager to be injected. */
> >>> @SpringBean
> >>> protected void setUserManager(UserManager um) {
> >>> this.um = um;
> >>> }
> >>>
> >>> @ValidateNestedProperties({
> >>> @Validate(field="password", required=true,
> >>> minlength=5,maxlength=20,expression="${this eq confirmPassword}")
> >>> })
> >>> private User user;
> >>> private String confirmPassword;
> >>>
> >>> /* Getters and setters for user and confirmPassword */
> >>> @DontValidate
> >>> @DefaultHandler
> >>> public Resolution begin() {
> >>> // for the moment just get one user from the database
> >>> User user = (User)um.getUser("123");
> >>> this.setUser(user);
> >>> return new ForwardResolution("/WEB-INF/jsps/edit1.jsp");
> >>>
> >>> }
> >>>
> >>> public Resolution gotoStep2() throws Exception {
> >>> // do some more logic here if necessary
> >>> return new ForwardResolution("/WEB-INF/jsps/edit2.jsp");
> >>> }
> >>>
> >>> public Resolution gotoStep3() throws Exception {
> >>> // do some more logic here if necessary
> >>> um.save(user);
> >>> return new ForwardResolution("/WEB-INF/jsps/editsuccess.jsp");
> >>> }
> >
> >
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > Stripes-users mailing list
> > Stripes-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>


-- 
-----------------------------------------
Brian McSweeney

Technology Director
Smarter Technology
web: http://www.smarter.ie
phone: +353868578212
-----------------------------------------
------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to