Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 3 Feb 2008 18:40:45 -0000 Issue 7841

user-digest-help

2008-02-03


Author LoginPost Reply

user Digest 3 Feb 2008 18:40:45 -0000 Issue 7841

Topics (messages 182157 through 182167):

Re: Struts2 2.0.11 Validation with DWR
 182157 by: j alex

S2 : Checking constants within JSP
 182158 by: j alex
 182159 by: Dave Newton
 182160 by: j alex
 182161 by: Dave Newton

Struts 2. Validation Issue
 182162 by: Martin Castellanos
 182163 by: Dave Newton
 182164 by: Martin Castellanos
 182165 by: Dave Newton
 182166 by: Martin Castellanos
 182167 by: Martin Castellanos

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_182157.ezm (zipped)
Were you able to solve this yet ? . If not, please let me now the exact
exception trace-- i had implemented it, and may be able to help

Also, if you solved ..pls post the solution too.

On Jan 29, 2008 9:27 AM, Julien RICHARD <richard.julien@(protected):

> I need some help with DWR.
>
> I have find and follow an example of utilisation of DWR for struts2
> validation.
> this link : http://java-x.blogspot.com/2006/11/struts-2-validation.html
>
> Im really new about DWR and this example doesn't work for me. I think DWR
> is
> the correct way for me to ckeck my form in ajax but this example make null
> execption and not working.
>
> If someone have some times to help me for my first step in DWR, will be
> appreciated ;)
>
> Regards,
> --
> RICHARD Julien,
>

Attachment: user_182158.ezm (zipped)
Hi,

What's the best way to check constants in jsp using the s:if tag.

I've constants defined in a file like :

public class AppConstants {

  public static final String APPLICATION_CODE = "MYAPP";

  public static final String APPLICATION_VERSION = "1.2";

Now, in the JSP we need to use these constants within an s:if

Currently, i'm using

<s:if test="myapp.appCode == @com.abc.util.AppConstants@(protected)">


but this doesn't look clean ; is there a way to get rid of the @
com.abc.util.AppConstants import ?

Thanks,
Joseph

Attachment: user_182159.ezm (zipped)
--- j alex <strutstwouser@(protected):
> <s:if test="myapp.appCode == @com.abc.util.AppConstants@(protected)">
>
> but this doesn't look clean ; is there a way to get rid of the @
> com.abc.util.AppConstants [import?]

No; that's how OGNL accesses static data (and it's much cleaner than the way
we have to do it with JSP 2.0, IIRC).

Another option is to expose a static property by setting an action property
to the static value, but IMO that's more trouble than it's worth.

Dave



Attachment: user_182160.ezm (zipped)
Thanks Dave, with just scriptlets we could do it with a single page import
on top
<%@(protected)
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
import="com.abc.utils.AffinityConstants"

and in scriptlet as:

