How can i validate current row input text field like required.

Hi All,
jdev 11.1.2.1.0
in my use case i have drag drop one viewobject as a adf table. and in table i have also add one extra input text field which is not based on
vo.
now i want to validate current row input text field not null when i commit row.
but when i using required property true. it worked for all row in table. problem is that i want only current row input text field validate not all
thanks,
Manish

When the user tries commit the data by clicking on the button -- For that button, have the logic in the actionlistener method to check if the additional input field is NULL or NOT.
If it is NULL, show an error message using FacesContext.addMessage() API.
Thanks,
Navaneeth

Similar Messages

  • How to insert a date picker input text field in a JSF Jsp page

    Hi,
    I have to develop an application using generic facets, unfortunately I am not supposed to use ADF Faces components given by Oracle.
    Now my requirement is, on JSP page an input text field which holds a DATE value is required, it should also have a Date Picker Calendar adjacent to it.
    Could you pls shed some light on this issue and help me out.
    Thanks
    ~Siva(ji)

    <HTML>
    <script language="JavaScript" type="text/javascript">
    <!--
    var pUpWidthc = 300; //Change the pUpWidthc to your requirements.
    var scrAvailc = 400;     //Change to your available screen width. You see in
    //this eBooks' middle frame, the frame width is
                                                                //equal to 410 . So whether your using frames or
                                                                //or a full 800 pixel screen, you must calculate
                                                                //your available screen width.
    var PopUpC = document.getElementById("pUpc");
    document.write('<div id="pUpc" style="visibility:hidden;z-index:4;width:'+pUpWidthc+';position:absolute;"></div>');
    function cstmPup(objC,c){
    popUpC = document.getElementById("pUpc");
    popUpC.innerHTML = c.innerHTML
    popUpC.style.left = getPos(objC,"Left");
    var scrNeedc = getPos(objC,"Left") + pUpWidthc;
    if (scrNeedc > scrAvailc){
    //The number 10 below is an extra offset x value applied when the
    //definitional popup box positions beyond your screen width. You
    //can change this number to fine tune your "beyond screenwidth" positioning.
    var scrOffsetC = getPos(objC,"Left") + pUpWidthc - (scrAvailc);
    popUpC.style.left = getPos(objC,"Left") - (scrOffsetC - 0);
    popUpC.style.top = getPos(objC,"Top") + objC.offsetHeight;
    popUpC.style.visibility = 'visible';
    fill();
    function fill()
         var noOfRows=7,noOfCols=7,i=0,j=0,day=1,x;
    var d1=FirstDayOfWeek(7,2008);
    //40     
         for(i=1;i<noOfRows;i++)
              x=document.getElementById('myTable').insertRow(i);
              for(j=0;j<noOfCols;j++)
                   var y=x.insertCell(j);
                   if( ( i==1 && j<d1))
                   y.innerHTML="";
                   else if(day<=DaysInMonth(7,2008)){
                   y.innerHTML=day;
                   day++;
    //document.write(FirstDayOfWeek(7,2008));
    function FirstDayOfWeek(m,y)
    var i;
    var dow = 6;
    //document.write("Hello");
    for (i=1583; i<y; i++)
    dow += (LeapYear(i)) ? 2 : 1;
    for (i=1; i<m; i++)
    dow += DaysInMonth(i,y);
    return dow % 7;
    function DaysInMonth(m,y)
    // m is the month number (1,2,3,...12), y is the year number (four digits)
    switch (m)
    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 10:
    case 12: return 31;
    case 2: if (LeapYear(y))
    return 29;
    else
    return 28;
    default: return 30;
    function LeapYear(y)
    return (y % 4==0) && ((y % 100!=0) || (y % 400==0));
    function getPos(objC,sPos){
    var iPos = 0;
    while (objC != null) {
    iPos += objC["offset" + sPos];
    objC = objC.offsetParent;}
    return iPos;
    function hPopUpc(){
    popUpC = document.getElementById("pUpc");
    popUpC.style.visibility = 'hidden';
    //-->
    </script>
    <BODY
    <button id="c1" onclick="cstmPup(c1,pUpCstm)">Custom PopUp</button>
    <'div' id="pUpCstm" style="display:none;">
    <'div' id="myid" align="left" style=" width:100%; height:100%; background:#cccccb; border:1px solid black; border-top:1px solid white; border-left:1px solid white; padding:10px; font:normal 10pt tahoma; padding-left:18px "> <b>Rich Message Boxes</b>
    <hr size="1" style="border:1px solid black;">
         <div style="width:220px; font-family:tahoma; font-size:80%; line-height:1.5em"><br>
              <table border ="1" id="myTable">
                   <TR>
                        <TD> SUN </TD>
                        <TD> MON </TD>
                        <TD> TUE </TD>
                        <TD> WED </TD>
                        <TD> THU </TD>
                        <TD> FRI </TD>
                        <TD> SAT </TD>
                   </TR>
              </table>
         <br><br>
         </div>
         <br>
         <div>
    <button tabindex="-1" onclick="hPopUpc()" style="border:1px solid black; border-left:1px solid white; border-top:1px solid white; background:#cccccc ">Close Message</button>
    </div>
    <?BODY
    </HTML>
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri

  • How can i find duplicate rows in a field of a table

    hi all,
    how can i able to find duplicate values in a field of a table????
    Regards

    test@ORA92>
    test@ORA92> with x as (
      2    select 1 as p, 'a' as q from dual union all
      3    select 1 as p, 'b' as q from dual union all
      4    select 2 as p, 'c' as q from dual union all
      5    select 3 as p, 'd' as q from dual union all
      6    select 3 as p, 'e' as q from dual union all
      7    select 3 as p, 'd' as q from dual
      8  )
      9  select p, q,
    10  case row_number() over (partition by p order by q)
    11    when 1 then null
    12    else 'Duplicate value: '||p||' of column p'
    13  end as msg
    14  from x;
             P Q MSG
             1 a
             1 b Duplicate value: 1 of column p
             2 c
             3 d
             3 d Duplicate value: 3 of column p
             3 e Duplicate value: 3 of column p
    6 rows selected.
    test@ORA92>
    test@ORA92>
    test@ORA92>cheers,
    pratz

  • How can i calculate the lengh of text field of workarea at runtime

    hi .
    we tried below code but it is always showing entire lenght of field , not the lenght of text field 
    DESCRIBE FIELD wa_itab_raw-txt LENGTH len.    
    IF len GE 139 AND wa_itab_raw-txt+39(1) = 'R'.
       wa_itab_retro = wa_itab_raw.                
       APPEND wa_itab_retro TO itab_retro.         
    ELSE.                                         
       wa_itab_sbi = wa_itab_raw.                  
       APPEND wa_itab_sbi TO itab_sbi.   
    kindly help me
    correct answers will be awarded <= read the rules [here!|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
    Edited by: Julius Bussche on Jul 28, 2008 6:37 PM

    Hi,
    try this
    DATA lv_length TYPE i.
    lv_length = STRLEN(wa_itab_raw-txt).
    Regards Rudi

  • How can i validate on ALV grid for the user

    Dear Freinds,
                     I have developed one custom report using ALV Grid program , as per the requirement i have to enter on the
    data and when i press the value save the program sumits the data into my custom table . Till here every thing is fine
    but one particular field i have declared as Char1 in my internal table , on the ALV output it is allowing me to enter
    more than one character   eg : it is allowing me to enter as Hyderabad .........even though i have declared as char 1 in the internal table ....however it is saving in the database table as H only that is correct.......but it is giving confusion to user
    i want to validate that user shouldnt allow to enter more than one character in the alv output of the input field .
    Please could any one let me know how can i validate.
    regard
    divya

    Hi,
    check  that field length in the final internal table .
    might be that filed lenth in final internal table declartion is more than 1 char.
    regards,
    Rama reddy
    Edited by: ram reddy on Jul 15, 2009 7:57 AM

  • Error checking input text fields.

    Hi
    Just wondering where I find a list of what can be error checked in input text fields?
    I'm looking for things like...
    - checking that letters and not numbers are entered
    - checking that an entered number is in a certain range
    etc...
    Thanks guys
    Shaun

    To restrict input for a text field, use the following AS3 codes:
    myInput.restrict = "A-Z, a-z, ., ,'"; //myInput is the instance name of your text area
    To check the range of the numbers, use the following code:
    myInput.restrict = "0-9";
    myInput.maxChars = 3;
    myBtn.addEventListener(MouseEvent.CLICK, chk);
    function chk(e:MouseEvent):void
        var myString:String = myInput.text;
        var i:Number = Number(myString); //Converting the string to a number variable
        var max:Number = 100; //Maximum range
        var min:Number = 30; //Minimum range
        if (i < max && i > min) //Condition to indicate the range
            trace("Within range");
        else
            trace("Out of range");
    Hope this helps.

  • Auto-tabbing between input text fields in AS3

    Hello-
    I am having some trouble figuring out how to work auto-tabbing between input text fields when a user inputs a character. I have a series of text boxes with maxChar set to 1, and when the user inputs a character, I would like it to auto-tab to the next one. I'm putting together a crossword-style banner ad so the auto-tabbing will help tremendously.  All the input text fields are instanced on the stage as input1, input2, etc; not called in from a custom class.  Also, I've been working with AS3 for about 2 weeks lol!
    thanks!

    Awesome, thank you, that works nicely! Now I need to figure out how to capture individual keyCodes for each input and then come up with a conditional to check for right or wrong answers. I have a "check your answers" button all set up. I think I am almost there, possibly a syntax hiccup for me. Any advice on how to do that would be appreciated.

  • Emailing data found in input text fields

    Hi,
    I have a simple form that users fill in various "input" text
    fields like "Name", "Email", etc... now all I want is when the
    click on the "send" button, it should automatically send an e-mail
    to "info@...".
    I got it to enter the proper recipient email address and
    subject but there's not content. What am I missing?
    Thanks,
    Phalconheart

    Thanks for the prompt reply.
    Just to clarify (programming is not my primary function...
    far from it)
    Yes, just opening the clients e-mail program and populating
    it with all the variable info he's selected is fine.
    so, in your code:
    url ="mailto:[email protected]?subject=Message
    Subject&body=First line of message.%0ASecond line." + "%0A" +
    "Third line.";
    1) what does the "%0A" do exactly?
    2) do I simply replace where you wrote "First Line of
    message" with the code "variables.item = itemChoice.text;"? and so
    on and so forth?
    Thanks,
    Pat

  • Can any one tell me how to change the current row header in FB1LN tcode

    Hi,
    can any one tell me how to change the current row header in FB1LN tcode.
    I want to show input date also in the layout.
    Regards
    Mave

    Hi
    I know two ways:
    - transaction obvu: here you can insert new fields, but only if these fields are included in certain table (like BKPF, BSEG, BSIS.....
    - if your field isn't included in those table, you have to modify the structure RFPOS and manage it in the BTE 1650. After updating RFPOS you have to run the program RFPOSXEXTEND to update the structure RFPOSXEXT.
    Max

  • How can i validate input number into a Field of  type char in oracle form?

    hi.....
    can any one help me.....please...!!!?!!
    How can i validate input number into a Field of type char in oracle form?

    i have tried doing that, but still the field except numbersthere was an error in that code. it should have been
    var_num:=to_number(var_char);however, it appears that you want the entry NOT to be a number. if this is the case then try
    begin
      if to_number(:block.item) = 0 then null; end if;
      message('The entry cannot be numeric');
      raise form_trigger_failure
    exception
      when value_error then
       /* this is where you put the code you want to be run when the
          entry is non-numeric */
    end;

  • 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;

  • How can i validate a path

    hi experts,
    how can i validate a path... i tried to use cl_gui_frontend_services=>directory_exist
    but it gives me an error
    for a local path and an app server path??
    thx in advance

    Hi Carlos,
    you follow the below coding, where you will get to separate validation
    for presentation server & application server file path.
    FORM present_validation .
      DATA: lw_check TYPE c,
            lw_file TYPE string.
      IF po_psv IS INITIAL.
        IF sy-ucomm = 'ONLI' OR sy-ucomm = space.
          MESSAGE  'Please input the file name' TYPE lc_e.
        ENDIF.
      ELSE.
        lw_file = po_psv.
        lw_check = cl_gui_frontend_services=>file_exist( lw_file ).
        IF lw_check IS INITIAL.
          MESSAGE  'Please input the correct file path' TYPE lc_e.
        ENDIF.
      ENDIF.
    ENDFORM.                    " PRESENT_VALIDATION
    FORM application_validation .
      DATA: lw_file TYPE string.
      lw_file = po_asv.
      IF po_asv IS INITIAL.
        IF sy-ucomm = 'ONLI' OR sy-ucomm = space.
          MESSAGE  'Please input the file name' TYPE lc_e.
        ENDIF.
      ELSE.
        OPEN DATASET lw_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc NE 0.
          MESSAGE  'Please input the correct file path' TYPE lc_e.
        ENDIF.
      ENDIF.
    ENDFORM.                    " APPLICATION_VALIDATION
    Hope this can solve your problems.
    Regards,
    Tutun

  • How can i find Duplicate Rows in forms6i

    Hi,
    How can i find duplicate rows in multiple record in forms6i.
    Thanks
    Raghu.K

    Oops, sorry for misreading your question. (However the SQL I gave you above is also very handy, and worth saving.)
    Okay, this is off the top of my head and untested, but might just work. Assuming that your data block name is MYBLOCK, and that the item that you want to check for dups on is named MYNUM, create an item-level WHEN-VALIDATE-ITEM trigger with the following code.
    declare
    l_newest_record number(10) := :system.cursor_record;
    l_newest_mynum number(10) := :myblock.mynum;
    l_dup_found boolean := false;
    begin
    -- In this loop, we skip backwards through all new records to look for dups.
    while :system.cursor_record > 1 loop
    previous_record;
    if :system.record_status = 'NEW' then
    if :myblock.mynum := l_newest_mynum then
    l_dup_found := true;
    exit; -- Dup found!
    end if;
    else
    exit; -- We've gone backwards past the first new record.
    end if;
    end loop;
    -- In this loop, we return to the current record.
    while :system.cursor_record < l_newest_record loop
    next_record;
    end loop;
    if l_dup_found then
    raise duplicate_row_found; -- user-defined exception
    end if;
    end;
    The above code only checks for dups in the new form records. It assumes that a unique constraint in the database will deal with records actually committed.
    Armand

  • How can i  change the column label text in a alv table display

    how can i change the column label text in a alv table display??
    A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
    <i>*  declare column, settings, header object
    DATA: lr_column TYPE REF TO cl_salv_wd_column.
    DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
    get column by specifying column name.
    lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
    set Header Text as null
    lr_column_header = lr_column->get_header( ).
    lr_column_header->set_text( ' ' ).</i>
    My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
    <i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
    i have checked in debugging and the error occured at the statement :
    <i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
    Thanks,
    Suri

    I found it myself how to do it. The error says that it is not able to find the reference object i.e  it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
      DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
             lr_if_controller  TYPE REF TO iwci_salv_wd_table,
             lr_cmdl   TYPE REF TO cl_salv_wd_config_table,
             lr_col    TYPE REF TO cl_salv_wd_column.
      DATA : node_year  TYPE REF TO if_wd_context_node,
             elem_year  TYPE REF TO if_wd_context_element,
             stru_year  TYPE if_alv_layout=>element_importing,
             item_year  LIKE stru_year-i_current_year,
             lf_string    TYPE char(x),
      DATA: lr_column TYPE REF TO cl_salv_wd_column.
      DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    Get the entered value from the input field of the screen
    node_year  = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
    elem_year  = node_year->get_element( ).
      elem_year->get_attribute(
       EXPORTING
        name = 'IMPORT_NODE-PARAMETER'
       IMPORTING
        value = L_IMPORT_PARAM ).
      WRITE L_IMPORT_PARAM TO lf_string.
    Get the reference of the table
      lr_cmp_usage  =  wd_this->wd_cpuse_alv( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lr_if_controller  = wd_this->wd_cpifc_alv( ).
      lr_column_settings = lr_if_controller->get_model( ).
    get column by specifying column name.
      IF lr_column_settings IS BOUND.
        lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
    set Header Text as null
        lr_column_header = lr_column->get_header( ).
        lr_column_header->set_text( lf_string ).
    endif.

  • How to set the current row in table automatically when tabout from one row to next row

    Hi
    I'm using jdev 11.1.2.0.0
    How can we set the  row(in which row focus is)  as current row in the table?
    If we create a table with single row selection, then whichever row we select, that row becomes current row because of the selection listener(#{bindings.xxvo.collectionModel.makeCurrent}).
    Then if we do tabout from one component to another component in table and moved to next row, then the focus would be on another row .
    when focus is shifted from one row to another row, then how can we make the focused row as current row or selected row.
    Any suggestion would we appreciated
    Thanks.

    Add clientListener inside table component and set client listener type to dblClick with method as a JavaScript method name.
    <af:clientListener method="dblclk" type="dblClick"/>

Maybe you are looking for

  • Problem Working With Framemaker 9 Dita XML Files in Framemaker 10

    I just upgraded to Framemaker 10. I am encountering a number of problems when I try to work with my Dita XML help topics, which were last saved in Framemaker 9 format. 1. Using the Default Dita Template When I open one of my documents in Framemaker 1

  • 9.3.1 esscmd esslang error

    Hello, We have been running a report script on a PC. It worked great until a new user was given the PC. Then we started getting the following output in the esscmd file: Essbase Command Mode Interface - Release 9.3.1 (ESB9.3.1.3.1B002) Copyright (c) 1

  • Client Security Solution - System Key Recovery - After Lenovo Service

    I have a T61p running Windows 7, which I recently had to send to Lenovo for service after the video failed. According to my repair summary, the motherboard on the computer was replaced. I received the laptop back today, and now when I log on, the sys

  • Tables and views relevant to concurrent program parameters

    I'd like to know all the tables and views relevant to concurrent program parameters. As far as I know, fnd_descr_flex_col_usage_vl, fnd_flex_value_sets, and fnd_parameters are such kind of tables or views. They can not provide enough information I wa

  • Gray screen of death - kernel question

    Hi, can somebody tell me the reason for my grey screen of death? Here is the log: Interval Since Last Panic Report:  95519 sec Panics Since Last Report:          2 Anonymous UUID:                    6FC3DCDE-E56D-4697-8458-B36C94FF65B0 Tue Oct 11 19: