Examples of addActionError()


Examples of com.opensymphony.xwork2.validator.ValidatorContext.addActionError()

        else if ( method.equals( "svn" ) )
        {
            String svnUrl = (String) getFieldValue( "svnUrl", obj );
            if ( svnUrl == null || svnUrl.equals( "" ) )
            {
                ctxt.addActionError( "SVN url is required." );
            }

            String username = (String) getFieldValue( "username", obj );
            if ( username == null || username.equals( "" ) )
            {
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ValidatorContext.addActionError()

            }

            String username = (String) getFieldValue( "username", obj );
            if ( username == null || username.equals( "" ) )
            {
                ctxt.addActionError( "Username is required." );
            }
        }
        else if ( method.equals( "cvs" ) )
        {
            String cvsRoot = (String) getFieldValue( "cvsRoot", obj );
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ValidatorContext.addActionError()

        else if ( method.equals( "cvs" ) )
        {
            String cvsRoot = (String) getFieldValue( "cvsRoot", obj );
            if ( cvsRoot == null || cvsRoot.equals( "" ) )
            {
                ctxt.addActionError( "CVS root is required." );
            }
        }
        else if ( method.equals( "file" ) )
        {
            String directory = (String) getFieldValue( "directory", obj );
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ValidatorContext.addActionError()

        else if ( method.equals( "file" ) )
        {
            String directory = (String) getFieldValue( "directory", obj );
            if ( directory == null || directory.equals( "" ) )
            {
                ctxt.addActionError( "Directory is required." );
            }
        }

        if ( ctxt.hasActionErrors() )
        {
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ValidatorContext.addActionError()

            new org.codehaus.redback.components.scheduler.CronExpressionValidator();

        ValidatorContext ctxt = getValidatorContext();
        if ( !cronExpressionValidator.validate( String.valueOf( cron ) ) )
        {
            ctxt.addActionError( "Invalid cron expression value(s)" );
            return;
        }
    }
}
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ValidatorContext.addActionError()

        if ( !snapshotsPolicy.equals( "interval" ) )
        {
            if ( snapshotsInterval.intValue() != 0 )
            {
                ctxt.addActionError( "Snapshots Interval must be set to zero." );
            }
        }

        if ( !releasesPolicy.equals( "interval" ) )
        {
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ValidatorContext.addActionError()

        if ( !releasesPolicy.equals( "interval" ) )
        {
            if ( releasesInterval.intValue() != 0 )
            {
                ctxt.addActionError( "Releases Interval must be set to zero." );
            }
        }

        if ( ctxt.hasActionErrors() )
        {
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ValidatorContext.addActionError()

                if (isActionError(violation)) {
                    if (LOG.isDebugEnabled()) {
                  LOG.debug("Adding action error '#0'", message);
                    }
                    validatorContext.addActionError(message);
                } else {
                    ValidationError validationError = buildValidationError(violation, message);

                    // build field name
                    String fieldName = validationError.getFieldName();
View Full Code Here

Examples of com.opensymphony.xwork2.validator.ValidatorContext.addActionError()

        ValidatorContext ctxt = getValidatorContext();

        if ( !validator.validate( cronExpression ) )
        {
            // FIXME i18n
            ctxt.addActionError( "Invalid cron expression value(s)" );
            return;
        }
    }

}
View Full Code Here

Examples of org.apache.struts2.TestAction.addActionError()

     public void testActionErrorsEscape() throws Exception {

        ActionErrorTag tag = new ActionErrorTag();
        TestAction testAction = new TestAction();
        testAction.addActionError("<p>hey</p>");
        stack.pop();
        stack.push(testAction);
        tag.setEscape(true);
        tag.setPageContext(pageContext);
        tag.doStartTag();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.