<%  if(((AppConstants.APPLICATION_CODE.equals(appCode)) {%>

In S2, we are avoiding scriptlets as much as possible, and using S2 tags and
the @ format seemed a little repetitive when there are a bunch of checks in
the JSP . I assume it won't have any performance impact . Please confirm?



On Feb 2, 2008 9:57 PM, Dave Newton <newton.dave@(protected):

> --- j alex <strutstwouser@(protected):
> > <s:if test="myapp.appCode == @com.abc.util.AppConstants@(protected)
> _CODE">
> >
> > but this doesn't look clean ; is there a way to get rid of the @
> > com.abc.util.AppConstants [import?]
>
> No; that's how OGNL accesses static data (and it's much cleaner than the
> way
> we have to do it with JSP 2.0, IIRC).
>
> Another option is to expose a static property by setting an action
> property
> to the static value, but IMO that's more trouble than it's worth.
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_182161.ezm (zipped)
--- j alex <strutstwouser@(protected):
> I assume it won't have any performance impact . Please confirm?

Won't have *any* performance impact? That doesn't seem possible; most any
time you're using a tag you're going to have some overhead. Scriptlets are
compiled directly into the servlet, tags make method calls.

*Significant* impact? Not likely, but you'd have to test it with your
specific use cases to know for sure, I suppose.

Dave


Attachment: user_182162.ezm (zipped)
Hi, I'm trying to use the xml validation, the validation is executing and
detecting errors, but after the validation the method save gets called
instead of invoking the input action it's executing the 'success' action.
I've tried several things but still can't see what's missing, I'm using
Spring as the object factory. I'd appreciate any help.
*
*DEBUG [http-8084-4] (ValidationInterceptor.java:134) - Validating
/books/save with method save.
DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean named '
com.opensymphony.xwork2.validator.validators.VisitorFieldValidator' found in
org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected):
defining beans
[propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
root of factory hierarchy
DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
java.util.LinkedHashMap]
DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
autowiring property 'validatorContext' of bean '
com.opensymphony.xwork2.validator.validators.VisitorFieldValidator' by name:
no matching bean found
DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) - Running
validator:
com.opensymphony.xwork2.validator.validators.VisitorFieldValidator@(protected)
object
com.maca.web.BookAction@(protected)
DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean named '
com.opensymphony.xwork2.validator.validators.RequiredStringValidator' found
in
org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected):
defining beans
[propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
root of factory hierarchy
DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
java.util.LinkedHashMap]
DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
autowiring property 'validatorContext' of bean '
com.opensymphony.xwork2.validator.validators.RequiredStringValidator' by
name: no matching bean found
DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean named '
com.opensymphony.xwork2.validator.validators.RequiredStringValidator' found
in
org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected):
defining beans
[propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
root of factory hierarchy
DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
java.util.LinkedHashMap]
DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
autowiring property 'validatorContext' of bean '
com.opensymphony.xwork2.validator.validators.RequiredStringValidator' by
name: no matching bean found
DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) - Running
validator:
com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
object
com.maca.model.Book@(protected)
ERROR [http-8084-4] (DelegatingValidatorContext.java:279) - Validation error
for book.book.title:Book title is required
DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) - Running
validator:
com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
object
com.maca.model.Book@(protected)
ERROR [http-8084-4] (DelegatingValidatorContext.java:279) - Validation error
for book.book.description:Book description is required
DEBUG [http-8084-4] (DefaultActionInvocation.java:383) - Executing action
method = save


This is a snippet from my struts.xml

<package name="books" extends="struts-default" namespace="/books">

    <!-- Default interceptor stack. -->
    <default-interceptor-ref name="basicStack"/>

    <action name="list" method="list" class="bookAction">
       <result>list.jsp</result>
    </action>
    <action name="input" method="input" class="bookAction">
       <result name="success" type="redirect-action">list</result>
       <result name="input">input.jsp</result>
    </action>
    <action name="edit" method="edit" class="bookAction">
       <result name="success" type="redirect-action">list</result>
       <result name="input">input.jsp</result>
    </action>
    *<action name="save" method="save" class="bookAction">**
       <result name="success" type="redirect-action">list</result>
       <result name="input">input.jsp</result>
       <interceptor-ref name="validationWorkflowStack"/>
    </action>*
    <action name="delete" method="delete" class="bookAction">
       <result name="success" type="redirect-action">list</result>
    </action>
  </package>

Regards

--
Martin Castellanos

Attachment: user_182163.ezm (zipped)
--- Martin Castellanos <martincastell@(protected):
> Hi, I'm trying to use the xml validation, the validation is executing and
> detecting errors, but after the validation the method save gets called
> instead of invoking the input action it's executing the 'success' action.
> I've tried several things but still can't see what's missing, I'm using
> Spring as the object factory. I'd appreciate any help.

What's the signature of your action class?

Dave

