Thanks, it worked! But its a little strange that it doesn't work my way,
because in empty context forms work, but when context isn't empty stripes
sees actions, they work, but forms can't find actions:(

And one question not related to topic, I have not really decided how to code
properties in my action beans, just look at my code please. Is it good
approach of getting lists(i just look if list is null, then get it from
database, and I do it in getter)

public class WebRolesActionBean extends BaseActionBean {

@ValidateNestedProperties({
        @Validate(field = "roleName", required = true, on = {"createRole"}),
        @Validate(field = "description", required = true, on =
{"createRole"})
    })
    WebRole role;
    List<WebRole> allRoles;
//********************************HANDLERS*************************************************************************************


    @DefaultHandler
    public Resolution execute() {
        return new ForwardResolution(getView());
    }

    @HandlesEvent("createRole")
    public Resolution createRole() {
        services.getWebUserService().saveWebRole(role);
        return new ForwardResolution(getView());
    }
//********************************HANDLERS*************************************************************************************


    public List<WebRole> getAllRoles() {
        if (allRoles == null) {
            allRoles = services.getWebUserService().getAllWebRoles();
        }
        return allRoles;
    }

    public void setAllRoles(List<WebRole> allRoles) {
        this.allRoles = allRoles;
    }
   public WebRole getRole() {
        return role;
    }

    public void setRole(WebRole role) {
        this.role = role;
    }


    public String getView() {
        return "/WEB-INF/jsp/admin/WebRoles.jsp";
    }
============EOF==============
2011/5/31 Richard Hauswald <richard.hausw...@googlemail.com>

> Try something like this:
> <s:form beanclass="<%= WebGroupsActionBean.class %>">
> </s:form>
>
> This method is refactoring safe and you can change URL Binding without
> changing your jsp.
>
> On Tue, May 31, 2011 at 2:09 PM, Alexander Knyazev <alexk...@gmail.com>
> wrote:
> > This is full error
> > It happens only when I change contextName in netbeans from empty one "".
> > Pages are working, for example when I type in browser
> > http://localhost:8084/CMS/admin/WebGroups.action - it opens action,
> shows
> > its jsp page, but forms don't work. I get this error in logs :
> > ERROR (FormTag:399) - Could not locate an ActionBean that was bound to
> the
> > URL [/CMS/admin/WebGroups.action]. Without an ActionBean class Stripes
> > cannot determine whether the ActionBean is a wizard or not. As a result
> > wizard behaviour will be disable
> > here is form:
> > <s:form action="${contextPath}/admin/WebGroups.action">
> > ...
> > </s:form>
> > when context path is empty, forms work
> >
> ------------------------------------------------------------------------------
> > Simplify data backup and recovery for your virtual environment with
> vRanger.
> > Installation's a snap, and flexible recovery options mean your data is
> safe,
> > secure and there when you need it. Data protection magic?
> > Nope - It's vRanger. Get your free trial download today.
> > http://p.sf.net/sfu/quest-sfdev2dev
> > _______________________________________________
> > Stripes-users mailing list
> > Stripes-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/stripes-users
> >
> >
>
>
>
> --
> Richard Hauswald
> Blog: http://tnfstacc.blogspot.com/
> LinkedIn: http://www.linkedin.com/in/richardhauswald
> Xing: http://www.xing.com/profile/Richard_Hauswald
>
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with
> vRanger.
> Installation's a snap, and flexible recovery options mean your data is
> safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to