Use rich:fileUpload/ to enable/disable my buttons with checking file names

Hello!
I need to upload some files with using <rich:fileUpload>,and i did it but i need to check file names for some reasons and enable or disable upload button but my problem is that when i open my modal panel and click add button of <rich:fileUpload> and then add upload button of <rich:fileUpload>(not my upload button but upload button wich <rich:fileupload> has) i check file name but the button is not enable/disable until i close my modal panel and open it agin,so i need to know how to modify my code to make it work?
<rich:modalPanel  id="uploadFile" autosized="true" resizeable="false">
                <f:facet name="header">
                 <h:panelGroup>
                     <h:outputText value="uploadFiles"></h:outputText>
                 </h:panelGroup>
             </f:facet>
             <h:form>
                  <rich:fileUpload  maxFilesQuantity="#{uploadBean.maxUploadFiles}" allowFlash="true" fileUploadListener="#{uploadBean.uploadListener}" immediateUpload="false"/>
                         <table>
                            <tr>
                                 <td><h:commandButton disabled="#{!uploadBean.xlsNameValid}" rendered="#{!uploadBean.admin}"  action="#{uploadBean.upload}" value="upload" /></td>
                                 <td><h:commandButton action="#{uploadBean.clearFiles}" value="cancel" id="cancel"/></td>
                            </tr>           
                       </table>
             </h:form>
             <rich:componentControl for="uploadFile" attachTo="cancel" operation="hide" event="onclick"/>
          </rich:modalPanel>

No the problem is that file is being checked on server side, but if file is invalid the button Upload(my button ,not standart rich:fileUpload) must be disbaled,and shown,but i have to close this modal panel and open it again to see my button enabled/disabled