> *
> *DEBUG [http-8084-4] (ValidationInterceptor.java:134) - Validating
> /books/save with method save.
> DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean named '
> com.opensymphony.xwork2.validator.validators.VisitorFieldValidator' found
> in
>
org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected):
> defining beans
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> root of factory hierarchy
> DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> java.util.LinkedHashMap]
> DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
> autowiring property 'validatorContext' of bean '
> com.opensymphony.xwork2.validator.validators.VisitorFieldValidator' by
> name:
> no matching bean found
> DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) - Running
> validator:
>
com.opensymphony.xwork2.validator.validators.VisitorFieldValidator@(protected)
> object
> com.maca.web.BookAction@(protected)
> DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean named '
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator' found
> in
>
org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected):
> defining beans
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> root of factory hierarchy
> DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> java.util.LinkedHashMap]
> DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
> autowiring property 'validatorContext' of bean '
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator' by
> name: no matching bean found
> DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean named '
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator' found
> in
>
org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected):
> defining beans
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> root of factory hierarchy
> DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> java.util.LinkedHashMap]
> DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
> autowiring property 'validatorContext' of bean '
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator' by
> name: no matching bean found
> DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) - Running
> validator:
>
com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> object
> com.maca.model.Book@(protected)
> ERROR [http-8084-4] (DelegatingValidatorContext.java:279) - Validation
> error
> for book.book.title:Book title is required
> DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) - Running
> validator:
>
com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> object
> com.maca.model.Book@(protected)
> ERROR [http-8084-4] (DelegatingValidatorContext.java:279) - Validation
> error
> for book.book.description:Book description is required
> DEBUG [http-8084-4] (DefaultActionInvocation.java:383) - Executing action
> method = save
>
>
> This is a snippet from my struts.xml
>
> <package name="books" extends="struts-default" namespace="/books">
>
>      <!-- Default interceptor stack. -->
>      <default-interceptor-ref name="basicStack"/>
>
>      <action name="list" method="list" class="bookAction">
>         <result>list.jsp</result>
>      </action>
>      <action name="input" method="input" class="bookAction">
>         <result name="success" type="redirect-action">list</result>
>         <result name="input">input.jsp</result>
>      </action>
>      <action name="edit" method="edit" class="bookAction">
>         <result name="success" type="redirect-action">list</result>
>         <result name="input">input.jsp</result>
>      </action>
>      *<action name="save" method="save" class="bookAction">**
>         <result name="success" type="redirect-action">list</result>
>         <result name="input">input.jsp</result>
>         <interceptor-ref name="validationWorkflowStack"/>
>      </action>*
>      <action name="delete" method="delete" class="bookAction">
>         <result name="success" type="redirect-action">list</result>
>      </action>
>   </package>


Attachment: user_182164.ezm (zipped)
Action Class is: com.maca.web.BookAction
Validation file is placed next to the class: BookAction-save-validation.xml
Validation file for the book entity is: Book-validation.xml and it's placed
next to the Book class


On Feb 3, 2008 12:20 PM, Dave Newton <newton.dave@(protected):

