Combo LOV firing mandatory field validation
Hello,
I am using Jdev 11.1.1.6.
My VO is entity based. I have 3 fields in this VO as F1, F2, F3
All 3 fields are mandatory.
F1 has model based Combo Lov implemented. List Attribute lookupId from LOV is returned to F1 and List Attribute lookupDesc to F2.
F2 is mandatory and editable. Idea is that default text is returned by lov and then user can update the description.
Scenario 1: <does not work>
At runtime, in create mode, when I try to select a value for this combo lov, it fires mandatory field validation for F2 (only for F2 and not F3) and does not show list of values. I can not make it to show list until enter some data in F2.
<af:inputComboboxListOfValues> has autoSubmit="true" and immediate="false" and F2 has partialTriggers="id of F1"
Scenario 2: <works>
For test purpose, if I make F2 read-only then it works perfectly but F2 is editable and mandatory as well.
<af:inputComboboxListOfValues> has autoSubmit="true" and immediate="false" and F2 has partialTriggers="id of F1"
Scenario 3: <works>
On other pages, I have implemented combo lov where the lov is implemented on reference field and returning the value to only Id column and not to any other field. This scenario works perfectly even with mandatory fields present on page.
<af:inputComboboxListOfValues> has autoSubmit="true" and immediate="false".
Thanks,
Jai
Try to remove partialTrigger from F2 (has partialTriggers="id of F1"),
and attach valueChangeListener on F1, in which you can partially refresh F2 (by code)
Of course, make F1 autoSubmit.
Scenario 1: <does not work>
At runtime, in create mode, when I try to select a value for this combo lov, it fires mandatory field validation for F2 (only for F2 and not F3) and does not show list of values. I can not make it to show list until enter some data in F2.
<af:inputComboboxListOfValues> has autoSubmit="true" and immediate="false" and F2 has partialTriggers="id of F1"
Similar Messages
-
Mandatory field validation on Page links.
We have created a Portal application where we included different applications as taskflows. We have also created a tabbed interface which helps us to communicate from one task flow to another taskflow. When we are in one page of taskflow and try to move to another page of different taskflow using tabbed interface we receive mandatory field validation error which prevents us to move to any other page until we fill all the mandatory fields. We need to move to different page of taskflow by using the tabbed interface even without filling all the necessary mandatory fields. Can anyone help us to resolve this issue as this is very important for our project.
<b>Layout</b>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
<htmlb:page title="Check Pernr " >
<htmlb:form>
<htmlb:textView text = "Personnel No."
design = "EMPHASIZED" />
<htmlb:inputField id = "pernr"
value = "<%= lv_pernr %>" />
<%
if lv_no_pernr = 'X'.
%>
<script language="Javascript">
alert ("Personnel no. is not Valid")
</script>
<%endif.%>
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b>ONINPUTPROCESSING</b>
DATA: l_pernr TYPE persno.
DATA: data TYPE REF TO cl_htmlb_inputfield.
data ?= cl_htmlb_manager=>get_data( request = runtime->server->request
name = 'inputField'
id = 'pernr' ).
IF data IS NOT INITIAL.
l_pernr = data->value.
ENDIF.
CLEAR lv_no_pernr.
SELECT SINGLE pernr FROM pa0000 INTO l_pernr WHERE pernr EQ lv_pernr.
IF sy-subrc NE 0.
lv_no_pernr = 'X'.
ENDIF.
<b>PAGE ATTRIBUTES</b>
lv_no_pernr TYPE FLAG
lv_pernr TYPE PERSNO
hope this helps.
A -
Mandatory field validation error occurs when user cancels out of blank "cre
Hi - I'm building an application using Oracle 10g 9.0.5.2, with ADF/UIX/Struts.
I followed the technique described in the tutorial
http://otn.oracle.com/obe/obe9051jdev/uixtutorial/lesson_uix.htm
In that example they have a page called BrowseDeptEmp. On this page is a
create button, which is linked to a /createEmpAction before displaying the
FormEmp uix page, where the user is supposed to enter new employee data.
So I did the same thing, but I added a cancel button on the FormEmp.uix page.
If the user presses cancel on the FormEmp page, it goes through a 'rollback' DataAction (with a rollback operation dragged on it) and then back
to the main page.
here's my problem:
If the user
1. clicks the create button on the BrowseDeptEmp page
2. Sees the blank form in the FormEmp page
3. Changes his mind (does not want to add a new employee) and clicks cancel
The FormEmp page displays validation errors on the fields that are mandatory in the DB! So the user
can't cancel out of the create page unless he fills in the mandatory fields...!!
How do I cancel out of a create page 1) without entering any data on the page and 2) without getting
mandatory field validation messages?
It must be simple but i can't figure it out....
Please help :)
Thanks
DesI don't understand how this can happen if the user has not entered any data.
Is there a commit action somewhere that is being triggered before the rollback?
is your cancel button a submit button?
one way to fix this is to convert the submit button into a
regular button and have the regular button go directly to your DataAction (the one with the rollback).
you can automatically create this button by drawing a pageLink from the page to the DataAction in the page flow diagram. -
Form Layout LOV on mandatory field
Hi,
I have an LOV on a mandatory field in a form layout. When I am entering a new record and click on the LOV icon the LOV page displays but the calling page gives an error of "Value Required". I have noticed that if I manually change the Immediate property of the field to "false" then I do not get the error.
This error does not occur in table layout.
Thanks,
GavinGavin,
Do you have multiple LOV's on the page and/or dependent items?
Is the Value Required message related to the LOV item on which you invoke the LOV window, or is it another item?
Steven Davelaar,
JHeadstart Team. -
PDF Form Mandatory Field Validation Issue in Workspace
If we open a PDF Form with mandatory fields (e.g. Mortgage-Prebuilt sample PDF form) in Workspace and then click the Workspace Complete button without completing the mandatory fields, there will be mandatory validation check which will highlight all the mandatory fields and display the mandatory fields error message dialog box.
However, if we click the Workspace Complete button again afterwards, the mandatory fields error message dialog box will not be displayed. The dialog box will be displayed only if our mouse is moved to any active/enabled fields/buttons in PDF form.
Does anyone encounter this strange issue before?
Kindly advice what should we do to solve this issue.Hi Patrick,
As this is the modal popup, there is a close button .
Now in the ACTIONS tab try to create an action for CLOSE.
Once you get the window reference,
wd_comp_controller->gref_w_popup_split type ref to IF_WD_WIINDOW.
SET_ON_CLOSE_ACTION
SET_CLOSE_BUTTON
CALL METHOD wd_comp_controller->gref_w_popup_split->set_close_button
EXPORTING
close_button = abap_true.
CALL METHOD wd_comp_controller->gref_w_popup_split->set_on_close_action
EXPORTING
view = wd_comp_controller->gref_v_controller_split
action_name = wd_assist->gc_close_split.
"Action Name
In the CLOSE action -
IF wd_comp_controller->gref_w_popup_split IS NOT INITIAL.
CALL METHOD wd_comp_controller->gref_msg_manager->clear_messages
EXPORTING
including_permanent_msg = abap_false
only_permanent_msg = abap_false.
CALL METHOD wd_comp_controller->gref_w_popup_split->set_close_in_any_case
EXPORTING
close_in_any_case = abap_true.
CALL METHOD wd_comp_controller->gref_w_popup_split->close.
ENDIF. " if wd_comp_controller->GREF_W_POPUP is not initial.
Regards,
Lekha. -
How to skip the mandatory field validation for clearing the screen fields
Hi Friends,
I have created a module pool screen, and made some fields mandatory. after entering some fields, if i try to clear the fields, am unable to clear. Its throwing the error "Enter all required fields"., since some mandatory fields are there. But i could able to navigate through other screen. Both the "CLEAR" and "NEXT" command are given in the at-exit command only. Next is working but clear is not working.
Please provide me the solution.
Thanks
Karthikeyan.LHi,
To avoid automatic input checks you have to assing function type - E to appropriate screen field, which is not to be checked.
These function codes don't trigger PAI processing, instead they go directly to
MODULE mod AT EXIT-COMMAND.
..placed in PAI of the screen. In this way you can ommit automatic checks performed by system on mandatory fields. Please ensure you have assing E type to next and clear functions in GUI status.
Regards
Marcin -
Avoiding Manadatory Field Validation
Hello,
I require to populate a few fields based on a value selected from a dropdown. However, I am using a custom screen with all manadatory fields, hence getting stuck with mandatory field validation.
I tried using AT EXIT-COMMAND in PAI, but then the selected value is not passed, and hence the population of screen fields is not happening.
Any suggestion for me?
Regards
Prasenjit Mitra
Pune, IndiaHI Prasenjit
The manadatory validation has the more priority so it will not allow any other statements to process.
Instead fo going for Obligatory addition for that parameter you can validate it manually in the PAI event like
If <parameter> is initial.
message e001(zer). --->show error message
else
<code>
endif
HI
the problem is you can use AT EXIT-COMMAND but you cant pass the value at the same time. so i suggest you to use the validation using coding by which you can pass the value
regards
kishore
Message was edited by: Harikishore Sreenivasulu -
Mandatory fields on the same page with dependent LOVs
Hi,
I am working on an ADF-BC application using JDeveloper 10.1.3.4
I have an ADF Creation form with dependent LOVs and while implementing dependent LOVs we set the autoSubmit property of the selectOneChoiceListBox as true.
If I have some mandatory fields on the same page then because of the autoSubmit property set as true whenever I select a value in the list the page gets submitted and the mandatory fields give an error that the values are required therefore I had to remove the mandatory fields.
I tried using f:subview but even that dint serve the purpose because what I want is something like partialSubmit so that my mandatory fields do no give an error when I select a value in the list.
Can somebody help me on this, how to have a dependent list and mandatory fields on the same page.
P.S: It is very crucial for my application
Thanks,
RakshaHello,
This bug has been around since 10.1.3, its even still present in Trinidad and now in 11.
One of the ways to avoid is to make your fields use:
showRequired="true"instead of
required="true"I have not found a decent way to avoid this in general.
My idea was that this shiould be possible with a phaselistener and determine if this is a partial page event instead of a normal submit, but this didnt work.
-Anton -
Mandatory date field validation different if using a custom form... why?
We are using SharePoint 2013 and have a custom list in which one of the fields is a mandatory date/time field. When using the default "New" form, if I don't add any date and click the Save button, the form looks like it is submitted and then
comes back with some red text indicating that I need a value for my date/time field. If I simply create a new custom "New" form, and then click on the Save button without adding my date/time value, I get a black (not red) validation error.
A couple things are going on here. The error is displayed BEFORE any submit happens, unlike when using the default New form. The validation message is different and is listed in black rather than red. For other mandatory fields, the form
does get submitted and then displays the validation error in red, although it is a different validation error message than when using the default New form.
I don't care that the text is different, but it is an issue for us that the text is not in red. Does anyone know why this is happening?
Thanks - PeterHi Peter,
According to your description, my understanding is that you want to the alert message is red in the custom New form.
Please open the custom New from in SharePoint web site, and save without type anything in the data field, then the alert message(black) displays. Click on F12 to open IE developer debug tool, click on the arrow , then click on the black message to find the
HTML element id for the message, in my test, the id is ctl00_ctl42_g_fed984e8_446c_4fdb_a279_328c2c369be5_ff21_ctl00_ctl00_DateTimeField_ctl00 .
Then click on Settings->Edit page, add a Content Edit web part to the custom New form page, edit the web part and add the following code into the Edit Source of the web part:
<style type="text/css">
#ctl00_ctl42_g_fed984e8_446c_4fdb_a279_328c2c369be5_ff21_ctl00_ctl00_DateTimeField_ctl00{
color:#FF0000;
</style>
If you have multiple mandatory fields, you need to find each id for each field alert message, add #id{…}
into <style …> </style> section.
I hope this helps.
Thanks,
Wendy
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Wendy Li
TechNet Community Support -
Dynamic mandatory field error message is not getting displayed in webui
Hi,
In Appointment if the importance is HIGH i made Location as mandatory.For this i enhanced BT126H_APPT/ApptDetails. In the get_p_location() method of BTACTIVITYYH i have written the code.
Now the problem is Error message for this dynamic mandatory field is not getting displayed in webui.
I debugged in DO_FINISH_INPUT error message is getting generated but it is not getting displayed in ui.
Can anybody tell where the problem is?
Thanks,
Hari.Hi Hari,
Really sorry do not know how to convert this nug file to text
How ever quick solution for your problem would be just keep your validation in 'DO_VALIDATE_INPUT' method of the view controller.
Means even if the User clicks on SAVE , Since it fails here , it would not allow you to go further.
Thanks,
Rajesh P -
Mandatory item validation at a page level?
Hi,
We have a page where the list of mandatory items changes according to how some 'key' items are set by the user e.g. if they select option 1 on item 1 we need a different set of mandatory fields than if they set option 2 - setting option 1 in item 4, may imply that some further items are mandatory, In addition, some items become mandatory due to circumstances known only on the database. We have in excess of 40 items on this page. Once all mandatory items are complete, the status of the page is saved as 'complete' - the user can always save the page as 'incomplete'.
We already have a database package that can check a table row to see if it is 'complete', it knows all the circumstances for when an items becomes mandatory and can produce a list of fields and the reasons why they have failed validation.
Is it possible to call this db package during page validation and use it to perform 'item' validations i.e. identify the invalid items and place the appropriate message inline with them?Hi,
You can create a pl/sql page validation where you call you procedure.
begin
package_k.proc_p(item1,item2,...,itemN);
end;
You should define the type of the validation, but it is very straight forward,
Regards,
Max. -
What are the Mandatory fields????
Hi.... Experts...
Please spend your valueble time for me.... I can get back to you with 10 points....
Here I got a requirement to create contract with VA41 transaction...
But I am in confusion with feilds which should be must record...
Please guide me on mandatory fields of VA41 transaction....
Thanks,
Naveen.IHi,
When ever you want to know the required fields for any transaction just try to run the Transaction In SHDB in forgroud mode with a recording name.
You will easily get to know the required fields to be entered for a given transaction.
Sometimes when we run this VA41, eventhough some fields are not mandatory we dont pass them but we willnt b able to create the document eventhough some fields are not mandatory to fill> To have the clear idea abt the manadotry fields try to run in SHDB.
for this VA41, ther mandatory fields are-
contract type (VBAK-AUART)
Sales Area is a combintaiotn of SAles Org, SAles divnsion, Distirbution channel hende all 3 are required to be filled.
1st screen-
Sales Area(VBAK-VKORG)
Division(VBAK-SPART)
D.Channel(VBAK-VTWEG),
2nd screen-
Customer code(kunnr),
Contract validity,
material code(matnr),
quantity
plant(werks).
Best Wishes,
Chandralekha
Edited by: Craig Cmehil on Jun 30, 2008 11:24 AM -
Check for mandatory fields while creating EP users using code .. :|
Hello All,
I have a code using which I can create user accounts/EP users on Portal, am working on EP6 SP9 & SP12.
<u>My query</u>:
1. <i>From Portal's perspective</i> -> While creating EP users, there are few mandatory fields like user-id, FirstName, LastName, Email-id and Password. If any of the above fields is null/empty, Portal would give us an error message.
2. <i>From coding perspective</i> -> Here, only the user-id is required. Even if I do not enter/fill any of the above mentioned mandatory fields (except user-id), user account is created.
In case wherein FirstName/LastName is not mentioned, Portal shows the userid in the Welcome Frame, i.e. Welcome <user-id>. Tried this by commenting the statements contains the methods related to setting/accepting FirstNme and LastName of user.
<b>I want to know if this is all rite?
If no, then please guide me as to how can I set mandatory fields in my code.</b>
Awaiting Reply.
Thanks and Warm Regards,
Ritu R HunjanHi Ritu,
>>please guide me as to how can I set mandatory fields in my code??
In ur jsp file or in the controls code add the following attribute
<hbj:label id="userIdLabel"
text="User ID"
labelFor="userIdInput"
design="HEADER3"
required="true"/>
and to check the mandatory entry for that field do this in the submit button
<hbj:button id="insert"
text="Submit"
design="emphasized"
onClick="save"
onClientClick="if(!isMandatory()) htmlbevent.cancelSubmit=true;;"/>
and in the javascript write the client validation code.
Hope this helps.
Regards,
Joshua Kiran -
Mandatory Fields displaying in the table
Hi
In my create Page , fields are present with input fields and DROP DOWN BY KEY AND rADIO GROUP.
In that some of the fields are mandatory.
If i enter values in that create page, it has to show fields in the table.
But iam having only mandatory fields should come in the table.
Our Abapers created table for the Mandatory fields only.
Iam having doubt how the remaining fields(not showing in the table) will connect to the database.
Will any one explain me on this.
Please help me.
Regards
SushmaIam trying to connect my web dynpro application to R3 Database.
Iam having list screen consistts of Create and Export buttons and table.
Table Fields :
Allowance Code , sub code ,Type , Level , expense Type , amount
After clicking Create button ,
the screen consists of save and Cancel buttons.
Allowance Code -- (Input Field)
Sub Code -- (Input Field)
Period Type -
(Dropdown by key)
Type -
(Radio button Group)
Level --- (Dropdown by key)
Expense Type -(Dropdown by key)
Trip - (Dropdown by key)
Currency - (Dropdown by key)
Amount --(Input Field)
In the Create screen all these fields are present. But in the table in the List Screen it is taking only mandatory Fields.
For this our Abapers created
Fun Mod : Zup_Allowance_Input
Table : ZMSTR_ALLOW
Iam getting error in this code under IdataType in this "Save Button ".
Can any one help me where i went wrong in this code.or else please provide the Code for this.
public void onActionSave(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionSave(ServerEvent)
try{
String str1=wdContext.currentStdAllowanceElement().getAllowanceCode();
String str2=wdContext.currentStdAllowanceElement().getSubCode();
IDataType dataType = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("PeriodType").getDataType();
String index=wdContext.currentStdAllowanceElement().getPeriodType();
String str3=wdThis.getTextFromSimpleType(dataType,index);
wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str3);
String arr[]={"Fixed","Actual"};
for(int i=0;i<arr.length;i++)
IPrivateEtrecStdCreateView.ICheckElement e=wdContext.nodeCheck().createCheckElement();
wdContext.nodeCheck().addElement(e);
e.setType(arr);
IDataType dataType = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("").getDataType();
String index=wdContext.currentStdAllowanceElement().getLevel();
String str5=wdThis.getTextFromSimpleType(dataType,index);
wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str5);
IDataType dataType = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("ExpenseType").getDataType();
String index=wdContext.currentStdAllowanceElement().getExpenseType();
String str6=wdThis.getTextFromSimpleType(dataType,index);
wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str6);
IDataType dataType = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("Trip").getDataType();
String index=wdContext.currentStdAllowanceElement().getTrip();
String str7=wdThis.getTextFromSimpleType(dataType,index);
wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str7);
IDataType datatype = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("Currency").getDataType();
String index=wdContext.currentStdAllowanceElement().getCurrency();
String str8=wdThis.getTextFromSimpleType(dataType,index);
wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str8);
String str9=wdContext.currentStdAllowanceElement().getAmount();
Zup_Allowance_Input input=new Zup_Allowance_Input();
input.setAllow_Opt("C");
input.setAllowance_Code(str1);
input.setSubcode(str2);
input.setType1(str3);
input.setLevel1(str5);
input.setExpense(str6);
input.setCurr_Key(str8);
wdContext.nodeZup_Allowance_Input().bind(input);
wdContext.currentZup_Allowance_InputElement().modelObject().execute();
String str10=wdContext.currentOutputElement().get();
if(str10.equalsIgnoreCase("3"))
String errorMessage = "Inserted Successfully !";
IWDEventHandlerInfo windowHandler = wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("OK");
IWDConfirmationDialog windowDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(errorMessage, windowHandler, "OK");
windowDialog.open();
windowDialog.setWindowPosition(300,250);
}if(str10.equalsIgnoreCase("2"))
String errorMessage = "Duplicate Value !";
IWDEventHandlerInfo windowHandler = wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("OK");
IWDConfirmationDialog windowDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(errorMessage, windowHandler, "OK");
windowDialog.open();
windowDialog.setWindowPosition(300,250);
}catch(Exception e)
wdComponentAPI.getMessageManager().reportSuccess(e.toString());
//@@end
//@@begin javadoc:onPlugFromEtrecStdView(ServerEvent)
/** Declared validating event handler. */
//@@end
public void onPlugFromEtrecStdView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onPlugFromEtrecStdView(ServerEvent)
wdContext.currentStdAllowanceElement().setAllowanceCode("");
wdContext.currentStdAllowanceElement().setAmount("");
wdContext.currentStdAllowanceElement().setSubCode("");
//@@end -
How to avoid mandatory fields popup when cancelling a transaction
Hi All,
I have created a Employee create page and put some mandatory fields on it
and have 2 buttons apply and cancel . if i navigate to that page and not enter anything and press cancel button a dialog comes up asking me to enter mandatory fields
what should i do to avoid that popup ?
thanks
ananyaEither
1) disable client side validation on press of cancel button
2)Or Don't mark the fields required and handle this in ur code on apply button event as server side validation.
--Mukul
Maybe you are looking for
-
Mini Displayport to Composite/S-Video
I found a new converter/adapter to convert from Mini Displayport to Composite/S-Video enabling connection of Macbook Pro/Air to an analog TV: http://www.lenkeng.net/Html/Product/DisplayPort-to-Composite-Video-Converter.htm l http://www.gamezhome.com/
-
what will be the cost of replacing a battery in the apple store..??
-
Function Modules for Parking FI Documents
Hi Experts, Which function modules are same as the T-Code F-65 for parking FI documents? You will be rewarded if your tips is helpful. Thanks and Regards Joe
-
After the recent update My Firefox has become unresponsive alot.
I don't know why but now Firefox has become so unresponsive. It particularly happens when I visit Youtube. It almost become impossible to even close it.
-
Whenever i open up a document on flash macromedia 8 and click on the tab to open the actionscript(or by pressing F9), it comes up with the message 'flash.exe has generated errors and will be closed by windows. You will need to restart the program. An