F:selectItems preventing action

I have a pretty simple JSF form, and I have a selectOneMenu component in the form. When I set the items for the selectOneMenu as this:
<h:selectOneMenu id="lbxNewParentID"  value="#{CategoryAdminBean.newParentId}">
     <f:selectItems value="#{CategoryAdminBean.rootCategoryItems}" />
</h:selectOneMenu>The items are populated correctly, but the action on the commandButton in that form doesn't work. If I remove the <f:selectItems .. /> from that form, the button behaves as expected. Is there something I am doing wrong?
Also, I can get the even to fire ifI set the immediate property to true on the button.

Likely there is a conversion or validation error occured. Add <h:messages/> to the code and take note the error message.

Similar Messages

  • Person Responsible for Corrective-Preventive action in Audit Management

    Hi,
    I am creating Corrective-Preventive action in audit (PLMD_AUDIT). I am using BAdi PLM_AUDIT_COR_UPDATE. I am getting all other info I need in it but not able to get person responsible (under 'Contact Persons' tab).
    Since the BAdi methods are 'before save' and 'update' we can not fetch from the database also.
    Can anyone help??

    Hi,
    If you want to get the list of CARs linked to audit , you can refer to bapis.
    BAPI_BUS20350_GET_DETAIL - pass the audit external id & guid to get the audit & CAPA details.
    BAPI_BUS20370_GET_DETAIL - pass the CAPA details
    Regards
    Keerthi

  • Corrective action & preventive action

    Dear Gurus;
    I am working on a scenario where, after every 5 breakdowns in a month on a Equipment, system should prompt to create a corrective action report or preventive action report.
    Or in second scenario, If the breakdown time for a equipment is more than 30 Hours in a month, system should prompt to create the corrective action or preventive action report.
    How can I map this? Also where can I maintain the report?
    Thanks & Regards
    Hemant

    ABAP development would be required for this and the logic may be as follows.
    Run transaction MCJB for a particular period 9development) say monthly, which shows the no of breakdowns, breakdown duration & cumulative breakdown duration. If the nof breakdowns are more than or equal to 5 (or) if the break down duration is more than 30 hrs on that particular month, then a followup action for creating a notification or mail to the concerned using function module / work flow.
    Trust this will help you while preparing a functional specs.
    Regards
    SRN

  • Is there a way to prevent actions, like spaces, to only occur on one screen when using multiple monitors?, Is there a way to prevent actions, like spaces, to only occur on one screen when using multiple monitors?

    Hello, I am using my Macbook Pro, late 2012 with a second monitor, which is a TV. I am wondering if there is a way to prevent spaces from poping up in the second monitor when i want it to ocur in the primary monitor? So on one monitor, or whichever one the mouse is, I want say Spaces, or Launch pad to popup on and not interfer with the other screen. Is there a way to do this?
    Thanks,
    Harrison Howard

    I believe the answer is no.
    I have not been able to make extra monitors stick with a particular space.
    Also, there is a relevant discussion here regarding this matter.
    The last poster suggests a workaround which does not work as far as I can tell.
    Here is the discussion thread
    Best of luck

  • How to prevent action (lead selection change) with popup (confirmation)?

    Hello all,
    I have an application where I want the user to confirm when he selects a new line in a table. When the user selects a new line in the table an other used component reloads its data based on the new line selected. If the user has not pressed the save button before selecting a new line, any changes in the used component will be lost.
    Currently I use onLeadSelect action on the table to call the load_data method(id=xxx) on the used component in order to display data relevant for id=xxx based the new line.
    I can open a popup to confirm from the onLeadSelect-action or the WDDoBeforeAction, but the action still happens; it doesn't wait for the user to respond. And then any changes are lost...
    I may have to store the parameters sent to the onLeadSelect method in context and continue when the button action from the pop-up returns via subscribed method, but I think this is an unelegant way of doing this.
    There must be a better way...? Any ideas?
    Regards,
    Christian Frier

    on the lead select event handler you can show the popup and no other logic. Move your logic to the ok and cancel button handlers of the pop up.

  • Is there a way of preventing actions from continuing?

    I have some interactivity built into my slide which involves the user doing a fair amount of clicking. (The majority of these are 'Increment $$variable$$ by X).
    But it keeps continuing each time the learner clicks which means they skip to the next slide before they are ready.
    I have already staggered the 'pause after' times so that the learner can do a few more clicks before they move on, but ideally I want the learner to stay on the slide until they choose to move on or get the question correct.
    Any suggestions welcome!
    Thank you
    M
    P.S. I'm using Captivate 8

    Maybe this post (there is also a link to a Youtube tutorial) can clarify:
    Why choose Standard over Simple action? - Captivate blog
    Although this was written for CP6, everything is also valid for CP8

  • Rendered attribute of commandButton preventing action method from executing

    When I add a rendered tag to my commandButton it'll only execute the method intermittantly. After a lot of testing, I've narrowed down the problem so I now know when it does and does not work properly.
    If rendered="true" it always works fine
    If rendered="#{issue.update}" and isUpdate() is simply "return true;" it'll always work correctly
    If rendered="#{issue.update}" and isUpdate() is simply "return this.getId() != 0;" it will not execute the action specifiied, however the page does refresh.
    It's also interesting to note that on the rendered page, the button is always shown only when it should be. So when the action fails to execute, the button is shown on the screen.
    In the case that doesn't work, I debugged through and noticed that isUpdate() is called six times for a single page refresh. By printing a stacktrace for each call, I discovered that it's called once in the ApplyRequestValues stage of the lifecycle and the other five times are from RenderResponse (I have the stacktraces, let me know if they'd be worth posting). This method is only referenced once and only on the jsf page, never in the java code... but I'll go back and try to understand why it's calling it so many times later.
    The first time isUpdate() is called, it will retrun false because the value for id has not yet been assigned, which makes sense. This causes a "false" to be returned from isUpdate() and this is what is causing the action to not be executed. If I debug through and change the return value to be true here (only the first time) the action is updated. So my question is, what's going on here? I don't understand why is isUpdate() called so many times, why is it called so early in the lifecycle, and why the call in the apply request values stage determines whether or not it executes the action?
    Now, as a workaround, I put a binding on the id, and tried to use that value. That exposed another problem with my page which requires some explanation... Here are the relevent sections of the page and backing bean...
    issue.jsp
    <h:outputText value="#{issue.init}" />
    there's a datatable here which displays all issues and has a commandLink to edit the issues (immediate="true"). It posts back to this page and passes an ID on the URL.
    <h:inputHidden id="id" value="#{issue.id}" binding="#{issue.idBinding}" />
    <h:inputText id="name" value="#{issue.name}" required="true" />
    <h:commandButton id="updateIssue" value="Update" action="#{issue.updateIssue}" rendered="#{issue.update}" />
    Issue.java
    getInit() will get the id from the FacesContext (specifically, the URL) and load the data from the database.
    On the rendered page in my web browser:
    After clicking on an edit link, the page is loaded and the name is filled in, the update button is on the screen, and everything looks good.
    When I view source, I see that the hidden input for id is set to zero. I'm still trying to figure out why this is the case since all the other parameters are set properly. I stepped through getInit() and it is, indeed setting the id property properly.
    So when I added the binding to get the value from there instead of via the local values, I found that it always got zero (presumedly because that's what is rendered in the HTML code). This means that isUpdate() still returns false on the first call, and my attempt at a workaround fails! So, just as a test, I used some "javascript on the URL" trickory to set the id field to "10". That worked just fine. So the root of the problem is that issue.id is not loading. I put code in the getId() method to always look at the binding and then faces context and put the id into this.id if it found a non-null and non-zero value. It now returns the correct value all of the time but the HTML produced still says the value is zero.
    I've spent about 4 hours on this issue and I'm to the point where I need advice from someone who is more educated on how JSF works. I know the inputHidden get the vaule for the HTML tag it produces from getId() because when I hard code that to always return 10, it works. But when I leave it to return the proper value, the debug statements say it's returning the proper value, but the HTML always says it's zero. This isn't an acceptable solution anyway because I use getId() in the datatable to display the IDs of each of the issues; I just wanted to see if it'd work and it didn't.
    Here's my latest getInit() method (which returns the value from the URL when called from the datatable, but not when called from the inputHidden.
        public int getId() {
            if(getIdBinding() != null && !getIdBinding().isLocalValueSet()) {
                if(getIdBinding().getSubmittedValue() != null) {
                    int temp = Integer.parseInt((String)getIdBinding().getSubmittedValue());
                    if(temp != 0) {
                        this.id = temp;
                        log.info("Got binding value of "+this.id);
            FacesContext ctx = FacesContext.getCurrentInstance();
            if(ctx != null) {
                Map<String, String> map = ctx.getExternalContext().getRequestParameterMap();
                    if(map != null) {
                    String given_id = map.get("id");
                    if(given_id != null) {
                        // if given an ID and no action, we load the data
                        try {
                            log.info("Got value from FacesContext of "+given_id);
                            int temp = Integer.parseInt(given_id);
                            if(temp != 0)
                                this.id = temp;
                        } catch(NumberFormatException e) {
                            // if what's passed in isn't an integer, we leave everything at default values
            return this.id;
        }Thanks in advance,
    Adam

    I'm clicking a link which will load data into a form. In the form there is a field called "id" which has a value of something other than zero. I press the update button (which is only rendered when the id is non-zero), it submits the form. When the restore view happens, the id is the default value of 0 because it has not yet applied the values from the form to the backing bean. Therefore the rendered attribute of update button (isUpdate()) will return false, and the update() method does not get queued.
    When I switch my backing bean to session level, the restore view already has the id loaded, even before the values from the form are applied, so everything works as expected. The problem was that I needed to have the correct return values before any values have been loaded into the member variables.
    As a solution to this, I made some private boolean variables called isNew and isUpdate. Both of them are true by default. This makes sure that the isNew() and isUpdate() methods (attached to the render attribute of my command buttons) return true in the restore view phase. When I read in the id from the URL or hidden input, it'll update the boolean values accordingly, which makes sure the buttons are rendered properly. This allowed me to set the backing bean back to the request scope, which make me happy. <img class="emoticon" src="images/emoticons/grin.gif" border="0" alt="" />
    Thank you Mr. De Campo. You gave me exactly what I was looking for... a better understanding of how thigns work, and (indirectly) a clean solution to my problem.

  • Prevent action method from executing

    Hi,
    Is it possible to somehow jump over some action methods in the definition of a service? For instance, this is the definition of the COLLECTION_INFO service, with two extra additions (prepareCustomRedirect and dummyMethod). In prepareCustomRedirect method I would like to force the service to jump over the execution of the rest of the action methods and go directly to the last one, dummyMethod, which does nothing, hence the services completes its execution. After the execution of the service, a redirect is desired, which is set in prepareCustomRedirect.
    <tr>
         <td>COLLECTION_INFO</td>
         <td>DocService
              33
              COLLECTION_INFO
              null
              null<br>
              !csCollectionUnableToInfoCollection</td>
         <td>3:prepareCustomRedirect:IdcService=COLLECTION_DISPLAY&hasCollectionID=true&dCollectionID=<$dCollectionID$>:0:null
              3:doSubService:LOAD_DOC_ENVIRONMENT:0:null
              3:canReadInCollection:::null
              3:loadUserConfig:::null
              3:loadCollectionPermissions:::null
              3:getCollectionMeta:::null
              3:loadSpecificCollectionMeta:::null
              3:loadPathForCollection:::null
    3:dummyMethod::0:null</td>
    </tr>
    Is this possible, either in this way or any other?
    Thanks,
    V

    You can do it like this:
    <tr>
    <td>COLLECTION_INFO</td>
    <td>DocService
    33
    COLLECTION_INFO
    null
    null
    !csCollectionUnableToInfoCollection</td>
    <td>3:dummyMethod::0:null</td>
    </tr>
    <tr>
    <td>COLLECTION_INFO_ORIG</td>
    <td>DocService
    33
    COLLECTION_INFO
    null
    null
    !csCollectionUnableToInfoCollection</td>
    <td>3:prepareCustomRedirect:IdcService=COLLECTION_DISPLAY&hasCollectionID=true&dCollectionID=<$dCollectionID$>:0:null
    3:doSubService:LOAD_DOC_ENVIRONMENT:0:null
    3:canReadInCollection:::null
    3:loadUserConfig:::null
    3:loadCollectionPermissions:::null
    3:getCollectionMeta:::null
    3:loadSpecificCollectionMeta:::null
    3:loadPathForCollection:::null
    </td>
    </tr>
    Within your dummyMethod you can perform your test and either execute the other service, or your code.
    Alternatively, take a look at Java filter events. If you find one that suits, you may put your code into the filter, and stop executing the rest of the service, if necessary.

  • How can I stop an action sequence with another

    Hi,
    I am quite new to flash catalyst. I made a side with an office where you can click the phone to go to the status "phone". In there you should be able to call some virtuell people. I made buttons with names that trigger different action sequences with showing the name of the called person in the display and playing a sound file that sounds like a call. Now my problem is when I am clicking a different name while it is still in one action sequence, the other one shows up over the first and both sounds are playing at the same time.
    How is it possible to tell the action sequence to stop all others when it is started?
    Thank you for your help.

    Sorry, I'm a bit confused now. Just to clear this out:
    WDDOBEFOREACTION is for validating user inputs BEFORE Actions and HERE you can prevent actions from happening
    WDDOAFTERACTION is called JUST WHEN an action is happening for all visible Views (it's to prevent redundant code which would be equal for all event handlers)
    WDDOBEFORENAVIGATION is AFTER Actions and BEFORE navigation.
    Check the chart in the following Link (sorry it's german, english version seems not available, but the chart is in english nevertheless)
    http://help.sap.com/saphelp_nw73/helpdata/de/49/b8c706c7c26d7ce10000000a421937/content.htm
    In my opinion put an if clause into WDDOBEFOREACTION, check whether the respective field is filled; and in case it is filled, execute your method; if not, don't.
    That's why I am confused, you kind of answer your question within your question itself )) or I still don't understand what you want to accomplish.
    best regards, hope this helps you (if not, try to explain it even more detailed for me ;-D)
    Lukas

  • Script to prevent email submission

    I have an email button on the form with a script that checks to see if one of the two radio buttons were selected by the user. If neither was selected, the script prevents the email and sets the focus to the radio button.
    How can i do this with Pre-Submit? I am trying to prevent the user from sending the form by email using the Share feature in Acrobat. I can write the script but do not understand how to cancel the submit action if neither radio button was selected.

    There is a validate element available that can prevent actions like printing or submitting when mandatory fields are empty.
    Here's a description.
    http://forms.stefcameron.com/2008/04/13/prevent-printing-pdf-forms-in-acrobat-8/

  • New Channel Guide is Even Smaller Than Before

    We have two TVs connected to Verizon FiOS. One TV is on a DVR and the other is simply on a set-top box. The TV on the set-top box has a channel guide that shows seven channels over 2 1/2 hours in full HD (9x16) format. It has always been superior and doesn't seem to have changed with the Feb. 4 update. The channel guide on the TV with the DVR used to show only six channels over 1/12 hours in old 3x4 format. The Feb. 4 upgrade made it even worse, now it only shows five channels over 1/12 hours in 3x4 format. All we want is for the channel guide at the DVR to be as good as the one with the set-top box. I tried and tried to change settings on the TV and DVR but cannot fix it. I phoned Verizon technical support and was told that our Motorola DVR simply cannot accommodate the guide that our Motorola set-top box does. He added that the service in our area cannot change to Cisco or other DVRs that might support better guides. We should not pay the premium for a DVR when it has a poorer channel guide than a set-top box. It is hard to understand why Motorola would produce a better set-top box than DVR, if the set-top box and DVR are really the culprits.
    We like to view at least six channels at a time so we can see all the broadcast channels in our area at a time; we like to view more than 1 1/2 hours at a time so we can see later times without shifting so much; and we prefer to have a full 9x16 HD guide when we are paying for HD service. 
    We were told that our Motorola DVR cannot support a channel guide that shows seven channels over 2 1/2 hours in full HD format, like our Motorola set-top box does. Is this correct? What can we do about it?
    Do other regions have better guides with their DVRs? Why?
    If you can provide us with an effective solution, we would be appreciative. If not, then please submit this as a complaint to your closed-loop corrective and preventive action system and notify us accordingly by email. 
    Thanks, Tom {edited for privacy}

    So I just checked my STBs.
    I have a 7100P2 HD STB and a 7232 HD DVR.
    Both show 7X2.5 hours.
    What model DVR do you have.
    The 6416 does not support a HD guide and will show less channels that a 72XX series DVR.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.

  • Need info on how to get class

    Hi ,
    When you run transaction PLM_AUDITMONITOR --> Corrective/Prventive actions -->
    select one of the corrective/preventive actions and click on audit component it shows a screen
    which has Actions,Descriptions and view selection , language , Basic data, text etc etc
    The data Action, Description I got it from CL_CGPL_PROJECT  but I need a class which gets me information
    in the Basic Data and text tab.
    Please help me out .
    Regards,
    Gouri
    Edited by: Gouri H on Aug 9, 2011 8:55 AM

    Hello,
    You can use the class CL_CGPL_TEXT which will get the Text details.
    Regards,
    Venkata Phani Prasad K

  • Looking for some VPN advice on c7200 and possible serious problem

    Hi all,
    I am looking for some advice on how to figure out few things.
    customer has a c7200 with VPN module and seen the following
    15.2(4)M4, RELEASE SOFTWARE (fc2)
    Vpn7# Show crypto isakmp sa
    Exemple: x.x.x.x  y.y.y.y QM_IDLE 14020 ACTIVE ( repeated around 700 times)
    Vpn7# IKE-Session : 2517 active, 5120 max, 3169 failed
    Hardware Encryption : ACTIVE
    Number of hardware crypto engines = 1
    CryptoEngine VAM2+:7 details: state = Active
    Capability : IPPCP, DES, 3DES, AES, RSA, IPv6, FAILCLOSE, HA
    IKE-Session : 2800 active, 5120 max, 3169 failed
    DH : 55 active, 5120 max, 0 failed
    IPSec-Session : 1628 active, 10230 max, 0 failedhe would like to know whether these messages allude to some kind of serious problem or show the normal operation of vpn routers. because they need  to analyse their business related incidents and do prevent actions
    therefore if someone could give  give me some advice if there is any problem with the hardware i would greatly appreciate it
    thanks in advance
    Lance

    I'd make sure to read the contract and any associated fine print really, really carefully before doing this. But back to your question - this is more of a marketing question and I'd suggest hiring a good marketer (or become one) to make the most of this opportunity.
    And how do you find a good marketer?
    I'd suggest using Seth Godin (http://sethgodin.typepad.com/) as your guide/model. If the person you want to hire knows and follows Seth's good marketing advice, you'll likely do very well. If they don't know who Seth Godin is and are obsessed with SEO rankings and email blasts, I'd be very worried (that's not to say SEO rankings and email blasts are "wrong" but that they shouldn't be the only options in your marketing approach).
    Good luck!

  • How to  not update the model value whe, multiple back-end validation failed

    Hello !
    I have a save button who perform in backend code multiple validations on some fields. The validations can be ok, if not, I show specific error messages in my page. It's working fine.
    The problem is that all the InputText I need to valid are value binded with value=#{backing.somepropery} to the model and when the code of the ActionEvent is called the model was already update.
    So the validation is useless, you see error message ok but I can't prevent action to be done.
    As the validation occurs only when I press a specific button I can't use custom validator.
    does someone have an idea to manage that ?
    Thank You.
    Dan.

    Thnaks for your repsonse but, it"s not working because the values are bound so the modifications are already done.
    I'm sure that there is a way to do that.

  • Remove password in pdf

    I just downloaded Adobe and 'Forms Central' for the purpose of removing an existing password in a pdf file. The prg won't import it because it is password protected. What should I do differenly?
    Thanks in adance for replies!
    DEB

    Hi DEB,
    Are you opening the PDF in Acrobat? Then, you may be able to remove the security. On that Security tab in the document properties, are you able to change the security settings? The person who created the file may have applied both a document open password, and a document permissions password (which prevents actions being taken on the PDF). If you have the passwords you need, and you have Acrobat, you should be able to turn off the security and save the file.
    Best,
    Sara

Maybe you are looking for