> --- Martin Castellanos <martincastell@(protected):
> > Hi, I'm trying to use the xml validation, the validation is executing
> and
> > detecting errors, but after the validation the method save gets called
> > instead of invoking the input action it's executing the 'success'
> action.
> > I've tried several things but still can't see what's missing, I'm using
> > Spring as the object factory. I'd appreciate any help.
>
> What's the signature of your action class?
>
> Dave
>
> > *
> > *DEBUG [http-8084-4] (ValidationInterceptor.java:134) - Validating
> > /books/save with method save.
> > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> named '
> > com.opensymphony.xwork2.validator.validators.VisitorFieldValidator'
> found
> > in
> >
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> :
> > defining beans
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > root of factory hierarchy
> > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > java.util.LinkedHashMap]
> > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
> > autowiring property 'validatorContext' of bean '
> > com.opensymphony.xwork2.validator.validators.VisitorFieldValidator' by
> > name:
> > no matching bean found
> > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> Running
> > validator:
> >
>
> com.opensymphony.xwork2.validator.validators.VisitorFieldValidator@(protected)
> > object
> > com.maca.web.BookAction@(protected)
> > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> named '
> > com.opensymphony.xwork2.validator.validators.RequiredStringValidator'
> found
> > in
> >
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> :
> > defining beans
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > root of factory hierarchy
> > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > java.util.LinkedHashMap]
> > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
> > autowiring property 'validatorContext' of bean '
> > com.opensymphony.xwork2.validator.validators.RequiredStringValidator' by
> > name: no matching bean found
> > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> named '
> > com.opensymphony.xwork2.validator.validators.RequiredStringValidator'
> found
> > in
> >
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> :
> > defining beans
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > root of factory hierarchy
> > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > java.util.LinkedHashMap]
> > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
> > autowiring property 'validatorContext' of bean '
> > com.opensymphony.xwork2.validator.validators.RequiredStringValidator' by
> > name: no matching bean found
> > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> Running
> > validator:
> >
>
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> > object
> > com.maca.model.Book@(protected)
> > ERROR [http-8084-4] (DelegatingValidatorContext.java:279) - Validation
> > error
> > for book.book.title:Book title is required
> > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> Running
> > validator:
> >
>
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> > object
> > com.maca.model.Book@(protected)
> > ERROR [http-8084-4] (DelegatingValidatorContext.java:279) - Validation
> > error
> > for book.book.description:Book description is required
> > DEBUG [http-8084-4] (DefaultActionInvocation.java:383) - Executing
> action
> > method = save
> >
> >
> > This is a snippet from my struts.xml
> >
> > <package name="books" extends="struts-default" namespace="/books">
> >
> >      <!-- Default interceptor stack. -->
> >      <default-interceptor-ref name="basicStack"/>
> >
> >      <action name="list" method="list" class="bookAction">
> >         <result>list.jsp</result>
> >      </action>
> >      <action name="input" method="input" class="bookAction">
> >         <result name="success" type="redirect-action">list</result>
> >         <result name="input">input.jsp</result>
> >      </action>
> >      <action name="edit" method="edit" class="bookAction">
> >         <result name="success" type="redirect-action">list</result>
> >         <result name="input">input.jsp</result>
> >      </action>
> >      <action name="save" method="save" class="bookAction">
> >         <result name="success" type="redirect-action">list</result>
> >         <result name="input">input.jsp</result>
> >         <interceptor-ref name="validationWorkflowStack"/>
> >      </action>
> >      <action name="delete" method="delete" class="bookAction">
> >         <result name="success" type="redirect-action">list</result>
> >      </action>
> >   </package>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Martin Castellanos

Attachment: user_182165.ezm (zipped)
--- Martin Castellanos <martincastell@(protected):
> Action Class is: com.maca.web.BookAction
> Validation file is placed next to the class: BookAction-save-validation.xml
> Validation file for the book entity is: Book-validation.xml and it's placed
> next to the Book class

"Signature" means "How is your class defined?" What does it extend? What does
it implement?

Dave

> On Feb 3, 2008 12:20 PM, Dave Newton <newton.dave@(protected):
>
> > --- Martin Castellanos <martincastell@(protected):
> > > Hi, I'm trying to use the xml validation, the validation is executing
> > and
> > > detecting errors, but after the validation the method save gets called
> > > instead of invoking the input action it's executing the 'success'
> > action.
> > > I've tried several things but still can't see what's missing, I'm using
> > > Spring as the object factory. I'd appreciate any help.
> >
> > What's the signature of your action class?
> >
> > Dave
> >
> > > *
> > > *DEBUG [http-8084-4] (ValidationInterceptor.java:134) - Validating
> > > /books/save with method save.
> > > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> > named '
> > > com.opensymphony.xwork2.validator.validators.VisitorFieldValidator'
> > found
> > > in
> > >
> >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> > :
> > > defining beans
> > >
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > > root of factory hierarchy
> > > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > > java.util.LinkedHashMap]
> > > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
> > > autowiring property 'validatorContext' of bean '
> > > com.opensymphony.xwork2.validator.validators.VisitorFieldValidator' by
> > > name:
> > > no matching bean found
> > > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> > Running
> > > validator:
> > >
> >
> >
>
com.opensymphony.xwork2.validator.validators.VisitorFieldValidator@(protected)
> > > object
> > > com.maca.web.BookAction@(protected)
> > > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> > named '
> > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator'
> > found
> > > in
> > >
> >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> > :
> > > defining beans
> > >
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > > root of factory hierarchy
> > > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > > java.util.LinkedHashMap]
> > > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
> > > autowiring property 'validatorContext' of bean '
> > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator'
> by
> > > name: no matching bean found
> > > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> > named '
> > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator'
> > found
> > > in
> > >
> >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> > :
> > > defining beans
> > >
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > > root of factory hierarchy
> > > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > > java.util.LinkedHashMap]
> > > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) - Not
> > > autowiring property 'validatorContext' of bean '
> > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator'
> by
> > > name: no matching bean found
> > > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> > Running
> > > validator:
> > >
> >
> >
>
com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> > > object
> > > com.maca.model.Book@(protected)
> > > ERROR [http-8084-4] (DelegatingValidatorContext.java:279) - Validation
> > > error
> > > for book.book.title:Book title is required
> > > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> > Running
> > > validator:
> > >
> >
> >
>
com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> > > object
> > > com.maca.model.Book@(protected)
> > > ERROR [http-8084-4] (DelegatingValidatorContext.java:279) - Validation
> > > error
> > > for book.book.description:Book description is required
> > > DEBUG [http-8084-4] (DefaultActionInvocation.java:383) - Executing
> > action
> > > method = save
> > >
> > >
> > > This is a snippet from my struts.xml
> > >
> > > <package name="books" extends="struts-default" namespace="/books">
> > >
> > >      <!-- Default interceptor stack. -->
> > >      <default-interceptor-ref name="basicStack"/>
> > >
> > >      <action name="list" method="list" class="bookAction">
> > >         <result>list.jsp</result>
> > >      </action>
> > >      <action name="input" method="input" class="bookAction">
> > >         <result name="success" type="redirect-action">list</result>
> > >         <result name="input">input.jsp</result>
> > >      </action>
> > >      <action name="edit" method="edit" class="bookAction">
> > >         <result name="success" type="redirect-action">list</result>
> > >         <result name="input">input.jsp</result>
> > >      </action>
> > >      <action name="save" method="save" class="bookAction">
> > >         <result name="success" type="redirect-action">list</result>
> > >         <result name="input">input.jsp</result>
> > >         <interceptor-ref name="validationWorkflowStack"/>
> > >      </action>
> > >      <action name="delete" method="delete" class="bookAction">
> > >         <result name="success" type="redirect-action">list</result>
> > >      </action>
> > >   </package>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
> --
> Martin Castellanos
>


