Validate method on EoImpl

hi jdev groups
using 11.1.1..5.0-adfbc
i had a validate method in particulalr xxxeoimpl class.
Reason: while perform tab out in ui the function will fires. well it performs it's work correclty.
code in Eoimpl class
    public boolean validatexxxSubTerr(String xxxsubterr) {
        if(xxxsubterr!=null){
             setAttributeInternal("xxxTerrId",FuncFindTerritory("somevaluevalue",prospsubterr));
        else{
           throw new JboException("Territory Not Found") ;
        return true;
  code in Eoimpl class
    public String FuncFindTerritory(String pbu, String pxxxsubterr){
        CallableStatement cs = null;
        try{
        cs=getDBTransaction().createCallableStatement("begin ? := FUNC_FIND_TERRITORY(?,?); end;",0);
        cs.registerOutParameter(1, Types.VARCHAR);
        cs.setString(3,pxxxsubterr);
        cs.setString(2,pbu);
        cs.executeUpdate();
        return cs.getString(1);
        catch(SQLException e){
        throw new JboException(e);
        finally
        if (cs!=null)
        try{
           cs.close();
         catch (Exception e){System.out.println (" Function Find Territory Exception Thrown "+e);}
    }my question is : I use this FuncFindTerritory in most of the eoimpl class.
so i dont want to duplicate the same FuncFindTerritory in all eo class.
is there any chance to define this function in am module access/call this function in eo particular validate method.
setAttributeInternal("xxxTerrId",FuncFindTerritory("somevaluevalue",prospsubterr)); // this what i meanif wrote like this means i have to define method(FuncFindTerritory) in eoimpl class.
instead of doing like this..
Adf provides to access the methods which is define in am? is there any way...
sorry for updating late.
thanks&&regards
adf7.

In theory you can access the AM from the EO but you should not. An EO represents one row of a table whereas the AM represents the the whole business logic. From this point of view where is no reason why an EO should need access to the AM.
Extending is a normal java mechanism which is wildly uses in frameworks. If you read the dev guide you'll find a paragraph which encourages you to build an extension for each framework class (for just this reason). This extension classes can hold all the stuff which is global for your application.
Timo

Similar Messages

  • Validate() method not working as it should

    I have a very weird problem here. I have a form-bean where i validate the user input and add them to the errors. When i click the submit button, the errors are displayed not on the same page but on the page as indicated in the <forward name="success" ...> page. very strange. i have done the following:-
    added <html:errors/>
    included the input attribute for that action in struts-config
    set the validate attribute to true in struts-config.
    i cant think of anything else. I've been picking my brains for a while now. Am i missing something really obvious folks? Please let me know !!!!!
    Regards
    Lexus

    Lemme see your validate method implementation and the appropriate snippet from the struts-config.xml file and I'll see what I can do for ya.

  • How to use ActionForm validate() method in ADF/Struts project

    Hi
    We are developing a project using ADF/Struts. We are not planning to use entity level validation. Rather we prefer to have it at Struts Form Bean level. So we need to have validate() method in Form Bean.
    That mean we need to have seperate bean for all the actions /jsp. The ADF's DataForm form bean is not gonna work for us. Is that correct.
    Please let me know...am I in the right direction.
    That could be a different discussion why we don't prefer entity level validation

    You can use the Struts validator plug-in (there's a howto on doing that on OTN) and it will handle the basics for you through XML definitions.
    If you want to specifically have a Form bean with a Validate() then the issue is that the current "DataForm" is a generic bean driven of the databinding files, so yes you'd have to write a bean per screen to use instead and loose that benefit of having a universal Bean. (Internally the DataPage and DataActions will respect the ActionForm APIs so you can pluf your own ActionForm subclass in with no problem.
    Plan B might be to leave the DataForm Bean in place and instead override the lifecycle of the datapage, probably in prepareModelUpdates()

  • Why is the ActionForms validate-Method called twice?

    Hello forum,
    I'm new to struts and want to develop a form, where an internetuser can leave a comment to an article. Just like most sides, an image with an text is displayed, the text has to be written into an inputfield before the comment is commited in order to be saved.
    When an user puts in no text or a wrong one, a errormessage is displayed, the old image is deleted and an new one is created and shown to the user. His input still stays in the fields.
    I proof the correctness of the word in the validate-Method of the ActionForm and it works fine.
    Now I've the following problem:
    If the user puts in the correct text, the comment is saved and the side is displayed again including his comment.. But also all the input of the form should be erased. But for some reason, its not and the validate method is called again and since there is a new wordvarifyingimage and a new text to be inserted, it throws an error which is displayed again. Also, all the input of his last message is present!
    So, I guess I miss a big point about the ActionForm handling. Why is the ActionForm called twice and why doesn't it erase the old input? I try to do this in the Action class after saving the comment, setting all the formparameters to "" or null.
    Can anybody give me a hint?
    Would be a big big help since I've not found anything googling about this issue.
    If you need code, just tell me which part I put in here (ActionForm, Action, struts-config or jsp-file)
    Thanxs in advance,
    strutsnewbytopro

    my jsp:
    <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="struts/html-el" prefix="html" %>
    <%@ taglib uri="jstl/c" prefix="c" %>
    <%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <style type="text/css" title="currentStyle" media="screen">
              @import "../library/css/blog.css";     
         </style>
    <script language="javascript">
         function sendMail(){
              document.forms[0].formaction.value ='mail';
              document.forms[0].submit();
         function saveComment(){
              document.forms[0].formaction.value ='comment';
              document.forms[0].submit();
         </script>
    </head>
    <body>
    <html:form action="/blog">
    <div id="container">
         <div id="leftside">
              <logic:messagesPresent>
                   <div id="errors">
                        <div style="color:#CC3333; ">
                        <p><span id="errorHeaders"><bean:message key="errors.validation.header"/></span>
                             <html:messages id="error">
                             <c:out value="${error}"/>
                             </html:messages>
                        </p></div>
                     </div>
              </logic:messagesPresent>
                 .... show blogentry ...          
              <logic:present name="comments">
                   <div id="divblogcomment">
                   <logic:iterate name="comments"  id="com">
                   <div class="breaker10" style="clear:left; "></div>
    <div class="rowblogcommentdate" style="width:150px;"<a href="<bean:write name="com" property="website" />"><bean:write name="com" property="username" /></a> am <bean:write name="com" property="postdate" /></div>
                   <div class="rowblogcomment"><bean:write name="com" property="comment" /></div>
                   </logic:iterate>
                   <div class="breaker10" style="clear:left; "></div>
    </div>
              </div>
                             </logic:present>
                             <logic:notPresent name="savedcomment">
                                  <div id="writeblogcomment">
                                  <div class="topbig"><div class="headsmall">enter Comment</div></div>
                                  <div id="bginhaltwriteblogcomment">
                                       <div class="breaker10" style="clear:left; "></div>
                                       <div align="center">
                                            <table cellpadding="0" cellspacing="0" border="0">
                                                 <tr>
                                                      <td>Name:</td>
                                                      <td>  </td>
                                                      <td><html:text size="50" name="blogForm2" styleClass="inputtext" property="username"/></td>
                                                      <td>  </td>
                                                      <td>Web:</td>
                                                      <td>  </td>
                                                      <td><html:text size="50" name="blogForm2" styleClass="inputtext" property="webaddress"/></td>
                                                 </tr>
                                                 <tr>
                                                      <td>Enter Code:</td>
                                                      <td>  </td>
                                                      <td><html:text size="66" name="blogForm2" styleClass="inputtext" property="commentword"/></td>
                                                      <td>  </td>
                                                      <td >Code:</td>
                                                      <td>  </td>
                                                      <td><img src="<bean:write name="entry" property="commentpicurl" />"></td>
                                                 </tr>
                                                  <tr>
                                                      <td colspan="7">Comment<br><html:textarea name="blogForm2" styleClass="comment" property="comment" /></td>
                                                 </tr>
                                                 <tr>
                                                      <td colspan="7"><html:submit styleClass="inputtext" onmousedown="javascript:saveComment();"><bean:message key="button.save"/></html:submit></td>
                                                 </tr>                                        
                                            </table>
                                       </p>
                                       </div>
                                       <div class="bottombig"></div>
                                  </div>
                             </div>
                             </logic:notPresent>
                             <logic:present name="savedcomment">
                             <div id="writeblogcomment">
                                  <div class="topbig">Comment saved<div class="headsmall">Kommentar gespeichert</div></div>
                                  <div id="bginhaltwriteblogcomment">
                                       <div class="breaker10" style="clear:left; "></div>
                                       <div align="center">
                                            <table cellpadding="0" cellspacing="0" border="0">
                                                 <tr>
                                                      <td>Comment saved</td>
                                                 </tr>
                                            </table>
                                       </p>
                                       </div>
                                       <div class="bottombig"></div>
                                  </div>
                             </div>
                             </logic:present>
                             </div>
    </div>
    <html:hidden name="blogForm2" property="formaction"/><br>
    <html:hidden name="blogForm2" property="id"/><br>
    <% session.removeAttribute("savedcomment"); %>
    </html:form>
    </body>
    </html>

  • Validate Method doesn't fire in insert - is it a bug ?

    I tried to use the validate method in a VO based upon 2 Entities.
    It works but when I insert a new row it doesn't fire.
    Is it a bug ?
    If not what's explanation for that behaviour ?
    Tks
    Tullio

    ViewObjectImpl.validate() is not called automatically in the BC4J framework.
    Validation by default should be implemented in the entities and EntityImpl.validate() is called by the framework on invalid entities when the Entity needs to be validated.

  • Struts - How not to lose parameter after validate() method

    Hi
    I have following problem. When I submit a form(action= sendMessage.do) from site generated in writeMessage.do?id=1 action and validate method find errors it forwards to writeMessage.do I need to forward to writeMessage.do?id=1
    <action path="/sendMessage"
    type="SendMessageAction"
    name="writeMessageForm"
    scope="request"
    validate="true"
    input="/writeMessage.do">
    <forward name="ok" path="/info.jsp"/>
    </action>
    I need something like input="/writeMessage.do?id=xx" , but xx will be changing in runtime. How to solve that problem?

    Swap input="/writeMessage.do" with input="/sendMessage.jsp" (or whatever the name of the input JSP was). If I remember rightly this will fix it for the automatic validation errors, however you'll still get this problem if you need to test business rules/custom validation rules from within your application. To fix this copy the following class and specify a className attribute for your action element in the struts config
    i.e. <action ... className="com.whatever.CustomActionMapping" ... />
    package com.whatever
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class CustomActionMapping extends ActionMapping
        public ActionForward findForward(String forwardName, HashMap requestParams)
            ActionForward fwd = findForward(forwardName);
            Iterator iter1 = requestParams.keySet().iterator();       
            if (iter1.hasNext())
                StringBuffer basePath = new StringBuffer(fwd.getPath());           
                basePath.append("?");
                 while (iter1.hasNext())
                     String paramName = (String) iter1.next();
                     ArrayList paramValues = (ArrayList) requestParams.get(paramName);
                     Iterator iter2 = paramValues.iterator();
                     while (iter2.hasNext())
                         String paramValue = String.valueOf(iter2.next());
                          basePath.append(paramName);
                          basePath.append("=");
                          basePath.append(paramValue);
                          if (iter2.hasNext())
                              basePath.append("&");
                     if (iter1.hasNext())
                         basePath.append("&");
                 fwd = new ActionForward(fwd);
                 fwd.setPath(basePath.toString());
            return fwd;
    }Then in the execute method of your action do something like
    // Creates a map to store the request parameters in
    HashMap requestParams = new HashMap();
    // Helper method to extract a request parameter for 'teamId'
    Integer teamId = RequestHelper.getTeamIdParam(request);       
    // Adds the teamId parameter to the hash map
    setRequestParam(RequestHelper.TEAM_ID, teamId, requestParams);
    // Creates a new forward with the required request parameters dynamically appended to the forward path
    return ((CustomActionMapping) mapping).findForward(forwardName, requestParams);

  • Using Validate Method of ActionForm to validate JSP

    Hi...
    Am working on a struts application in which i have a struts jsp page which will contain a table of records that am populating while loading the page itself, each record of the table will have a check box associated with it.
    my requirement is that, i must select atleast one checkbox from the list of records before going for further processing from the page ie. i must validate whether the the user had selected any one of the check boxes. i am not usings struts validation plugin for this, instead am going for overrideing the validate method of ActionForm in my form bean.
    Now comes my problem:
    When i tried to validate the page without selecting any of the check boxes,the validate method is being called and its checking the values and returning the error message to my jsp page, but by the time the msg comes back to the jsp page the page is getting refreshed and all the previous list of records i had displayed in the page is lost giving me an error msg on jsp that "collection not found". The application scope is set to request and not to session. So i tried with setting the scope to session (which was not permissible by my requirements, still just for testing) but still am geting the same error
    i am stuck up with this problem for a long time and i couldnt find out any one who could solve it, and i have to use the Validate method of Action Form
    Please any one can explain whats the problem and what should i do
    Thanks in advance
    Rens

    ok, i'm going to try and make this short and sweet. let me know if you run into problems.
    first off, you may need to add apache commons-collections to your project.
    #1
    you will need to make a new bean class to represent your 'line' object. so if it was a Person we'd make a Person class with a String name, int age... blah blah blah.
    #2
    in your ActionForm class, add a
    java.util.List personList;and make a normal setter and getter for it
    #3
    this is the only tricky part, make (or add this to) your reset( ) function in your ActionForm...
    public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
         personList = ListUtils.lazyList(new java.util.ArrayList(), new Factory() {
              public Object create() { return new Person(); }
    }but replace the 'new Person()' part with whatever the bean class you made in Step 1 is
    #4
    now, in your Action class build the list of objects from the database, and set it into your form.
    #5
    in your .jsp code you will need to use the nested tags like so
    <nested:iterate id="personLine" property="personList">
              <TR>
                   <td><nested:write property="name"/></td>
                   <nested:hidden property="age"/>
              </TR>
    </nested:iterate>
    #6
    then back in your validate code or in your Action class you can access the list by calling yourForm.getPersonList() and validating it. if you find a problem and return with an error all the values will remain without having to talk to the database again.
    hope that helps.

  • How to get the reference of the cell id in validate method in adf

    Hi All,
    I am using Jdeveloper 11.1.1.2 and i am using custom validator where i have registered the validator in facesconfig.xml.I need to know how can i get the ID of the inputtext box which is present in the hierarchy as Panel Header->Table->column->textbox :-
    Below is my custom validator class source , please tell me how to get the reference of the textbox which is present in such hierarchy.:-
    package validator;
    import java.io.Serializable;
    import java.util.Date;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.validator.Validator;
    import javax.faces.validator.ValidatorException;
    import oracle.adf.view.rich.component.rich.input.RichInputDate;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adfinternal.view.faces.bi.util.JsfUtils;
    public class ValidateConversion implements Serializable, Validator {
    public ValidateConversion() {
    super();
    public void validate(FacesContext facesContext, UIComponent uIComponent,
    Object object) throws ValidatorException {
    System.out.println("*************");
    System.out.println((String)object);
    //get component id by get("AttributeName");
    String conversionComponentId = (String)uIComponent.getAttributes().get("UncommittedOrder_PH:t7:it14");
    System.out.println("conversionComponentId=" + conversionComponentId);
    RichInputText conversionComponent = (RichInputText)uIComponent.findComponent(conversionComponentId);
    Integer conversion = (Integer)conversionComponent.getValue();
    Integer quantityInBags = (Integer)object;
    //get labels from the two inputDate component.
    String conversionLabel = conversionComponent.getLabel();
    String quantityInBagsLabel = ((RichInputText)uIComponent).getLabel();
    Integer remainder = (quantityInBags % conversion);
    //throw error if valiation fails
    if (remainder > 0) {
    throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
    "The " + quantityInBagsLabel + " should be in multiples of" + conversion +".",
    null));
    Thanks,
    Plese reply!!!

    Thanks Jabr,
    This is my jsff page source and i need to find the reference of it14 which is the textbox :-
    <af:panelGroupLayout id="pgl1" styleClass="AFStretchWidth">
    <af:panelHeader text="Results" id="Results_PH" size="1">
    <af:table value="#{bindings.queryProductResponseType.collectionModel}"
    var="row"
    rows="#{bindings.queryProductResponseType.rangeSize}"
    emptyText="#{bindings.queryProductResponseType.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.queryProductResponseType.rangeSize}"
    rowBandingInterval="1"
    filterModel="#{bindings.queryProductResponseTypeQuery.queryDescriptor}"
    queryListener="#{bindings.queryProductResponseTypeQuery.processQuery}"
    filterVisible="true" varStatus="vs" id="ResultTable_t"
    width="99%" partialTriggers="::cb1 ::cb2 ::cb3 it14"
    binding="#{viewScope.GrowerOrderBean.resultTable}"
    columnStretching="last" rowSelection="multiple"
    sortListener="#{viewScope.GrowerOrderBean.sortResultTable_action}"
    autoHeightRows="8" first="0"
    inlineStyle="height:196px;margin:10px"
    selectionListener="#{viewScope.GrowerOrderBean.resultRowSelect_action}">
    <af:column filterable="false" sortable="false" headerText="Select"
    id="c9" width="55" rendered="false"
    filterFeatures="caseInsensitive">
    <div align="center">
    <af:selectBooleanCheckbox value="#{row.bindings.booleanFlag.inputValue}"
    label="#{bindings.queryProductResponseType.hints.booleanFlag.label}"
    required="#{bindings.queryProductResponseType.hints.booleanFlag.mandatory}"
    shortDesc="#{bindings.queryProductResponseType.hints.booleanFlag.tooltip}"
    id="it19" autoSubmit="true">
    <f:validator binding="#{row.bindings.booleanFlag.validator}"/>
    </af:selectBooleanCheckbox>
    </div>
    </af:column>
    <!-- START of column created by SYSTIME -->
    <af:column sortProperty="quantity" headerText="Quantity in Bags" filterFeatures="caseInsensitive"
    id="c54" rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterable="true" sortable="true">
    <af:inputText label="Quantity in Bags" id="it14"
    partialTriggers="it19" autoSubmit="true"
    readOnly="#{row.activeYN == 'N' or row.availability &lt; 0 or row.availability ==0}"
    valueChangeListener="#{viewScope.GrowerOrderBean.compare}">
    <af:validateLongRange id="RangeCheck_Val1" minimum="1"
    maximum="#{row.availability * row.conversion}"
    messageDetailNotInRange="You have entered a quantity more than is available. Quantity entered must be in the range of {2} to {3}"
    messageDetailMinimum="Minimum {0} allowed is {2}"
    messageDetailMaximum="Maximum {0} allowed is {2}"
    hintNotInRange="#{'Quantity In Bags to Order'}"/>
    <af:validateRegExp pattern="^[1-9]+[0-9]*$"
    messageDetailNoMatch="Quantity In Bags must be in whole number format."/>
    <f:validator validatorId="custom.conversionValidator"/>
    </af:inputText>
    </af:column>
    <!-- END of column created by SYSTIME -->
    <af:column sortProperty="quantity" filterable="true"
    sortable="true" headerText="Quantity" id="c3"
    width="60"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" visible="false">
    <div align="center" >
    <af:inputText value="#{row.bindings.quantity.inputValue}"
    label="#{bindings.queryProductResponseType.hints.quantity.label}"
    required="#{bindings.queryProductResponseType.hints.quantity.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.quantity.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.quantity.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.quantity.tooltip}"
    id="it5" partialTriggers="it19"
    readOnly="#{row.activeYN == 'N' or row.availability &lt; 0 or row.availability ==0}">
    <f:validator binding="#{row.bindings.quantity.validator}"/>
    <af:validateLongRange id="RangeCheck_Val" minimum="1"
    maximum="#{row.bindings.availability.inputValue}"
    messageDetailNotInRange="You have entered a quantity more than is available. Quantity entered must be in the range of {2} to {3}"
    messageDetailMinimum="Minimum {0} allowed is {2}"
    messageDetailMaximum="Maximum {0} allowed is {2}"
    hintNotInRange="#{'Quantity to Order'}"/>
    <af:validateRegExp pattern="^[1-9]+[0-9]*$"
    messageDetailNoMatch="Quantity must be in whole number format."/>
    </af:inputText>
    </div>
    </af:column>
    <af:column sortProperty="brand" filterable="true" sortable="true"
    headerText="Brand" id="c10" width="80"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" displayIndex="-1">
    <af:inputText value="#{row.bindings.brand.inputValue}"
    label="#{bindings.queryProductResponseType.hints.brand.label}"
    required="#{bindings.queryProductResponseType.hints.brand.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.brand.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.brand.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.brand.tooltip}"
    id="it7" readOnly="true">
    <f:validator binding="#{row.bindings.brand.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="seedsz" filterable="true" sortable="true"
    headerText="Seed Size" id="c7" width="50"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.seedsz.inputValue}"
    label="#{bindings.queryProductResponseType.hints.seedsz.label}"
    required="#{bindings.queryProductResponseType.hints.seedsz.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.seedsz.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.seedsz.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.seedsz.tooltip}"
    id="it11" readOnly="true"
    contentStyle="text-transform:uppercase">
    <f:validator binding="#{row.bindings.seedsz.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="pckSize" filterable="true"
    sortable="true" headerText="Pkg Size" id="c11"
    width="50"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive"
    inlineStyle="#{row.conversion > 1 ? 'background-color:Yellow;' : 'background-color:White;'}">
    <af:inputText value="#{row.bindings.pckSize.inputValue}"
    label="#{bindings.queryProductResponseType.hints.pckSize.label}"
    required="#{bindings.queryProductResponseType.hints.pckSize.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.pckSize.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.pckSize.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.pckSize.tooltip}"
    id="it8" readOnly="true">
    <f:validator binding="#{row.bindings.pckSize.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="conversion" filterable="true"
    sortable="true" headerText="Conv" id="c4" width="50"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" displayIndex="-1">
    <af:inputText value="#{row.bindings.conversion.inputValue}"
    label="#{bindings.queryProductResponseType.hints.conversion.label}"
    required="#{bindings.queryProductResponseType.hints.conversion.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.conversion.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.conversion.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.conversion.tooltip}"
    id="conversion_it" readOnly="true">
    <f:validator binding="#{row.bindings.conversion.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="treatment" filterable="true"
    sortable="true" headerText="Treatment" id="c13"
    width="70"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.treatment.inputValue}"
    label="#{bindings.queryProductResponseType.hints.treatment.label}"
    required="#{bindings.queryProductResponseType.hints.treatment.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.treatment.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.treatment.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.treatment.tooltip}"
    id="it20" readOnly="true">
    <f:validator binding="#{row.bindings.treatment.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="availability" filterable="true"
    sortable="true" headerText="Availability" id="c15"
    width="60"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.availability> 500 ? '>=500': (row.availability> 100 and row.availability&lt;500 ? '100-500' : row.availability) }"
    label="#{bindings.queryProductResponseType.hints.availability.label}"
    required="#{bindings.queryProductResponseType.hints.availability.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.availability.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.availability.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.availability.tooltip}"
    id="it9" readOnly="true">
    <f:validator binding="#{row.bindings.availability.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="desiredDeliveryDate" filterable="true"
    sortable="true" headerText="Desired Delivery Month" id="c2"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" width="90">
    <af:selectOneChoice id="soc1" partialTriggers="it19"
    unselectedLabel="#{viewScope.GrowerOrderBean.desiredDeliveryDate}"
    value="#{row.bindings.desiredDeliveryDate.inputValue}"
    readOnly="#{row.activeYN == 'N'}">
    <af:forEach var="item"
    items="#{viewScope.GrowerOrderBean.selectItems}">
    <af:selectItem label="#{item.label}" value="#{item.value}"/>
    </af:forEach>
    </af:selectOneChoice>
    </af:column>
    <af:column sortProperty="maturity" filterable="true"
    sortable="true" headerText="Maturity" id="c5"
    width="60"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <div align="center">
    <af:inputText value="#{row.bindings.maturity.inputValue}"
    label="#{bindings.queryProductResponseType.hints.maturity.label}"
    required="#{bindings.queryProductResponseType.hints.maturity.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.maturity.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.maturity.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.maturity.tooltip}"
    id="it16" readOnly="true">
    <f:validator binding="#{row.bindings.maturity.validator}"/>
    </af:inputText>
    </div>
    </af:column>
    <af:column sortProperty="technology" filterable="true"
    sortable="true" headerText="Technology" id="c14"
    rendered="true" filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.technology.inputValue}"
    label="#{bindings.queryProductResponseType.hints.technology.label}"
    required="#{bindings.queryProductResponseType.hints.technology.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.technology.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.technology.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.technology.tooltip}"
    id="it15" readOnly="true">
    <f:validator binding="#{row.bindings.technology.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="prdLine" filterable="true"
    sortable="true" headerText="Product Line" id="c6"
    width="70"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.prdLine.inputValue}"
    label="#{bindings.queryProductResponseType.hints.prdLine.label}"
    required="#{bindings.queryProductResponseType.hints.prdLine.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.prdLine.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.prdLine.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.prdLine.tooltip}"
    id="it12" readOnly="true">
    <f:validator binding="#{row.bindings.prdLine.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="brandMktName" filterable="true"
    sortable="true" headerText="Marketing Brand" id="c8"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" width="80">
    <af:inputText value="#{row.bindings.brandMktName.inputValue}"
    label="#{bindings.queryProductResponseType.hints.brandMktName.label}"
    required="#{bindings.queryProductResponseType.hints.brandMktName.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.brandMktName.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.brandMktName.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.brandMktName.tooltip}"
    id="it17" readOnly="true">
    <f:validator binding="#{row.bindings.brandMktName.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="itemID" filterable="true" sortable="true"
    headerText="Item#" id="c1"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" width="60">
    <af:inputText value="#{row.bindings.itemID.inputValue}"
    label="#{bindings.queryProductResponseType.hints.itemID.label}"
    required="#{bindings.queryProductResponseType.hints.itemID.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.itemID.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.itemID.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.itemID.tooltip}"
    id="it6" readOnly="true">
    <f:validator binding="#{row.bindings.itemID.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="descp" filterable="true" sortable="true"
    headerText="Description" id="c17" width="105"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.descp.inputValue}"
    label="#{bindings.queryProductResponseType.hints.descp.label}"
    required="#{bindings.queryProductResponseType.hints.descp.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.descp.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.descp.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.descp.tooltip}"
    id="it10" readOnly="true">
    <f:validator binding="#{row.bindings.descp.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="primaryUOM" filterable="true"
    sortable="true"
    headerText="#{bindings.queryProductResponseType.hints.primaryUOM.label}"
    id="c16" rendered="false"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.primaryUOM.inputValue}"
    label="#{bindings.queryProductResponseType.hints.primaryUOM.label}"
    required="#{bindings.queryProductResponseType.hints.primaryUOM.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.primaryUOM.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.primaryUOM.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.primaryUOM.tooltip}"
    id="it18">
    <f:validator binding="#{row.bindings.primaryUOM.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="secondaryUOM" filterable="true"
    sortable="true"
    headerText="#{bindings.queryProductResponseType.hints.secondaryUOM.label}"
    id="c12" rendered="false"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.secondaryUOM.inputValue}"
    label="#{bindings.queryProductResponseType.hints.secondaryUOM.label}"
    required="#{bindings.queryProductResponseType.hints.secondaryUOM.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.secondaryUOM.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.secondaryUOM.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.secondaryUOM.tooltip}"
    id="it21">
    <f:validator binding="#{row.bindings.secondaryUOM.validator}"/>
    </af:inputText>
    </af:column>
    </af:table>
    <af:spacer width="10" height="5" id="s7"/>
    <af:toolbar id="t1">
    <af:commandButton id="AddToOrderButton2"
    actionListener="#{viewScope.GrowerOrderBean.addToOrder_action}"
    partialSubmit="true"
    styleClass="addToOrderButton">
    <af:clientListener method="setFocus" type="action"/>
    </af:commandButton>
    </af:toolbar>
    <f:facet name="context">
    <af:group id="g1">
    <af:spacer width="60" height="10" id="s1"/>
    <af:commandButton id="cb4"
    actionListener="#{viewScope.GrowerOrderBean.addToOrder_action}"
    partialSubmit="true"
    styleClass="addToOrderButton">
    <af:clientListener method="setFocus" type="action"/>
    </af:commandButton>
    </af:group>
    </f:facet>
    <f:facet name="info"/>
    <f:facet name="legend"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar"/>
    </af:panelHeader>
    </jsp:root>
    Please reply !!
    Thanks.

  • Method Binding to JSF 1.0 validate-Method error

    Hi there,
    Iam impressed, changing from Beta to 1.0 wasn't that much work at all, I just got one problem left:
    <h:inputText value="#{methodsBean.orderNumber}" validator="#{methodsBean.checkOrderNumber}"/>
    This is my method:
         public void checkOrderNumber(FacesContext context, UIInput input, Object value) throws ValidatorException
              String orderNumber = (String)input.getValue();
              if (orderNumber.startsWith("100-") && orderNumber.length() == 8)
                   //ok
                   input.setValid(true);
              else
                   FacesMessage message =
                        new FacesMessage(
                             resources.getString("order_number_wrong"),
                             resources.getString("order_number_wrong_detail"));
                   throw new ValidatorException(message);               
    It does not work, but what's wrong? I
    any ideas?!
    Thanx!

    hi,
    perhaps you must use UIComponent instead of UIInput
    the signature of Validator.validate() changed.
    Object was added (you have it)
    and UIComponent instead of UIInput.
    here a method of me:
    public static void validateEmail(
              FacesContext context,
              UIComponent component,
              Object value)
              throws ValidatorException {
              if ((context == null) || (component == null)) {
                   throw new NullPointerException();
              if (!(component instanceof UIOutput)) {
                   return;
              String inhalt = value.toString();
                     //GenericValidator aus Commons-Validator-Projekt
              if (!GenericValidator.isEmail(inhalt)) {
                   FacesMessage fehler =
                        MessageFactory.getMessage(
                             context,
                             "EMAIL_UNGUELTIG",
                             new Object[] { "[email protected]" });
                   throw new ValidatorException(fehler);
         }cheers,

  • Custom method in EOImpl

    Hi,
    I have a custom method to call in the EOImpl. This method just creates rows for another entity. What would be the best place to put this custom code. Is it the validateEntity or the postChanges method of the EOImpl.
    thanks.

    Hi,
    Thanks for your response.
    I have to call this custom logic irrespective of the DML operation type.
    The scenario is that when an attribute in the EO is set, and the EO changes are saved, call this custom logic which creates entity rows behind the scenes.
    I am unsure if it is wise to put it in the setter of the attribute. hence I was debating on validateEntity or postChanges.
    Do you still think it should go into the doDML.
    TIA

  • Struts how can validate form without using validate method.

    Hi
    Is this possible validate a form without using validate form
    if it is possible then
    please tell me how can we validate it
    Thanks
    Surendra

    Make use of validator framework.. this would enable you to do validation both @ client side by javascript under defined validation rules and also enables you to do it @ serverside....
    And if want to create a Dyanamic Form beans which takes care of validations to make use ValidatorForm or DynaValidatorForm class under the pacakage org.apache.struts.validator and create an instance of it with preconfigured validations under structs...
    Make use of the links below which i think are the best tutors for newbies....
    http://www.roseindia.net/struts/struts_validator_framework.shtml
    http://www.oracle.com/technology/oramag/oracle/04-jan/o14dev_struts.html
    http://www.onjava.com/pub/a/onjava/2002/12/11/jakartastruts.html
    Hope might be of some help.. :)
    REGARDS,
    RaHuL

  • The validate() and doLayout() methods

    In the first mini-program I made, what is the purpose of the validate() method? I read that it is to force the container into using the new layout manager for the components added. My first question is just: why don't I have to call the validate() method to ensure that the new layout manager is being used?
    import javax.swing.*;
    import java.awt.*;
    public class ShowLayout extends JFrame
        public ShowLayout()
            setTitle("MyFrame");
            setSize(200,200);
            setVisible(true);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            setLayout(new FlowLayout());
            add(new JButton("Accept"));
            add(new JButton("Cancel"));
            setLayout(new GridLayout());
            //validate(); // why is this needed? It seems to work without it
        public static void main(String[] args)
            ShowLayout showLayout = new ShowLayout();
    }According to my understanding of what I've read about the doLayout() method, it is used to force the container to re-layout the components given the new properties of the layout manager.
    Also, what is the purpose of the doLayout() method? Similarly, my second question is: why don't I have to call the doLayout() method to ensure that the new properties have taken effect?
    import javax.swing.*;
    import java.awt.*;
    public class ShowLayout extends JFrame
        public ShowLayout()
            setTitle("MyFrame");
            setSize(200,200);
            setVisible(true);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            setLayout(new FlowLayout());
            add(new JButton("Accept"));
            add(new JButton("Cancel"));
            setSize(100,100);
            //doLayout(); // why is this needed? It seems to work without it      
        public static void main(String[] args)
            ShowLayout showLayout = new ShowLayout();
    }Are both of these methods called implicitly? Is the explicit calling of these methods only mandatory with an older JVM?
    Sorry if my questions seem stupid but any input would be greatly appreciated!

    You appear to have some funcamental misconceptions regarding the action of revalidate() and doLayout(). Have you read the API for those methods?
    I recommend you to the Swing tutorials linked form the topic listing page for this forum. By going through the tutorials you can learn things systematically.
    The usual programming idiom is to add all components to the GUI hierarchy before its top level window is setVisible(true), not after. Also, all Swing components should be constructed and modified on the EDT and only on the EDT. Not on the main thread.
    db

  • Is it possible to validate a table row as a single entity?

    JDeveloper - 11.1.1.6
    WLS - 10.3.5
    I have a requirement to validate a row in a table as a single entity. A database procedure will be passed the values from a given row and several validations performed. There are some field-level validations in the row as well. I had planned to expose an AM method that calls the procedure and then highlights the bad fields.
    How can I fire this row validation when the user has completed their edits (clicked off of the current row)? Is there some event I can listen for?
    I guess I can have a selectionListener that saves the current row key and when the current row key is different from the saved row key call the validation procedure for the saved row?
    Thanks!

    That certainly seems much more straight forward.
    Thinking more about this more, would it be best to call the validation method from prepareForDML? Or would overriding the validate method and calling from there be a better option?
    I am still fairly new to ADF and still trying to grasp some concepts.
    Thanks.
    Edited by: errodr on May 15, 2013 5:45 AM

  • XMLDocument.Validate works on some machines but not on others

    Hi All
    I have a problem which I cannot Solve ,  I have a routine that Validates a node in a document  against a XSD file using the XmlDocument.Validate  method. This works fine on several machines but on a different network using the Same Document and schema files validate fails  with a validation exception element not found . I cannot figure out why the exact same files and application should be successful on one machine and unsuccessfull on another. I have used Filemon to see if their are ACCESS DENIED problems but there are none.
    I have reinstalled the framework 2.0, to no avail
    Regards

    I am trying to Get the Details on to an HTTP server no luck yet,  and this fourm says that the files are to large to upload. , I have noticed the FILEMON says that the MSCORLIB.PDB file was not found in two locations WINNT and WINNT\dll  would this have somthing to do with the problem. I have given the XML and Schema files to others to view but they confirm that there is nothing wrong with the file or the schema.   

  • How to validate XML at runtime and show the exact cause of validation failure .

    Hi
    How can I validate my generated XML at runtine against its schema ? I have used
    the validate() method and it does validate correctly against the schema but the
    problem is it just returns a boolean . I need to know the exact cause of failure
    (like for example The element X was supposed to contain Y,Z etc ). I need to capture
    the exact exception (like a Sax Parse exception details).
    How do i do that using XMLBeans ??
    - Bana

    Hi Bana,
    You could use the XmlOptions.setErrorListener(Collection) method to get the detailed error message by invoking validate(option).
    Kind Regards,
    Jennifer

Maybe you are looking for

  • ITunes error 7 windows error 127?!?!?

    Help! I need to install the latest software onto my iphone 3s to stop it freezing. The guy at the apple store told me to do this through itunes. I tried this earlier but it told me I had to upgrade the latest itunes software first, i said ok. halfway

  • How can I add a rescue email?

    I cannot purchase apps because I don't remember answers to security questions. Can I add a rescue email now?

  • Kernel Panics Galore

    Hey Gang, Just getting kernel panics galore (in fact, this is my second time writing this, because, guess what, kernel panic). And there doesn't seem to be any 'one' thing. I'm not very good at reading them, but here's the most recent: Tue Apr 25 10:

  • Empty Photos app, but 3.8GB in Photo Library

    All photos and videos that used to be in the Photos app on my iPad mini (iOS 8.1.2, 16 GB) have been deleted; both the "Camera Roll" and "Recently Deleted" albums are empty. This was confirmed by a separate Photo Transfer App. However, in the setting

  • Greek Data becomes Question Marks when passed through a Database Link

    Hi All, We have a 10gR2 sharing a Win32 Server with an MSSQL 2005. Data transfers between these are set up using an HS Database Link. All latin data is passing well, however we have some Greek in there and its transformed to question marks on the way