H:dataTable getter called during APPLY_REQUES_VALUES stage

Hello,
I'm having some trouble with localization. I need to set labels of components in an h:dataTable with localized strings.
To change the locale I have an immediate commandLink that calls an action containing setLocale().
Now here's the problem. When I change the locale the h:dataTable calls my value bound getter during the APPLY_REQUEST_VALUES stage! This occurs before the setLocale() call.
Log:
17:16:55 [INFO ] PhaseTracker BEFORE RESTORE_VIEW 1
17:16:55 [INFO ] PhaseTracker AFTER RESTORE_VIEW 1
17:16:55 [INFO ] PhaseTracker BEFORE APPLY_REQUEST_VALUES 2
17:16:55 [DEBUG] LocaleStrings loading from table divisionstrings...
17:16:55 [DEBUG] LocaleStrings current locale: fr
17:16:55 [DEBUG] LocaleStrings setting locale to fr
17:16:55 [INFO ] PhaseTracker AFTER APPLY_REQUEST_VALUES 2
17:16:55 [INFO ] PhaseTracker BEFORE RENDER_RESPONSE 6
17:16:56 [INFO ] PhaseTracker AFTER RENDER_RESPONSE 6
So the result is that the localized strings on the elements in the h:dataTable are set using the incorrect previous locale.
Normally when I do not use h:dataTable, my value bound getter doesn't get called until the RENDER_RESPONSE phase. In that case everything works fine.
Anyone able to shed any light on how I can fix this? Thanks.

I dug through the code a bit...
During the APPLY_REQUEST_VALUES phase components are asked to processDecodes().
Now this is expected however for UIData (the ancestor of HtmlDataTable) it needs to set a row index which results in the data model being retrieved and all the value bindings being called.
Here's a partial stack trace:
at javax.faces.component.UIData.getValue(UIData.java:527)
at javax.faces.component.UIData.getDataModel(UIData.java:856)
at javax.faces.component.UIData.setRowIndex(UIData.java:379)
at javax.faces.component.UIData.iterate(UIData.java:898)
at javax.faces.component.UIData.processDecodes(UIData.java:737)
Hmm... so looks like things will be called twice. Once in the APPLY_REQUEST_VALUES phase and again in the RENDER_RESPONSE phase.

