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.

Similar Messages

  • 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.

  • 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

  • Creating a Custom Pop-up Message?

    I would like to create a custom pop-up message for a form.  What I'm looking for is when the user types in a series of numbers and if the total is under 650,000 a pop-up message will appear explaining what to do next and then the user clicks okay and the box disappears.  Thanks in advance for any help.

    For the messageBox method see http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=001368.html
    The attached contains the following logic on the calculate event on the field 'total'
    // form1.page1.subform1.total::calculate - (JavaScript, client)
    if (form1.page1.subform1.nf1.isNull || form1.page1.subform1.nf2.isNull || form1.page1.subform1.nf3.isNull || form1.page1.subform1.nf4.isNull) {
      this.rawValue = null;
    else {
      var total_ = form1.page1.subform1.nf1.rawValue +
          form1.page1.subform1.nf2.rawValue +
          form1.page1.subform1.nf3.rawValue +
          form1.page1.subform1.nf4.rawValue;
      if (total_ < 650000) {
        xfa.host.messageBox("The total must be 650,000 or greater. Please review...","Total LT 650,000",1);
      this.rawValue = total_;
    The code assumes that fields n1 - nf4 are mandatory. If you need to do the validation prior to an action such as print or save, you will need additional logic to force the calculate to fire.
    Steve

  • How to get UI page validation messages?

    Hi,
    I have problem regarding Front End validation messages..how to get this
    in my project i have a form with some fields
    i need to generate small pop up message "already exist" for entering same values for perticular
    columns (when click the tab for next column then i need message)
    can any body help me..

    Community Feedback and Suggestions (Do Not Post Product-Related Questions Here)
    Mod: locking.

  • Creation of Custom IDoc with Message control for sales Order

    Hi all,
    I am trying to create custom Outbound IDoc with message control.
    I wrote the code in a function module and i want to register that function module. (as in inbound registration of function module as in BD51).I am not knowing if that registration is necessary for outbound Idoc, if so in which transacition?
    Please list me the steps to create a custom IDoc for Message control.
    Thanks in advance,
    Regards,
    John.

    Hi,
    You need to use FM : MASTER_IDOC_DISTRIBUTE to create outbound idoc.fill the data in the tables EDIDC,EDIDD and generate the IDOC.
    check this link:
    Re: Master_IDoc_Distribute
    and use transaction : WEDI for IDOC configurations.
    here you will have all the transactions(step by step) to set the outbound IDOC configurations.
    Regards
    Appana

  • Page has a custom page size message

    On the master pages, on a locked layer, we have a frame whose content is set to "Undefined" that is sized to exactly match the page size. This is so the page trim can easily be seen and measured in PDF and when printed and we've never had any trouble with it before.
    We have a file in which when we change the starting page number that frame goes out of position by 9 pts toward the outside of the pages. When we reapply a master to that page (even if its the SAME master) we get the message "Page ## has a custom page size. This page can retain its current size or be resized to match the new master."
    If we select "Keep current size" the outer frame to mark the page trim stays in the wrong position. If we select "Use master page size" that frame gets set correctly.
    I've checked the page size at all stages using both the page tool and the button on the pages pallet and it shows the page size to be exactly what the rest of the pages and the document are set to, so I don't understand why I'm getting this message.
    The first problem I was made aware of with this file is that when we ran our script to auto flow text the script was overriding the master items on to the page in the wrong position. Thinking it had something to do with the script command (which works correctly on other files) I posted this http://forums.adobe.com/message/5206889#5206889 to the scripting forum.
    Now that I've been made aware of this custom page size message I'm thinking this and the script not working correctly are related.
    Thanks for any insight anyone can offer.
    Ken

    I wondered whether my operator had accidentally changed the page size with the page tool selected and that the sizes showing in the dialog and on the tool bar were, maybe, rounded. When I saw your message I was hopeful that, maybe, the preflight would detect an incorrect page size.
    But, alas, it did not! It is showing on errors.
    Thinking that maybe InD was "seeing" the frame that was sitting outside the page as making the page larger I tried repositioning it and removing it before applying the master. But, I received the message again.
    Thanks for taking the time to respond!

  • ADAPTER.JAVA_EXCEPTION  - java.lang.Exception: no valid message format obje

    Hi experts,
    we have a problem when we call a web service PI (release 7.01 , SP 10), from legacy system : the PI system return this message : ADAPTER.JAVA_EXCEPTION ; - java.lang.Exception: no valid message format object found
    For to test this scenario we use soapUI tool.
    I tried the URL (... /XISOAPAdapter/HelperServlet?action=FindChannel ...) in IE and got the following response :
      <?xml version="1.0"; ?>
    - <s:ChannelInfo xmlns:s="http://sap.com/xi/WebService/xi30">
      <channelID>11ccbb96a7f3349c895a005c9bc09cb7</channelID>
      <name>CC_Soap_Sender_TestWS</name>
      <type xmlns:st="http://sap.com/xi/XI/System">st:SOAP</type>
      <direction>INBOUND</direction>
      <party />
      <service>BS_..........IDB_DEV</service>
      </s:ChannelInfo>
    so I think that this service is OK .
    Thanks in advance for your help,
    Alberto

    Hi,
        1)  Check the URL once again- check for the extra spaces at the end of the link.
    2) please refer below blog i hope it will help you
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40611dd6-e66e-2910-f383-e80fb44f9cd4?QuickLink=index&overridelayout=true
    Did you check the page no 14 of the document  which has the same problem - in problem analysis it has mentioned that check the URL as well as proxy setting of internet browser.
    3) Try to create the ID objects manually (Sender Channel and Sender Agreement).....when we use the wizard a * gets introduced in the unfilled (unused) fields (party etc) ....however when manually created the unused fields are left blank.
    4) Check if all the ID objects are available in SXI_CACHE.
    regards,
    ganesh.

  • How to set a dynamic validation message in javascript

    Hi,
    I am using the "validate" event on a field, along with the "script message" field, to make a validation and send a message to the user if the test fails.
    - Is it possible to define parameters in this message, for example "field &1 is invalid" where we replace &1 by the name of a field?
    - Is it possible to send 2 different messages (I guess it's like using a message &1)?
    - What is the best practice according to your experience?
    Notes:
    - I am aware of the xfa.host.messageBox, but I'd like to keep Adobe logic for validations (am I wrong? why?)
    - I also saw the possibility of binding a field from the context, to the message field, but I found that it was not very clean to do this way (if even possible)
    Thx !

    According to the tests I did since yesterday, it is very difficult to use the "validation script message" (in the "value" tab of a "text input" field, within a dynamic table), for sending a dynamic message.
    I abandon, and prefer to use use
    xfa.host.messageBox( "dynamic message text" )
    For information, I could change the message during "validate" event, with a rather complex algorithm.
    Unfortunately, when a table row is just added (dynamically, with a button), though the message has been changed, it displays the original value. When I change the field again, the changed validation message is taken into account. I don't know why.
    Edited by: Sandra Rossi on Jul 24, 2009 9:01 AM : it's only to say that since then, this was the only solution! Question closed

  • Variable in the validation message

    Dear all,
    I have defined a new validation method with the following settings in the SEM-BCS:
    Type of the data stream: totals records
    Validation type: data rows and totaled
    Then I have defined a new validation rule and a new message. For example:
    Validation rule:
    VAL_YTD u201E&1u201D ( u201CAu201D items ) = 0
    Message:
    u201CAu201D items (&1) donu2019t equal 0.
    I use the group function with item.
    My question:
    How can I set up that in the message text that the system writes out the number of item in the message?
    For example
    u201C112u201D item (56 EURO) donu2019t equal 0.
    Regards
    Zsolt

    Hi Zsolt,
    I have struggled with this in the past and found the help document useful but I think it is not possible to list the incorrect Item (as suggested above by Collet).
    NB If you have BCS 6.02 or greater, then you already have the new "jump to" functionality that can take users directly to the List of Totals records to display the incorrect data record - this provides some help for users and infact may be better because they would probably go to the Totals List after a validation message anyway.
    NB It doesn't need any configuration, only installation of 6.02 (that is BCS 6, EHP2) or greater, plus (if you haven't already) activation of the EHP2 group close function in T-Code SFW5. Then the functionality will exist in your validation log screen after running the validation task.

  • Losing Data Validation Messages when writing back to context

    ( The base for this question is the ALV grid in section 2 of this [TimeSheetMockUp|http://www.duke.edu/~michaelm/TimeCard/AnnotatedTimeSheet.jpg] )
    Users enter values in the white cells which represent the hours recorded on a given day for a certain type of time.  
    Lets say we have a z-object that supplies us with the overall grid structure, including the headers and (the shaded) summarization cells. The web dynpro ALV had been set to allow input only on the raw data cells. They are set to 4 places with one decimal.
    As the app was being developed, when we entered invalid data in a cell, such as 123456, or 1.2345 or u2018qu2019, a nice message was displayed that told the us about the issue.  This was free u2013 I guess the phase model does that for us, and we liked it.
    Well, down the road a pieceu2026 we needed to add a method to recalc all the summary values from the raw inputs. 
    METHOD wddoafteraction .
    * wizard: navigate to and get the rows data                         *
      DATA lo_nd_nd_rows TYPE REF TO if_wd_context_node.
      DATA lt_nd_rows TYPE wd_this->elements_nd_rows.
    * navigate from <CONTEXT> to <ND_ROWS> via lead selection
      lo_nd_nd_rows = wd_context->get_child_node( name = wd_this->wdctx_nd_rows ).
      lo_nd_nd_rows->get_static_attributes_table( IMPORTING table = lt_nd_rows ).
    * do the math                                                       *
      DATA lt_updated_rows TYPE wd_this->elements_nd_rows.
      CALL METHOD wd_assist->o_wc->recalc_update_and_return_wrows
        EXPORTING
          im_rows = lt_nd_rows
        IMPORTING
          ex_rows = lt_updated_rows.
    * repopulate the rows                                      *
      lo_nd_nd_rows->bind_table( new_items = lt_updated_rows set_initial_elements = abap_true ).
    Now, weu2019re losing all the nice data validation messages u2013 they do not display (the offending entries are just cleared) !!!
    After some investigation, it seems that the bind_table call is where they get lost (without that call, they appear) .
    Iu2019ve tried placing this code in a number of hook methods, but the same thing occurs.  It is currently in the viewu2019s afteraction hook.
    So, u2026 I have two questions.
    u2022     How do I get my nice messages back. ?
    u2022      Where is the right place to update my context from 
    ( Btw, downstream, our recalc outines will also want to throw messages that we will want processed after we get through the initial validation  )
    Thanksu2026
    u2026Mike

    Fixed with SAP Note 1410122 - WD ABAP ALV: Messages are not displayed

  • 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

  • How to display Entity level validation messages in a table

    I'm using ADF 11g 11.1.1.2.0. I have a page with an updateable table based on an EO. In the EO I have defined some entity level and attribute level declarative business rules. When the user enters a value in the table that violates an attribute level validation, the related message is displayed inline and the attribute is surrounded by a red box. Furthermore the user is not able to place his cursor in a different row. In this way it is clear which row and attribute caused the error. However if the user enters some data that violates an entity level validation, the validation message is displayed as global messages in the message-popup when the business rule is based on a script or a method. This means that the user gets a global message popup, and does not know which row caused the error. Ofcourse we can include the identifying attributes of the row in the error message, but I would like to know if there is another more visual way to communicate to the user which row caused the error.
    Edited by: Jonas de Graaff (PSB) on 10-feb-2010 2:51

    Hi Chittibabu,
    what about using a TreeTable control?
    SAPUI5 SDK - Demo Kit
    Regards
    Tobias

  • Want the Customer specific validations at the time of asset posting

    Dear all,
    I want to implement Customer specific validations at the time of asset posting(ABZON , F-90 , F-91).Please tell which user-exit should I use??
    AINT0004 is working only for ABZON.
    AINT0001 is not as per my requirements!!
    Regards,
    Amiya

    Hi Amiya ,
    u can achieve thru Validations / Substitutions OB28. But u have limitations  in the implementations of Logic .
    regards
    Prabhu

  • How can i change validator Messages

    i am newbie in JSFl i just start now
    i am making a very simple login application
    here i do a validator on text field.
    validation message show me as form1:txtid: Validation Error: Value is required.i want to change these message like ID is required.how can i do this??

    thanks shakeel bahi.
    it is only work for required property. am i right?
    how i change message on length validator?
    for example minimum length is 2 and maximum is 10
    error message show as
    for minimum
    form1:txtID validation error minmum length 2for maximum
    form1:txtID validation error maximum length 10here i want to replace my messages like
    User Id length Should be between 2 to 10thanks again for your efforts

Maybe you are looking for

  • Pre10 wont start disc/folder burn. Tried everything!

    Hi there, I recently bought a new computer and I can not get Pre7 or Pre10 to burn a folder or a disc. I have browsed these forums for hours and hours looking for a solution but no success.  I initially loaded Pre7 when i got the computer but when it

  • More than one iPod with more than one user

    Sorry if this has been asked and answered before. I searched and can't find it. I have an iPod Nano and my daughter has an iPod 30GB. We both had our own laptops which each had iTunes downloaded onto. Well, my daughter's laptop is no longer working.

  • How to remove ":"  in file name while using Variable substution

    Hi ALL I am using  file adapter and I what to create file name dynamically by acesssing PO number and time stamp from the payload using variable substution. But the problem is I am getting ":" in time stamp field value and it is not acceptable for fi

  • I cannot view some photos in iPhoto' 11

    I installed 10.7 successfully but some photos in my iPhoto library do not show.  Some events show blank and their contents show blank with a triangle containing "!".  I know the photos are there as they show up momentarily as I scroll the screen.  In

  • Transferring VHS Video onto DVD via Macbook

    Hi I've been given a large project and need some (simple) help. Its to transfer about 40 VHS tapes onto CD,s. Help please as How/what do I need/ is there any step by step instructions? Thanks