Yeah th'tas because you use @Validate not in the action bean class.

Try :

@ValidateNestedProperties(...)
protected ItemExt itemExt = new ItemExt();

In short stripes validation ain't "nested" : you have to specify in in the 
action bean explicitly using @ValidateNestedProperties.

HTH

Rémi

Le 5 mars 2013 à 16:18, - a écrit :

> This is what I have...
> 
> Action
> @UrlBinding(ActionsConstants.VIEW_ITEM_URL+"{$event}/{param}")
> public class ViewAction extends BaseActionBean {
> 
> private static final String JSP_VIEW = "/jsp/common/view.jsp";
> 
>       protected ItemExt itemExt = new ItemExt();
>       public ItemExt getItemExt() {
>               return itemExt;
>       }
>       public void setItemExt(ItemExt itemExt) {
>               this.itemExt = itemExt;
>       }
>       
>       public Resolution view() throws Exception {     
>               itemExt = advertServiceWrapper.selectItemAndExtById(itemId);    
>         
>               ....
>       return new ForwardResolution(JSP_VIEW);
>       }
> }
>       
> Object ItemExt
> public class ItemExt implements Serializable {
>       private static final long serialVersionUID = 1L;
>       
>       private Integer itemId;
>       .... gets and sets
>       private User user;
>       public User getUser() {
>               return user;
>       }
>       public void setUser(User user) {
>               this.user = user;
>       }
>       
>       .... gets and sets
> }
> 
> public class User implements Serializable{
>       private static final long serialVersionUID = 1L;
>       
>       @Validate(encrypted=true)
>       private Integer userId;
>       
>       .... gets and sets
>       
> }
>       
> view.jsp
> <%@include file="/jsp/common/taglibs.jsp"%>
> <s:layout-render name="/jsp/common/layout/_default_center.jsp">
> <s:layout-component name="main_content">
> <s:form id="viewForm" name="viewForm"
> beanclass="<%=com.web.project.action.ViewAction.class%>" method="post"
> partial="true">
> .......
> <c:out ....
> .......
> </s:form>
>                       
>       another jsp included where it is ecrypted field                 
>                       
> <jsp:include page="/jsp/common/parts/email_form.jsp" 
> flush="true"></jsp:include>
> ....
>   </s:layout-component>
> </s:layout-render>
> 
> email_form.jsp (included jsp)
> <%@include file="/jsp/common/taglibs.jsp"%>
> <s:form beanclass="<%=com.action.ViewAction.class%>">
>       
>       here waiting encrypted field
> 
>       <s:hidden name="itemExt.user.userId"></s:hidden>
>       ....
> </s:form>
> 
> 
> 
>       
> 
> 
> 
> 
> 
> 2013/3/5 Poitras Christian <christian.poit...@ircm.qc.ca>:
>> Hi,
>> 
>> Can you post you JSP page and ActionBean? That will help to find the problem.
>> 
>> Christian
>> 
>> -----Message d'origine-----
>> De : - [mailto:grandebu...@gmail.com]
>> Envoyé : March-05-13 9:17 AM
>> À : Stripes Users List
>> Objet : Re: [Stripes-users] Encrypted field by stripes
>> 
>> Can someone help me with a solution to encrypt stripes field?
>> Thanks in advance.
>> 
>> 
>> 2013/3/3 - <grandebu...@gmail.com>:
>>> Hello,
>>> I have a problem with encrypted field by stripes. As I have understood
>>> when you have been declared before field declaration like
>>>        @Validate(encrypted=true)
>>>        private Integer userId;
>>> and have this hidden field on my jsp it should be encrypted. But on
>>> the source code of the jsp I still see the integer value.
>>> I miss something? Can someone tell me how it should be implemented?
>>> Thanks.
>> 
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics Download AppDynamics Lite for 
>> free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>> 
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to