ItemEditor validation question

I have an app with a datagrid populate by items dragged into
it. I have an object method that adds up the quantities of the
dropped objects and displays an error in they exceed the amount
defined in the object's properties. Works fine.
However, now I need to include data checking on a PER ITEM
level; that is, the XML entries for each grid item has its own min
and max qty, not just the list as a total. Can anyone recommend a
strategy for updating my old code to accomodate this?
A typical entry is <item ln1="Bacon" minQy="1/2" maxQy="1"
qty="1" units="lb." sn="bacon" />
I create each list item with: private var _list2 : List = new
List(0,1,.25,.25,"lbs","Meats") and then check the list with
_errQty = _list2.checkTotal(app._chosen2);
The list object:
quote:
public class List extends Object {
import mx.collections.*;
include "DialogStrings.as";
// CONSTRUCTOR
function
List(_minC:Number,_maxC:Number,_minQ:Number,_maxQ:Number,_un:String,_ingName:String){
_minChoices = _minC;
_maxChoices = _maxC;
_minQty = _minQ;
_maxQty = _maxQ;
_units = _un;
_shortName = _ingName;
// PRIVATE VARIABLES
private var _minChoices : Number;
private var _maxChoices : Number;
private var _maxQty : Number;
private var _minQty : Number;
private var _units : String;
public var _shortName : String;
// checks the total quantities, returns error string
public function checkTotal(_arr:ArrayCollection) : String {
var _errType:String = "";
var _n:Number = getTotal(_arr)
if (_n > _maxQty) {
_errType = "over";
else if (_n < _minQty){
_errType = "under";
} else {
_errType = "";
switch (_errType){
case "over":
return getMaxQtyError();
break;
case "under":
return getMinQtyError();
break;
case "":
return "";
trace("Quantity OK");
break;
default:
return "";
trace("no matching error condition");
break;
// adds up the quantities, returns sum
private function getTotal(_arr:ArrayCollection) : Number {
var _sum : Number = 0;
var _length : Number = _arr.length;
for(var i:Number=0; i<_length; i++) {
var _item : Object = _arr.getItemAt( i );
var _value : Number = _item["@qty"];
_sum += _value;
return _sum;

Thanks I'll just have to wait till I get the email back.
I had a look now and it appears Apple have added Macbook Air to the list. I was confused for quite some time as to what to choose when Air wasnt on the drop down menu.
As long as the serial number dictates the vaildity of my request rather than the model then I'm happy.
thanks

Similar Messages

  • Struts and validation question ?

    hi,
    i am using the struts framework for my application, i have a simple jsp logon page (username, password)
    i have defined a validtion.xml file
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE form-validation PUBLIC
              "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
              "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
        Validation Rules for the Struts Example Web Application
        $Id: validation.xml,v 1.8 2003/05/25 22:51:20 dgraham Exp $
    -->
    <form-validation>
        <!-- ========== Default Language Form Definitions ===================== -->
        <formset>
            <form name="logonForm">
                <field property="username"
                        depends="required, minlength,maxlength">
                    <arg0   key="prompt.username"/>
                    <arg1   key="${var:minlength}" name="minlength"
                       resource="false"/>
                    <arg2   key="${var:maxlength}" name="maxlength"
                       resource="false"/>
                    <var>
                        <var-name>maxlength</var-name>
                        <var-value>16</var-value>
                    </var>
                    <var>
                        <var-name>minlength</var-name>
                        <var-value>3</var-value>
                    </var>
                </field>
                <field property="password"
                        depends="required, minlength,maxlength">
                    <arg0   key="prompt.password"/>
                    <arg1   key="${var:minlength}" name="minlength"
                       resource="false"/>
                    <arg2   key="${var:maxlength}" name="maxlength"
                       resource="false"/>
                    <var>
                        <var-name>maxlength</var-name>
                        <var-value>16</var-value>
                    </var>
                    <var>
                        <var-name>minlength</var-name>
                        <var-value>3</var-value>
                    </var>
                </field>
            </form>
            <form name="registrationForm">
                <field property="fromAddress"
                        depends="required,email">
                    <arg0   key="prompt.fromAddress"/>
                </field>
                <field property="fullName"
                        depends="required">
                  <arg0     key="prompt.fullName"/>
                </field>
                <field property="replyToAddress"
                        depends="email">
                    <arg0   key="prompt.replyToAddress"/>
                </field>
                <field property="username"
                        depends="required">
                  <arg0     key="prompt.username"/>
                </field>
            </form>
        </formset>
    </form-validation>i have also the validation-rules.xml file provided by the struts lib.
    i would like to force the content of 'username' property to be alphabetic.
    i guess i have to create my own element
    <validator name="alphabeticString"...> inside the validation-rules.xml file, but i am newbie in javascript programming.
    i have tree question.
    1) why the validation code inside the validator element is written in javascript since it's not going to be executed at client side???
    2)can i use java instead ? (to code teh validation ...)
    3)has anyone got a code to solve this problem ?
    thanks for your help

    i would like to force the content of 'username' property to be alphabetic.
    i guess i have to create my own element
    <validator name="alphabeticString"...> inside the validation-rules.xml file,
    but i am newbie in javascript programming.Not for something that simple... there's a validator rule called mask, which takes a regular expression as an argument, so if you want only a-z: "[a-zA-Z]*" should work.
    1) why the validation code inside the validator element is written in javascript since it's not going to be executed at client side???It is validated on the client, or can be. You have to include the javascript with the html:javascript tag library tag and specify the form name. Then you need to put the onsubmit="return validateFormName();" attribute in the form tag. If JS isn't supported, it'll still default back to the server side validation.
    2)can i use java instead ? (to code teh validation ...)Don't include the JS stuff.

  • Table validation question

    Hi
    I have created 2 tables zposition, zwork.
    The fields in zposition is department and position.
    The fields in zwork is empid, department, position, firstname and lastname.
    I wanted to create a validation that when i insert the data into the zwork, the system will automatically check against the zposition tables for the department and position that was store inside it. How do i do it?

    in ur zwork table where u find the fields department and position..
    in the table fields of zwork just put the cursor on this field say department and click the key button(on the top) it will propose for a check table and in there give the zposition table relavant field department.
    the answer is there in ur question itself ...
    // check against the zposition tables for the department and position--> u need to propose the check table on that field .
    so all in ur are validating the zwork department entry with zposition department field..

  • Data Template construction AND data template validation questions:

    Hello World.
    I am new to Oracle BI and I have sucessfully used the BI Java APIs to create from start to finish a pdf report process. I use the DataProcessor, RTFProcessor, and FOProcessor classes to do this. My question is other than the most simple of Data Templates being used, how is everyone building their data templates? And I would also like to know how are developers validating the actual data template file? I have submitted a request through my MetaLink account for obtaining either a "dtd" or "xsd" file that could be used to validate a constructed data template. I have not received any real answers. I plan on using either XMLSpy or MyEclispse 6 to create my data templates, but I need a "rule book" dtd or xsd file in order to use the auto prompting feature. Making a data template "in the dark" cannot be the method of choice for all of the developers that visit this forum. I see some really fancy/detailed reports and I would like to see how people are building there data templates. Building the data template is at least half the battle when constructing a BI report.
    Thanks for your time.

    Notepad is the developer's choice for data definitions, seriously.
    I have seen and used XMLSpy and have Stylus Studio but they are really a bit of overkill for the data templates. I use Stylus Studio for some of our XML-FO format templates, but that is another story.
    Scott
    Edited by: ScottC on Oct 22, 2008 3:00 PM

  • Validator Question

    Hi i am creating an application where a user simply enters their details such as name, email etc which should be then validated using the validator. If the details are correct it should redirect the user to my Acknowledge page, however if not it will put the user back to the original part displaying error messages to re-enter their details. Now as it stands i already have the a form for the user to enter their details, enterStudentDetails.jsp, and i am trying to test that their email is not left blank but when i do leave it blank, and hit the submit button, it goes into my Acknowledge.jsp page. That is the issue i have at the moment, and i am trying use the validator to check the input on the server side to display the error message.
    enterStudentDetails.jsp
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Enter Student Details</title>
        </head>
        <body>
        <h1>Enter Student Details</h1>
        <html:form action="ValidateDetails">
            <table border="1">
                <thead>
                    <tr>
                        <td>Email :
                        <td><bean:message key="validatedetails.email" />
                        <th> <html:text property="email" size="32"/>
                        <th><html:errors property="email" />
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>First Name:</td>
                         <td><bean:message key="validatedetails.firstName" />
                        <td><html:text property="firstName"/></td>
                        <td><html:errors property="firstName"/></td>
                    </tr>
                    <tr>
                        <td>Last Name: </td>
                         <td><bean:message key="validatedetails.lastName" />
                        <td><html:text property="lastName"/></td>
                        <td><html:errors property="lastName"/></td>
                    </tr>
                    <tr>
                        <td> Password
                         <td><bean:message key="validatedetails.password" />
                        <td><html:password property="password"/></td>
                        <td><html:errors property="password"/></td>
                    </tr>
                    <tr>
                        <td> Confirm Password
                         <td><bean:message key="validatedetails.confirmPassword" />
                        <td><html:password property="confirmPassword"/></td>
                        <td><html:errors property="confirmPassword"/></td>
                    </tr>
                    <tr>
                        <td>Date of birth (dd/mm/yyyy):
                        <td><html:text property="dateOfBirth"/></td>
                        <td><html:errors property="dateOfBirth"/></td>
                    </tr>
                    <td><html:submit value="sign up!" />
                </tbody>
            </table>   
        </html:form>
        <%--
        This example uses JSTL, uncomment the taglib directive above.
        To test, display the page like this: index.jsp?sayHello=true&name=Murphy
        --%>
        <%--
        <c:if test="${param.sayHello}">
            <!-- Let's welcome the user ${param.name} -->
            Hello ${param.name}!
        </c:if>
        --%>
        </body>
    </html>ValidateDetails.java
    * ValidateDetails.java
    * Created on 10 April 2008, 22:00
    package com.myapp.struts;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionForward;
    * @author
    * @version
    public class ValidateDetails extends Action {
        /* forward name="success" path="" */
        private final static String SUCCESS = "success";
         * This is the action called from the Struts framework.
         * @param mapping The ActionMapping used to select this instance.
         * @param form The optional ActionForm bean for this request.
         * @param request The HTTP Request we are processing.
         * @param response The HTTP Response we are processing.
         * @throws java.lang.Exception
         * @return
        public ActionForward execute(ActionMapping mapping, ActionForm  form,
                HttpServletRequest request, HttpServletResponse response)
                throws Exception {
            return mapping.findForward(SUCCESS);
    }DetailsForm.java
    * DetailsForm.java
    * Created on 10 April 2008, 21:52
    package com.myapp.struts;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionMessage;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    * @author
    * @version
    public class DetailsForm extends org.apache.struts.validator.ValidatorForm {
       private int id;
        private String firstName;
        private String lastName;
        private String password;
        private String confirmPassword;
        private String email;
        private Date dateOfBirth;
        public int getId() {
            return id;
        public String getFirstName() {
            return firstName;
        public String getLastName() {
            return lastName;
        public String getPassword() {
            return password;
        public String getEmail() {
            return email;
        public Date getDateOfBirth() {
            return dateOfBirth;
        public String getConfirmPassword() {
            return confirmPassword;
        public void setFirstName(String s) {
            firstName = s;
        public void setLastName(String s) {
            lastName = s;
        public void setPassword(String s) {
            password = s;
        public void setEmail(String s) {
            email = s;
        public void setDateOfBirth(String s) {
            try {
                // TODO: put the date format in the resources file
                dateOfBirth = new SimpleDateFormat("dd/MM/yyyy").parse(s);
            } catch (ParseException e) {
        public void setConfirmPassword(String s) {
           confirmPassword = s;
           password = confirmPassword;
        public DetailsForm() {
            super();
            // TODO Auto-generated constructor stub
    /**  public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
            ActionErrors errors = new ActionErrors();
            if (getName() == null || getName().length() < 1) {
                errors.add("name", new ActionMessage("error.name.required"));
                // TODO: add 'error.name.required' key to your resources
            return errors;
       */struts-config.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
        <form-beans>
            <form-bean name="DetailsForm" type="com.myapp.struts.DetailsForm"/>
        </form-beans>
        <global-exceptions>
        </global-exceptions>
        <global-forwards>
            <forward name="welcome"  path="/Welcome.do"/>
        </global-forwards>
        <action-mappings>
            <action input="/enterStudentDetails.jsp"
                    validate="true"
                    name="DetailsForm"
                    path="/ValidateDetails"
                    scope="request"
                    type="com.myapp.struts.ValidateDetails">
                <forward name="success" path="/Acknowledge.jsp"/>
            </action>
            <action path="/Welcome" forward="/welcomeStruts.jsp"/>
        </action-mappings>
        <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
        <message-resources parameter="com/myapp/struts/ApplicationResource"/>   
        <!-- ========================= Tiles plugin ===============================-->
        <!--
        This plugin initialize Tiles definition factory. This later can takes some
        parameters explained here after. The plugin first read parameters from
        web.xml, thenoverload them with parameters defined here. All parameters
        are optional.
        The plugin should be declared in each struts-config file.
        - definitions-config: (optional)
        Specify configuration file names. There can be several comma
        separated file names (default: ?? )
        - moduleAware: (optional - struts1.1)
        Specify if the Tiles definition factory is module aware. If true
        (default), there will be one factory for each Struts module.
        If false, there will be one common factory for all module. In this
        later case, it is still needed to declare one plugin per module.
        The factory will be initialized with parameters found in the first
        initialized plugin (generally the one associated with the default
        module).
        true : One factory per module. (default)
        false : one single shared factory for all modules
        - definitions-parser-validate: (optional)
        Specify if xml parser should validate the Tiles configuration file.
        true : validate. DTD should be specified in file header (default)
        false : no validation
        Paths found in Tiles definitions are relative to the main context.
        -->
        <plug-in className="org.apache.struts.tiles.TilesPlugin" >
            <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />     
            <set-property property="moduleAware" value="true" />
        </plug-in>
        <!-- ========================= Validator plugin ================================= -->
        <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
            <set-property
                property="pathnames"
                value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
        </plug-in>
    </struts-config>Application Resource file
    errors.header=
    errors.prefix=<span style="color: red">
    errors.suffix=</span>
    errors.footer=
    DetailsForm.required.email=Email must be entered
    validatedetails.email=Email
    validatedetails.firstName=First Name
    validatedetails.lastName=Last Name
    validatedetails.password=Password
    validatedetails.confirmPassword=Confirm Password
    error.email.required=Email must be entered
    errors.header=<UL>
    errors.prefix=<LI>
    errors.suffix=</LI>
    errors.footer=</UL>
    errors.invalid={0} is invalid.
    errors.maxlength={0} can not be greater than {1} characters.
    errors.minlength={0} can not be less than {1} characters.
    errors.range={0} is not in the range {1} through {2}.
    errors.required={0} is required.
    errors.byte={0} must be an byte.
    errors.date={0} is not a date.
    errors.double={0} must be an double.
    errors.float={0} must be an float.
    errors.integer={0} must be an integer.
    errors.long={0} must be an long.
    errors.short={0} must be an short.
    errors.creditcard={0} is not a valid credit card number.
    errors.email={0} is an invalid e-mail address.
    errors.cancel=Operation cancelled.
    errors.detail={0}
    errors.general=The process did not complete. Details should follow.
    errors.token=Request could not be completed. Operation is not in sequence.
    welcome.title=Struts Application
    welcome.heading=Struts Applications in Netbeans!
    welcome.message=It's easy to create Struts applications with NetBeans.validation.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
    <form-validation>
        <form name="DetailsForm">
            <field
                property="email"
                depends="required,email">
                <arg key="DetailsForm.email"/>
            </field>
            <field
                property="firstName"
                depends="required">
                <arg key="error.firstName" />
            </field>
            <field
                property="lastName"
                depends="required">
                <arg key="error.lastName" />
            </field>
            <field
                property="password"
                depends="required,minlength">
                <arg key="error.password" />
                <arg1 name="minlength" key="${var:minlength}" resource="false" />
                <var>
                    <var-name>minlength</var-name>
                    <var-value>6</var-value>
                </var>
            </field>
            <field
                property="confirmPassword"
                depends="required,validwhen">
                <arg key="error.password" />
                <msg name="validwhen" key="error.password.confirm" />
                <var>
                    <var-name> test </var-name>
                    <var-value> (*this* == password) </var-value>
                </var>
            </field>
            <field
                property="dateOfBirth"
                depends="required,date">
                <arg key="Date of Birth" resource="false" />
                <var>
                    <var-name>datePatternStrict</var-name>
                    <var-value>dd/mm/yyyy</var-value>
                </var>
            </field>
        </form>
        <!--
         This is a minimal Validator form file with a couple of examples.
    -->
        <global>
            <!-- An example global constant
            <constant>
                <constant-name>postalCode</constant-name>
                <constant-value>^\d{5}\d*$</constant-value>
            </constant>
            end example-->
        </global>
        <formset>
            <!-- An example form -->
            <form name="logonForm">
                <field
                    property="username"
                    depends="required">
                    <arg key="logonForm.username"/>
                </field>
                <field
                    property="password"
                    depends="required,mask">
                    <arg key="logonForm.password"/>
                    <var>
                        <var-name>mask</var-name>
                        <var-value>^[0-9a-zA-Z]*$</var-value>
                    </var>
                </field>
            </form>
        </formset>
        <!-- An example formset for another locale -->
        <formset language="fr">
            <constant>
                <constant-name>postalCode</constant-name>
                <constant-value>^[0-9a-zA-Z]*$</constant-value>
            </constant>
            <!-- An example form -->
            <form name="logonForm">
                <field
                    property="username"
                    depends="required">
                    <arg key="logonForm.username"/>
                </field>
                <field
                    property="password"
                    depends="required,mask">
                    <arg key="logonForm.password"/>
                    <var>
                        <var-name>mask</var-name>
                        <var-value>^[0-9a-zA-Z]*$</var-value>
                    </var>
                </field>
            </form>
        </formset>
    </form-validation>Now, i have read a few articles on the subject but i am slighly confused in that in terms of creating a bean does it necessarily nead to be a dynamic bean? or can i still keep the one that i have right now for me to use validator. Can somebody provide some insight on what i would need to do because i am slighly confused.
    Thanks.

    oh, i didn't realize i could do that. I acutally already
    found a way to do it, if a whole bunch of if statments :) mhehe,
    but it works. i'lll try to do it your way :)
    another question. It seems that in my functions if i
    reference a field which is located on a different tab, it does not
    recoglize it, and i get a runtime error, unless i click on that
    tab, before clicking on the "validate" button.
    does anyone know why it's not recognizing it? do i need to
    somehow declare that field in my init()?
    Thanks!

  • XML SCHEMA validation question

    i'm using jdk 1.4.2 and am trying to validate an xml document against an xml schema. i don't have any packages like xerces or apache and am trying to avoid having to use them. i've had a look at the jdk 1.5 api documentation, and it seems to have some new classes dedicated to xml validation using schemas that 1.4.2 does not have (e.g. the Schema class). my question is, is it possible to do xml validation against a schema only using jdk 1.4.2 and without the likes of the xerces and apache parser packages?
    any help much appreciated, thanks

    The tutorial on Schema Validation parses/validates with the SAXParserFactory. J2sdk 1.4.2 JAXP has an error in the implementation of the SAXParserFactory. Parse/validate with the DocumentBuilderFactory instead of the SAXParserFactory.
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPSAX9.html

  • XSLT Validation Question

    Well I'm diving into XSLT for the first time.  I've gotten the RSS feed to display just fine, but my problem is with the XHTML 1.0 strict validation and it could just be DW.
    What I have is a XSLT fragment file, saved as .xsl, with the feed.  I then used the server behaviors to add the fragment to my primary PHP document.  It seems that when DW adds this code into a PHP document it adds a script to the document and then includes the xsl file where I place it on the page.  However, the beginning of the XSL file shows:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    That is the line that the validator says won't validate because the only place it is allowed is at the beginning of the file but since DW is including the xsl fragment file in the middle of a file it won't validate.  Is the XSL fragment document still valid without that code at the top of it?

    Maybe this helps?
    http://www.objectsbydesign.com/projects/xslt/xhtml.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Validation question

    Here is my JSP code
    <h:dataTable value="#{manageAssetMB.currbean.allAttrAssociations}" var="currAttrAssoc" >
    <h:column>
    <h:outputText id="input" value="#{currAttrAssoc.attr.name}" />
    <h:outputText value="*" rendered="#{currAttrAssoc.mandatory}" />
    </h:column>
    <h:column>
    <h:inputText id="input2" required="true" validator="#{manageAssetMB.control.validateInput }" value="#{currAttrAssoc.input }" rendered="#{currAttrAssoc.sizeOfPossibleValues == 0 && currAttrAssoc.mandatory}">
    <f:validateLength maximum="500"/>
    </h:inputText>
    <div style="color: red"><h:message for="input2"/>
    </div>
    </h:column>
    </h:dataTable>
    my validation method:
    public void validateInput(FacesContext context, UIComponent componentToValidate, Object value) {
    System.out.println("hello world");
    HtmlInputText component = (HtmlInputText) FacesContext.getCurrentInstance().getViewRoot().findComponent("input");
    String name = value.toString();
    System.out.println(name);
    //System.out.println(component.getValue().toString());
    if(component.getValue().toString().equalsIgnoreCase("Name")){
    FacesMessage message = new FacesMessage("input Name");
    throw new ValidatorException(message);
    else if(component.getValue().toString().equalsIgnoreCase("Address")){
    FacesMessage message = new FacesMessage("Wrong address");
    throw new ValidatorException(message);
    I want to get value (the title) of ID "input" which can be Name, Address. And afterwards in the validation i check what type of title it is and determine how to evaluate it using if/else if statement.
    This doesn't work. Any idea on how to fix this?
    thank you!

    Duplicate the value for the outputText as the label of the inputText. E.g.
    <h:outputText value="#{currAttrAssoc.attr.name}" />
    <h:inputText id="input2"
        value="#{currAttrAssoc.input}"
        label="#{currAttrAssoc.attr.name}"
    />The standard messages will substitute the label when it is defined.

  • Java Digital Signature - certificate validation question

    I am not sure if this is possible but here is my problem/question:
    I need to publish a web based program in Citrix. My question is, everytime a user logs into Citrix and executes this application they are prompted to trust the Java certificate. Usually a user would choose "always trust" and they would not be prompted again. However, the Citrix environment is setup so that when a user logs out of Citrix all their user configuration is deleted. So the next time they log in, they are prompted once again to trust the Java cert.
    Is there a way to automatically sign this certificate before it prompts a user or a way to script something that wouldn't ask the user again to validate this? Sorry if this sounds like I have no idea what I am talking about but I don't :)
    The Citrix admin said he could launch this command or script (if possible) before the application is launched so it would sign the cert or place the needed cert in the users profile. Hope this makes sense.
    Any suggestions would be greatly appreciated.
    Thanks in advance,
    Scott

    Try the PDFBox mailing-list.

  • Xmlagg -validation- question

    Hi,
    I'm using db version 9.2.0.7.0
    Can someone explain me these differences when using xmlagg :
        select xmlagg(xmlelement( "object"
                                , xmlelement("name",object_name)
                                , xmlelement("type",object_type)
        from  all_objects
        where rownum < 25;
        >>Output : Not pretty-printed
        create table tt_test_01
        ( col1 xmltype )
        insert into tt_test_01
        select xmlelement( "object"
                         , xmlelement("name",object_name)
                         , xmlelement("type",object_type)
        from  all_objects
        where rownum < 25;
       select xmlagg(col1)
       from    tt_test_01
       >> Output : pretty-printedThis causes some troubles in my case.
    The pretty print can cause validation errors, which I actually want to ignore
    ( for example -assume there is a chr(128) in the selected data- :
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00216: invalid character 128 (0x80)
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1 I know that these characters aren't allowed in XML, however I don't want to get this error at this point, when selecting.
    Can anyone explain me why method 1 doesn't validate
    and method 2 does validate ?
    Thanks in advance,
    Art

    In general XMLAGG should not pretty print. However whenever we parse we tend to pretty print. That said we do not support constucting invalid XML under any cirumstances so the only bug I see here is the fact that we do not throw the parsing error in all cases..

  • Newbie validation question!

    Hey,
    i 've just made the "BC4J Hotel Reservation System" sample from the oracle
    site. : http://otn.oracle.com/products/bc4j/index2.htm?Code&listing.htm
    Everythin compiled ok, and i used the provided validation code. Now when i
    run the application-module tester (Jdeveloper)...i get the validation error
    just when i dubbelclick one of the viewobjects, even before inserting any
    data....Is the validation not supposed to be active only when entering new data?
    give me a clue plz.
    null

    Please provide the validation error that is being caught. If you have required fields and are navigating to another row, you would get validation errors.
    -Stuart
    null

  • Struts2 Validation Question

    I'm just starting on Struts and following a tutorial from a book that does validation. It uses xml config but I'm trying to get it to work with annotations. Everything seems to be right, including, on an error, it redirects to the right page. The problem is that the validation errors don't appear above the fields that have the problems, like they are supposed to. In fact, they don't appear anywhere. Strangely, if I put in the tag <s:fielderror /> then the correct errors appear where the tag is, but my understanding is that I do NOT need that tag and they SHOULD automatically appear under the appropriate fields.
    Here's my JSP:
    <s:form action="register">
         <s:textfield name="user.username" label="Username"/>
         <s:password name="user.password" label="Password"/>
         <s:textfield name="user.portfolioName" label="Enter a name for your portfolio"/> 
        <s:submit/>
    </s:form>Here's my Register action:
    @Results({
        @Result(value="/security/RegistrationSuccess.jsp"),
        @Result(name="input",value="/security/Registration.jsp")
    public class RegisterAction extends ActionSupport
        private User user; //we can use a user object and have the framework automatically instantiate it
        public String execute()
            getPortfolioService().createAccount( user );
            return SUCCESS;
        public User getUser() {
            return user;
        public void setUser(User user) {
            this.user = user;
        public void validate(){
            /* Retrieve our simple portfolio service object. */
            PortfolioService ps = getPortfolioService();
            /* Check that fields are not empty */
            if ( user.getPassword().length() == 0 ){       
                addFieldError( "user.password", getText("password.required") );
            if ( user.getUsername().length() == 0 ){       
                addFieldError( "user.username", getText("username.required") );
            if ( user.getPortfolioName().length() == 0  ){         
                addFieldError( "user.portfolioName", getText( "portfolioName.required" ));
            /* Make sure user doesn't already have an account */
            if ( ps.userExists(user.getUsername() ) ){     
                addFieldError("user.username", getText( "user.exists"));
        public PortfolioService getPortfolioService( )  {
            return new PortfolioService();
    }Edited by: JFactor2004 on Jul 2, 2010 6:12 AM

    I take it back. I just restarted eclipse and tried it again and it works fine. There seems to be some problem with eclipse and tomcat where the old versions of files don't seem to be replaced by new versions of them. Anyone else using eclipse + tomcat and noticing this?

  • Inline Validation Question

    I was wondering if it is possible to have two separate messages thrown in a validation. One that would show in the Notification area, and one that would show inline with the item.
    The reason why I ask is that currently I have everything on a page very delicately lined up. When an error message fires, it pushes everything to the right, which messes up the alignment. Plus if multiple items on the same line throw errors, it no longer fits on the page like the users want.
    I'd like to have the actual error message display at the top of the screen (notification area) and just the red X that Apex puts next to items that fail validation appear next to the item.
    Thanks in advance.
    Josh

    Josh,
    One way you could do this would be to set the validation to display both inline and in the notification area. Then edit (or create a copy and edit) the label template. There is a section of the template "Error Display". You could just remove the substitution #ERROR_MESSAGE# and the break tag. This way you are just left with the CSS class.
    You could also add the error message as a title attribute to the div and the user would then get a tooltip.
    eg <div class="t20InlineError" title="#ERROR_MESSAGE#">
    Greg
    Edited by: Greg Jarmiolowski on Aug 24, 2009 1:26 PM

  • TextInput Validation question

    Hi,
    I am looking to a validation for TextInput wherein the input has to be:
    1. At least 6 words (yes, not albhabets/characters). Maximum 10 words.
    2. Every word is of at least 2 characters.
    Please provide help/links if you know a solution.
    Thanks,
    Sam

    I think you can do what you want by using the valueCommit event of a TextInput control to trigger validation after a user enters information in the control
    From there I'd use an array from .text.split(' ') to get the list of space separated chars/words.
    You can then check the array length  for number of words
    and the length of each array element for the minimum 2 char requirement.
    My suggestion..
    Don

  • Time Validation question

    I am using the time validation and it works well, however my
    case (which I think would be common) doesn't seem to be supported,
    or I am just not sure how to configure. I want someone to enter in
    a time such as '8:45 AM' or '11:30 PM'. It seems as though it
    requires either a leading zero, or a single diget, but not a way to
    do both. The code below allows for the '8:45 PM' option. But not
    11:45 PM.
    <script type="text/javascript">
    var eventtime = new
    Spry.Widget.ValidationTextField("eventtime", "time", {format:"h:mm
    tt", hint:"8:00 AM", validateOn:["blur", "change"],
    useCharacterMasking:true});
    </script>
    The example on this page is forces the leading zero.
    http://labs.adobe.com/technologies/spry/samples/validationwidgets/TextfieldValidationSampl e.html
    Am I missing something or does that pretty much require users
    to always do leading zero in order to enter the full range of
    time?

    The textfield validation widget implementation doesn't
    support variable length for time format. To cover your use-case you
    might use the "hh:mm:tt" format and add the leading zero for single
    digit case.
    The time formats that are accepted are: "HH:mm" (default),
    "HH:mm:ss", "hh:mm tt", "hh:mm:ss tt", "hh:mm t", "hh:mm:ss t".

Maybe you are looking for