I have an action event method that checks if there is a value in the
domain object in the action.  If there is the object is pulled from a
db and I want to prepoulate the form.

Eveything works great if I use a GET url parameter like

/need/art?criteria.reportId=24359304

but if I issue a post with that same parameter the data is pull but
the form fields are not pre-populated.

my form is defined as with one of the fields as an example

<s:form beanclass="${actionBean.class}" id="reportForm">

<s:hidden name="criteria.reportName" id="reportName" />

--NOTE  if I print out ${actionBean.criteria.reportName} next to the
field the value is correct

and here is the action event method

        @DefaultHandler
        public Resolution form() {
                if ((criteria != null) && (criteria.getReportId() != null)) {
                        setCriteria(reportsDao.fetch(criteria.getReportId()));
                } else {
                        if(getCriteria() == null)
                                setCriteria(new NeedReportCriteria());
                        getCriteria().setMode(ReportType.ART.getId());
                }
                reports = 
reportsDao.getListByUser(getContext().getUser().getUsername(),
criteria.getMode());

                return new ForwardResolution(VIEW_FORM);
        }

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to