Attachment: user_182166.ezm (zipped)
Oh, it's just a regular bean, doesn't implements or extends anything

On Feb 3, 2008 12:32 PM, Dave Newton <newton.dave@(protected):

> --- Martin Castellanos <martincastell@(protected):
> > Action Class is: com.maca.web.BookAction
> > Validation file is placed next to the class:
> BookAction-save-validation.xml
> > Validation file for the book entity is: Book-validation.xml and it's
> placed
> > next to the Book class
>
> "Signature" means "How is your class defined?" What does it extend? What
> does
> it implement?
>
> Dave
>
> > On Feb 3, 2008 12:20 PM, Dave Newton <newton.dave@(protected):
> >
> > > --- Martin Castellanos <martincastell@(protected):
> > > > Hi, I'm trying to use the xml validation, the validation is
> executing
> > > and
> > > > detecting errors, but after the validation the method save gets
> called
> > > > instead of invoking the input action it's executing the 'success'
> > > action.
> > > > I've tried several things but still can't see what's missing, I'm
> using
> > > > Spring as the object factory. I'd appreciate any help.
> > >
> > > What's the signature of your action class?
> > >
> > > Dave
> > >
> > > > *
> > > > *DEBUG [http-8084-4] (ValidationInterceptor.java:134) - Validating
> > > > /books/save with method save.
> > > > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> > > named '
> > > > com.opensymphony.xwork2.validator.validators.VisitorFieldValidator'
> > > found
> > > > in
> > > >
> > >
> > >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> > > :
> > > > defining beans
> > > >
> > >
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > > > root of factory hierarchy
> > > > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > > > java.util.LinkedHashMap]
> > > > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) -
> Not
> > > > autowiring property 'validatorContext' of bean '
> > > > com.opensymphony.xwork2.validator.validators.VisitorFieldValidator'
> by
> > > > name:
> > > > no matching bean found
> > > > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> > > Running
> > > > validator:
> > > >
> > >
> > >
> >
>
> com.opensymphony.xwork2.validator.validators.VisitorFieldValidator@(protected)
> > > > object
> > > > com.maca.web.BookAction@(protected)
> > > > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> > > named '
> > > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator
> '
> > > found
> > > > in
> > > >
> > >
> > >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> > > :
> > > > defining beans
> > > >
> > >
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > > > root of factory hierarchy
> > > > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > > > java.util.LinkedHashMap]
> > > > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) -
> Not
> > > > autowiring property 'validatorContext' of bean '
> > > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator
> '
> > by
> > > > name: no matching bean found
> > > > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> > > named '
> > > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator
> '
> > > found
> > > > in
> > > >
> > >
> > >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> > > :
> > > > defining beans
> > > >
> > >
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > > > root of factory hierarchy
> > > > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > > > java.util.LinkedHashMap]
> > > > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) -
> Not
> > > > autowiring property 'validatorContext' of bean '
> > > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator
> '
> > by
> > > > name: no matching bean found
> > > > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> > > Running
> > > > validator:
> > > >
> > >
> > >
> >
>
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> > > > object
> > > > com.maca.model.Book@(protected)
> > > > ERROR [http-8084-4] (DelegatingValidatorContext.java:279) -
> Validation
> > > > error
> > > > for book.book.title:Book title is required
> > > > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> > > Running
> > > > validator:
> > > >
> > >
> > >
> >
>
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> > > > object
> > > > com.maca.model.Book@(protected)
> > > > ERROR [http-8084-4] (DelegatingValidatorContext.java:279) -
> Validation
> > > > error
> > > > for book.book.description:Book description is required
> > > > DEBUG [http-8084-4] (DefaultActionInvocation.java:383) - Executing
> > > action
> > > > method = save
> > > >
> > > >
> > > > This is a snippet from my struts.xml
> > > >
> > > > <package name="books" extends="struts-default" namespace="/books">
> > > >
> > > >      <!-- Default interceptor stack. -->
> > > >      <default-interceptor-ref name="basicStack"/>
> > > >
> > > >      <action name="list" method="list" class="bookAction">
> > > >         <result>list.jsp</result>
> > > >      </action>
> > > >      <action name="input" method="input" class="bookAction">
> > > >         <result name="success"
> type="redirect-action">list</result>
> > > >         <result name="input">input.jsp</result>
> > > >      </action>
> > > >      <action name="edit" method="edit" class="bookAction">
> > > >         <result name="success"
> type="redirect-action">list</result>
> > > >         <result name="input">input.jsp</result>
> > > >      </action>
> > > >      <action name="save" method="save" class="bookAction">
> > > >         <result name="success"
> type="redirect-action">list</result>
> > > >         <result name="input">input.jsp</result>
> > > >         <interceptor-ref name="validationWorkflowStack"/>
> > > >      </action>
> > > >      <action name="delete" method="delete" class="bookAction">
> > > >         <result name="success"
> type="redirect-action">list</result>
> > > >      </action>
> > > >   </package>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> > --
> > Martin Castellanos
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Martin Castellanos

