oracle adf - programmatically set validator message in entity object in adf -


The sample code is shown below in the implementation of the Oracle Form in the "when-valid item" trigger in the ADF.

  Announce the date sysdate1; Start by choosing sysdate from double to sysdate1; If to_char (: xdate, 'cc') & lt; '20' message ('Confirm Century Please'); Message ('Confirm Century', NO_ACKNOWLEDGE); Increase form_trigger_failure; end if; If x_date> Sysdate1 then message ('You can not enter future date'); Message ('You can not enter future date', NO_ACKNOWLEDGE); Increase form_trigger_failure; end if; Dp_date (); End;   

Is it possible to change the verifier message in a unit objectively programmable? Because I am implementing Oracle forms "when valid-item-triggers", where the error message based on the situation has been changed as above. [In ADF we can create more than one message] I give this statement "Script Expression Verifier allows you to enter more than one error message. This is useful if the verification script gives a different error or warning message from the condition" On the link but have not provided any examples, can any organization not provide me any other way to implement "pointer" or any other? In the above scenario, we can solve the problem in two ways (according to my knowledge). ). If we have items from the code in the other entity objects (except for the current EO, this item is available), we can write the "when-valid-item" trigger method in the managed bean and we can call it in the stigma Event event.

Sikund is interesting, create an expression vedicator in the item's business rule in the unit object, select "script expression" as the rule type and give "rule definition" as "source" .customValidateItem ( NewValue) "Where" customValidateItem "is your custom method in your EntityImpl class, and it's calling using groovy expression, and setting failure handling messages as shown in the picture below.  Enter image details here

Before this you need to create a transient converter such as: message and we can use the value of that item (message ) Using the groovy expression "source.message" from EntityImpl class and setting the "message" item value in the same class based on "condit", the above code such as Ion X: if (gid! = 223) {setmessage ("Please do not gid please 223 !!"); false return;
} and if (gid! = 224) {setmessage ("please check gid 224 Is !! "); Details are false;}

The accelerator has been created in the setmessage EntityImpl.

Hope this helps some body

Thanks.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -