Run button's method action without input text's validation raise

Hi
My English isn't very good
I use jdeveloper 11.1.1.3.0
I have a button and an inputText(with validation) on the page. I defined a method action for the button.
when I click the button, the input Text's validation raise and the button's method doesn't run.
If I set immediate=true for the button then the validation doesn't raise but in this case also button's method doesn't run.
How can I run button's method action without input text's validation raise?
Habib

If I set immediate=true for the button then the validation doesn't raise but in this case also button's method doesn't run.This should have worked . Run your application in debug mdoe and put a debug pointer in your actionListener to see if the control goes there.
Also put partialSubmit="true" for your button.

Similar Messages

  • Retain all form field values after input text field validation failure

    Hi,
    I have a form with 1 input text field, one Command button and one h:selectManyListbox. when User enteres some values in input field and clicks on command button named Add, the value is validated. If input is invalid, then an error message appears next to the field. If input is valid, then the value is added into h:selectManyListbox. Adding to list box is done using Ajax4Jsf.
    Probelm:
    Let's assume user entered 3 valid values one after another and all are added into the list box. When he enters a wrong value, and error message appears. however, the entered values in list box goes away. Is there a way to retain the values even after validation failure.
    Code is given below;
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
    <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
    <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
    <h:panelGroup>
         <h:outputLabel for="inputEmailId1" value="Email Id: " />
         <t:inputText value="#{bean.newEmailId}" id="inputEmailId1" maxlength="100" size="40" immediate="true">
              <t:validateEmail message="Enter a valid Email Id." />
         </t:inputText>
         <t:message for="inputEmailId1" styleClass="errorStyleClass" />
    </h:panelGroup>
    <t:panelGroup style="text-align: left;" >
         <a4j:commandButton value="Add" styleClass="buttonsSub" action="#{bean.addSharedEmails}"
              reRender="inputEmailId1, selectedSharedEmails" />
    </t:panelGroup>
    <t:panelGroup style="text-align: left;">
         <h:selectManyListbox id="selectedSharedEmails" size="8" style="width:100%;" immediate="true">
              <f:selectItems value="#{bean.sharedEmails}" />
         </h:selectManyListbox>
    </t:panelGroup>
    Thanks in advance,

    Use the attribute "binding" instead of a "value". This will remember the value. You can also make sure that you dont have anything in your constructor or class level that initialises that value to "" or null. Because if JSF is remembering your value but your initialization that gets triggered before the page loading resets it to default values then you need to change that part of the code.

  • Executing methods using an input text file

    Hello all,
    I was just wondering if I could get a little help with giving the input commands to my program through a provided text file. I have already made a stack program and want to test it by feeding it a text file with commands in it. Here is an example of the text that it would contain:
    bluePush 100
    blueIsEmpty
    print
    bluePush 101
    bluePush 102
    bluePush 103
    blueSize
    bluePush 104
    print
    bluePop
    print
    redIsEmpty
    Etc..
    Problem is, I'm not really sure how to make my test file. I've never taken a text file as input before and once it's in, I'm not sure how to parse the commands.
    Any help would be greatly appreciated.
    Thanks,
    Tyler

    You would open the file like such:
      String fileName = "c:\path\to\file.txt";
      BufferedReader input = new BufferedReader(
                               new FileReader(fileName));You would create a loop to read the text, line by line, something like this:
      String line = null;
      while ((line = input.readLine()) != null){
        //... do processing here
      }Inside the while loop, you would parse the string into command and value pairs. Maybe look into StringTokenizer... Something like this:
        //inside while loop
        StringTokenizer parser = new StringTokanizer(line, " ");
        String command = parser.nextToken();
        String value = null;
        if (doesCommandHaveValue(command)) value = nextToken();
        //Determine course of action based on command
    //*** Then have the method doesCommandHaveValue...
    // Returns true if "Push" is found inside of command,
    // since it looks like only push statements have values after them
    private boolean doesCommandHaveValue(String command) {
      return (command.indexOf("Push") != -1);
    }Then mabe do a series of ifs based on command, to call different methods, using the value read in.

  • HT202159 Tried restarting download from the "Purchases" tab but the app comes out with "an error ocurred " message and I the button next to it is grey without any text or action. Please help, cannot dowload bad piggies game

    Tried restarting download from the "Purchases" tab but the app comes out with "an error ocurred " message and I the button next to it is grey without any text or action. Please help, cannot dowload bad piggies game

    Hi aaronvilla,
    Sorry to hear you are having issues with your iTunes Store purchase.   The following information should help you with this:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    To report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase, follow these steps:
    Find the email receipt for your purchase.
    Click Report a Problem under the app that is having the issue.
    When prompted, enter the Apple ID and password you used to purchase the item, then click Report a Problem.
    Click Report a Problem next to the item you are having an issue with.
    From the Choose Problem dropdown menu, choose the appropriate issue.
    Follow the onscreen instructions and—if prompted—type a description of the problem into the text field.
    Click Submit to have your issue reviewed.
    Hope this helps ....
    - Judy

  • Problem with action script 3 make input text box and button....

    Hi every one I am trying to make a family book using "Air for Android" with a simple search engin in the book
    air for android only work with AS3,
    the search function is to type a person's name and hit submit then go to a specific frame.
    have a problem making below code to work in AS3 and hopefully one of you guys can lead me in the right direction to fix the issue.
    Currently, I have an input text box and a button. When you type specific words into the input box and then hit the button it sends you to a specific frame.
    (it work find in AS2 but not in AS3,)
    Here is my current code that is placed on the main timeline, first frame:
    stop();
    onEnterFrame = function () {
        submit.onRelease = function() {
            switch (yourname.text) {
            case "name1" :
                gotoAndStop(2);
                break;
            case "name2" :
                gotoAndStop(3);
                break;
    My button that checks if the phrase is correct is called "submit" and my input box has an instance of "yourname".
    My phrases that will be accepted in the input box are "name1" and "name2" which bring me to two different frames.
    Basically, I'm having a problem with making this to work with AS3.

    you should use the default option in the switch statement
    that way yourname contains something not in one of the case statements it will go to the default bit and execute teh code there
    function onSubmit(e:MouseEvent):void
                                  switch (yourname.text)
                                            case "name1":
                                                      gotoAndStop(2);
                                                      break;
                                            case "name2":
                                                      gotoAndStop(3);
                                                      break;
                                            default:
                                                      goToAndStop(you frame you want);
                                            break;

  • Input Text Clear Button

    Hello,
       On an Input Text, under Options, it lists "Clear Button".  What is this, and how do I use it? The default selections are true and false, but they don't seem to change anything.
    Thanks!
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This is beneficial to other community members reading the thread.
    -Bruton

    Odd.   It behaves like you said, but only in Single Line Mode, not Password or Multi-Line.   Is it like that for you as well? 
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This is beneficial to other community members reading the thread.
    -Bruton

  • Using a button to check an input text field

    I am an educator and I am designing an interactive activity for my students. I created two buttons named button_B and button_G, and an input textfield named in_Text.  When a student presses button_B, the letter "B" is entered into the input text field; if a student presses button_G, the letter "G" is entered into the input text field. More than one letter entry is acceptable as a student's answer: for exmple the entry BBB, BGB within the input field is okay.  I have no trouble writing AS3 to accomplish this task, however:
    For a student's solution to the input text field to be correct, it has to contain the four values BBB, GGG, BGB, and GBG in any order. I created an array named solution_S with these values. I also have an enter the solution button named enter_btn. The student can check their solution by pressing the enter_btn button; if the input textfield is correct, the quiz moves on to the next frame in my timeline; if it is incorrect, it moves to a different frame in my timeline. How would I enter this actionscript to accomplish this? Thanks much!

    var check:Boolean=false;
    for(var i:uint=0;i<solution_S.length;i++)
      if( solution_S[i].toString()==in_Text.Text)
    check=true;}
    if(check)
    gotoAndStop(...);
    else
    gotoAndStop(...);

  • ITunes opens but without any text showing.  Drop down menus have text but not the app itself. I have a Mac Powerbook Pro running Windows XP under Boot Camp.

    Running under Windows XP,  a few upgrades ago iTunes started opening without any text showing in the application.  Clicking on PLAY will play music but no text shows to indicate what's playing and no text to show music library. Drop down windows show text but not the app itself.
    Subsequent upgrades and reinstalls have not corrected the problem, When I run under iOS (Snow Leopard), iTunes opens with text and runs correctly.
    Help!

    Because I created FAT32 partition using Boot Camp tool few days ago I installed my custom copy of Windows XP with SP3, IE7 and WMP10 integrated using nLite (for WMP10 integration use RVM Integrator). I did not use Boot Camp tool this time - I just booted CD using Option key. Then I installed Boot Camp 2.0 drivers you can find on Mac Disk 1. After this I installed Boot Camp drivers 2.1 update. In Add or remove Programs I checked drivers - I uninstalled old drivers which call identical, but you can skip this. Everything works fine BTW it is better to format your partition to NTFS - you have much less disk errors, you do not waste time for disk errors scans during Windows startup, your data are much more safe. If you need NTFS write permissions use great tool Paragon NTFS for Mac OSX or open source NTFS driver.
    Message was edited by: limo79

  • After launching Thunderbird I only see the frames of TB without any text or buttons.

    After launching Thunderbird I only see the frames of TB without any text or buttons. No folders, no messages, no menu's...nothing is displayed. I removed the program and profiles, but a re-install results the same error.

    Hey hey Christ1
    I think we are getting closer to this thing being solved...
    The Update --
    I have all my Mail in One of my accounts (work)....but not all the Mail in the other account (aka my Music account).....
    Both I've set up again..using your advice...and changed both now to IMAP..
    Originally after refreshing my laptop, when I set up Thunderbird....I used the POP settings.....and that's when I messed it up.....
    but using IMAP now....I've gotten more of my old emails .....in my INBOX.....not all.....but most....YIPPIE
    My SENT emails....in my Music account.....have all disappeared.......I've looked in both sent folders...in POP...and IMAP....and nothing is there...
    However my sent folder of my work account...I have SOME of the sent emails...
    Address books....Collected and Personal folders.....I have NO Email Addresses at all.
    Sooo now even though I am getting confident we will solve it.....I still have 4 accounts....aka...2 Work (POP and IMAP).....2 Music (POP and IMAP) until you tell me to delete or change one from each.....
    BOTH IMAP accounts.....do not show new messages...when they come in....however the POP shows it.....I did read that If I deleted the POP to change to IMAP I will not be able to get emails.....sooo not sure what to do about that issue now....
    Is there an "automatic" backup feature for Thunderbird...?? All this could have been soo prevented if I did that....sheesh...
    anyway..thanks so far.... :)
    Jay

  • Can I associate a right-click action w/ a text entry button?

    Is there a way to associate a right-click action with a text
    entry button? I tried to do a shift-F10 (windows equivalent) but it
    wasn't recognized. I suspect it is not possible, but thought I
    would ask.

    Ahhhh, the fog is lifting now!
    Thanks for fleshing that out a bit. There are a few different
    ways to handle right-click in Captivate. See the links below for
    more.
    Adobe
    Developer Center Article 1
    Adobe
    Developer Center Article 2
    Paul
    Dewhurst's Right-Click widget
    Hopefully something there will help... Rick

  • Run Button without execute the program

    Hi,
    Normally, when I am pressing the "run button", it will run the program. How do I prevent from executing the program until I want to enable? For example, I have 3 power supplies on my pxi box, and I don't want to run the program until I have all my value set: voltage, current limit, output function and etc...Then, I will press the button like (enable or set) to set a certain voltage at certain power supply. I am using Labview 8.6. Thank you.
    Solved!
    Go to Solution.

    Move the Set button outside that inner loop.  It should be inside the True case but not inside the inner loop.
    To run it again for another power supply, you need to control the outer loop with a separate stop button.  Remove the boolean constants from the True and False cases that are wired to the stop sign.  Wire the new stop button to the stop sign.  When you are done setting all power supplies, press the new stop button.
    If you know you will only be using two power supplies, you could replace the outer while loop with a For loop with a constant value of 2 wired to the N.  Then the loop will execute for the first power supply setting and then repeat for the next.
    - tbob
    Inventor of the WORM Global

  • Paging a data table with input text fields

    I've created a datatable with input text fields so that contents can be edited. I have 'save' and 'cancel' buttons on the page so that changes can be saved or abandoned. That seems to work fine.
    However, I have a problem with paging. If I modify an input text field, page to the next page in the datatable and then page back, the modified input text field reverts to the original entry in the database. Does anyone know how I can preserve this change (without issuing a commit) until the user clicks on the save button?
    Here is a snippet of jsp with datatable.
    <h:dataTable binding="#{DocTypeDetail.doctypeMetadataTable}" headerClass="list-header" id="doctypeMetadataTable"
    rowClasses="list-row-even,list-row-odd" rows="5" style="left: 240px; top: 312px; position: absolute"
    value="#{DocTypeDetail.doctypeMetadataTableModel}" var="currentRow">
    <h:column binding="#{DocTypeDetail.column2}" id="column2">
    <h:inputText binding="#{DocTypeDetail.textField1}" id="textField1" value="#{currentRow['name']}"/>
    <f:facet name="header">
    <h:outputText binding="#{DocTypeDetail.outputText5}" id="outputText5" value="Name"/>
    </f:facet>
    </h:column>
    <h:column binding="#{DocTypeDetail.column3}" id="column3">
    <h:inputText binding="#{DocTypeDetail.textField2}" id="textField2" value="#{currentRow['value']}"/>
    <f:facet name="header">
    <h:outputText binding="#{DocTypeDetail.outputText8}" id="outputText8" value="Value"/>
    </f:facet>
    </h:column>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header">
    <h:panelGroup binding="#{DocTypeDetail.groupPanel1}" id="groupPanel1" style="display: block; text-align: center" styleClass="list-paging-header">
    <h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_firstPageAction}"
    binding="#{DocTypeDetail.doctypeMetadataTableHeaderFirstButton}" id="doctypeMetadataTableHeaderFirstButton"
    image="resources/paging_first.gif" immediate="true"/>
    <h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_previousPageAction}"
    binding="#{DocTypeDetail.doctypeMetadataTableHeaderPreviousButton}" id="doctypeMetadataTableHeaderPreviousButton"
    image="resources/paging_previous.gif" immediate="true"/>
    <h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_nextPageAction}"
    binding="#{DocTypeDetail.doctypeMetadataTableHeaderNextButton}" id="doctypeMetadataTableHeaderNextButton"
    image="resources/paging_next.gif" immediate="true"/>
    <h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_lastPageAction}"
    binding="#{DocTypeDetail.doctypeMetadataTableHeaderLastButton}" id="doctypeMetadataTableHeaderLastButton"
    image="resources/paging_last.gif" immediate="true"/>
    </h:panelGroup>
    </f:facet>
    </h:dataTable>

    I know by now you must have figured it out. If not you might want to try keeping the backing bean in session instead of request scope.
    Hope that helps,
    HeMan

  • ADF 11g + How to capture the value of a dynamically created input text box

    Hi All,
    I have a requirement where, on selection of the value in a drop down, the input text boxes need to get dynamically populated on the JSPX page. I'm able to bring this functionality, and it is working fine.
    But the challenge right now I'm facing is that, how to read/capture the value entered in those dynamic text boxes on submission of the page. Please help me in getting this resolved.
    Below is the code snippet I'm using for this.
    // Clearing the existing input fields in the Panel form
    while (pf100.getChildren().iterator().hasNext()) {
    pf100.getChildren().remove(pf100.getChildren().iterator().next());
    // Creating the new fields based on the number of IP addresses selected
    for (int i = 0; i < iIPAddress; i++) {
    RichInputText pcPreferredDomain = new RichInputText();
    pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
    (i + 1));
    pcPreferredDomain.setColumns(40);
    pcPreferredDomain.setId("pcpfdomain" + (i + 1));
    pf100.getChildren().add(pcPreferredDomain);
    Thanks All in Advance,
    Thanks & Regards,
    Dharmathej M

    As per your method, you are creating the RichInputText components as local variables.
    What happens when you are creating them as class level variables in the managed bean, if you do so, you can refer to the values of the UI components in the actionListener/action code for the command button in the managed bean
    sample:
    public class ManagedBean{
    RichInputText [] pcPreferredDomain;
    public ManagedBean(){
    // Clearing the existing input fields in the Panel form
    while (pf100.getChildren().iterator().hasNext()) {
    pf100.getChildren().remove(pf100.getChildren().iterator().next());
    pcPreferredDomain = new RichInputText[iIPAddress];
    // Creating the new fields based on the number of IP addresses selected
    for (int i = 0; i < iIPAddress; i++) {
    pcPreferredDomain[i] = new RichInputText();
    pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
    (i + 1));
    pcPreferredDomain.setColumns(40);
    pcPreferredDomain.setId("pcpfdomain" + (i + 1));
    pf100.getChildren().add(pcPreferredDomain);
    Thanks,
    Navaneeth

  • Create Draggable Input text

    I Made a Draggable Inputtext but when I drag it I can not
    write into it ,I try to put a button beside input text and put the
    Drag action in the button ,it works fine but ,is there any way to
    make the Draggable Input text by itself without the button beside
    it

    >>I Made a Draggable Inputtext but when I drag it I can
    not write into it ,I
    >>try
    to put a button beside input text and put the Drag action in
    the button ,it
    works fine but ,is there any way to make the Draggable Input
    text by itself
    without the button beside it
    <<
    Right, probably you put the input text into a movie clip and
    then assigned
    onPress and onRelease events? Then the mc containing the text
    absorbs the
    mouse events so your input field can't get the focus. You can
    get around
    this fairly easily using a mouse listener that just moves the
    field with the
    mouse. I have an input text field with an instance name of
    dragText, and the
    code below is on frame 1. Note in the MouseMove test I am
    also testing to
    see if the control key is down - I added this to allow the
    mouse to still
    function normall to select text for editing, but move the
    field when control
    is down.
    var mouseListener:Object = new Object();
    mouseListener.onMouseDown = function() {
    this.deltaX = _xmouse - dragText._x;
    this.deltaY = _ymouse - dragText._y;
    this.dragging = true;
    mouseListener.onMouseUp = function() {
    this.dragging = false;
    mouseListener.onMouseMove = function() {
    if((_xmouse >= dragText._x) && (_xmouse <=
    dragText._x + dragText._width)
    && (_ymouse >= dragText._y) && (_ymouse
    <= dragText._y + dragText._height)
    && this.dragging && Key.isDown(Key.CONTROL)){
    dragText._x = _xmouse - this.deltaX;
    dragText._y = _ymouse - this.deltaY;
    Mouse.addListener(mouseListener);
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • How Can i send the data entered in Input text fields to e-mail?

    Iam Jennifer, Iam having a doubt in Flash, I hope that you
    are going to solve my problem, Iam taking 3 Static text fields as
    Name, Age and Country and besides each and every static text fields
    i have taken 3 input text fields with different instance names,
    when i enter my Name, Age and Country details in the input text
    fields and after entering those details if user clicks the submit
    button the data should be send to some mail address, is it possible
    Im not so good at action script, but i hope that any one can
    help me...
    Iam attaching the action script code also, please find the
    attachment below, the actions are given to button.
    Attach Code
    Btn.onPress = function ()
    mail_lv = new LoadVars();
    mail_lv.dummy1 = "";
    mail_lv.subject = "Details";
    mail_lv.message = "hi";
    mail_lv.username = "name_txt".text;
    mail_lv.age = "age_txt".text;
    mail_lv.country = "country_txt".text;
    mail_lv.onLoad = function ()
    trace("Sent successfully...");
    trace("mail_lv.subject = " + mail_lv.subject);
    trace("mail_lv.message = " + mail_lv.message);
    mail_lv.send("mailto:[email protected]", "_blank");

    The names of your variables, "name_txt", for instance, should
    NOT have quotes around them. Use:
    mail_lv.username = name_txt.text;
    mail_lv.age = age_txt.text;
    mail_lv.country = country_txt.text;

Maybe you are looking for