JSF - UICommand component not rendering properly

2:12 PM 7/11/2007
by Nirav Assar
Overview
It was discovered that in certain situations a UICommand component does not bind properly to its associated action method in the managed bean. The symptoms of this situation occur when you have a page with an action, and you click the action and nothing occurs. The page seems like it submits, but no code inside the action method of the managed bean gets executed and no errors are generated in the console!
Problem
The problem arises when you have a managed bean in request scope and you have a UICommand, either a commandLink or commandButton, associated to the bean. In addition this UICommand component has a rendered attribute tag (boolean value) that uses a managed bean method to tell it whether is renders or not. Even if the component gets rendered to the screen, the component does not get binded to the action method in the request scoped bean. This is a problem with JSF and may be due to the fact that the component gets rendered, but since the bean is not created until a request is submitted, the component never gets binded to an action. Therefore, nothing in the action method ever gets executed.
Analysis
Thus is seems like if you want to dynamically render a submit type component, such as a button or a link, you cannot effectivley do that with a bean in request scope. You'll have to place it session scope, which will work fine. Another option is to render the buttons all the time, but based on some scenario, using the "disabled" attribute to prevent a user from using the action. The "disable" attribute can access a boolean method in the managed bean.
You could also use Javascript to hide the already rendered button on certain circumstance. However this would require javascript knowing the state of the domain objects/and or managed bean state.
References:
http://forum.java.sun.com/thread.jspa?threadID=5127437&messageID=9461810

RamondDeCampo hit the nail on the head. If the bean used for the rendered attribute is request scope and the value differs between requests, you're going to see this type of behavior.
Search the forums, there have been many similar reports as well as suggested solutions.

