Howto render a UI component depending on a specific value

Hi all,
I'm using jdev 10.1.3.4 and built a small ADF BC / JSF application.
I try to render a UI component (selectmanylistbox) depending on a value of another UI component which is represented by a session bean attribute.
I implemented a class "public class OnPageLoadBackingBeanBase implements PagePhaseListener" and extended my backing bean from this class as described by Duncan Mills.
Further on I overwrote the method "onPagePreRender" and tried to get the value from one UI component by his getter and set the rendered value by using that getter.setrendered(...) method within the backing bean (request scope). Additionally I call "AdfFacesContext.getCurrentInstance().addPartialTarget(this.getPanelGroup2())" but I'm not sure if it's really necessary.
After a postback it works but not during the initial invocation of that page. It's seems like as the UI components are not reachable by their getter and setter in that moment?!
Does someone has an idea how to get it.
Thanks for advice.
Ralf
Edited by: user11987218 on Feb 15, 2010 7:34 AM

Hi,
why don't you use EL on the UI component "render" property and reference the session bean attribute. If this then returns false then the component doesn't render
Frank

Similar Messages

  • Dynamic image displays depending on yes / no value

    Dynamic image displays depending on yes / no value    
    I´d like to have a image showing, depending on a specific value (y/n)
    ..sorry need some help.
    I can´t get it workin.....
    <img <?php $status="n";
    if ($status == "y") {
      echo 'src="stecker_on.png" alt="yes"';
    } else {
      echo 'src="stecker_off.png" alt="no"';
    } ?> height="71" width="101" />
    The image ist not showing... ideas ?
    All I get ist some text showing:
      height="71" width="101" />
    MANY THANKS !!!!

    Presumably you mean this -
    http://mediaconsults.de/1test/steckertest.php
    And it's not clear what that is going to show me.  Looking at the code on the page -
    <html>
    <head>
    <title>Unbenanntes Dokument</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    MM_reloadPage(true);
    //-->
    </script>
    </head>
    <body background="test%20png.png">
    <div id="Layer1" style="position:absolute; left:1290px; top:246px; width:95px; height:112px; z-index:1"><img src="stecker_off.png" alt="no"height="101" width="71" /></div>
    </body>
    </html>
    I would advise you the following:
    1.  Put a valid and complete doctype on that page!
    2.  Get rid of the resize if NN4 javascript - it hasn't been needed for nearly a decade.
    3.  Fix your image code (note the missing space after "no"!
    4.  1290px is way too wide unless you want lots of people scrolling right to see things.

  • Development Component Dependency in CM Service

    Dear All..
    We are using CM Service to tr transport Web Dynpro Java object into our target system.
    But we are suffering from the DC(Development Component) Dependency.
    Let me explain the situaiton in the below.
    <The First>
    Like the ERP ABAP System, we can develop and change DC which is referenced by another DC.
    One developer developed A DC and another developer developed B DC.
    B DC is referenced by A DC in Model view in the NWDS(Netweaver Development Studio).
    In this situation if A DC should be transported to our production system,
    we have to check-in and activate and release activity.
    By releasing A DC,the B DC is packed in a DIP(Development Infrastructure Package) file together because of
    dependency between A DC and B DC.
    Is it right?
    If it is right,what should I do if the B DC have a some problem and if I don't want to transport it.
    Of course If the developer which develops B DC does not activate after check-In,
    the B DC which have a problem in that time is not packed in a DIP file.
    But the developer which devlops B DC also have to test and activate to transport into our QAS system before deploying
    into our production system.
    This is the our first problem.
    <The Second>
    So far as I know the deployment process is composed of like this.
    Stop Applicaiton -> lock application -> deploy -> Start Application.
    Is it right?
    I found out that the time for locking application depends on the applicaiton dependency.
    For example If we deploy some application having much dependency with other application,the system first try to stop whole
    related applicaiton and then deploy and start application again.
    I think this kind of situation is natural.
    Unfortunately our some application is referenced by all applicaiton(For example the application which is used by other applicaiton commonly).
    So If we change this common application and deploy,our whole applicaiton is stopped and started again.
    In this situation are there any useful deployment method or development method(minimization of application dependency) to prevent
    customer affection when we deploy web dynpro application?
    Regards...

    Thanks for your reply.
    DIP is a unit which we can transport our DC(Development Component) into our production system using CTS+.
    You can find more detail information in the document.
    "How To... Configure CM Services in SAP NetWeaver 7.3 and up"
    Also regarding second question,as I said already it is natual but I'm just searching for the best reference to deploy webdyn  object which have a many dependency.
    For example,manually stopping before we deploy.
    Regards...

  • Component dependency and sld dependency

    hi all,
    i need to create,component dependency and sld dependency.how to create and wht is the use of these dependencies.
    regards,
    AVR

    Hi,
    it's explained here:
    http://help.sap.com/saphelp_nw04/helpdata/en/44/63977c40b54ddfe10000000a1553f7/frameset.htm
    Regards
    Patrick

  • How to get BOM component dependant demand whitout having BOM header in APO?

    Hello,
    I would like to know if it is possible to get BOM component dependant demand in APO without having BOM header in APO.
    If someone already did that, please thanks to share your experience.
    Thanks a lot and best regards.
    M.Niang

    Hi Niang,
    There is an functionality in APO - DP module called "Forecasting with Bills of Material". You need create DP-BOM (PDS/PPM) from R/3.
    Please refer the SAP help link for details.
    http://help.sap.com/saphelp_scm50/helpdata/en/8f/9d6937089c2556e10000009b38f889/frameset.htm
    Hope this is what you are looking for.
    Regards,
    Nawanit

  • Does Flash player render font-types differently depending on platform?

    We published a captivate course that uses all sans serif fonts. The fonts appear as expected when tested in Firefox and Safari on OS X 10.8.5. However, when tested in IE8 on Windows 7 one of the text captions appears as a serif font. Does Flash player render font-types differently depending on platform?

    Hi,
    I did as you suggested. The repost is in the "PDF language" forum, and we have an indication that the pdf file might be ambiguous as to the choice of a transparency blending space:
    http://forums.adobe.com/thread/714292
    However, in the meantime, I noticed that this issue is not (or hardly) noticeable if the file is opened as the first file in the session. However, as soon as one file (the same or another one) has been opened (and possibly closed - does not matter as long as the Reader stays open) and the file in question is loaded by any means (drag&drop, File-Open, Explorer double-click), it becomes really ugly. I guess this is why many people in the discussion boards have a hard time reproducing this issue, leading to the assumption that it is very system specific. I assume it is quite general.
    In any case, if a file looks differently depending on whether another file has been open before, this is DEFINITELY a thing to look into for the Reader guys, wouldn't you say?
    Best regards,
    bersbers

  • Set a component visible based on a value of a LOV

    Hi all,
    I am using Jdeveloper 11.1.1.2 and ADFBC.
    I have a panelFormLayout with some fields.
    I have a LOV and I want to set the property visible of a field based on the value of the LOV.
    For example: if LOV = First (value =1) field = visible, if LOV = Second (value =1) field = not visible
    I have created a backing bean of the page with a method that return a boolean, but I don't know how to get the value of the LOV.
    What have I to use? ADFUtils? JSFUtils?
    Here there is my code:
    public class InsMovimento {
    private RichSelectOneChoice soc3;
    public void setSoc3(RichSelectOneChoice soc3) {
    this.soc3 = soc3;
    public RichSelectOneChoice getSoc3() {
    return soc3;
    public boolean isVisiblePanelLottoEScadenza(){
    boolean isVisible = false;
    // ... code to retrieve the value of the LOV
    return isVisible;
    Any suggestions?
    Thank you
    Andrea

    Hi,
    you have 2 options. For both options you need to set autosubmit=true on the LOV field and use the PartialTriggers property on the depedent fields to point to the ID of the LOV. Alo define a value change listener on the LOV field
    Option 1: Create a managed bean reference for the LOV using its binding property. Then, call getValue on it to get the component value
    Option 2: If the component is bound to ADF, you can read the value fom the ADF binding layer
    Option 1 is good to use if for example the "immediate" property on the LOV is set to true so you avoid required field validation problems if the dependent fields have no value though must have one. In this case using a ValueChangeListener on the LOV can be used to read the values, and set the boolean values in the managed bean
    Frank

  • Changing a row colour in JTable, depending on a column value

    Hi,
    I need assistance with the following:
    I need to change the colour of a row in a JTable, depending on a column value. I have been successful on changing one column's colour in each cell, depending on the value by using a CellRenderer extending DefaultTableCellRenderer.I am unable to set the other 2 columns's cell's depending on the first column value's.
    I would appreciate any help, source would be a bonus.
    Thx
    Charl

    Ok, here follows the code as requested. Note that this is the code setting each row in one of my columns depending on the value. Now i have to cgange column0 and column1 's foreground the same as what this column (column2) 's foreground is. Thx
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    class ColorizedCell extends DefaultTableCellRenderer {
    static Hashtable cache;
    static {
    cache = new Hashtable();
    cache.put ("Device Responding to Poll",Color.green);
    cache.put ("Wan link Recovered",Color.green);
    cache.put ("No Response to Device Poll",Color.yellow);
    cache.put ("Wan Link Failure",Color.red);
    cache.put ("Lan Link Failure down",Color.red);
    cache.put ("Device Down",Color.red);
    public Component getTableCellRendererComponent(JTable table,
    Object value, boolean isSelected,
    boolean hasFocus, int row, int column)
    JLabel label = (JLabel) super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
    label.setText((String)value);
    if(column == 2) {
    //setFont(bold);
    Color c = (Color)cache.get(value);
    label.setForeground(c);
    if (isSelected) {
    label.setOpaque(true);
    label.setBackground(Color.white);
    else {
    //setFont(plain);
    label.setForeground(Color.white);
    return label;
    }

  • Costing component allocation to CO-PA value field via SD invoicing

    Hi experts,
    Somewhere a setting must be made that allocates costing component amount to CO-PA value fields.
    I.e. this takes place when the CO-PA document is created belonging to the order/invoice created in SD.
    Will appreciate to learn a transaction code where this setting is made.
    BR,
    Niclas

    Hi,
    costing-based CO-PA:
    all values from billing documents flow to CO-PA based on KE4I T-code, quantities based on KE4M. If its necessary to reset some of the transferred values this can be done depending on the billing type using KE4W.
    All other values that are posted with a PAOBJNR as cost object (=direct postings) are processed by mapping the cost element number to a value field in T-code KEI2.
    Other values are settled to CO-PA by different settlement transactions (KEU5, KO88,...)
    Best regards, Christian

  • How do you output a field column depending on another fields value?

    when selecting a field in a query, how do you output it on its own column depending on another fields value?
    For example
    Select
    a.gross_vol as Gas_vol when a.Object_code = "GAS"
    a.gross_vol as Wat_Vol when a.object_code = "water"

    how do you output it on its own column depending on another fields value?Scalar subquery maybe?:
    michaels>  select (select ename from emp where empno = 7788) scott_ename,
           (select ename from emp where empno = 7839) king_ename
      from dual
    SCOTT_ENAM KING_ENAME
    SCOTT      KING 

  • Payroll: One Element Input Value dependent on Other Input Value

    Hi Guys
    Can we defined an input value in an element that is dependent on other input value. e.g. say when I am creating an entry to make accrual adjustments, converting 100 Annual Hours to 20 sick hours, I want users to enter 100 and 20 should be reflected automatically.
    Is this possible.

    I'm afraid you need a customization for this. I guess a forms personalization will not help you out. Or you enter it via an SIT (with the behavior stated), and you route that data to the element entry (via a user hook).

  • BPM with sofware component dependency issue

    Hi ,
      I have all abstract interfaces in the sotware component A and interface mapping,message mapping and BPM is in the Software component B.Software component B has the dependency with A.In my BPM container variables I am able to refer the abstract interfaces from the software component A.But in the transformertion step inside the bpm,eventhough the container variables and the souce , target messages interfaces refers the same interface and namespace it gives an error at design time. Is there any constraint in BPM ie: abstract interfaces which we have used in BPM should be in the same namespace where BPM resides.
    Thanks in Advance
    Regards,
    Ravi

    Ur integration process must be defined in SWC A.
    There is a constraint. From help.sap
    An integration process can only reference interfaces from its own software component version.
    Regards,
    Prateek

  • JSF render -Third party component

    Hai All
    I am having doubt regarding JSF Third party component like Jmaki ,MyFaces or something like that . How the third party component match with JSF life cycle even though there is no java classes for managing and rendering the Third party component . what i basically mean to say is if we use <h:inputText> in our JSF page , the inputText component will managed by many java class like UIInput.class and HtmlInputText and InputTextRender and so on. next if we use dojo.dropdowndatepicker ,there is no component for managing this component like UIDate, HtmlData .
    could you tell me how third party component working without any problem.
    Thanks for advance
    Selvakumar.k

    If you look in the jar files for the libraries, you will find a faces-config.xml file containing such configurations.

  • Howto install Related Content component on UCM 11g

    Hi,
    I did install URM 11g to test the Related Content component.
    Does the component also work with UCM 11g. Are there any special metafields required?
    Another problem is that I can't build the Related Content component, cause it is not listed in the URM ComponentWizard.
    Greetings
    Bodhy

    Hi Bodhy,
    Yes it does work with UCM 11g
    It is a little hidden but can be installed as follows
    Admin Server > Component Manager
    In the first paragraph click on the link to advanced component manager
    THen on the this page find the text
    "If you really wish to modify URM components from this page, please click _here_. " and click the link
    You should now find that the RelatedContent component can be enabled just for UCM.
    Please mark this one as answered (if it works of course) as it may well be useful to other people looking for this hidden feature!
    Tim

  • Conditionally render an adf component  based on the outcome of a message

    Hello,
    I have a jspx page with one panel box. Right above the panel box is the message tag that displays errors related to that page.
    How do I hide the panel box when I only want errors displayed?
    I tried the following code without success:
    To catch the error:
    JSFUtils.addFacesErrorMessage(JSFUtils.getStringFromBundle("System Error"));
    To display the error:
    *<af:messages/>*
    *<af:panelBox rendered="#{facesContext.messages == null}" />*
    This displays the error message (if there is an error) and hides the panel box. But when there's no error, the panel box is still hidden!!!
    Is there something missing?
    I'm using Jdev 10.1.3.4.
    Thanks in advance!
    Edited by: user643066 on Dec 19, 2008 3:34 PM

    Hello,
    try:
    *<af:panelBox rendered="#{facesContext.messages.hasNext}" />*
    (messages is of type java.util.Iterator)
    but i've also seen it working without! any panelBox: Just *<f:facet name="messages"><af:messages /></f:facet>* (like in the ADF tutorial)
    ..and populate the messages with JSFUtils.addFacesErrorMessage(..)
    I hope it helps,
    605963
    Edited by: user605963 on 19.01.2009 05:39
    Edited by: user605963 on 19.01.2009 05:59

Maybe you are looking for