Similar Messages

  • How to differentiate between Radio Buttons with the same name?

    My form has two fields, to which I gave the same name ("Radio Button 1.0") in order to achieve mutual exclusivity.
    Now, I would like to use JavaScript to retrieve the value of one the two fields:
    var checkMark = this.getField("Radio Button1.0");
    if (checkMark.value == "Yes") {
    Questions:
    What is the proper way to inspect the value of a Radio Button? I have tried this:
    if (checkMark.value == "No") [...]
    but it doesn't seem to work.
    How can I tell apart 2 radio buttons with the same name?
    TIA,
    -RFH

    When Radio Buttons and Check Boxes are unchecked their value is "Off", so if you have "Yes", "No" buttons you will also encounter an 'Off" value. Now if you want to look at a given button, you will have to use the "isBoxChecked(nWidget)" method.
    nWidget:
    The 0-based index of an individual radiobutton or checkbox widget for this field. The index is determined by the order in which the individual widgets of this field were created (and is unaffected by tab-order).
    Every entry in the Fields panel has a suffix giving this index, for example MyField #0.
    Returns
    true if the specified widget is currently checked, false otherwise.
    Example
    var f = this.getField("ChkBox");
    if(f.isBoxChecked(0))
    app.alert("The Box is Checked");
    else
    app.alert("The Box is not Checked");

  • Enable/disable operation buttons according to the selected row in table?

    Hi,
    I used JDev 11.1.1.2.0
    On my main page, it has a query section and display search result to a table component, and also has some operation buttons like (update/delete) on the toolbar.
    I want to enable/disable the operation buttons according to some filed value of the selected row in the table, and I searched the OTN forum, found more questions like this but seemed no found one right solution.
    The table is single selection, and has a status column, its data type is Integer, and I want to enable buttons when the selected row's status field value is 0 or 1, disable buttons when status value is other values.
    Table code like:
    <af:table value="#{bindings.VO1.collectionModel}" var="row"
    rows="#{bindings.VO1.rangeSize}"
    emptyText="#{bindingsVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.VO1.rangeSize}"
    rowBandingInterval="0"
    filterModel="#{bindings.VOCriteriaQuery.queryDescriptor}"
    queryListener="#{bindings.VOCriteriaQuery.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.VO1.collectionModel.selectedRow}"
    selectionListener="#{bindings.VO1.collectionModel.makeCurrent}"
    rowSelection="single" id="resId1">
    Operation buttons code like:
    <af:commandToolbarButton text="Update" id="ctb2" action="editDAF"/>
    Any suggestion will be great help.
    Thanks,
    zeroxin

    Hi,
    create an attribute binding in the PageDef file for the status field. Then setup the button PartialTriggers property to point to the table ID. The button's disabled property then points to the status attribute binding like
    #{bindings.statusField.inputValue=='value'}
    Frank

  • Screen Personas 2.0 Enable/Disable script button in Javascript

    Hi,
    Has anyone tried enabling or disabling script buttons on a flavor using Javascript. I have two script buttons,
    The first one (Button1) searches for a contract based on the contract id provided by the user in a text box. (So, the script triggers the transaction me33k, fetches and displays the relevant fields in the flavor)
    Now, based on whether the contract is present in the system the user needs to click another script button (Button2) which will allow him to create an order. Currently the button is disabled (ScriptButton.IsEnabled = false in the Properties menu).
    In the Button1 script towards the end, I need to enable Button2 is a contract is found. So in the Button1 script, at the final step I try to calculate in JS and write the following JS code,
    var args.btn2id = document.getElementById("Personas/blahblahblah");
    args.btn2id.disabled = false;
    But this is never works. And I have noticed that the control id does not return the control object in Javascript (so, args.btn2id is always null) and I tried removing the '/' and various other options.
    Has anyone ever tried to enable/disable buttons in Personas? Is it even possible?
    Abhijeet

    You don't have access to the Personas control properties from JavaScript to dynamically change them.
    About the only thing that comes to mind is Tobias' method to hide the script button if you want to disable it.

  • Enable/disable lov button in a multi-row bloc

    Hi all,
    I have a form in which there is a multi-row block with some lov buttons related to some items,
    in query mode, user should not be able to modify item, item property update_allowed is set to false, that worked, but user is able to modify item when he clicks on the lov button...so i want to disable the button for query records and for record in (insert or new), button should be enable,
    i tried some tips but don't work, do you have any idea
    Thanks for your help.

    Hi,
    Can you suggest some methods to enable/disable LOVs in my search query? I have a customized VC which performs search and I need to enable/disable the LOVs depending on requirement.
    Abhishek

  • Enabling/Disabling a button in Web appl. based on exception in a Query

    Hi all,
    I am wondering whether we can grey out a button in the web applic. designer based on whether a report has an exception showing.
    So now we can enable or disable a button, so at runtime, when the web app runs, and a condition is visible in the analysis item table, then the button (save for example) should be disabled, otherwise if there are no exceptions then it should be enabled.
    I am thinking Javascript, but not sure how to read the exceptions in a web apps query?
    Thanks for any help forwarded.
    Regards
    SMS

    Hi Sumit,
    just add one more attribute of type wdy_boolean, and bind this attribute to readonly property of button by coding.
    then as per your cell value set the attribute value, below is the some sample code.
    METHOD wddoinit .
      DATA: lv_node TYPE REF TO if_wd_context_node,
            lt_mara TYPE ig_componentcontroller=>elements_mara,
            wa_mara TYPE ig_componentcontroller=>element_mara.
      SELECT matnr
             ersda
             ernam
             mtart
             matkl
             meins FROM mara INTO CORRESPONDING FIELDS OF TABLE lt_mara
                                     WHERE meins = 'GM' OR meins = 'CCM'.
      SORT lt_mara BY meins.
      lv_node = wd_context->get_child_node( name = wd_this->wdctx_mara ).
      LOOP AT lt_mara INTO wa_mara.
        IF wa_mara-meins = 'GM'.
          wa_mara-readonly = 'X'.
        ELSE.
          wa_mara-readonly = ' '.
        ENDIF.
        MODIFY lt_mara FROM wa_mara TRANSPORTING readonly.
        lv_node->bind_structure(  SET_INITIAL_ELEMENTS = ABAP_FALSE
                                  new_item = wa_mara ).
      ENDLOOP.
      lv_node->bind_table( new_items = lt_mara ).
    ENDMETHOD.
    Regards
    Srinivas

  • Enable / Disable a button Based on a value

    Hi all,
    How can i enable or Disable a Button Based on some input Text value.
    Here is the ADF Code fragment:
    *<af:switcher id="customActionButtons"*
    *facetName="#{actionAvailable.isCustomActionButtons}">*
    *<f:facet name="true">*
    *<af:panelGroupLayout layout="horizontal" id="pgl10">*
    *<af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"*
    *text="#{wf:getResourceValue('APPROVE', 'bindings.customActions')}"*
    *disabled="#{!bindings.APPROVE.enabled}"*
    *action="#{invokeActionBean.invokeOperation}"*
    *partialSubmit="false"*
    *visible="#{wf:isCustomActionAvailable('APPROVE', 'bindings.customActions')}"*
    *id="ctb2">*
    *<f:attribute name="DC_OPERATION_BINDING"*
    *value="bindings.APPROVE"/>*
    *</af:commandToolbarButton>*
    *<af:inputText value="#{bindings.input.inputValue}"*
    *label="#{bindings.input.hints.label}"*
    *required="#{bindings.input.hints.mandatory}"*
    *columns="#{bindings.input.hints.displayWidth}"*
    *maximumLength="#{bindings.input.hints.precision}"*
    *shortDesc="#{bindings.input.hints.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{bindings.input.validator}"/>*
    *</af:inputText>*
    I have highlighted the Button and Input text in Bold.
    Any suggestions,
    Thanks,
    karthik

    you need to set the autosubmit property for the text field to true. and set the partial trigger for the the button to that input text id.
    and set the rendered property for the button based on the input text value.
    same idea is exist in this link:
    http://groundside.com/blog/GrantRonald.php?title=conditional_rendering_of_jsf_fields_depe&more=1&c=1&tb=1&pb=1
    Edited by: M.Jabr on Feb 7, 2011 1:26 AM

  • Enable/Disable a button

    I was wondering how could i disable a button until another
    action has been accomplished before enabling a button. Is there
    anyone that could help me on this?

    This might help - it's a script I picked up somewhere a few
    years ago that disables a button once it's been pushed, then if the
    page has not been submitted after a few seconds, it will flash an
    alert to the user telling them to hold their horses. It's helped
    cut down on people resubmitting things.
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function disableForm(theform) {
    if (document.all || document.getElementById) {
    for (i = 0; i < theform.length; i++) {
    var tempobj = theform.elements
    if (tempobj.type.toLowerCase() == "submit" ||
    tempobj.type.toLowerCase() == "reset")
    tempobj.disabled = true;
    setTimeout('alert("Your form is being submitted. The process
    will finish in a few seconds.")', 3000);
    return true;
    else {
    alert("Your form is being submitted. The process will finish
    in a few seconds.");
    return false;
    // End -->
    </script>

  • Can we disable cancel button in the File download

    Hi Experts,
    Working in jdev 11.1.1.30.
    Can we disable cancel button while trying to download file. and by default file will open with out click on open file, is thes possible?
    Edited by: user5802014 on Aug 17, 2010 9:15 AM

    Hi Kamal,
    how to disable “Cancel and keep workitem in Inbox” button in the user decision.
    As far as i know this is not possible. Just recollected reading this [old thread.|http://mailman.mit.edu/pipermail/sap-wug/2004-September/014240.html]
    then the work item is regenerated for him alone.
    Again this is a standard behaviour, as soon as the workitem is executed by one of the responsible agents it is reserved for that person so that no one can perform any action on it unless the first person replaces it intentionally. Yes, it would have been a better option to have it replaced automatically on pressing "Cancel and keep the workitem in inbox" but this is the way the design is. It is the responsibility of the agent to replace it manually (using "Replace" button) after performing any action on the workitem including pressing "Cancel" button. You may need to take care of this in the user training.
    Additionally you can also schedule a report (may be once a day in the midnight) which can check for the reserved workitems and replace all of them using "SAP_WAPI_PUT_BACK_WORKITEM". This would make sure that the workitems are replaced to all users even if the user has accidentally forgot to replace the workitem. Again in this case the user cannot "Reserve" a workitem even if he/she wants to (as your scheduled report would replace it in the midnight).
    Thanks,
    Prasath N
    Edited by: Prasath Natesan on Dec 26, 2007 5:56 PM
    changed "Replace manually" button to "Replace" button

  • Hello, bought a used Mac and I'd like to change the home file name from the previous owner having someone elses name on the home icon is driving me nuts thanks!

    Hello - new to mac -  bought a used Mac OS X 10.6.8 - I'm set up as admin yet can't seem to remove or edit the home file (john's computer with the home icon).  Anyone know how to do this? 
    Message was edited by: macmom7

    Before following these steps, you may wish to back up your important data.
    For Mac OS X v10.5 or later
    Enable the root user.
    Log in as root.
    Navigate to the /Users folder.
    Select the Home folder with the short name you want to change, and rename it just like you would rename any folder. Keep in mind that the shortname must be all lowercase, with no spaces, and only contain letters.
    Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to create a new user with the Account name or Short Name that you used in the previous step.
    Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" appears. Note: This will correct the ownership of all files in the Home folder, and avoid permissions issues with the contents.
    Choose Log Out from the Apple menu.
    Log in as the newly created user. You should be able to access all of your original files (on the desktop, in Documents, and in the other folders of this Home).
    After verifying that your data is as expected, you can delete the original user account via the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier).
    Disable the root user
    http://support.apple.com/kb/HT1428

  • Help with image file names when using Import Word document feature

    Hello,
    I am using File >> Import >> Word document into an HTML template.  If the Word document contains images, the images are written to the directory specified in my Site Default Image Folder.  Here is my question: As I was teaching myself the Import function, one time the images were automatically named to match the page name.  So for example, if my page is named Create.html, the images would be named Create_image001.jpg, Create_image002.jpg, etc.  I can't remember how I enabled this feature (or maybe I was dreaming) but if anyone knows how to control the name of the images imported from MS Word, please let me know.  I've searched and Googled for hours and can't find a way to control the image file names.
    Thanks in advance,
    Shellie

    I was hoping that this would be fixed in the 10.8.2 upgrade but it has not.  Anyone have any luck?  Earlier today I was trying to write a paper and navigating between 10 pdfs was a nightmare without being able to hover my mouse for the titles like I used to. 

  • How to use the js in the case of not sure the file name into multiple files to PS?

    function place($path){
        var idPlc = charIDToTypeID( "Plc " );
        var desc28 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        desc28.putPath( idnull, new File( $path ) );
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc28.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc29 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc29.putUnitDouble( idHrzn, idRlt, 0.000000 );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc29.putUnitDouble( idVrtc, idRlt, 0.000000 );
        var idOfst = charIDToTypeID( "Ofst" );
        desc28.putObject( idOfst, idOfst, desc29 );
        executeAction( idPlc, desc28, DialogModes.NO );
    for(i=1;i<=4;i++){
        place ("E:\\aaa\\"+i+".jpg");
    目前我的解决方案是,把多个文件提前修改成数字序列,然后用for循环调用,我想问的是,如果我不更改文件名,是否也可以同时导入多个文件?
    At present my solution is to advance the multiple files modified into a sequence of Numbers, and then use a for loop calls, I want to ask is, if I don't change the file name, also can import multiple files at the same time?

    You could use a file or folder selection dialog and then feed the selected files into the for-clause.
    var aFile = selectFile(true);
    alert (aFile);
    ////// select file //////
    function selectFile (multi) {
    if (multi == true) {var theString = "please select files"}
    else {var theString = "please select one file"};
    if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog (theString, '*.jpg;*.tif;*.psd;*.png', multi)}
    else {var theFiles = File.openDialog (theString, getFiles, multi)};
    ////// filter files  for mac //////
    function getFiles (theFile) {
        if (theFile.name.match(/\.(jpg|tif|psd|png)$/i) || theFile.constructor.name == "Folder") {
            return true
    return theFiles

  • ENABLING/DISABLING of buttons

    Hi,
    I have two buttons in my application. One is submit and other is redirect. I wanted the second button to be enabled only on click of the first one. Can any one help me on this please?
    Thanks in advance
    Akhil

    Take a look at this thread Disable button using javascript
    It has a link to some examples which should help you.
    Chris

  • How to enable/disable a button in Photoshop panel?

    Anyone know how you'd create the proper code in a Photoshop extension panel so that certain buttons in the panel could be enabled or disabled dynamically as needed? 

    Hi Sonunew2flex,
    Write one public function in main application file as below...
    // In main application file
    public function changeButtonDisableStatus(bool:Boolean):void
         yourNuutonId.enabled = bool;
    //In your hear renderer do this
    if(cb.selected=true)
       Application.application.changeButtonDisableStatus(true);
    else
       Application.application.changeButtonDisableStatus(false);
    Thanks,
    Bhasker

  • Enable-Disable Hardware Acceleration with GPO or Script

    I have a about 300 systems I need to apply this to at any given time.

    You may need to lock layers.acceleration.disabled as well to true.
    <pre><nowiki>//
    lockPref("gfx.direct2d.disabled", true);
    lockPref("layers.acceleration.disabled", true);</nowiki></pre>
    You can use a mozilla.cfg file in the Firefox program folder to lock prefs or specify new (default) values.
    Place a file local-settings.js in the defaults\pref folder where you also find the file channel-prefs.js to specify using mozilla.cfg.
    pref("general.config.filename", "mozilla.cfg");
    pref("general.config.obscure_value", 0); // use this to disable the byte-shift
    See:
    *http://kb.mozillazine.org/Locking_preferences
    You can use these functions in mozilla.cfg:
    defaultPref(); // set new default value
    pref(); // set pref, but allow changes in current session
    lockPref(); // lock pref, disallow changes

Maybe you are looking for

  • How to see the content of an attachment in sxmb_moni

    Hi all, Does someone know how to see the actual content of an attachment in sxmb_moni? If I look under Inbound Message (CENTRAL)/Payloads, I would see one node for MainDocument and another node with the name of the attachment. When I click on the att

  • Portal 3.0 Install on NT 2K

    I have FINALLY completed the Portal 3.0 installation on Window NT 2000. Here are my steps in order to help someone: 1) Read MetaLink Doc# 132445.1 and ensure all the database size requirements are met. It mentions JServer should be successfully insta

  • CS5 stroke problems

    Hi guys. Yeah, i know, actually there's a discussion here about cs5 stroke problems. But my problem is a little bit different (sorry if i'm wrong). If i just draw an open path i can use any stroke weight i want to, but if i join the path with another

  • I'm trying to add a printer to my account, however when I enter the printer code, the website errors

    I'm trying to add a printer to my account for the first time.  However, when I enter the printer code, the website popup screen errors out and doesn't advance to the next function.  Any idea what's going on with this?

  • Does jDeveloper support activity links?

    I have tried jDev 10.1.3.3 as well as 11g tech preview 4. Does jDeveloper support modeling of activity links? I can't seem to find that anywhere. An example of how links are used: <flow ...> <links> <link name="checkFlight-To-BookFlight" /> </links>