How can I validate a multi-select box to have at least 1 option

How can I validate a multi-select box to have at least 1 option
selected in struts?

thanks i will try that other then that if I want to create single drop down list and pass multiple values associated to that drop list value how would i do that....

Similar Messages

  • HT204135 How can one make the printer dialog box to have Show Details as default?

      I very often use different presets from document to document.  Thanks.

    Once you select the Show Details for any application, the next time you use that application and select to print, the full details pane should be shown.
    If this is not happening and the applications always show the Hidden Details print dialog then you may need to perform some sort of reset.
    Also, if you were to use the Presets option and set commonly used settings as a Preset, then even if the print dialog is not showing the extra details, you can still select the desired Preset from this print dialog.

  • How can i call the certificate selection dialog box from source code?

    How can i call the certificate selection dialog box from source code?
    NB: Of course if i have more than one certificate in the Microsoft Keystore 'My'.
    Thank You in advance

    I found an example of the "TestStand UI Expression Control.ctl" and it works just the way I need it. (check the link)
    Proper use of "TestStand UI ExpressionEdit Control" in LabVIEW http://forums.ni.com/ni/board/message?board.id=330&requireLogin=False&thread.id=10609 
    The "Expression Browser Dialog Box Button" F(x) stays disable while editing the VI, however it become available when the VI is called from TestStand.
    Thank you,
    Hecuba
    Mfg. Test Engineer
    Certified LabVIEW Associate Developer

  • Multi-Select Box Not Displaying Values Passed From Grid?

    Coldfusion 8
    I inherited an application and am trying to maintain and improve it... hit a snag today.
    I have a multi-select box that is not displaying what I expect.  The values come from a ColdFusion grid which is based off a database query.
    Here is the code for the select - does not work - nothing is selected:
    <cfselect name="USER_IDS" multiple="true" queryposition="below" selected="USER_IDS" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
    </cfselect>
    Now if I change the multiselect to a single select like below - it takes the first item in the field list (from the grid) and selects it in the drop down.
    <cfselect name="USER_IDS" multiple="false" queryposition="below" selected="USER_IDS" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
    </cfselect>
    Or if I assign a variable like this and use the multi-select code it seems to work as well.
    testlist = "22,26";
    <cfselect name="USER_IDS" multiple="true" queryposition="below" selected="#testlist#" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
    </cfselect>
    I have displayed the value of "User_IDs" in the grid and in the data entry part of the screen to see values of:  22,26
    to make sure that wasn't my issue.
    Do grids and multiselects require something additional?  Any advice on how to resolve?

    Problem was related to some javascript for the select box.  There was a function for a single select box but not a multiple select box - this fixed it: 
    if(theForm.elements[i].type == "select-multiple"){
                        var selectBox = theForm.elements[i];
                        var sbname = selectBox.name;
                        cpvalue = String(eval('record.data.' + sbname));
                        var NotifyArray = cpvalue.split(',');
                        for (var j=0; j < selectBox.length; j++) {
                            selectBox[j].selected = false;
                        for (var j=0; j < selectBox.length; j++) {
                            sbvalue = selectBox[j].value;
                            for (var k=0; k < NotifyArray.length; k++){
                                if (sbvalue == NotifyArray[k]){
                                    selectBox[j].selected = true;

  • How do I default a multi-select to have all values selected

    Hi all,
    I have a report (standard, not interactive - for various reasons) and I have a number of 'search' fields that the use can use to fulter the results shown. One of these fields is a multi-select list which allows the users to select multiple values at the same time. This is working fine.
    My problem is in setting the default for the multi-select list to have all values selected (either when the page is first opened or when the user clicks a 'reset' button).
    The multi-select query is:
    select
         lv1.description d, lv1.lookup_code r
    from
         tpa_adm_lookup_types lt1,
         tpa_adm_lookup_values lv1
    where
         lv1.lookup_type_id = lt1.lookup_type_id
    and lt1.lookup_type = 'RELEASE_PHASES'
    and     lv1.delete_flag = 'N'
    order by 1
    how do I get it to default to everything selected?
    Many thanks,
    Martin

    Hi Andy,
    Yes it is a dynamic list so a fixed default is no good.
    I have built the field with a source (when session state is null) of:
    with data as (
    select lookup_code, row_number() over(order by lv1.description) rn,count(*) over () cnt
    from tpa_adm_lookup_values lv1,
         tpa_adm_lookup_types lt1
    where lv1.lookup_type_id = lt1.lookup_type_id
    and lt1.lookup_type = 'RELEASE_PHASES'
    and lv1.delete_flag = 'N'  )
    select ltrim(sys_connect_by_path(lookup_code,':'),':') catvalues
    from data
       where rn = cnt
       start with rn = 1
       connect by prior rn = rn-1;which works but I was hoping ApEx had a cleaner solution.
    Regards,
    Martin

  • How Can I validate an Cust_Id that has nubers and letters within it

    I am trying to validate a cust_id that has both numbers and letter in it. like this 111A12345678. the valid letters to be imputed are A,C,D,E,G,Z how can I validate this so that when the fourth character is any other letter than the above, like this 111B12345678 it display an error message that A,C,D,E,G,Z are the only valid letter that can be imputed in the fourth character.
    Your help is greatly appreciated
    Thanks
    Hank

    I think Sergio was wondering what Db version, 10G will give you regexp, if you're running 9i then a sql exists may do it for you
    select 1
    from dual
    where substr(:cust_id_item,4,1) in ('A','C','D','E','G','Z')

  • How can I validate a date using sql

    How can I validate a date using sql or pl/sql
    select to_date('01/01/2009','mm/dd/yyyy') from dual this is a good date
    but how can I check for a bad date
    select to_date('0a/01/2009','mm/dd/yyyy') from dual
    Howard

    William Robertson wrote:
    It'll be complicated in pure SQL, as you'll have to parse out day, month and year and then validate the day against the month and year bearing in mind the rules for leap years. It would be simpler to write a PL/SQL function and call that.Nah, not that complicated, you just need to generate a calender to validate against.
    SQL> ed
    Wrote file afiedt.buf
      1  with yrs as (select rownum-1 as yr from dual connect by rownum <= 100)
      2      ,mnth as (select rownum as mn, case when rownum in (4,6,9,11) then 30
      3                            when rownum = 2 then 28
      4                       else 31
      5                       end as dy
      6                from dual
      7                connect by rownum <= 12)
      8      ,cent as (select (rownum-1) as cen from dual connect by rownum <= 21)
      9      ,cal as (select cen, yr, mn,
    10                      case when ((yr = 0 and mod(cen,400) = 0)
    11                             or (mod(yr,4) = 0 and yr > 0))
    12                            and mn = 2 then dy+1
    13                      else dy
    14                      end as dy
    15               from cent, yrs, mnth)
    16  --
    17      ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    18  --
    19  select case when cal.cen is null then 'Invalid Date'
    20              when not regexp_like(dt,'^[0-9]{1,2}[\/.-_][0-9]{1,2}[\/.-_][0-9]{4}$') then 'Invalid Date'
    21         else dt
    22         end as dt
    23  from dt left outer join
    24               cal on (to_number(regexp_substr(dt,'[0-9]+')) between 1 and cal.dy
    25                   and to_number(regexp_substr(dt,'[0-9]+',1,2)) = cal.mn
    26                   and floor(to_number(regexp_substr(dt,'[0-9]+',1,3))/100) = cal.cen
    27*                  and to_number(substr(regexp_substr(dt,'[0-9]+',1,3),-2)) = cal.yr)
    SQL> /
    Enter value for date_dd_mm_yyyy: a1/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select 'a1/02/2008' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 01/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '01/02/2008' as dt from dual)
    DT
    01/02/2008
    SQL> /
    Enter value for date_dd_mm_yyyy: 29/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '29/02/2008' as dt from dual)
    DT
    29/02/2008
    SQL> /
    Enter value for date_dd_mm_yyyy: 30/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '30/02/2008' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 29/02/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '29/02/2009' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 28/02/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '28/02/2009' as dt from dual)
    DT
    28/02/2009
    SQL> /
    Enter value for date_dd_mm_yyyy: 0a/01/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '0a/01/2009' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 00/01/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '00/01/2009' as dt from dual)
    DT
    Invalid Date
    SQL>

  • How can I automatically close a dialog box using Javascript after I click the OK button to submit it?

    How can I automatically close a dialog box using Javascript after I click the OK button to submit it? I don't want to have to X out of the dialog box after I am done.
    Thanks
    Linda

    JS can not interact with open dialogs in any way, unless it's a dialog
    created in JS using the Dialog object.
    On Thu, Jul 24, 2014 at 11:13 PM, lindaeliseruble <[email protected]>

  • How can I re-locate the 'Title' box on the first slide of my slideshow??

    how can I re-locate the 'Title' box on the first slide of my slideshow??

    You can't.  It's not a user controllable feature.
    OT

  • I try to find something on my iPad, many results are emails, when I push on an email I can't see the email, because I get ever the first email,or the previous selected email in my inbox. How can I see the email selected?

    I try to find something on my iPad, many results are emails, when I push on an email I can't see the email, because I get ever the first email,or the previous selected email in my inbox. How can I see the email selected?

    Is your Yahoo account set up as POP3 or IMAP?

  • I use a iphone and MacBook Pro using mail on each.  How can I see the same mail boxes on the laptop that I see on the iPhone?

    I use a iphone and MacBook Pro using mail on each.  How can I see the same mail boxes on the laptop that I see on the iPhone?

    for starters this is not the forum for notebooks or for that matter icloud or iphone.
    MacBook Pro
    https://discussions.apple.com/community/notebooks/macbook_pro
    https://discussions.apple.com/community/mac_os?view=discussions 
    http://www.apple.com/support/macbookpro
    http://www.apple.com/support/iphone

  • How can I validate my warranty with a refurbished iphone?

    On August 28th I visited Miami and I went to the Apple Store to replace my Iphone 4 broken out of warranty with a Refurbished Iphone.
    The problem is that the refurbished Iphone replacement never worked! I tried to verify my coverage status but it is out of warranty. I know that there are 90 days of warranty. However, how can I validate this warranty because the IMEI is not accepted to chat or contact Apple Support? Somebody can help me?
    Thank you

    SILsam wrote:
    I've already checked it, however the device does not have coverage. It was a refurbished iphone 4 and theoretically it has 90 days of warranty.
    According to your original post, your limited warranty is scheduled to expire on November 28th.  That service replacement warranty was never intended to include live support via chat or phone conversations with an AppleCare advisor.

  • How can I add the progress loading box when I load a module?

    Hi everyone, how can I add the progress loading box when I
    load a
    module? Is it an automated thing with flex or must I code it?
    Thanks.
    :)

    try using javascript onclick attribute:
    onclick="document.form.name.disabled=false"
    m

  • How can you transfer files from drop box to ibooks?

    How can you transfer files from drop box to ibooks?

    These two articles should help:
    http://docs.info.apple.com/article.html?path=Mac/10.7/en/mchlp2185.html
    http://support.apple.com/kb/HT2518

  • How can I validate a date field in Portal Forms

    I have a date field in portal forms that I want to perform validation on to make sure it's in the proper format before being accepted (mm/dd/yyyy). How can I validate against that field?

    Hi Ben,
    I took the time to test and revise. This is code that will validate a date entry (format MM/DD/YYYY). Just paste this in the "Before the start of the form..." window of the Additional PL/SQL code section of the form. Then add validateDate(); into the onBlur event window of the field in question. Replace the CYCLE_END_DATE with the field name in question.
    HTP.P('
    <SCRIPT LANGUAGE=javascript>
    function validateDate() {
    var ddObj;
    var mmObj;
    var yyObj;
    var day;
    var mon;
    var year;
    var field_val;
    var field_name;
    for (var j=0; j < document.forms[0].elements.length; j++) {
    field_name = document.forms[0].elements[j].name;
    field_val = document.forms[0].elements[j].value;
    if (field_name.substring(field_name.indexOf(''DEFAULT.'') + 8, field_name.lastIndexOf(''.01'')) == ''CYCLE_END_DATE'') {
    var delimPos = field_val.search(/\//i);
    if (delimPos < 0)
    alert(''Invalid date entry! Please enter in MM/DD/YYYY format. '' +
    ''e.g, Dec 21, 2003 would be entered as 12/21/2003'');
    else
    if (field_val.length != 10)
    alert(''Invalid date entry! Please Please enter in MM/DD/YYYY format. '' +
    ''e.g, Jan 1, 2003 would be entered as 01/01/2003'');
    else {
    month = field_val.substring(0, field_val.indexOf(''/''));
    day = field_val.substring(field_val.indexOf(''/'') + 1, field_val.lastIndexOf(''/''));
    year = field_val.substring(field_val.lastIndexOf(''/'') + 1, 10);
    /* Need to subtract 1 from value because in Javascript, January begins with 0
    and ends with 11 for December */
    month = month - 1;
    ddObj = new Date(year, month, day);
    mmObj = new Date(year, month, day);
    yyObj = new Date(year, month, day);
    if (ddObj.getDate(ddObj.setDate(day)) != day)
    alert(''Invalid day!'');
    if (mmObj.getMonth(mmObj.setMonth(month)) != month)
    alert(''Invalid month!'');
    if (mmObj.getYear(mmObj.setYear(year)) != year)
    alert(''Invalid year!'');
    </SCRIPT>
    ');

Maybe you are looking for

  • Can't Send Email to a Group

    Trying to send an email to groups I created in address book.  Opening a new email and typing group name brings up the group but it doesn't populate with emails.  I right clicked on the group to create an email and again, created the email but no emai

  • How to remove Variables Personalization in the BEx Analyzer?

    Hi All, Help us. Say please: 1. How to remove personal Variables Personalization for query/user in the BEx Analyzer with standart tools? 2. How to disable personalization button on varible screen? Our users very often click this "bad" button and afte

  • Backup job stuck in running state

    Hi I am using 11gR2 RAC on Windows 2008 R2. I have several different database jobs stuck in a running state. However if I check the view v$session_longops I can not see anything in there relating to RMAN. If I drill down to the job and the step that

  • IN BACKGROUND TASK

    Hi all, howe can I do to use INSERT_COUNT ? R/3 (RFC) --> xi --> (JDBC - Insert) R/3 (RFC) <-- xi <-- (JDBC - Insert.response) I want to know how much registers was inserted in database. I know that must to be used element INSERT_COUNT in the message

  • How to get offline files back open?

    How do I get my files back from being "offline" in my multitrack session? I by mistake closed a few files and now when I open them again in my media browser they still show as "offline" and cant' seem to get them back open to work with them again.  I