Attachment: user_182167.ezm (zipped)
Oh, it's just a regular bean, doesn't implements or extends anything

On Feb 3, 2008 12:32 PM, Dave Newton <newton.dave@(protected):

> --- Martin Castellanos <martincastell@(protected):
> > Action Class is: com.maca.web.BookAction
> > Validation file is placed next to the class:
> BookAction-save-validation.xml
> > Validation file for the book entity is: Book-validation.xml and it's
> placed
> > next to the Book class
>
> "Signature" means "How is your class defined?" What does it extend? What
> does
> it implement?
>
> Dave
>
> > On Feb 3, 2008 12:20 PM, Dave Newton <newton.dave@(protected):
> >
> > > --- Martin Castellanos <martincastell@(protected):
> > > > Hi, I'm trying to use the xml validation, the validation is
> executing
> > > and
> > > > detecting errors, but after the validation the method save gets
> called
> > > > instead of invoking the input action it's executing the 'success'
> > > action.
> > > > I've tried several things but still can't see what's missing, I'm
> using
> > > > Spring as the object factory. I'd appreciate any help.
> > >
> > > What's the signature of your action class?
> > >
> > > Dave
> > >
> > > > *
> > > > *DEBUG [http-8084-4] (ValidationInterceptor.java:134) - Validating
> > > > /books/save with method save.
> > > > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> > > named '
> > > > com.opensymphony.xwork2.validator.validators.VisitorFieldValidator'
> > > found
> > > > in
> > > >
> > >
> > >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> > > :
> > > > defining beans
> > > >
> > >
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > > > root of factory hierarchy
> > > > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > > > java.util.LinkedHashMap]
> > > > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) -
> Not
> > > > autowiring property 'validatorContext' of bean '
> > > > com.opensymphony.xwork2.validator.validators.VisitorFieldValidator'
> by
> > > > name:
> > > > no matching bean found
> > > > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> > > Running
> > > > validator:
> > > >
> > >
> > >
> >
>
> com.opensymphony.xwork2.validator.validators.VisitorFieldValidator@(protected)
> > > > object
> > > > com.maca.web.BookAction@(protected)
> > > > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> > > named '
> > > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator
> '
> > > found
> > > > in
> > > >
> > >
> > >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> > > :
> > > > defining beans
> > > >
> > >
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > > > root of factory hierarchy
> > > > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > > > java.util.LinkedHashMap]
> > > > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) -
> Not
> > > > autowiring property 'validatorContext' of bean '
> > > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator
> '
> > by
> > > > name: no matching bean found
> > > > DEBUG [http-8084-4] (DefaultListableBeanFactory.java:354) - No bean
> > > named '
> > > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator
> '
> > > found
> > > > in
> > > >
> > >
> > >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@(protected)
> > > :
> > > > defining beans
> > > >
> > >
> >
> [propertyConfigurer,bookDataSource,bookSessionFactory,bookDao,bookAction];
> > > > root of factory hierarchy
> > > > DEBUG [http-8084-4] (CollectionFactory.java:114) - Creating [
> > > > java.util.LinkedHashMap]
> > > > DEBUG [http-8084-4] (AbstractAutowireCapableBeanFactory.java:892) -
> Not
> > > > autowiring property 'validatorContext' of bean '
> > > > com.opensymphony.xwork2.validator.validators.RequiredStringValidator
> '
> > by
> > > > name: no matching bean found
> > > > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> > > Running
> > > > validator:
> > > >
> > >
> > >
> >
>
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> > > > object
> > > > com.maca.model.Book@(protected)
> > > > ERROR [http-8084-4] (DelegatingValidatorContext.java:279) -
> Validation
> > > > error
> > > > for book.book.title:Book title is required
> > > > DEBUG [http-8084-4] (AnnotationActionValidatorManager.java:146) -
> > > Running
> > > > validator:
> > > >
> > >
> > >
> >
>
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator@(protected)
> > > > object
> > > > com.maca.model.Book@(protected)
> > > > ERROR [http-8084-4] (DelegatingValidatorContext.java:279) -
> Validation
> > > > error
> > > > for book.book.description:Book description is required
> > > > DEBUG [http-8084-4] (DefaultActionInvocation.java:383) - Executing
> > > action
> > > > method = save
> > > >
> > > >
> > > > This is a snippet from my struts.xml
> > > >
> > > > <package name="books" extends="struts-default" namespace="/books">
> > > >
> > > >      <!-- Default interceptor stack. -->
> > > >      <default-interceptor-ref name="basicStack"/>
> > > >
> > > >      <action name="list" method="list" class="bookAction">
> > > >         <result>list.jsp</result>
> > > >      </action>
> > > >      <action name="input" method="input" class="bookAction">
> > > >         <result name="success"
> type="redirect-action">list</result>
> > > >         <result name="input">input.jsp</result>
> > > >      </action>
> > > >      <action name="edit" method="edit" class="bookAction">
> > > >         <result name="success"
> type="redirect-action">list</result>
> > > >         <result name="input">input.jsp</result>
> > > >      </action>
> > > >      <action name="save" method="save" class="bookAction">
> > > >         <result name="success"
> type="redirect-action">list</result>
> > > >         <result name="input">input.jsp</result>
> > > >         <interceptor-ref name="validationWorkflowStack"/>
> > > >      </action>
> > > >      <action name="delete" method="delete" class="bookAction">
> > > >         <result name="success"
> type="redirect-action">list</result>
> > > >      </action>
> > > >   </package>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> > --
> > Martin Castellanos
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Martin Castellanos
©2008 gg3721.com - Jax Systems, LLC, U.S.A.