Similar Messages

  • Routine not getting called during Batch job posting of Shipment costs

    Hi,
    We have a routine created and attached to the condition type in the condition base type of shipment cost procedure.When the shipment cost is created by running a batch job (VI06) , the value  posted is the initial value determined withourt routine.
    The  routine is getting activated only when we go in u201CCondition tabu201D in shipment cost.
    Because of this,  correct values are getting calculated only when we click on u201Ccondition tabu201D,& getting wrong value in initial screen, which is not possible in batch job.
    Need your views / suggestions to fix this issue.We need to use batch job and enable rouitne before batch job posts the cost to the Service PO.
    Thanks in advance.
    Regards,
    Ameya K.

    Modified the routine program

  • CRM_ISA_PRICING_ITMDATA_GET is not getting called

    Hi All,
    The FM - CRM_ISA_PRICING_ITMDATA_GET (and BADI CRM_ISA_HDR_PRICING - NEW_ITEM_VALUES_READ) to pass additional pricing fields is not getting called during  product catalog pricing . We added the below change to xcm->customer->modification->backendobject-config.xml and still is not working.
    <configs>
    <xi:include href="$/modification/backendobject-config.xml#xpointer(backendobject/configs/*)"/>
    <config isa:extends="../config[@id='crmdefault']">
    <businessObject type="PriceCalc">
        <params>
               <param name="doItemCalls" value="true"/>
          </params>
      </businessObject>  
    </config>
    </configs>
    Even it is not working if we change the   <param name="doItemCalls" value="true"/> in  xcm->sap->modification->backendobject-config.xml .
    Any suggestions on how this FM (and BADI) will be called during product catalog pricing?
    Thanks,
    Rajinikanth G

    Hi,
    There was an authorization issue which configured in XCM and it was called after addaing proper authorizations.
    Thanks,
    Rajinikanth G

  • Shutdown hook not getting called when running tomcat as a service

    I have a shutdown hook as part of a lifecycle <Listener> tomcat6 class, which gets created and registered in the class's constructor (class is referenced in the server.xml). The hook gets called during shutdown when tomcat has been started from a shell, but not when tomcat has been installed as a service. The -Xrs flag doesn't make a difference either way. I am running java 6u12 server VM (haven't tried client) and prior versions. Does anyone have any ideas? This has been tested by starting/stopping from the Control Panel, and also with 'tomcat6 //TS/ServiceName' (i.e. in test mode)
    One possibility is that tomcat internally calls Runtime.halt(), but the shutdown process appears to be normal and the same with either scenario. The other possibility is that the JVM has an issue. The tomcat user groups don't have anything to offer.
    Thoughts?
    tia

    sanokistoka wrote:
    jschell wrote:
    sanokistoka wrote:
    Let me ask the last question in a better way: Does anyone have any GOOD ideas?Get back to us when you have found your good solution.Stop wasting bandwidth. I didn't post here to be a smart ars like you and pretend that I have a solution to a rare problem... FYI - the workaround is to use the tomcat lifecycle events (AFTER_STOP_EVENT) to achieve the same - why do you think I mentioned it's a tomcat listener in the first place? Feel free to educate me.
    So you are claiming that Runtime.getRuntime().addShutdownHook() that you posted in the above is not part of the java API?
    Or perhaps that everything that is added via addShutdownHook() runs?
    Surely you are not claiming that it isn't calling addShutdownHook() in the first place?
    Get a life and a job.I have both but thanks for the concern.
    sanokistoka wrote:
    swamyv wrote:
    There are free tools available to debug windows. I think gdb is one of them. If you search you can find some good tools.
    If you find any good tools that you like share it with us.
    Yes I will try gdb (have cygwin) and see where this takes us - not sure if the JVM or tomcat6.exe have the symbols to get a meaningful stack trace. As luck would have it, [https://issues.apache.org/bugzilla/show_bug.cgi?id=10565|https://issues.apache.org/bugzilla/show_bug.cgi?id=10565] claims that "shutdown hooks are not supported in a container environment" although there is no such restriction in the servlet spec, which would make this a tomcat issue (it does sound like that tomcat6.exe wrapper is somehow involved). Unfortunately, tomcat does NOT issue the AFTER_STOP_EVENT if killed before it has completed its start-up (it appears its own shutdown hook, which sends the event, is not registered until it has fully come up); thus the need for a shutdown hook (at least, up until it's fully up). A shutdown hook is still required in my case for clean-up after tomcat is completely out of the picture. It sounds like the proper architecture here is to really embed tomcat in an application, and create a shutdown hook at the outer level.
    Educate me some more. The above description certainly seems like you are suggesting that both of the following are true.
    1. It is not a bug in the VM.
    2. The problem, for your implementation, is in how the wrapper terminates the windows service.
    Perhaps what is actually happening it that addShutdownHook() is never being called at all? Thus of course any processing of the thread associated with that would never, ever run.
    And that happens because you are banging on the stop service so fast that it doesn't actually have time to spin up?

  • HT4623 my iphone 5 is not getting audio during calls, im not hearing anything unless i put it on speaker. Can you help me is this a software problem its very annoying for every call i dial or recieve i have to put on speaker. Please help me apple please.

    my iphone 5 is not getting audio during calls, im not hearing anything unless i put it on speaker. Can you help me is this a software problem its very annoying for every call i dial or recieve i have to put on speaker. Please help me apple please.

    There's a whole lot to read in your post, and frankly I have not read it all.
    Having said that, this troubleshooting guide should help:
    http://support.apple.com/kb/TS1538
    In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it.

  • My iphone 4 is getting stuck during gaming when sim card is inserted. Call anyone help me out to solve this problem?

    My iphone 4 is getting stuck during gaming when sim card is inserted. Call anyone help me out to solve this problem?

    That doesn't make any sense to me at all, unless the games you're trying to play have some sort of online connection/capability and you're in a weak signal area, thus the games can't make the required online connection. What happens when you turn cellular data off in settings: Settings>General>Network>Cellular Data>Off.

  • Am I the only one getting calls from 253-802-0308 about malicious file downloads after updating FIREFOX?

    After updating Firefox I start getting calls from 253-802-0308 (International Telcom in Auburn Washington, found using 411.com). The report that they are getting messages that my Windows PC is reporting the downloading of malicious files. I don't think that there is a connection with Mozilla but it only started after I ran the last 2 or 3 updates to Firefox. Searches on Google and other search engines don't show logical connections to the phone calls and the problem being reported to me. None of my anti-virus programs, Ccleaner, DEFENDER & AVG pickup and malicious files. I'm curious about who they may be because when I question them during the calls they end up hanging up on me. Just wondering if similar problems are being reported.

    That is a reported scammer set-up. Read some of the following from actual phone customers. It is not related to your Firefox updates. I have gotten a few of these types of calls on my '''''unlisted '''''home phone number over the past several years. They use a dialer, usually automatic and sequential number dialing. Get a loud whistle to blow into the phone mouth piece or one of those loud air horns from the hardware/sporting good store; this kind of trash deserves broken ear drums.
    *https://encrypted.google.com/search?q=253-802-0308&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]

  • Badi/exit/Workflow called during  execution of the BSP "SRMSUS_SELFREG"

    Hi all,
    We are running on SRM 5.0.(SP06) Strategic sourcing scenario.We are using enterprise Portal as the front end.My query is that at the end of Supplier  registration process,when the Supplier admin creates the USER ID's for the Suppliers(through BSP SRMSUS_SELFREG),is there any way by which we can create the enterprise Portal users for those suppliers at the same time(Automation) ?My BASIS person told me that the automation is possible when the EP system is connected only to 1 backend but in our landscape we are having several systems connected to EP.
    Other alternative would be to send a mail to the EP administrator stating that the Vendors User ID's have been created in SRM and the EP ID's need to be created.
    For this ,i didnt get any BADi/exit which gets triggered during this USER ID creation process wherein i can write my logic for sending the mail to the EP admin.
    There are some Std workflows (e.g. WS10000209)for USER creation but these dont seem to be useful in this scenario.
    So the only method left is to modify the Std BSP which  we dont want.Has anybody worked on this kind of scenario?
    Any suggestions are welcome and will be rewarded as well.
    BR,
    Disha.

    Hi
    I am still searching.. but no BADI/Exit is called in this case..
    <u>Meanwhile, i found few SAP OSS notes, which you can go through -></u>
    Note 1031896 Delimiting of Supplier Reg URL due to Special characters
    Note  1031070 Supplier cannot be registered
    Note  996030 Need to relogin to srmsus_selfreg service when using aliases
    Note 1032573 FormofAddr field mandatory in userselfreg.htm page
    Note 1003820 Supplier cannot be registered
    Note 889451 Not Possible to register in Supplier self-registration
    Note  807511 Error message after self registration of supplier admin user
    Note 784883 Irrelevant warning message stops self registration
    Do let me know.
    Regards
    - Atul

  • My bionic has started having my calls hang up unexpectedly and tries to dial calls during a call by my face touching screen I guess, can I fix it?

    This started about 2 weeks ago, when I get calls they either can't hear me and we gotta call back, or during a call my screen lights up and either my face causes it to hang up or phone does, or it try's to dial another phone number for me, it tried an international number, I can not afford this for sure, but I have cleaned senors and screen per protocol and tried updates.  At the same time my camera started only focusing every now and then, it doesn't alert me for some of my calls and texts randomly, and starts to make a call on its own while it is sitting on a table with no one touching it, is it me and my phone or is others having these issues and can I fix them?

        osubuckeyebest, I am sorry to hear about your phone issues! How long has this been an issue for you? Is there any physical or water damage to the phone? Have you tried to do a master reset on the device http://bit.ly/RFtIqk ?^SP

  • Script does not get called

    Hi there, I am trying to setup a quad view on my stage by
    placing 4 sprites on the stage with the same 3D cast member. I then
    apply a behaviour script that initalizes the 4 sprites in their
    correct positions and sets up the 4 different camers as follows...
    topView
    perspView
    sideView
    frontView
    ... however, doing so, the script gets called only on the
    first sprite and the other 3 sprites do not react with the
    behaviour script. As a matter of fact, I also have a sendAllSprites
    command inside the behaviour script and it does not send the
    message to all of the sprites with that piticular behaviour script.
    Is the reason why the behaviour script does not work on the other 3
    sprites because I need a diferent 3d castmember for each
    sprite?

    Hello,
    You don't need to place 4 sprites of the same W3D cast member
    in the score.
    1- Place a single occurence (sprite) of the W3D cast member
    in the score
    2- Create 4 cameras either in your 3D package or by code
    using member.newCamera():
    topView
    perspView
    sideView
    frontView
    3- Set the rect of the four cameras so they correspond to
    each corner of the screen
    4- Use sprite.addCamera() in order to add the four cameras to
    the W3D sprite
    That's all you need.
    Best regards,
    Karl Sigiscar.
    http://www.chromelib.com

  • Get called back as the data table is being rendered

    Hello:
    I have a datatable, like this:
    <t:column>
    <f:facet name="header">
    <t:outputText value="Process" style="font-weight: bold" />
    </f:facet>
    <t:commandButton id="ProcessButton" styleClass="sbttnHeader"
    actionListener="#{ProcessQueueBBean.processAction}"
    value="#{ProcessQueueBBean.processButtonNames[dbRow.status]}" >
    </t:commandButton>
    </t:column>I need to get called when the data table rows are being rendered. The reason I need to get called is that some columns have conditional data depending on the other values in the same row
    Any ideas?
    Thanks for your help

    I don't know i've never tried this in the way you need it but let me know if it works.. in the <column tag render=> I know you can check infor
    so have render = "#{row.num+row.othernumber >0}"
    that probably will work .. like i said I never tried it in a table column.. Let me know if it works

  • Sessions/connections gets hang during update and select operations.

    A table with 3 million records, which has customer details data.
    Everyday application is executing select and update queries on that table.
    Sessions/connections gets hang during update and select operations.
    After checking ADDM report, following are the findings:
    Please suggest the solutions
    Findings and Recommendations
    Finding 1: Row Lock Waits
    Impact is 145.22 active sessions, 99.77% of total activity.
    SQL statements were found waiting for row lock waits.
    Recommendation 1: Application Analysis
    Estimated benefit is 145.22 active sessions, 99.77% of total activity.
    Action
    Significant row contention was detected in the TABLE
    "AVAYA.AIRTEL_CUSTOMER_MASTER" with object ID 82155. Trace the cause of
    row contention in the application logic using the given blocked SQL.
    Related Object
    Database object with ID 82155.
    Rationale
    The SQL statement with SQL_ID "974vg65j29pmv" was blocked on row locks.
    Related Object
    SQL statement with SQL_ID 974vg65j29pmv.
    UPDATE AVAYA.AIRTEL_CUSTOMER_MASTER SET PREFERRED_LANGUAGE = :1
    WHERE ( AIRTEL_CUSTOMER_MASTER.MSISDN = :2 )
    Rationale
    The session with ID 50 and serial number 34525 in instance number 1 was
    the blocking session responsible for 100% of this recommendation's
    benefit.
    Symptoms That Led to the Finding:
    Wait class "Application" was consuming significant database time.
    Impact is 145.22 active sessions, 99.77% of total activity.
    Finding 2: Top SQL Statements
    Impact is 46.39 active sessions, 31.87% of total activity.
    SQL statements consuming significant database time were found. These
    statements offer a good opportunity for performance improvement.
    Recommendation 1: SQL Tuning
    Estimated benefit is 46.39 active sessions, 31.87% of total activity.
    Action
    Investigate the UPDATE statement with SQL_ID "974vg65j29pmv" for
    possible performance improvements. You can supplement the information
    given here with an ASH report for this SQL_ID.
    Related Object
    SQL statement with SQL_ID 974vg65j29pmv.
    UPDATE AVAYA.AIRTEL_CUSTOMER_MASTER SET PREFERRED_LANGUAGE = :1
    WHERE ( AIRTEL_CUSTOMER_MASTER.MSISDN = :2 )
    Rationale
    The SQL spent only 0% of its database time on CPU, I/O and Cluster
    waits. Therefore, the SQL Tuning Advisor is not applicable in this case.
    Look at performance data for the SQL to find potential improvements.
    Rationale
    Database time for this SQL was divided as follows: 100% for SQL
    execution, 0% for parsing, 0% for PL/SQL execution and 0% for Java
    execution.
    Rationale
    SQL statement with SQL_ID "974vg65j29pmv" was executed 212 times and had
    an average elapsed time of 2494 seconds.
    Rationale
    Waiting for event "enq: TX - row lock contention" in wait class
    "Application" accounted for 100% of the database time spent in
    processing the SQL statement with SQL_ID "974vg65j29pmv".

    **addm report **
              ADDM Report for Task 'TASK_7526'
    Analysis Period
    AWR snapshot range from 5003 to 5004.
    Time period starts at 08-JUL-13 11.00.27 AM
    Time period ends at 08-JUL-13 12.00.45 PM
    Analysis Target
    Database 'AVAYADB' with DB ID 2878789264.
    Database version 11.2.0.1.0.
    ADDM performed an analysis of instance avayadb, numbered 1 and hosted at
    NG-LA04AVAYA01.
    Activity During the Analysis Period
    Total database time was 563062 seconds.
    The average number of active sessions was 155.63.
    Summary of Findings
       Description         Active Sessions      Recommendations
                           Percent of Activity
    1  Row Lock Waits      155.44 | 99.88       1
    2  Top SQL Statements  26.67 | 17.14        1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              Findings and Recommendations
    Finding 1: Row Lock Waits
    Impact is 155.4 active sessions, 99.88% of total activity.
    SQL statements were found waiting for row lock waits.
       Recommendation 1: Application Analysis
       Estimated benefit is 155.44 active sessions, 99.88% of total activity.
       Action
          Significant row contention was detected in the TABLE
          "AVAYA.AIRTEL_CUSTOMER_MASTER" with object ID 82155. Trace the cause of
          row contention in the application logic using the given blocked SQL.
          Related Object
             Database object with ID 82155.
       Rationale
          The SQL statement with SQL_ID "974vg65j29pmv" was blocked on row locks.
          Related Object
             SQL statement with SQL_ID 974vg65j29pmv.
             UPDATE AVAYA.AIRTEL_CUSTOMER_MASTER SET PREFERRED_LANGUAGE = :1
             WHERE  ( AIRTEL_CUSTOMER_MASTER.MSISDN = :2 )
       Rationale
          The session with ID 167 and serial number 6084 in instance number 1 was
          the blocking session responsible for 100% of this recommendation's
          benefit.
       Symptoms That Led to the Finding:
          Wait class "Application" was consuming significant database time.
          Impact is 155.45 active sessions, 99.88% of total activity.
    Finding 2: Top SQL Statements
    Impact is 26.66 active sessions, 17.14% of total activity.
    SQL statements consuming significant database time were found. These
    statements offer a good opportunity for performance improvement.
       Recommendation 1: SQL Tuning
       Estimated benefit is 26.67 active sessions, 17.14% of total activity.
       Action
          Investigate the UPDATE statement with SQL_ID "974vg65j29pmv" for
          possible performance improvements. You can supplement the information
          given here with an ASH report for this SQL_ID.
          Related Object
             SQL statement with SQL_ID 974vg65j29pmv.
             UPDATE AVAYA.AIRTEL_CUSTOMER_MASTER SET PREFERRED_LANGUAGE = :1
             WHERE  ( AIRTEL_CUSTOMER_MASTER.MSISDN = :2 )
       Rationale
          The SQL spent only 0% of its database time on CPU, I/O and Cluster
          waits. Therefore, the SQL Tuning Advisor is not applicable in this case.
          Look at performance data for the SQL to find potential improvements.
       Rationale
          Database time for this SQL was divided as follows: 100% for SQL
          execution, 0% for parsing, 0% for PL/SQL execution and 0% for Java
          execution.
       Rationale
          SQL statement with SQL_ID "974vg65j29pmv" was executed 707 times and had
          an average elapsed time of 794 seconds.
       Rationale
          Waiting for event "enq: TX - row lock contention" in wait class
          "Application" accounted for 100% of the database time spent in
          processing the SQL statement with SQL_ID "974vg65j29pmv".
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              Additional Information
    Miscellaneous Information
    Wait class "Commit" was not consuming significant database time.
    Wait class "Concurrency" was not consuming significant database time.
    Wait class "Configuration" was not consuming significant database time.
    Wait class "Network" was not consuming significant database time.
    Wait class "User I/O" was not consuming significant database time.
    Session connect and disconnect calls were not consuming significant database
    time.
    Hard parsing of SQL statements was not consuming significant database time.

  • Desktop Manager gets stuck during backup.

    Desktop Manager keeps getting stuck during device backup. At the "Messages" backup stage it gets about 80% of the way through then just hangs there. It makes no further progress and thus does not complete a backup.
    How do I resolve this issue?
    Desktop Manager 4.6, Blackberry Bold, Windows XP. 

    using the advanced options, try and backup only the Messages database.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • Jsf and getter call

    hi
    I made a jsf page with a selectOneMenu component. here is the code:
    <h:form>
    <f:view>               
         <h:selectOneMenu id="pippo" immediate="true">     
             <f:selectItems value="#{user.items}" />               
         </h:selectOneMenu>               
    </f:view>
    </h:form>the getter method for 'items' add "select" to the menu
    here is the code
    public SelectItem[] getItems() {
         System.out.println("getItems");
         items[0] = new SelectItem("-1", "select");
         System.out.println("end getItems");
         return items;
    }but if I check the log i can see 2 calls for getItems method
    and these 2 calls are in the same fase (render response)
    for example while loading the page:
    [cut]
    09:36:01,046 INFO [STDOUT] BeforePhase: RENDER_RESPONSE 6
    09:36:02,953 INFO [STDOUT] getItems
    09:36:02,953 INFO [STDOUT] end getItems
    09:36:02,953 INFO [STDOUT] getItems
    09:36:02,953 INFO [STDOUT] end getItems
    09:36:02,968 INFO [STDOUT] AfterPhase: RENDER_RESPONSE 6
    [cut]
    why 2 calls?
    i really don't understand.
    what if I have an heavy getter with db connection and so on ?
    thansk a lot!

    giunad wrote:
    even if I don't figure why I have 2 calls in the same phase (the link you sent me talks about several calls during several phases..) ,
    where should I put the logic code?Definitely not in the getter. Or you must introduce lazy loading in there. Usual places are the constructor or initialization block of the bean.
    for example 2 selectOneMenu on cascade where the content of the second menu is function of the first selection ?
    ie country and state, parent and son, category and subcategory.. and so on.In this case, you may find this article useful: [http://balusc.blogspot.com/2007/10/populate-child-menus.html]

  • CommandButton actions not getting called when "disabled" element present

    MyObjectForm.jsp contains commandButtons for "add", "update" and "delete" that are enabled/disabled according to the value of the bound id field.
    MyObjectForm.jsp
    <html>
    <body>
    <f:view>
    <h:form id="create">
    <h:inputHidden id="id" value="#{myObjectBean.id}" />
    <h:panelGrid columns="3" border="0">
    Name: <h:inputText id="name"
    requiredMessage="*"
    value="#{myObjectBean.name}"
    required="true"/>
    <h:message for="name"/>
    // other fields
    <h:commandButton id="add"
    value="Add" disabled="#{myObjectBean.id!=0}"
    action="#{myObjectBean.add}"/>
    <h:commandButton id="update"
    value="Update" disabled="#{myObjectBean.id==0}"
    action="#{myObjectBean.update}"/>
    <h:commandButton id="delete"
    value="Delete" disabled="#{myObjectBean.id==0}"
    action="#{myObjectBean.delete}"/>
    <h:commandButton id="delete2"
    value="Delete (no disabled element)"
    action="#{myObjectBean.delete}"/>
    </h:form>
    </f:view>
    </body>
    </html>In its managed bean, MyObjectBean, if an id parameter is found in the request, the record is read from the database and the form is populated accordingly in an annotated @PostConstruct method:-
    MyObjectBean.java
    public class MyObjectBean {
    private int id;
    /** other properties removed for brevity **/
    public MyObjectBean() {
    LOG.debug("creating object!");
    @PostConstruct
    public void init() {
    String paramId = FacesUtils.getRequestParameter("id");
    if(paramId!=null && !paramId.equals("")){
    getById(Integer.parseInt(paramId));
    LOG.debug("init id:"+id);
    }else{
    public String delete(){
    LOG.debug("delete:"+id);
    MyObjectVO myObjectVO = new MyObjectVO();
    ModelUtils.copyProperties(this, myObjectVO);
    myObjectService.removeMyObjectVO(myObjectVO);
    return "";
    public String add(){
    LOG.debug("add");
    MyObjectVO myObjectVO = new MyObjectVO();
    ModelUtils.copyProperties(this, myObjectVO);
    myObjectService.insertMyObjectVO(myObjectVO);
    return "";
    public String update(){
    LOG.debug("update:"+id);
    MyObjectVO myObjectVO = new MyObjectVO();
    ModelUtils.copyProperties(this, myObjectVO);
    myObjectService.updateMyObjectVO(myObjectVO);
    return "";
    public void getById(int id){
    MyObjectVO myObjectVO= myObjectService.findMyObjectById(id);
    ModelUtils.copyProperties(myObjectVO, this);
    /** property accessors removed for brevity **/
    }When no parameter is passed, id is zero, MyObjectForm.jsp fields are empty with the "add" button enabled and the "update" and "delete" buttons disabled.
    Completing the form and clicking the "add" button calls the add() method in MyObjectBean.java which inserts a record in the database. A navigation rule takes us to ViewAllMyObjects.jsp to view a list of all objects. Selecting an item from the ViewAllMyObjects.jsp list, adds the selected id to the request as a paramter and a navigation rule returns us to MyObjectForm.jsp, populated as expected. The "add" button is now disabled and the "update" and "delete" buttons are enabled (id is no longer equal to zero).
    Action methods not getting called
    This is the problem I come to the forum with: the action methods of commandButtons "update" and "delete" are not getting called.
    I added an extra commandButton "delete2" to the form with no "disabled" element set and onclick its action method is called as expected:-
    commandButton "delete2" (no disabled element) - works
    <h:commandButton id="delete2"
    value="Delete (no disabled element)"
    action="#{myObjectBean.delete}"/>Why would "delete2" work but "delete", not?
    commandButton "delete" (disabled when id is zero) - doesn't work
    <h:commandButton id="delete"
    value="Delete" disabled="#{myObjectBean.id==0}"
    action="#{myObjectBean.delete}"/>The obvious difference is the "disabled" element present in one but not the other but neither render a disabled element in the generated html.
    Am I missing something in my understanding of the JSF lifecycle? I really want to understand why this doesn't work.
    Thanks in advance.
    Edited by: petecknight on Jan 2, 2009 1:18 AM

    Ah, I see (I think). Is the request-scoped MyObjectBean instantiated in the Update Models phase? If so then the id property will not be populated at the Apply Request Values phase which happens before this, making the commandButton's disabled attribute evaluate to true.
    Confusingly for me, during the Render Response phase, the id property is+ set, so the expression is false (not disabled) giving the impression that the "enabled" buttons would work.
    So, is this an flaw in my parameter passing and processing code or do you see a work around?

Maybe you are looking for