Customizing a Standard Validator Message

Hi!
Have anyone of you tried this tutorial ?
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/custommessage.html#05
i think i'm doing everything like they say and it's not working i still get
Validation Error: Value is required.
hmmm.

Any suggestions, highlights ?
after all night i think i'll create my own validators based on staticText components. Blast!
Message was edited by:
dElay

Similar Messages

  • Oracle Devs -  "Customizing a Standard Validator Message" tutorial moved?

    Guys and Gals,
    Page 366 of the Oracle JDeveloper 11g Handbook: A Guide to Oracle Fusion Web Development references a "Customizing a Standard Validator Message" tutorial on java.sun.com.
    It is nowhere to be found. Java.sun.com redirects to another oracle webpage, and the JDev tutorials do not seem to cover this material.
    I'm not looking to add my own custom validator, but rather modify the default JSF error message. i.e. Change standard validator text from "Too many objects match the primary key oracle.jbo.key[<mypart>]" to "Part <mypart> already exists.".
    Can anyone reference another tutorial for this topic?
    Thanks in advance.

    HaHa! Finally found something similar. Sweet sauce.
    http://netbeans.org/kb/docs/web/convert-validate.html#08

  • JSF, NetBeans and customizing of Standard Validation Errors

    Hello together,
    i want to use german Standard Validation Errors via a own .properties File:
    1.
    Here is my faces-config.xml ( the entries are uncommented ! ):
    <faces-config>
    <application>
    <locale-config>
    <default-locale>de</default-locale>
    <supported-locale>de</supported-locale>
    <supported-locale>en</supported-locale>
    </locale-config>
    *<message-bundle>alles.mymessages</message-bundle>*
    </application>
    </faces-config>
    2.
    Here is mymessages.properties-File in package alles:
    javax.faces.validator.NOT_IN_RANGE=Das angegebene Attribut liegt nicht zwischen den erwarteten Werten {0} und {1}.
    javax.faces.validator.NOT_IN_RANGE_detail="{2}"\:Eingegebener Wert liegt nicht im erwarteten Bereich von {0} bis {1}.
    javax.faces.validator.LongRangeValidator.LIMIT=Validierungsfehler
    javax.faces.validator.LongRangeValidator.LIMIT_detail=Eingegebener Wert kann nicht in den korrekten Typ umgewandelt werden.
    javax.faces.validator.LongRangeValidator.MAXIMUM=Validierungsfehler
    javax.faces.validator.LongRangeValidator.MAXIMUM_detail="{1}"\:Wert ist gr\u00F6\u00DFer als das erlaubte Maximum"{0}".
    3.
    Here the part of the JSF-View with the Validator:
    <ui:textField binding="#{WorkTypeEdit.textFieldBeschartKzSoll}" converter="#{WorkTypeEdit.bigIntegerConverter1}"
    id="textFieldBeschartKzSoll" required="true" style="height: 24px; width: 48px" validator="#{WorkTypeEdit.longRangeValidator1.validate}"/>
    The application still shows the standard englisch validation error text. What is wrong here ?
    I' am using NetBeans 5.5.1 with VWP and the deploment is to Glassfish server.
    Thanks a lot.
    HJA

    Hello Raymond,
    i did some coding and create additional a custom validator:
    My JSF-View part:
    <ui:textField binding="#{WorkTypeEdit.textFieldBeschartKzSoll}" converter="#{WorkTypeEdit.integerConverter1}"
    id="textFieldBeschartKzSoll" maxLength="2" required="true" style="height: 24px; width: 48px" *validator="#{MyValidation.validateInput}">*
    *<f:validateLongRange minimum="1" maximum="9"></f:validateLongRange>*
    </ui:textField>
    My custom validator in Myvalidation class:
    public void validateInput (FacesContext facescontext, UIComponent component, Object value) throws ValidatorException
    long min = 0, max = 0;
    Locale locale = facescontext.getViewRoot ().getLocale ();
    String mb = facescontext.getApplication ().getMessageBundle ();
    ResourceBundle rb = ResourceBundle.getBundle (mb, locale);
    Validator[] validator = ((UIInput) component).getValidators ();
    for (int i=0; i < validator.length; i++)
    if (validator[i] instanceof LongRangeValidator)
    LongRangeValidator lv = (LongRangeValidator) validator;
    long lvalue = Long.valueOf ((String)value.toString ());
    min = lv.getMinimum ();
    max = lv.getMaximum ();
    if (lvalue < min || lvalue > max)
    ((UIInput) component).setValid (false);
    *String message = rb.getString ("javax.faces.validator.NOT_IN_RANGE");*
    *String messageDetail = rb.getString ("javax.faces.validator.NOT_IN_RANGE_detail");*
    *facescontext.addMessage (component.getClientId (facescontext), new FacesMessage (FacesMessage.SEVERITY_ERROR,message,messageDetail));* }
    What happen now is, at first i get the german message because of rb.getString........ so the locale is working
    and then the englisch message follows in the message component.
    Sorry that i take your time so long...
    HJA

  • Overwrite Standard Validation message to Custom message

    Hello Gurus,
    I searched and have gone through lot of resources but did not find solution and came up with this question.
    I have a scenario where I can not make action(Save) as validation independent. So, I tried using IF_WD_MESSAGE_MANAGER methods in WDDOBEFOREACTION as below.
    1) Used HAS_VALIDATION_ERRORS If true got all the messages using method GET_MESSAGES.
    2) Loop through messages of perticular attribute and deleted message based on MSG_ID using REMOVE_MESSAGE.
    3) And tried to set custom error message using REPORT_ATTRIBUTE_ERROR_MESSAGE.
    But to my suprise IF_WD_MESSAGE_MANAGER->GET_MESSAGES is not returning any messages even though there exists a validation erro, though HAS_VALIDATION_ERRORS returning TRUE.
    Cant we make use of GET_MESSAGES in WDDOBEFOREACTION or anything wrong in my logic.
    Any inputs would be appreciated!
    Thanks a ton in advance!
    Regards,
    Pavan.
    Edited by: Pavankumar Adiraju on Aug 1, 2011 6:42 AM

    Thanks for the response!!
    @ Srinivas: Sorry, I missed one more step wherein I use message object(MSG_OBJECT) of messages returned by GET_MESSAGES to get the specific message using GET_TEXT.
    So, to rephrase I will only overwrite specific error message with my custom message.
    @ Kranthi : Before posting the question I found the forum suggestion you mentioned but did not find a way to get reference to it.
    Please tell me if you know how to get reference of IF_WD_VALIDATION in WDDOBEFOREVALIDATION to use it.
    Regards,
    Pavan.

  • Disable the validation message

    Hi,
    How to disable the validation message "<fieldname> cannot be blank"? But when Submit button is clicked, it should still display the standard validation message "At least one required field was empty". Many thanks in advance.

    Hi,
    Try unticking the Validation messages in the Object > Value palette and clearing any Validation Patterns:
    Niall

  • How to use standard validator with custom component?

    Hi folks!
    I've implemented a custom component extending UIInput. My component worked well but now I want to use a standard validator.
    How can I use it??
    regards,
    Steven

    Validation is done by UIInput.validate() which is invoked by processValidators().
    So, if you don't redefine these inherited methods they will invoke the
    corresponding validators.

  • Standard Oracle Messages in Custom forms

    Hi,
    We have created cutsom oracle forms in our EBS setup and we want to show standard oracle messages in our custom forms, but somehow we are not able to show those messages. Is there any setting that we need to do to enable this?
    Thanks,

    Hi,
    Please see "Oracle Applications Developer Guide", Chapter 27 - Customization Standards.
    Applications Releases 11i and 12
    http://www.oracle.com/technology/documentation/applications.html
    You may also review these documents.
    Note: 1019036.6 - How do you Create Custom Messages?
    Note: 189441.1 - How to Change the Text for a Standard Message
    Regards,
    Hussein

  • Label on custom validation message

    Hi,
    I�m trying to display a the label of a input on a custom validation message using h:messages, for example:
    "The field Email is required"
    I don�t want to use the requiredMessage attribute of the outputText because I wish to apply it for all fileds on my application.
    I�ve tried something like that:
    On the jsp:
    <h:outputLabel for="email" value="Email" />
    <h:inputText value={bean.email} required=true />On the bundle:
    javax.faces.component.UIInput.REQUIRED=The field {0} {1} is requiredBut, the {0} parameter is the component ID, and the {1} parameter resolves to null.
    Please help, this is very important to me.
    THanks

    The {1} should resolve to the label of the inputText component. Note that here (and in the documentation) 'label' refers to the value of the label attribute on the inputText component itself. It does not refer to the value of an outputLabel component that is 'for' the input component.
    So you want the following:
    <h:outputLabel for="email" value="Email" />
    <h:inputText id="email" value="#{bean.email}" required="true" label="Email" />Note I also added an id to pair with the for attribute.

  • Customizing EO validation messages

    Example use case (JDeveloper 11.1.1.6):
    - I have one EO that maps to one VO that is displayed in two different jsff tabs (tab1, tab2).
    - The EO has an attribute (say Myint of type oracle.jbo.domain.Number that corresponds to a NUMBER(10,0) db type).
    - Myint appears in both tabs, however in tab1 it is referred as"int1" and in tab2 as "int2".
    - The attribute has a validation rule (at EO level) based on the corresponding db type (basically requesting that it is an integer).
    I read/believe that validation, if possible should be done at EO level (and it makes sense as you define once and reuse in all screens).
    Here are my questions:
    1) In the 'Edit Validation rule ' pop-up (EO) I can define an error message based on an key from a rb.
    In my case, I have a generic message like 'An integer value is required for the 'Myint' field.'
    How can I customize the messages for the specific jsff tabs, e.g., get messages like:
    An integer value is required for the 'int1' field.'
    An integer value is required for the 'int2' field.'
    I want to avoid client validation; however I would like to be able also customize my error message. Is there a way to do this?
    I know I can pass a expression to the message text, but still this does not really help me.
    Now if I cannot do this, does not this limits the usability of EO validation?
    2) Is there a way to have ADF create the red box around the erroneous field. In my view this is nice to have as it directly identifies the issue.
    Thanks

    Hi,
    I am using JDev 11g R2 and it has a red box highlighted for any validation failure of attribute (your point#2) but not sure if it's there in your jdev version :)
    Coming to your issue,
    For EO, it is always the same field irrespective of it coming from vo1 or vo2 and you don't have control of validation messages of vow/vo2 directly on EO however you can achieve your requirement in couple of ways
    Option#1. You can have a custom entity level validation (invoke your custom method with what ever message you want to throw)
    Option#2: You can create a transient attribute in your EO of String type and update your VO1 and VO2 to add the new transient attribute and always keep that transient attribute with int1 or int2 (based on your VO usage)
    and now in your validation error message of attribute you can use place holder to read the value from transient attribute
    for e.g. you error message looks like "Please fill the value for field {field}"
    and it will populate field in token list in the same editor window, there in field value give it as Attribute name of transient attribute.
    Regards,
    Ravi Nuka.

  • Changing standard Validation Error Messages

    Hi All,
    Does anyone know how to change the standard SAP-messages
    like: Decimal value 100 is too large for totalDigits 4
    or: Accuracy 3 exceeds fractionDigits 2
    Thanks,
    Jeschael

    Hi Jeschael,
    I have exactly the same problem. I guess, I'll have to change the datatype to String and write my own  parsing functions for input.
    What have you done?
    Regards,
    Jon

  • Customizing Predefined Database error messages

    Hi,
    I've a ADF table from the view object in my page. The table has two columns and column 2 is mandatory from entity side (in db not null). While filling the table from the page, I kept 3 row's value empty in 2nd column.
    Now on submit, it throws validation message which is as expected. But as I left 3 field in column 2 blank, in the message it says "Column 2 : Please enter a value" three times.
    My customer wants that instead of three message string, it should display one message string like "Please enter values for column 2"
    Is there any possibility to concatenate the 3 message string into single message? If yes what is the way to achieve it?
    We are using JDeveloper 11.1.1.4
    Thanks in Advance
    Arunava

    Hi,
    I'm also facing same problem since many days..I'm unable to concatenate multiple duplicate error messages into a single message.I've a ADF table from the view object in my page.When I'm entering multiple row values in a single column as a blank values(which are mandatory), and after When i click the commit,AttrValException is being occured and predefined error messages are being displayed in a dialog box.As the entered blank values are from same column, the error messages are duplicate as shown below::
    (For example):
    Error:
    EmployeeId :You Must enter a Value
    EmployeeId :You must enter a Value
    EmployeeId :You must enter a Value.
    When I click the commit button,Is there any way to handle the exception and concatenate these error messages into a single message.
    I'm using JDeveloper 11.1.1.4.0
    Thanks in Advance
    Krishna Murthy

  • Validation messages in JSF (when not using ADF faces)

    I've spent some time with JDeveloper 11 and would like to use it on an upcoming project. I have to target IE 6, so I won't be able to take advantage of ADF Faces. Instead I'd like to use the ADF Business Components with a standard JSF interface so it can be used by people still running IE 6.
    I've created a Business Component from a database table and can bind a JSF HTML Creation Form by dragging the appropriate view from the AppModule in the Data Controls pane. However, when I attempt to submit the page without all the fields being valid I get the following validation error message:
    j_id__ctru2:j_id__ctru6: Validation Error: Value is required. j_id__ctru2:j_id__ctru6: Validation Error: Value is required.
    I've tried making this more descriptive, but editing the error message in the Validation Rules section of the Business Component has no effect. What's the best way to convey a meaningful validation message to the user when not using ADF Faces?
    Also - I'm still very new to JDeveloper. Since I won't be able to rely on my users having Internet Explorer 7, would you recommend I stay with JDeveloper 10? The examples and documentation I've seen so far for JDeveloper 11 appear heavily biased towards using ADF Faces so I'm starting to wonder how much support is there for using plain old JSF.
    Thanks for your time!

    Hi,
    if you are completely new to this then I suggest to use JDeveloper 10.1.3 and ADF Faces in there. Its good to use with IE6 as well. Currently we do have more tutorials available for this release than for 11, which for this reason is a better choice for someone new to this
    Frank

  • Standard warning messages in Vendor Request Form

    Hi All,
    Please let us know, how are the standard warning messages in Vendor Request Form while creation/search are displayed.
    For example, I am getting an soft warning message text, at vendor creation which says "Some of the records were not found; for more information, check the log".
    Here we don't have any log traces to be checked for, and we have verified the back end record resultset count which is same, irrelevant of the warning message being shown.
    These messages are displayed only at two places:
    1) The search navigation page, where all the searched record results are displayed and we continue further for creation of vendor workflow.
    2) When the workflow of vendor creation is completed, along with the "Workflow has been completed" success message, this warning message is also shown.
    I want to know, from where these messages are being populated and how to suppress these messages.
    Kindly suggest.
    Thanks in advance!
    Message was edited by: Oxana Noa Zubarev

    Hi All,
    Attaching the screen shot for refernce:
    After we click on "continue with create/edit" button, after few details have been entered, the work flow completes.
    There are we are getting these error message as highlighted above.
    Let me know if any info from my end would help in getting the root cause.
    Thanks in advance.

  • Report on document based on document attributes (custom or standard)

    Hi All,
    Got a requirement to create a custom report in Solman to display document details under a project based upon the attributes (Custom or standard) of the document eg- Doc attribte phase 1 would result in a set of documents, phase 2 in another set.
    Please help me from where I can get the required data.
    Regards,

    I think i should have asked my question in a seperate thread...since it is considered as a reply to this thread....No indication/tool bar for rewardings points is found.....
    May be next time will reward more than expected..
    Thanks for all your service.
    Regards,
    Murali.S

  • Is there a way to create standard text messages that can be reused easily

    is there a way to create standard text messages that can be reused easily

    if you meant phrases, then Yes
    Setteings> general>keyboard> add new shortcut

Maybe you are looking for

  • Document to document hyperlinks exported to epub do not work

    I've been flooding the forums lately with a lot of ebook questions recently . . . hopefully this will be the last one. I've created multiple documents combined into a book, so that when I export my ebook, I'll get the necessary breaks within the book

  • How can I move songs on my ipod touch to my laptop

    Hey every one! I have an iPod touch I think is the 3rd or 4th generation. (I think is the 4th because it has Facetime) I put all the music in with another laptop but now I want to bring it down to mine, the other one is my brother and we live in diff

  • Upgraded to itunes 8.0 - Purchased Songs now wont play - no error message.

    Upgraded to itunes 8.0 - Purchased Songs now wont play - no error message.

  • Changing the Database Name

    Hi Gurus I am using oracle 10g on Windows platform. The issue is I need to change my database name. When i gone through the Oracle docs I found there is an utility called 'DBNEWID' . But not getting a clear cut idea. Since my DB is So critical anybod

  • Powershell and Outlook Issues

    So my ultimate goal is to export emails after a specific length of time as a .msg and then upload them to sharepoint for archival purposes. My issue is all the examples I find never seem to work for me. I use PowerGUI for my ISE, I have powershell 2.