Required attribute in dsp input tag

Hi
dsp:input tag is unable identify the required attribute if i keep like this <dsp:input bean="something" type ="text" required="required"/>
but it is working if i keep like this <dsp:input bean="something" type ="text">
                                                       <dsp:tagAttribute name="required" value="required"/>
                                                </dsp:input>
if i follow second option i am getting some issues in my application
please give me solution how 1st one will work

It should be required="true". For reference see
Oracle ATG Web Commerce - dsp:input

Similar Messages

  • Required Attribute style XML input from BPEL

    Hi all,
    We are integrating JDE 811 with BPEL using ORACLE SOA Suite 10133.
    As per the documentation given http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28996/bpel_pm.htm#CDEICHJB, we created the BPEL process to support transacation from BPEL to JDE 811. As given in the document we generated the WSDL in attribute style. For testing the BPEL Process, they have given the XML input in the document in the format of attribute style as given below :
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body xmlns:ns1="http://xmlns.oracle.com/GetYearDescription_SYNC">
    <ns1:jdeRequest type="callmethod">
    <callMethod name="GetYearDescription" runOnError="no">
    <params>
    <param name="mnCalendarYear">58</param>
    </params><onError abort="yes"/>
    </callMethod>
    </ns1:jdeRequest>
    </soap:Body>
    </soap:Envelope>
    and the output we received as
    <GetYearDescription_SYNCProcessResponsehttp://xmlns.oracle.com/GetYearDescription_SYNCPSFTcallmethodDV811*ALL>
    <callMethodGetYearDescriptionnourn:iwaysoftware:jde/services/JDEJAVA_CMFGBASE/B3000260/GetYearDescription>
    <params>
    <parammnCalendarYear>58</param>
    <paramszYearDescription>2058</param>
    </params>
    </callMethod>
    </GetYearDescription_SYNCProcessResponse>
    But, if we use the current schema and give input using normal HTML form on the BPELConsole then the error comes like
    WSIF JCA Execute of operation 'GetYearDescription' failed due to: Error in processing the input document.; nested exception is: javax.resource.ResourceException:
    Error in processing the input document.</summary>
    </part><part name="detail"><detail>javax.resource.ResourceException: Error in processing the input document.
    that is why for outbound integration we need to give raw XML during runtime as input to the bpel process in bpel console manually. and that input looks like
    Also in real time scenario, we are receiving the XML input from a third party software/Adapter that may be a flat file/.xml flat file/DB and we need to pass the similar data in BPEL to the JDE 811. Here we are not able to pass the data to JDE as the adapter accepts the input in attribute style XML.
    If we are trying to enter that input through a flat .xml file then it returns no data, as nothing is passed to that process.
    Any idea how we can process this without giving raw xml input manually during run time, means using normal HTML Form.
    if it is not possible then please tell me what will be the required XML that we have to pass as input in that flat file.
    Thanks,
    Anindya

    Hi All,
    SOAP based input is required for any BPEL process for testing in BPEL Console.
    We have created a BPEL process which is successfully receiving data from 3rd party and it is not in a SOAP format.
    That is why we are entering input manually (I have already described input in above post) while testing that BPEL process. and we can receive proper output (i have already specified what i am getting as output in my above post.)
    But in real time scenario we cant give input manually.
    how can we achieve SOAP based invocation during runtime??
    I hope my question is clear to all.
    please suggest me if anybody have any idea about this.
    Regards
    Anindya

  • Custom attributes in dsp tag

    Hi,
    I need to have HTML5 attribute in dsp:a tag.
    ex. <a class="" href="" data-type=""/>
    The data-type and other HTML5 attributes are not supported by dsp taglib. How can i achieve it.
    Prakhar

    Look at DafEAR\base\j2ee-components\atg-bootstrap.war#WEB-INF\taglibs\dspjspTaglib1_0.tld this maps dsp:a to class atg.taglib.dspjsp.ATag.
    I think you will need to write your own ATag class extending this one, compile this, put inside atg-bootstrap.war and change the mapping of dsp:a

  • Custom Tag is missing required attribute property

    Hello,
    Here is my struts config file source;
    <global-forwards>
              <forward name="mainpage" path="/index.jsp">
              </forward>
              <forward name="CustomerDetailsForward" path="/GoToCustomerPage.do">
              </forward>
         </global-forwards>
         <!-- Action Mappings -->
         <action-mappings>
              <action path="/SubmitCustomerForm" type="action.SubmitCustomerForm" name="CustomerForm" scope="request" validate="true" input="/CustomerDetails.jsp">
                   <forward name="success" path="/Success.jsp">
                   </forward>
                   <forward name="failure" path="/Failure.jsp">
                   </forward>
              </action>
              <action path="/GoToCustomerPage" type="org.apache.struts.actions.ForwardAction" parameter="/CustomerDetails.jsp">
              </action>
         </action-mappings>
    And my index.jsp source;
    <html:html>
    <head>
    <html:base/>
    </head>
    <body>
    <html:button></html:button>
    <html:link forward="CustomerDetailsForward">Go To Customer Form </html:link>
    </body>
    </html:html>
    And here is the error;
    Error Message:JSPG0227E: Exception caught while translating /index.jsp: /index.jsp(13,1) --> JSPG0006E: Custom Tag is missing required attribute property
    Root Cause:com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /index.jsp: /index.jsp(13,1) --> JSPG0006E: Custom Tag is missing required attribute property     at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitCustomTagStart(ValidateVisitor.java:304)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:267)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:309)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:268)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:309)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:139)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121)     at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:121)     at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:181)     at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:83)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:349)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:317)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:226)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:131)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:270)     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)     at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:472)     at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:111)     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)     at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)     at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)

    volkov wrote:
    Error Message:JSPG0227E: Exception caught while translating /index.jsp: /index.jsp(13,1) --> JSPG0006E: Custom Tag is missing required attribute propertyWhich is line 13 then? And check the syntax for that tag.

  • JPSTranslate:Custom tag is missing required attribute for

    When ever I am placing a label in jsf using RAD i am getting a similar error which i am not able to rectify. And how to integreate swing components in Faces jsp file
    Please help me out.

    volkov wrote:
    Error Message:JSPG0227E: Exception caught while translating /index.jsp: /index.jsp(13,1) --> JSPG0006E: Custom Tag is missing required attribute propertyWhich is line 13 then? And check the syntax for that tag.

  • HOW TO: Use Input tags to edit records

    The question has been asked, "What does using the BC4J Input data tags provide
    over standard HTML input fields?" It is true that either type of input field allows
    your JSP to take user input and update your BC4J datasource. Both types of input
    fields submit a name-value pair to a JSP processing page that bind the data with
    a datasource row and attribute. However, unless you use the BC4J Input data tags,
    users will not be able to edit data in existing records. To see the difference,
    use the JDeveloper DataPage Wizard to create an Insert Record form and an Edit
    Record form.</p>
    To create the Insert Record form:</p>
    <ol>
    [*]Use the Business Components Wizard to create an entity object and view object for a database table you can update.
    [*]In the same project or another project, if you wish, use the DataPage Wizard to create an Insert Form for the view object.
    [*]Look in your JSP project folder in the Navigator and notice that two pages were generated: one JSP to render the insert HTML form and the other JSP to process the incoming parameters.
    [*]Open the file VO_Insert.jsp and notice that it does not use the BC4J input data tags.
    </ol>
    In the Insert form, the input data tags are not needed to render static HTML form elements such as empty text fields. It is important to note, however, that the name of these text fields corresponds to the attributes of your selected view object. This is extremely important because the processing page looks for parameters corresponding to the names of the attributes to update the view object datasource.</p>
    Now, create the Edit Record form:
    <ol>
    [*]Use the DataPage Wizard again, but this time select Edit Form for the view
    object.
    [*]Open the file VO_Edit.jsp and notice that it uses the BC4J input data tags,
    which contain the prefix <jbo:Input ...>.
    [*]Look in your JSP project folder in the Navigator and again notice that two
    pages were generated: one JSP to render the edit HTML form and the other JSP
    to process the incoming parameters.
    [*]Open the file VO_Edit.jsp and notice that it uses the BC4J input data tags.
    </ol>
    In the Edit form, the BC4J input data tags are needed because in this case,
    the page has to query the current value of the record and place that data into
    the text field. The Edit form uses a second page to process the edited values.</p>
    To summarize the differences:</p>
    Use the <jbo:Input ...> data tags when you need to create an Edit Existing Record type of JSP page. This page will query the current data from the view object datasource and display it in each input field.
    OR
    Use standard HTML input fields when you do not need to query the database to show existing records. This is the case in a static Insert Record form where only empty HTML fields are rendered.
    The end goal of each Input tag is to supply a name-value pair to a processing
    page which will then update the database according to the value passed to it.
    For example in order to update the &quot;Ename&quot; column of the Emp table,
    a name-value pair such as Ename=&quot;smith&quot; must be passed via an HTML
    form to a processing page. The processing page will then be able to update the
    table with the new value of the attribute using the following code:
    <jbo:Row id="myrow" datasource="ds" rowkeyparam="MyRowKey" action="Update">
    <jbo:SetAttribute dataitem="*"/>
    </jbo:Row>
    </p>
    By setting the attribute 'dataitem=&quot;*&quot;' in the SetAttribute tag,
    it is able to update all database columns where a name-value pair is supplied.
    The SetAttribute tag must be used inside of the Row tag to allow an operation
    on a single row.</p>
    The Row tag is able to identify a specific row through the rowkeyparam attribute.
    The rowkeyparam takes the HTML request parameter that contains the value of
    a BC4J rowkey. It is the BC4J rowkey that uniquely identifies the row within
    a rowset. By default Row tag by default obtains the rowkey for the cu rrent row.
    (You can also specify the row when you want to perform a Find action as explained
    in the OTN topic &quot;How To: Navigating Using DataTags&quot;.)
    </p>

    Ok. I didn't understand your question.
    You have to do some settings for adding new  rows for the analysis grid in Analyzer. And in the new rows you can input the characteristic values. To enable the new rows
    In Analyzer - uncheck the setting Suppress New Lines in the proprties of the Analysis grid item.
    In WAD - Check the property Number of New Lines (NEW_LINES_COUNT) of Analysis grid item. You use this parameter to insert any required number of empty rows into the table. The parameter is set to 0 by default.

  • Validation error message is not displayed for an attribute as an Input List Of Value

    Hi everyone,
    I use jdev 11.1.1.7.0
    In my application I've created an Entity Obj and a View Obj base Employees table.
    for the JobId attribute I've taken actions as listed below:
    1. in Employees EO I've created a validation for this attribute and in some cases an error message returns (the error message is "the salary is not high"):
         * Validation method for JobId.
        public boolean validateJobId(String jobid) {
            if (...) {
                return false;
            if (...) {
                return false;
            if (...) {
                return false;
            return true;
    2. in Employees VO  I've created a LOV for this attribute (the view accessor is JobsViewObj ) and I display the attribute as an Input Text with List Of Values.
    in jspx page I drag& drop this attribute as below:
              <af:inputListOfValues id="jobIdId"
                                    popupTitle="Search and Select: #{bindings.JobId.hints.label}"
                                    value="#{bindings.JobId.inputValue}"
                                    label="#{bindings.JobId.hints.label}"
                                    model="#{bindings.JobId.listOfValuesModel}"
                                    required="#{bindings.JobId.hints.mandatory}"
                                    columns="#{bindings.JobId.hints.displayWidth}"
                                    shortDesc="#{bindings.JobId.hints.tooltip}"
                                    autoSubmit="true">
                <f:validator binding="#{bindings.JobId.validator}"/>
              </af:inputListOfValues>
    I open the Popup and I select a row from the Popup list and then I click Ok. After that if the validation method(validateJobId) returns false, the error message("the salary is not high") must be show to the user. but the error message doesn't display. I don't understand why this happens.
    Can anybody guide me about this problem?
    Regards
    Habib

    yes, you're right, I've tested it in 12.1.3 and error message was displayed.
    it seems it's a bug(bad bug ) in both 11.1.1.7 and 12.1.2. and now what can I do? is there any way to display the the error message?
    Regards
    Habib

  • Get filename from uploaded file then place in input tags

    i have an upload feature with the use of upBean and i can get the filname thru filename=file.getFileName
    when i place in the input tags it takes an error what i suppose to do
    <input type="hidden" name="getfilename" value="<%=filename%>">
    if (MultipartFormDataRequest.isMultipartFormData(request)) {
                            // Uses MultipartFormDataRequest to parse the HTTP request.
                            MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
                            String todo = null;
                            String filename=null;
                            String description=request.getParameter("txtDesc");
                            String checkfilename=mrequest.getParameter("uploadfile");
                            if (mrequest != null) todo = mrequest.getParameter("todo");
                            if ( (todo != null) && (todo.equalsIgnoreCase("upload")) ) {
                                Hashtable files = mrequest.getFiles();
                                if ( (files != null) && (!files.isEmpty()) && (description!=null)) {
                                    UploadFile file = (UploadFile) files.get("uploadfile");
                                    if (file != null){
                                        filename=file.getFileName();                                    if(checkfilename==null){
                                            filename="";
                                  upBean.store(mrequest, "uploadfile");  // Uses the bean now to store specified by jsp:setProperty at the top.
                                             else out.println("<BR> todo="+todo);
                    %>
                    Message was edited by:
    BlingBling15

    Thanks for reply.
    I replaced messageFileUpload (binded to blob table column) with messageStyledText (binded to filename attribute). Above the table placed single messageFileUpload and submitButton nearby. After user select file on submit I do:
    *if (pageContext.getParameter("DoUploadButton") != null) {*
    .. DataObject fileUploadData = pageContext.getNamedDataObject("FileData");
    .. *if (fileUploadData != null) {*
    .... String fileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
    .... String contentType = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
    .... BlobDomain fileContent = (BlobDomain)fileUploadData.selectValue(null, fileName);
    .... String seqNumber = pageContext.getParameter("seqNumber");
    .... am.insertInstanceAttachRowBlob(seqNumber, fileName, fileContent, contentType);
    .... pageContext.removeNamedDataObject("FileData");
    .. return;
    Edited by: user12086842 on 02.01.2013 2:41

  • Problem with "required" attribute in inputBox

    Hi ,
    I have a requirement where a input field needs to be populated using lookup.
    I am using commandButton to populate the input field.Since I dont want user to type anything in this input Field , I have made this field readOnly.
    This is a mandatory field so I have put required attribute true.But on the click of submit button this validation does not trigger.If I make remove readOnly attribute or make it false, the validation triggers.Here is the snippet for this part.
    <afh:rowLayout>
    <afh:cellFormat halign="right" >
    <af:commandButton id="lookupFrom_buttonId" text="From Mfg:"
    action="dialog:company.selectBox"
    immediate="true" windowWidth="390" windowHeight="550"
    launchListener="#{mfgReassignBean.addParameter}"
    returnListener="#{mfgReassignBean.returnFromMfr}"
    partialSubmit="true" useWindow="true"
    >
    </af:commandButton>
    </afh:cellFormat>
    <af:inputText
    partialTriggers="lookupFrom_buttonId"
    readOnly="true"
    required="true"
    binding="#{mfgReassignBean.fromDeveloperInput}"
    value="#{mfgReassignBean.assignmentRule.fromMfgName}"
    />
    </afh:rowLayout>
    has anybody faced such situation...any suggestions ?
    Thanks!!

    disabled and readonly fields are discarded from the JSF stack and thus not validated! Options are: make readonly field not readonly on form submit or copy readonly field to hidden field (both involve client side javascript)

  • Using value binding expressions to set 'required' attribute

    I am trying to use a value binding expression to determine whether the value of various input control's is required or not according to where they are used and not having much luck. I wonder if anyone can shed some light on this...
    The following expression works: <h:inputText id="name" required="#{true}"/> whereas <c:set var="required" value="true" scope="request"/>
    <h:inputText id="name" required="#{required}"/> does not, even though the expression evaluates to true! I have tried numerous variations (requestScope.required, required == true, required ? true : false, etc.) to no avail. Interestingly, #{1 == 1} or binding to a backing bean method works, but as soon as you add a request variable it breaks.
    Am I doing something wrong, is this something that JSF doesn't allow, or just a bug in the RI? Note that I don't want to vary this flag between multiple submissions of the same form, I am just trying to reuse the same JSP include to generate form controls for required and optional data on different forms to avoid a whole lot of cutting any pasting.
    Any pointers gratefully received.
    -- Keith Wilson

    I had something like this happen, and here's what I concluded the problem was. Perhaps your problem is similar.
    In the first non-working example you show a request-scope variable being set in the JSP page, and then use that to set the "required" attribute. But consider what happens when you submit the form. There is no longer any request-scope variable set because we have a new request and we don't go through the JSP page! (Not before validation is checked, anyhow).
    So basically I concluded that the variable had to be in (say) session scope for it to work as you would like.

  • How to add attributes in the xml tag

    hi,
    i have two tables employee,department
    employee table
    empno number,
    empname varchar2(100),
    deptno number,
    department table
    deptno number,
    deptname varchar2(100)
    i want xml file in the above mentioned two tables.The xml file is as follows,
    <?xml version="1.0" encoding="UTF-8" ?>
    <EmployeeInfo>
    <Data type="employee">
    <empno>1</empno>
    <empname>siva</empname>
    <deptno>10</deptno>
    </data>
    <Data type="department">
    <deptno>10</empno>
    <deptname>IT</empname>
    </data>
    </EmployeeInfo>
    can anybody please give plsql code for this requirement.i need to add attributes in the xml tag.Its urgent
    By
    Siva

    A general example (based on the OE sample data/tables)
    SQL>SELECT XMLElement("Emp",
      2                     XMLAttributes(employee_id AS "id"
      3                                  , '10' "dept"),
      4                     first_name||' '||last_name) as result
      5 FROM   employees e
      6 WHERE  department_id = 10;
    RESULT
    <Emp id="200" dept="10">Jennifer Whalen</Emp>

  • Jsessionid getting appended to the dsp:a tag

    Hi,
    We have a requirement to strip off jsession id getting generated from every url.
    However, in a non-secure page (http), the link (which uses <dsp:a> tag) automatically appends the jsessionid to the url. We are not able to manually strip it out.
    Is there a way we can tell ATG10 to strip out jsession id upon link creation?
    Any idea is highly appreciated.

    I have been in contact w/ a remote user who has this same issue.
    He has a rather large volume of local mail in a POP account. He recently had to migrate his data from one Macbook Pro running Snow Leopard to another so that we could send his older machine in to get repaired.
    Now that he's working on the loaner with all his data migrated over, he gets this error when he tries to send mail. He cannot send any mail from within Mail.app. I'm currently having him back up his ~/Library/Mail/ and ~/Library/Mail Downloads/ and ~/Library/Preferences/com.apple.mail.plist files to an external drive before we really start messing about with anything too scary. I had him try to remove the envelope index file to "import" all the mail, but mail crashed twice at about 30% complete, so he put the old envelope index file back.
    Something interesting: he has two accounts, The one which does not work is the work account which is set up for POP3 and one is a personal account which is set up using IMAP.
    He just sent me a test message from the personal account and mail had no problem writing to that account's (do they have separate outboxes?) outbox.
    He does have like 400,000 messages total in a variety of folders in mail, but... it was working before he used the Migration Assistant to move his data to this temporary laptop.

  • Html input tags

    why doesn't the jsf <input_text> tag generate a correctly terminated html <input> tag?
    It leaves off the closing /, ie,
    <input type="text" name="vendor_name" maxlength="25" size="50">
    instead of
    <input type="text" name="vendor_name" maxlength="25" size="50"/>

    The standard renderKit renders HTML and not XHTML. XHTML requires a webpage to be a well-formed XML document, HTML doesn't. I hope that several renderkits will be provided in the final release.
    Kind regards,
    Rune Bj?rnstad.

  • Problem with the "required" attribute in input_text (in 1.0 beta)

    Suppose you wanted to display a more meaningfull message instead of the default "Validation Error: Value is required", e.g. "Please enter your e-mail address". Looks like the only way to do this is to write a custom validator. However, if required="true" in the input_text, you will get the default message, if you don't set "required", your custom validator is not called at all.
    This is something that needs to be addressed, because it will be very common to want to have meaningfull error messages (I can't imagine somebody will approve a commercial application which will display messages like "Validation Error: Value is required").
    As a workaround, I tried setting an error message in the action handler, but I can't seem to get the component from within the bean code. In the action method I have:
    FacesContext context = FacesContext.getCurrentInstance();
    UIInput component = (UIInput) context.getViewRoot().findComponent("testInput");where testInput is the id of the input_text - findComponent() returns null.
    P.S. Btw, I noticed that now in 1.0 the ids look like this id0:testInput which is a really bad choice if you have to write any JavaScript handler, e.g. onClick(), since id0:testInput is not a valid JavaScript variable name. You can still find it by going through all the document.forms[0].elements[n].name and set it up that way, but it's a hassle.

    Thanks,
    findComponent("formName:inputName")worked fine.
    But still, I think that if you have a custom validator
    it should be called regardless of whether there is
    something in the input or not (or maybe bypass the
    default validation if "required" attribute is set, but
    there is a custom validator), because that's the only
    way you can change the default "Value required"
    message using a validator. If you have to check it in
    the action method, you might as well do the whole
    validation there, which makes validators pointless.The expert group considered this decision carefully, and concluded that the current behavior was the best -- if there is no input data, skip any specified validations -- because of the likelihood for things like null pointer exceptons in validators that are not prepared for this scenario.
    One approach to dealing with this if you would prefer different behavior for your own components is to subclass UIInput and override the validate() method to do something different.
    Craig

  • Error: Attribute binding invalid for tag ganttChart according to TLD

    Hi,
    I am experimenting with writing my first custom tag and getting the stack trace:
    org.apache.jasper.JasperException: /GanttFaces.jsp(18,3) Attribute binding invalid for tag ganttChart according to TLD
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:234)
         org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:989)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
    when using a binding with my custom tag:
    <jg:ganttChart binding="#{ganttFaces.ganttChart}" id="gantt1" .... >
    The error message reads as if I have to make special considerations in the TLD file to enable binding, but I can't find anything about that. Thats how my tld file looks:
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>JGantt</shortname>
    <uri>http://netronic.de/jgantt/taglibJSF</uri>
    <info>My tag library </info>
    <tag>
    <name>ganttChart</name>
    <tagclass>de.netronic.jgantt.server.jsf.JGanttChartTag</tagclass>
    <info>The chart</info>
    <attribute>
         <name>id</name>
         <required>true</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    Any idea what I am missing?
    Udo

    In your TLD, I do not see any binding attribute! you ahe to define it
    <attribute>
    <name>binding</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    Afterwards, you should create the setter method in your tag class: setBinding(String binding)

Maybe you are looking for