How to programmatically set an error message for a validation rule of an EO
Hello,
Is there a way to programmatically set an error message when validating any data on an EO?
It seems the API of the EO interface does not have any method to be defined for my needs..
thanks
The other option is that for the error message you can define a groovy expression to call an EO method.
I documented this on my blog
http://blogs.oracle.com/grantronald/entry/dynamic_error_messages_from_a
Regards
Grant
Similar Messages
-
How to show a single error message for all fields
Hi
I have a JSF from containing around 10 controls(input, select etc.) .
Now I need to display an error message in case any of the mandatory control has validation error.
Message format would be like
"*Please,Complete the fields marked with yellow!"* The message I need to show in a div tag with Yelow background.
Currently, I am getting individual default error message in case validation fails and related field is bordered with Yellow.
My code is below.
*<h:panelGrid columns="3">*
*<h:outputText value="#{msgProv.bi_firstname}" />*
*<h:outputText>*
*<rich:spacer width="100px"></rich:spacer>*
*</h:outputText>*
*<h:panelGroup>*
*<h:inputText*
*value="#{brokerInformationFields.firstName}"*
*label="#{msgProv.bi_firstname}" id="firstName" required="true">*
*<f:validateLength maximum="10" minimum="2" />*
*<rich:ajaxValidator event="onblur" />*
*</h:inputText>*
*</h:panelGroup>*
*<h:outputText value="#{msgProv.bi_lastname}" />*
*<h:outputText>*
*<rich:spacer width="100px"></rich:spacer>*
*</h:outputText>*
*<h:panelGroup>*
*<h:inputText label="#{msgProv.bi_lastname}" id="lastName"*
*value="#{brokerInformationFields.lastName}" required="true">*
*<f:validateLength maximum="20" minimum="1"/>*
*<rich:ajaxValidator event="onblur" />*
*</h:inputText>*
*</h:panelGroup>*
*<h:commandLink action="#{brokerInformationActions.submit}">*
*<h:graphicImage value="/images/axa/btn_submit_from.png" style="border:0px;"/>*
*</h:commandLink>*
I am using (JSF1.2,Rich Faces 3.3.0,Facelets.)
And a Phase Listener from
http://balusc.blogspot.com/2007/12/set-focus-in-jsf.html
This Phase listener is to border the control with Yellow in case validation fail.
Now my Query
*1) How can I show a single message for all fields as I marked above in case of validation failure?*
*2) Now, the control is becoming yellow borderd when user clicks the submit button and validation fails.*
*User can move from one control to other using tab. That time proper validation message is appearing.*
*but the border of the control is not changing to yellow.*
*What's the correcion can be made to meet that requirement too.*
regards
RoyHi Nabheet,
Thanks for your response.
The FM returns the error messages if they are standard ones. For example, if the posting period is closed - the FM will not allow the Workflow to proceed further.
But in this case, I have a custom error - for a particular Profit center, Cost center and I/O fields are mandatory(not at time of parking, but should be filled before posting).
Since this is not a standard error, this FM will not stop workflow from proceeding further. How can I have the custom error captured in this FM?
Thanks. -
How to programmatically set formatted javascript dates for validation?
How does one programmatically set formatted javascript dates for validation?
"12/31/2011" does not seem to work?ourDate.rawValue = "2011-12-31"; // works
NOTE: if you have a hierarchy issue you may need something like
root.body.table.detail.ourDate.rawValue = "2011-12-31"; -
How to get rid of error message for the material?
Hi everybody,there is a material which is showing an error message whenevr try to create a sales order, i've checked the material master...there is no check in X-plant Mtrl or X-dist chan or any flag for deletion...but still the red error message comes up while creating a sales order...how to get rid of this error?
this means material is blocked for procurment
three kinds of block can be there
01 Blocked for procment/whse
02 Blocked for task list/BOM
03 Blocked for Purchasing
GOTO MM42 give material n plant data
Select BESIC VIEW
there is a field called as material block remove the blocking reason
Hope this will help
Edited by: WISH on Mar 24, 2008 6:33 AM -
How to Create Warning or Error message for transaction
Dear Gurus,
I understand that we can create a new warning or error message. I would like know how we tie the transaction with these message.
ex:
I want to create a warning message in MIGO when i receive goods for PO. How do i create a message a tie the transaction to it.
Regards,
Kumara.Of course you can add own messages and message classes. But they will not be considered anywhere without proper coding.
If you want a message to appear in MIGO then you have to find an user exit where you can put your coding that will issue your own messages. -
How can I get localized Error messages for basic errors ?
I'm running JDK 1.6
and I wrote :
Locale.setDefault(Locale.CANADA_FRENCH);
try
java.io.File f = new java.io.File("c:/temp/xxnonexistentx");
byte aa[] = new byte[2];
java.io.FileInputStream fis = new java.io.FileInputStream(f);
fis.read(aa);
fis.close();
catch (Exception e)
System.err.println(" Err " + e.getLocalizedMessage());
}And I get
Err c:\temp\xxx (The system cannot find the file specified)why do I always get the US English error message. This is really a basic error, why does it seem that there is no localized version in French ?
I also tried with
Locale.setDefault(Locale.GERMAN);But I always get English �ber Alles !
WHY ?As a developper I prefer my error messages in my
langage. .NET does it (if I want), I like it. Do you
know that O'Reilly & Flanagan Java reference book
(1500 pages) in French sells very well in France ?
Not so much the English version.As I said, I sympathize to some extent. With this part, yes.
End-users do see some error messages (this file not
found is an example), you want, me and all other
people, to translate this type of messages in how
many languages, each separately, over and over ?If I'm an end-user I don't want to see Java error messages. Or if I must, I only want to see them in the context of "This error message occurred, please pass it on to the technical support people when you call them". So, given that, I don't care if the system only produces German messages. This part I don't sympathize with. -
ADF: showing error message on a validation rule programatically
Jdeveloper : 11.1.2.2.0
i m using ADF. i ve a form that contains input text that is binded to a managed bean property.
that input text value is inserted into an entity attribute.the attribute in the entity has a validation rule.
i submit the form and in my managed bean i call
am.getDBTransaction().commit();
i want when i submit the form and the when the commit is called and throws exception regarding the validation rule,i want to show an error note window same style like this http://oi50.tinypic.com/15fhnpt.jpg
how can i do that ?
thanks in advance :)Hi,
i submit the form and in my managed bean i call
am.getDBTransaction().commit();A strict NO NO for doing this. You add the commit action to the binding and call the execute the commit operation binding programatically.
i m using ADF.ADF is vast. Be specific on the technologies you use (ADF BC and ADF Faces?)
that input text value is inserted into an entity attribute.the attribute in the entity has a validation rule.Are you doing something special with the binding you have in bean? If not, why don't you Drag and Drop the VO from the data control directly? (set the af:messages tag to have inline=true).
-Arun -
How to set a welcome message for a user when he is login
in my server i am creatin a user "john" in solaris10 box when ever he logins in to the server he should get a message like "welcome john" what is the option to set the message ....
how can i set a welcome message for a user in solaris
please guide me the process how i can do
Thanks in AdvanceTHANK YOU FOR YOUR REPLY
i have checked it out in /etc/motd
its working fine but the message is coming for every user when they login
i want message lilke
if john is looged in
than message like "welcome john"
can u please tell me the procedure where to change in /etc/profile and /etc/.login -
Dear Experts,
I have a requirement for making material description as non mandetory in change request view of mdg material screen.
I have done that using field usage in get data method of feeder classes, but still message is displaying.
This message 'Material description is mandatory is displaying with check action only, but not with save or submit after i anhance field property as not mandetory.
How to prevent error message for material description in MDG material detail screen, when user click on check action.
Thanks
SukumarHello Sukumar
In IMG activity "Configure Properties of Change Request Step", you can completely deactivate the reuse area checks (but will then loose all other checks of the backend business logic as well).
You can also set the error severity of the checks from Error to Warning (per CR type, not per check).
Or you provide a default value for the material description, e.g. by implementing the BAdI USMD_RULE_SERVICE.
Regards, Ingo Bruß -
How to create a error message for Deleted batch while creating a PO
Hi ,
Can any body tell me how to create error message for a deleted batch while creating a PO in ME21n,
when a PO is created for a deleted batch at GI &GR lebel it is showing a error message,
but i want to show a error message while doing the PO creation.
Thanks,
Sachhiin badi me_process_po_cust u can put this message
METHOD if_ex_me_process_po_cust~check. -
how can i stop an error message that comes up when i am using word? the error message is "word is unable to save the Autorecover file in the location specified. Make sure that you have specified a valid location for Autoreover files in Preferences,…"
It sounds like if you open Preferences in Word there will be a place where you can specify where to store autorecover files. Right now it sounds like it's pointing to somewhere that doesn't exist.
-
How to give error message for the screen element text field when wrong i/p
How to give error message for the screen element text field when wrong i/p
when wrong input given
eg.
I have a text box with SBOOK-CARRID
so when user give wrong entry in text box i.e LG
then I should give some error stating that the the input is invalid or not available ,
now it showing the error of standard messages,
i want manual message to be displayed when error comes.
Thank you,
Regards,
Jagrut Bharatkumar ShuklaHi all,
Thank you for your valuable reply,
but the thing is that its a screen field,
i.e text box not a selection screen
i created in screen layout
with name sbook-carrid
now i want to get error message display if wrong i/p is given
thank you.
Regards,
Jagrut bharatkumar Shukla, -
Editable ALV - how to throw an error message for a specific line & field
Hi all,
I've implemented an editable ALV and also the ON_DATA_CHECK event to check the values, entered in the ALV. So this works fine and I can check the values.
But now, I want to throw an error message corresponding to the field in the ALV, where the error occured.
How can I throw this error message corresponding to a specific line/field in the ALV?
I was using REPORT_ATTRIBUTE_ERROR_MESSAGE and REPORT_ELEMENT_ERROR_MESSAGE but without success.
I'm also using a loop over the "CHANGES" in the ALV and within this loop, I use
elem_alv = node_alv->get_element( index = <change>-element_index )
to get the element for the message.
CALL METHOD lo_message_manager->REPORT_ELEMENT_ERROR_MESSAGE
EXPORTING
MESSAGE_TEXT = 'my message'
ELEMENT = elem_alv
* ATTRIBUTES =
* PARAMS =
* MSG_USER_DATA =
* IS_PERMANENT = ABAP_FALSE
* SCOPE_PERMANENT_MSG = CO_MSG_SCOPE_CTXT_ELEMENT
* MSG_INDEX =
* CANCEL_NAVIGATION =
* IS_VALIDATION_INDEPENDENT = ABAP_FALSE.
2.) is it right, that for an editable ALV, I can't use the WDDOBEFOREACTION to do the checks?
If I try to use this, I can't get the values of my ALV table to check it.
Thanks,
AndreasHi Andreas,
I have tried to replicate your problem and I am getting the desired output. I have a row by name TEMP_NEW in my ALV and I want to throw an error message whenever the user enters a value of 4 for that particular field. Please find my coding as below. The important thing is where we perform the actual comparison between the r_value and 4. r_value is defined in SALV_WD_S_TABLE_MOD_CELL as reference to type DATA. So suppose the user enters a value of say 3 in the TEMP_NEW field of the ALV then r_value would contain 3 but if you observe its type in debugging mode it would be as TYPE REF TO I and not TYPE I. So you cannot directly say something like:
"if ls_modified_cells-r_value = 3" as this would lead to a syntax error. Define a field-symbol say <temp> and then use it to get the actual value into it by saying like:
ASSIGN ls_modified_cells-r_value->* TO <temp>.
Then you can use this <temp> for comparison in your IF statement like:
IF <temp> = 3.
Find the entire coding as below:
METHOD check_data.
DATA: lr_node TYPE REF TO if_wd_context_node,
lr_element TYPE REF TO if_wd_context_element,
ls_modified_cells TYPE salv_wd_s_table_mod_cell.
FIELD-SYMBOLS <temp> TYPE data.
" get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
lr_node = wd_context->get_child_node( name = 'NODE' ).
LOOP AT r_param->t_modified_cells INTO ls_modified_cells.
lr_element = lr_node->get_element( index = ls_modified_cells-index ).
IF ls_modified_cells-attribute = 'TEMP_NEW'.
" Get the value extracted into the field symbol from the reference variable
ASSIGN ls_modified_cells-r_value->* TO <temp>.
" Use the value present in this field-symbol for your comparison
IF <temp> = 4.
" report message
CALL METHOD lo_message_manager->report_attribute_error_message
EXPORTING
message_text = 'Sample message text'
element = lr_element
attribute_name = ls_modified_cells-attribute.
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
Hope this helps resolve your problem.
Regards,
Uday -
Cannot update. Get error message 1648, "no valid sequence could be found for the set of patches."
Uninstall the corrupt Reader version using http://labs.adobe.com/downloads/acrobatcleaner.html then download and install the latest Reader from http://get.adobe.com/reader/enterprise/
-
I'm running Mac OS X version 10.6.8 How come I get this error message "You are running an operating system that Photoshop no longer supports. Refer to the system requirements for a full list of supported platforms." When I Try to download a FREE trail?
Hi Brizill,
Please refer to the help document below to understand the technical specifications for the same:
System requirements | Photoshop
Regards,
Sheena
Maybe you are looking for
-
The iWeb '08 nightmare has begun! My ENTIRE site does not show up in iWeb!
*Remember the whole iWeb 1.0.1 fiasco?* I think we are all gonna have to live through that again with iWeb '08. During the first fiasco, it took Apple more than 2 months to issue a fix, lets hope it doesn't take them as long this sime. *So my problem
-
nno sound when I use in app streaming
-
How to get thread by thread id
I can get threadID of any thread. But how to choose any thread with id of it for waiting.
-
Weird iTunes Problem with Podcast
I have been stumped on this for several months now. My Escape Adulthood podcast has been listed in iTunes for a while now. I have three done episodes. Unfortunately, anytime anyone tries to download or preview episode #2 or #3 from iTunes, all they g
-
insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('','','',41) java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."DESCRIPTION"."TYPE") at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at