How to skip validation using serverListener

Hi,
I am using Jdev 11.1.2.3.0
My requirement was to called some action using the keyboard key.
I tried with Access key first but its behaving differently in different browser.
Crome: allowing action on access key press.
IE : setting the focus on commandLink.
Note : I have defined accessKey for RichCommandLink.
Then i used the different approach which is as follows:
1- Register the keyBoard handler to document. on beforePhase Event.
2- Added the js file as follows :
Javascript file:
var keyRegistry = new Array();
keyRegistry[0] = "alt 1";
keyRegistry[1] = "alt 2";
keyRegistry[2] = "alt 3";
keyRegistry[3] = "alt 4";
keyRegistry[4] = "alt 5";
keyRegistry[5] = "alt 6";
keyRegistry[6] = "alt 7";
keyRegistry[7] = "alt 8";
keyRegistry[8] = "alt 9";
keyRegistry[9] = "alt 0";
function registerKeyBoardHandler(serverListener, afdocument) {
  _serverListener = serverListener;
  var document = AdfPage.PAGE.findComponentByAbsoluteId(afdocument);
  _document = document;
  for (var i = keyRegistry.length - 1; i >= 0; i--) {
    var keyStroke = AdfKeyStroke.getKeyStrokeFromMarshalledString(keyRegistry);
AdfRichUIPeer.registerKeyStroke(document, keyStroke, callBack);
function callBack(keyCode) {
var activeComponentClientId = AdfPage.PAGE.getActiveComponentId();
// Send the marshalled key code to the server listener for the developer
// To handle the function key in a managed bean method
var marshalledKeyCode = keyCode.toMarshalledString();
AdfCustomEvent.queue(_document,
_serverListener, {keycode:marshalledKeyCode,
    activeComponentClientId:activeComponentClientId}, true);
// indicate to the client that the key was handled and that there
// is no need to pass the event to the browser to handle it
return true;
*jspx page:*
        <f:view beforePhase="#{KeyboardHandler.registerKeyboardMapping}">
<f:loadBundle basename="properties/Labels" var="labels"/>
<af:document id="adfDocument">
<af:resource type="javascript" source="/js/keyboard.js"/>
<af:serverListener type="keyboardToServerNotify" method="#{KeyboardHandler.handleKeyboardEvent}" />
</af:document>
</f:view>
*Java Code :*
        public class KeyboardHandler {
public KeyboardHandler() {
super();
public void registerKeyboardMapping(PhaseEvent phaseEvent) {
if (phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE) {
FacesContext facesContext = FacesContext.getCurrentInstance();
ExtendedRenderKitService extRenderKitService =
Service.getRenderKitService(facesContext,
ExtendedRenderKitService.class);
List childComponents = facesContext.getViewRoot().getChildren();
//First child component in an ADF Faces page - and the only child - is af:document
//Thus no need to parse the child components and check for their component family
//type
String id =
((UIComponent)childComponents.get(0)).getClientId(facesContext);
StringBuffer script = new StringBuffer();
script.append("window.registerKeyBoardHandler('keyboardToServerNotify','" +
id + "')");
extRenderKitService.addScript(facesContext, script.toString());
public void handleKeyboardEvent(ClientEvent clientEvent) {
String keyCode = (String)clientEvent.getParameters().get("keycode");
System.out.println("KeyCode ::"+keyCode);
//Here on basis of numeric key 0-9 i will decide different action
This is working fine and launching the first action successfully.
*Now problem is that when i invoked second action its asking me enter data for required fields.*
If i was invoking serverlistener from button than I can control immediate property of command button. but here serverListener is getting called form document. How can I avoid validation here.
Can anybody please me?
Thanks a lot in advance.
-Amit Sharma
http://amit-adf-work.blogspot.com/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

If you want to skip all validation until time of commit you can do as described here
http://andrejusb.blogspot.com/2012/12/skip-validation-for-adf-required-tabs.html

Similar Messages

  • How to skip validations in ADF on click of cancel button

    Hi,
    I am new to this technology. i Have used ADF components required property to do Required filed validations. Whne i click on Cancel button i dont want the validations to get executed. How to skip validations in ths case?
    I am using ADF 11g and JSF 2.2

    Set immediate property of the cancel button to true.
    Check this out.
    http://jobinesh.blogspot.com/2009/08/how-to-skip-validation.html
    -Arun

  • How to skip validation for tag file, or jsp fragment?

    hi
    I have some jsp fragment and tag file in a workshop 10 project
    workshop blame me about the jsp fragment (no start/end tag)
    and unable to publish to server
    is there a way to skip validation on some files?
    I do found an check box call "validate JSP fragments" and I have un-ticked it. It does nothing.
    please help

    Yes, you can turn off validation either on project/folder/individual file.
    Project:
    Project > Properties - Validation AppXRay - un-check "Validate Workshop managed documents" (this is not recommended, you may loose entire AppXRay validation).Folder:
    Project > Properties - Validation AppXRay - Exclude Folders tab, if all the JSP fragments are present in a particular folder (under WebAppRoot), you can pick that folder to be excluded from AppXRay validationFile:
    Help > Help Contents - BEA Workshop User's Guide > Common IDE Tasks > "Using AppXRay" - Live Synchronization of artifacts with AppXRay - On this page scroll to the bottom you will find a table with list of comments that can be included in a JSP file to exclude file level validation.Ex:
    <%--<nitrox:set-property property="validation" value="true"/> --%>
    Controls all validation in the IDE. The default value of true enables validation.

  • How to process validations using PL/SQL function

    Hi.
    I created a page with a form to process DML operations against a database table. Also created a validation using PL/SQL function that returns a boolean value:
    declare
    v_dummy varchar2(1)
    begin
    select 'X'
    into v_dummy
    from s_customer
    where id = :p2_id;
    return (TRUE);
    exception
    when no_data_found then
    return (FALSE);
    when others
    return (TRUE);
    end;
    In this case i want to send a message to the user indicating that an certain row (the one with :p2_id value) already exists in the database. The piece of code above will do the job. If this function returns true, it means the row is in the DB already.
    The problem is that i don´t know what do to or how to tell htmldb that a TRUE value should issue a message or be processed as en error, whilst a FALSE means OK.
    How do i tell htmldb what to do?
    Suppose must do something with "expression 1" , "expression 2", etc.
    Any ideas???

    Hóla LuÃs,
    when you pick the PL/SQL function body returning a boolean, it implicitly means that TRUE means OK, while FALSE means error, always.
    In order to associate such error to a given form field, you have to go back to the page definiton / validations and specify the name of the item in the corresponding field.
    When you first create the validation rule, this value is not present even if you ask for the error message inline with the field.
    The error message text can be specified in the validation definition, if I am not wrong.
    When you need to return special error messages, including dynamic content for instance, you can use the Function Returning Error Message type, which reports an error when the string returned by the function is not null. This comes in handy when you want to display an item's code, for example, rather than generic text.
    Even in this case, you must go back to the validation and specify the name of the field if you want to see it inline.
    Hope it helps,
    Flavio

  • How to skip words using keyboard shortcuts

    Using Ctrl+Rt arrow usually skips words when typing in a free text box but FF uses that keyboard command to move through the open tabs. Is this customizable?
    == This happened ==
    Every time Firefox opened
    == typing in a text field

    on the Keyboard Shortcuts page, under the Windows & Tabs section, it says that CTRL + LEFT ARROW (or RIGHT ARROW) will navigate between tabs. this means that when you are in a text box (e.g. typing an email in a web based email provider like gmail, or in the box i am typing this reply in right now) when you press CTRL + L/R ARROW it changes tabs instead of skipping words. so basically firefox is overriding ability to skip words using CTRL + L/R ARROW. this is rather annoying when typing emails using firefox. i have resorted to typing my emails in a word processor, then pasting into gmail.
    is there a way to disable the CTRL + L/R ARROW shortcut in firefox? it seems redundant to even have that shortcut because CTRL + PGUP/PGDN already does this.
    i did find [http://ubuntuforums.org/showthread.php?t=211030 this page] on the ubuntu forums with a user experiencing the same issue. one user suggested the following (quoted below), but it didnt work for me because the setting was already set to true.
    QUOTE FROM UBUNTU FORUMS:
    In firefox, type about:config in the adress bar and change layout.word_select.stop_at_punctuation to True

  • How to Skip validation

    Hi ,
    I am using Jdeveloper 11.1.1.3 .I am having an af:table in my page, and i have a command link which calls a method in a backing bean. While clicking on the command link i want to skip the validations that happens in the table rows, without using immediate="true"
    Is this possible?
    Expecting some guidance.

    Hi,
    If i use immediate property am getting one another problem. I have two operations to be done ,one is to create a new record and another one is to delete a record.
    I have two command links.*Add link* is using CreateInsert and Delete link is using Delete operations. I am explaining the problem bellow.
    1.I have two LOV fields in the row.First i insert a row and fill values in the two LOV fields *(for example 1st field-"AB" 2nd field-"1234")*.
    2.I delete this record using Delete command link.
    3.Then again i insert a new row using Add command link.
    4.In this new row in the first LOV field i give the same value that i gave last time -that is "AB". While giving this value it automatically brings up the value "1234" in the second field.
    This happens only if i set true to the immediate property of the Delete command link.I have not used any ppr also.If i dint set the immediate property then the insertion and deletion works fine,but it is doing validation when i click these links.So i want to skip the validation while clicking Delete link.

  • SQL Loader Problem : how to skip column using sql ldr

    Hi,
    My problme is like this.
    In the data file i am getting some data and storing it in flat file format with ` as delimiter.
    For example:
    t1col1`t1col2`t1col3`t2col1`t2col2`t2col3`t2col4
    There are two tables here i.e t1 having 3 columns and t2 having 4 column values.
    But in the database i m having only 3 columns for t2 which corresponds to data of t2col3. Now in my control file can i use filler to skip this value in the datafile with the columnName mentioned.
    So my basic question is can i get rid of some column value which is there in the datafile and its position is not known when it will come but its name is known and its name is not present in the actual database. Can it be done using keyword "filler".
    Any help on this would be highly appreciated.
    Eagerly waiting for your reply.
    Regards,

    You will able to find good information about it in this document :
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96652.pdf
    Joel P�rez

  • How to skip characters using JTextBox.getText()

    First, I'd like to say these forums rock! They've helped me so much. As I get better at this, I hope to be able to return the favor.
    I've set up a couple methods to allow users to edit specific text fields and then save.
    I'm trying to get a Double value from a text box using:
    Retail.price.set(f, Double.parseDouble(price.getText()));However, to make my UI look good, I've inserted a "$" into the text box. I can redo the code to repopulate the fields leaving the "$" out when the modify button is pressed, but I was wondering if there is a way to just ignore the $ when getting my Double.
    Thanks in advance!

    Retail.price.set(f, Double.parseDouble(price.getText().replaceAll("\\$","")));

  • How to skip validation on page refresh

    Hello,
    I found related posts but they don't point me in the direction of a possible solution.
    I have a simple page
    <HTML>
    <HEAD>
    <title>Page 3</title>
    </HEAD>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <body>
    <f:use_faces>
    <h:form id="form1Id" formName="form1">
    <h:input_text id="form1Input" valueRef="UserSettings.newEmail"><f:validate_required /></h:input_text>
    <h:output_errors for="form1Input" />
    <p><h:command_button id='Page3CommandId' commandName='ok' label='ok' action='success'/>
    </h:form>
    </f:use_faces>
    </body>
    </HTML>
    If I first load it, it works ok, but if I refresh (or revisit the page), a validation error is rendered.
    Is there anyone who can point me to a possible workaround or point me to some reading material that could help me move forward.
    Thanks,
    Peter

    Thanks for the reply. As far as I understood all this, the UserSettings bean is in session scope.
    The faces-config.xml file contains
    <managed-bean>
    <managed-bean-name>UserSettings</managed-bean-name>
    <managed-bean-class>webrss.UserSettings</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

  • Skip validation on page definition

    Hi all,
    That article explain how to skip validation using page definition
    http://mahmoudoracle.blogspot.com/2011/08/skip-validation-in-adf.html
    Thanks

    chk this
    http://jobinesh.blogspot.com/2009/08/how-to-skip-validation.html

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • How do I do validation using SDK.

    How do I do validation using SDK.
    We have created different warehouses for the client business operations.
    For eg:
    1. Inspection Stores
    2. Rejection Stores
    3. Main Stores
    In Goods Return & A/P Credit Memo, other than RejectionStores is
    selected, we want to generate a warning message.
    How do I do this through SDK.
    I need the code sample for the following activity:
    1. Reading the data available at each row of the current form (Goods
    Return/ A/P Credit memo)
    2. Validate the data with a paricular warehouse
    3. Generate warning message.
    I could not find any samples related to this.

    There is a method called MessageBox for the Application object. Have a look at
    the documentation, everything is there.

  • XML Validation in PI 7.1 - Restart and skip validation possible, but how?

    Hello all,
    I read about schema validation in PI 7.1 and did a few tests on my own, but could not restart and skip validation for invalid payloaded messages. The documents say it is possible.
    Anyone know how? Thanks.
    BTW, I really think putting the schemas in server file system will cause a lot of authorization trouble in enterprises. No one gives access to the server filesystem and I don't think they will also like to open the required subdirectories for share. Asking the basis team to create the folder structures and maintaining schemas would be another pain. Don't you also think that SAP could find a better approach, like automatically uploading the schemas to the filesystem, or validating them from repository directly if possible?
    Kind regards,
    Gökhan

    Hi Gökhan,
    I am facing the same issue.
    I set up outbound xml validation in receiver agreement and tested it with valid and invalid messages.
    The validation works fine.
    But in case of validation error I tried to restart with skipping the validation. But this wasn't possible.
    I am always facing the same valdiation error.
    I already tried all different tools I know (sxi_monitor, message monitoring in rwb and in nwa)
    I am working on PI 7.11 SP6
    Did you find a solution for skipping the validation for a single message out of the monitoring?
    I know that there is the possibility of deactivate the validation in receiver agreement but thid doesn't meet the requirement of skip the validation only for a single message.
    Maybe anyone else faced and solved this issue already.
    Thanks in advance
    Jochen

  • How to do  validation in jsp using javascript

    how to do validation in jsp using javascript

    The same way you do with any HTML page.
    Catch the onclick/onsubmit event, do your validation in javascript and then allow/cancel the action as required.
    However this is javascript validation only - javascript can never call JSP code.

  • How to skip the header rows of the file using UTL_FILE?

    Hi,
    I created a procedure to read the file from shared location using UTl_FILE package. But, I stucked why because I don't know how to skip the header rows as those rows are headings for one of the report.Since, please help me.
    Regards,
    Vissu.....

    vissu wrote:
    Hi,
    I created a procedure to read the file from shared location using UTl_FILE package. But, I stucked why because I don't know how to skip the header rows as those rows are headings for one of the report.Since, please help me.
    Regards,
    Vissu.....UTL_FILE just reads data from the file. It has no concept of what could be a "header" or "body" or "records" or "footer" or any other data based concept. If you want to skip lines of a file, you will just need to read them using UTL_FILE and ignore them.

Maybe you are looking for

  • Samsung 51 inch Plasma Tv

    Good Afternoon, I just bought this tv 2 months ago and I am noticing around the letters on the cable its like shadowing around the letters? how can I fix this I attached a pic on what it looks like

  • Integrating Web Services Manager with Oracle Portal and SSO

    Hi, I wanted to throw this out there and make sure I was on the right track and also if somebody can point me to some resources online that might help. Basically, we have OWSM acting as a Gateway securing some web services. Oracle Portal is integrate

  • How to display MANDT field in ALV Grid display?

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING    I_CALLBACK_PROGRAM                = LV_REPID    I_STRUCTURE_NAME                  = 'ZSTR_TRAIL'    I_SAVE                            = 'A'   TABLES     T_OUTTAB                          = it_output

  • Bridge CS4 with very large image archves

    I have just catalogued 420,000 images from 3TB of my photographic collection. For those interested, the master cache files became quite large and took about 9 days of continuous processing: cache size: 140 gb file count: 991,000 folder count: 3000 Al

  • Question on SLD

    Dear All, We have two SLDs running on NW 7.0 (Non-Prod SLD and Prod SLD). We have CIM Content, Technical Landscape, Business Landscape defined in both SLDs. However we are not clear how the flow should be defined for - CIM Content - Technical Landsca