Similar Messages

  • MyFaces schedule component is not rendering properly.

    Hello everybody.
    I am trying to use the Tomahawk schedule component with Jdeveloper 10.1.3.2. It is not rendering properly.
    The schedule entries and the header line are mising for weeks.
    I removed the default-render-kit-id element from the faces-config.xml. Nothing changed.
    Used versions:
    - Jdeveloper 10.1.3.2
    - myFaces 1.5.1
    - tomahawk 1.5.1
    Any suggestions?
    Thanks.

    Hi,
    did you post this question on the MyFaces open source list?
    Frank

  • Command links are not rendering properly in panel collection toolbar facet

    Hi
    I am using jdev 11.1.2.3.0
    I added toolbar component to the toolbar Facet of panel collection component .
    Under the tool bar I added two command link components with name create and delete,
    the problem is at run time the buttons are not rendering properly,they are hiding,instead of links
    this symbol(>>) is displaying.
    On clicking the symbol,I am able to see the links,I used <af:spacer> after the links but not worked.
    what I have to do to render the links properly in the panel collection toolbar facet

    Hi Timo
    This is the code and I am using 11.1.2.3.0
         <f:facet name="toolbar">
                    <af:toolbar id="t1">
                            <af:commandImageLink icon="#{resource['images:create.png']}" text="Create" id="cbInsert">
                            <af:showPopupBehavior popupId="p1"/>
                        </af:commandImageLink>
              </af:toolbar>

  • Command links are not rendering properly in the toolbar facet of panel collection

    Hi
    I am using jdev 11.1.2.3.0
    I added toolbar component to the toolbar Facet of panel collection component .
    Under the tool bar I added two command link components with name create and delete,
    the problem is at run time the buttons are not rendering properly,they are hiding,instead of links
    this symbol(>>) is displaying.
    On clicking the symbol,I am able to see the links,I used <af:spacer> after the links but not worked.
    what I have to do to render the links properly in the panel collection toolbar facet

    Hi Timo
    This is the code and I am using 11.1.2.3.0
         <f:facet name="toolbar">
                    <af:toolbar id="t1">
                            <af:commandImageLink icon="#{resource['images:create.png']}" text="Create" id="cbInsert">
                            <af:showPopupBehavior popupId="p1"/>
                        </af:commandImageLink>
              </af:toolbar>

  • TaskMenu is not rendering properly using rendered attribute withSecurityCxt

    Hi All,
    I am trying to use this code rendered="#{!(securityContext.userInRole['ZPM_ENT_MARKETING_BUDGET_MANAGER_DUTY'])}" in the itemNode UI component of my Budget_taskmenu.xml. But UI is not rendering it properly.
    I have checked the same code in the backing bean and it is returning true and false as per expectation but at UI level my menu is not coming properly (it is coming as #{null} in place of name in menu).
    But same piece of code is working fine in my .jsff file where I am doing the same check in rendered attribute.
    rendered="#{!(securityContext.userInRole['ZPM_ENT_MARKETING_BUDGET_MANAGER_DUTY'])}"
    Any Suggestion.
    Regards,
    Sarvesh Kaushik

    Hi Frank,
    Thanks for your reply.
    But I found the actual root cause of the issue.
    There is nothing wrong in the expression rendered="#{!(securityContext.userInRole['ZPM_ENT_MARKETING_BUDGET_MANAGER_DUTY'])}".
    The actual issue with my code was one label name was wrong bcoz of which menu was not rendering properly.
    Thanks and Regards,
    Sarvesh Kaushik

  • CQ page is not rendering properly. It is not rendering HTML. It is showing HTML source code as is.

    On some of the pages, I am getting this weird behavior wherein page is not rendering properly. It is showing HTML source code as is. Could you please help me out? What could be the issue? And how can we get rid of the same?

    Check your component jsp page. it is possible that it is just plan file without directives <@ or you might have miss to close tag which is creating source as text to render
    Paste your jsp code in case you need further help
    Thanks,
    Ajit

  • Why are previews in Bridge blurry (not rendering properly)?

    Why are previews in Bridge blurry (not rendering properly)?
    I found a simple answer to this question: control click on the thumbnail and select "purge cache for selection"
    After years of intermittently having this problem, this solved the issue. I had just finished a fresh install of main sys hd (new hd) and first time opening bridge encountered this issue again after not having the problem for a few years.
    Hope this helps others.  

    Why are previews in Bridge blurry (not rendering properly)?
    I found a simple answer to this question: control click on the thumbnail and select "purge cache for selection"
    After years of intermittently having this problem, this solved the issue. I had just finished a fresh install of main sys hd (new hd) and first time opening bridge encountered this issue again after not having the problem for a few years.
    Hope this helps others.  

  • The drop-down menu is not rendered properly with iframe where a pdf is embedded

    I want to embed a pdf in a webpage, where the drop-down menu needs to be displayed on the top of the pdf. I am using iframe to embed the pdf.
    The drop-down menu is not properly rendered (border-radius and box-shadow) in Firefox at http://mysite1.webege.com/test.html.

    *[https://bugzilla.mozilla.org/show_bug.cgi?id=779435 bug 779435] - the drop-down menu is not rendered properly with iframe where a pdf is embedded
    It is usually best to attach a minimal test case to the bug report.<br />
    In that case the code doesn't get lost if the page is removed from the server.

  • Crystal report not rendering properly on Mozilla ?

    Hi,
    We are using VS2008,CR2008 on server 2012. In Chrome & IE CR working properly.
    But when I am using Mozilla with updated version not rendering properly.

    This is an old version of this issue that might give some insight:
    *[http://stackoverflow.com/questions/19768144/crystal-report-v10-5-toolbar-not-visible-on-firefox-but-visible-on-ie-and-chrome]
    also (but I am not sure what version you are using): " CR 10.5 is one of the versions that was not updated to support IIS7." from [http://www.experts-exchange.com/Database/Reporting/Crystal_Reports/Q_28350929.html]
    It might be ideal to ask a developer in stackoverflow.com or file a bug with webcompat.com for expert investigation for crystal reports. I am sorry I could not be more helpful.

  • PDFs not rendering properly with hpeprint or AirPrint

    Both my iPhone 4 and my iPad 2 connect to my LaserJet Pro 400 color MFP M475dn (connected via ethernet cable to an Apple Airport Extreme) and print most things just fine. However, when I use either hpeprint or Apple AirPrint options to attempt to print, PDFs are NOT rendered properly... the graphic logos appear ok on a PDF document, but text is a complete, incomprehensible mess. I have the latest firmware and software. Any ideas? Despite all the latest firmware and software, could it be a driver issue?Thanks in advance.

    Hi CTU_Agent, 
    Your LaserJet Pro 400 color MFP M475dn is a commercial product. I suggest posting in the forum for HP Business Support for a better chance at finding a prompt solution.
    You may find the commercial Laserjet board here.
    http://h30499.www3.hp.com/t5/Printers-LaserJet/bd-p/bsc-413
    Hope you find the help you need;
    RobertoR
    Remember ▼
    You can say THANKS by clicking the KUDOS STAR. If my suggestion resolves your issue Mark as a "SOLUTION" this way others can benefit Thanks in Advance!

  • Stylesheet not rendering properly on child site

    I have a stylesheet in the Style Library of a parent publishing site.  A Master Page in a child site is using the stylesheet, but the styles are not rendered properly.  I copied the same stylesheet and used it in an ASP.NET web form Master Page
    and the styles rendered properly.  I then created a basic HTML page and used that stylesheet and it worked out fine.  Why won't it work in SharePoint 2013?  Is there a clash with the default styles and can I disable the default styles?
    Thanks,
    Mike

    Hi,
    To use an External Stylesheet, you can reference it as what the links below suggests:
    http://techtrainingnotes.blogspot.jp/2012/05/adding-javascript-and-css-to-sharepoint.html
    https://www.nothingbutsharepoint.com/sites/eusp/Pages/Understanding-SharePoint-CSSLink-and-how-to-add-your-custom-CSS-in-SharePoint-2010.aspx
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Fonts not rendering properly. Am I missing something?

    I have PS Elements 10 for Mac. I've been trying to figure out why my text is not rendering properly. I type out a word and although caps lock is OFF, the text shows up in all caps. Also, the spacing between letters is wide. I've been trying to search through help and options, but can't find anything. Does anyone have any suggestions on what could be wrong?

    At the far left of the options bar is a tiny triangle. Click it and choose Reset Tool from the popout menu.

  • Transitions not rendering properly - corruption

    My transitions are not rendering properly when I try layering two. It was working fine before, now suddenly it is not. I am using FCP 6 and I have Slick FX add ons. The add on was working fine before. I've tried trashing the FCP preferences but to no avail.
    See here for a sample -
    http://metrosi.com/Picture3.png
    Any other suggestions? Please help!
    Jennifer

    Seems that the problem is with specific Slick FX transitions. Ones under Slick FX Transitions - 3D.
    Things tried....
    Tried using the Rotate transition in another location, same issue. Looked ok in the timeline prior to rendering.
    There is a Slick FX transition in the timeline that appears to be rendering properly...Cylinder. Put another in a different part of the timeline and it rendered fine (Spin Zoom)
    Tried another 3D one (Spherize) -looks fine in the timeline before rendering...rendered fine.
    Tried another 3D one (Tube) - did not work.
    Tried adding Rotate in after adding others...still not working.
    Turnstile not working also (opened a new sequence and tried adding it)
    Twist not working either.
    So...not sure what to do about it!

  • Graphs not rendering properly

    I am using Discoverer 4i with Oracle Applications 11i
    Hosted on Linux Redhat
    All my graphs that come with Oracle BI Intelligence workbooks are Not rendering properly on the client side (Graphs come as .gif from the server). The[b] graphs display in dark green and black color (and not readable).
    e.g.
    Customer Intelligence (responsibility) -> Customer Intelligence Overview
    Supplier Performance (responsibility) -> Supplier Performance
    Any idea why / fix for this issue?
    Thanks in advance for your help.

    For Your Info: I found the fix on Metalink Note ID: 341637.1

  • I had designed a Web App and tested on Firefox 18, 19, 20 and now when i'm checking it on 21 version it's not rendering properly. Now tell me what should i do.

    I had designed a Web App and tested on Firefox 18, 19, 20 and now when I'm checking it on 21 version it's not rendering properly. Now tell me what should i do.

    Hi charlesmoizeau, why do you want to install Firefox 18? To be compatible with a particular website or add-on? There might be a better workaround, but without the details, it's hard to say.
    See this help article: [[Install an older version of Firefox]]. And be aware that Mozilla discloses [https://www.mozilla.org/security/known-vulnerabilities/firefox.html security flaws] after each new release.

Maybe you are looking for

  • Reference to FLVPlayback Skin object

    So I have a problem with the FLVPlayback. I'm using a customized version of the SteelOverPlaySeekMute skin, and it works very well. The only problem is, that Macromedia coded the FLVPlayback.skinAutoHide poorly, in that it only hides when an onRollOu

  • How can I send digital Output at faster rate than 1ms period?

    Hi! I'm using a PCI-6229 to send digital outputs to a power source and I need to send n different numbers in binary code. I need this to be periodic so I've used a while structure and the diferent numbers as the different components of an array. In t

  • Mapping in Services Interface with multiple operation... ?

    Hi ALL, I have a SOAP to SOAP scenario here Just PI 7.1 with EHP1 acting a bus no mapping nothing . 1) I have the WSDL file from the receiver system with multiple synchronous operations  in it ..i imported the wsdl as External Definition .. i used th

  • Dimensions width and length of a book in iBooks Author

    How I can set the width and size throughout the pages and therefore the book in iBooks Author? IPad and need to export it to PDF for printing with specific steps. Any help please?

  • Landed Cost :   Journal Entry

    Hello every body. Something rare is happening to me when I try to make a Landed Cost Journal Entry. Normally, when I try to do this, the journal entry it comes with just One account (inventory account), but this especial one is coming with 2 accounts