Changing rendered attribute on postback and contained components

I am using:
Container: Apache Tomcat 6.0.24
JSF: Mojarra 1.2_12-b01-FCS
Facelets: 1.1.14
I have a search page with the search criteria at the top and the results at the bottom. For the results at the bottom, I'm using
<ui:fragment rendered="#{searchBean.hasResults}">
  [... various components that display results, like a graph component ...]
</ui:fragment>#{searchBean.hasResults} is false on the initial GET page load. The user types in the criteria, clicks "Search". On the page load, when components are created, hasResults is false. Then later the actionListener on the searchButton loads the results and sets #{searchBean.hasResults} to true. However, by the time Render comes around, the result components were not created, so they are not rendered.
How do I get around this? Is there a way to force controls to be created inside a fragment? Is my approach totally wrong? If so, what is a better approach?
I think I understand the whole page lifecycle well enough to know why things are going wrong, but I don't understand how to use it to get what I need to happen to happen.
Thanks in advance,
Chris

Hi, Raymond,
Thanks for your reply.
I tried the <h:panelGroup rendered="..."> as well as <c:if test="..."> and got the exact same behavior.
My thought was that it was not <ui:fragment> who's job it was to create the children, but rather the framework's "Restore View Phase" aka "Reconstitute Component Tree" that would not know to create the component. But I don't really understand the inner workings of how it knows which components to recreate. I know if I set a break point in one of the contained component constructors, the debugger breaks on the initial load, but it is never hit (and therefore never constructed) when I reload.
http://www.ibm.com/developerworks/library/j-jsf2/
"This phase of the lifecycle presents three view instances: new view, initial view, and postback, with each one being handled differently." [...] "In the case of a postback (the user returns to a page she has previously accessed), the view corresponding to the page already exists, so it needs only to be restored. In this case, JSF uses the existing view's state information to reconstruct its state."
If I am misunderstanding, and the view is really only created on the first load along with all of the components, then perhaps it is getting removed somewhere along the way or there is some other flag telling it not to render. Or maybe the view is only ever created once, and specific instances of the view are used for the page? If that were the case, why are the variables created in the constructor of the component getting cleared?
[In case it matters, I'm using PrimeFaces' LineChart component.]

Similar Messages

  • UIX 2.2.8: rendered attribute for onBlurValidater and onSubmitValidater?

    Hi, i want to create onBlurValidater and / or onSubmitValidater in my subclassed ui:dateField based on a new attribute.
    In UIX 2.2.8 there is no rendered attribute on the onXxValidator tags.
    Any idea how i can achive something like
    <ui:dateField>
      <onBlurValidater
           rendered="${uix.rootAttr.validatorType == 'blur'}">
        <date pattern="${uix.rootAttr.formatPattern}"/>
      </onBlurValidater>
      <onSubmitValidater
           rendered="${uix.rootAttr.validatorType == 'submit'}">
        <date pattern="${uix.rootAttr.formatPattern}"/>
      </onSubmitValidater>
    </ui:dateField>Thanks, Markus

    ping

  • BI 7.0- Filled Cube- Change Attribute as NAVIGATIONAL and for BEX

    Hi,
    We are on BI 7.0.
    I have the following task:
    Making an Attribute NAVIGATIONAL and making it available in the BEX for a Filled LIVE Cube.
    Questions:
    1.  Is it done through Remodelling or is it just change the attribute to NAV and add the Attribute under NAV attribute while creating Cube?  As said above this is a live cube with data in it.
    2.  Does it need any other adjustments or steps after this point.
    Steps to make a Attribute Naviagtional :-> Need Verification-
    1.  Change the Attribute from DIS to NAV in InfoObject maintenance.
    2.  I know there is the second step to add NAV attribute in Cube. I am doubtful, can someone confirm.  Under the InfoCube-> Change, add the attribute under NAV Attributes.
    Will appreciate your replies.
    -TC

    1. Is it done through Remodelling or is it just change the attribute to NAV and add the Attribute under NAV attribute while creating Cube? As said above this is a live cube with data in it.
    no need of remodeling, do it normally
    2. Does it need any other adjustments or steps after this point.
    activate yr Infoobject (its not gonna impact yr data modelling at all because NAV or Display setting is set for BEx)
    Steps to make a Attribute Naviagtional :-> Need Verification-
    1. Change the Attribute from DIS to NAV in InfoObject maintenance.
    2. I know there is the second step to add NAV attribute in Cube. I am doubtful, can someone confirm. Under the InfoCube-> Change, add the attribute under NAV Attributes.
    actually u could make attribute NAV in cube only when if its set so at infoobject level otherwise NAV checkbox wont be appeared in edit mode in infocube

  • Rendered attribute and actions

    If a component has rendered set to false, can it still perform an action? In other words, if I have a button which does something which I don't render for unauthenticated users, is there any way they will be able to save the html to disk, and modify the various form elements to perform that unauthorized action?

    @RaymondDeCamo
    I understand that this is true for most languages eg. PHP, however I was wondering if the server would still execute the action if the button that was bound to it had its rendered attribute set to false. It seems like the JSF people would put in that kind of functionality. In other words, are you sure JSF doesn't run the server-side checks itself?
    @BalusC
    I know the person won't be able to click on the button, but could they add in their own custom HTML into the form to perform the action?

  • I recently changed my internet service provider and my e mail address. I updated my iTunes account with the new e mail. Now I cannot get updates on my devices, because the login box on each still contains my old e mail. How can I change this please?

    I recently changed my internet service provider and my e mail address. I updated my iTunes account with the new e mail. Now I cannot get updates on my devices, because the login box on each device still contains my old e mail, and I do not know how to change this How can I change this please?

    Try tapping on the id in Settings > iTunes & App Stores on your devices (Settings > Store if they aren't on iOS 6+) and then log back in and see if that 'refreshes' the account on them.

  • How does attribute change run works for Aggregates and Master data?

    Hi
    Can anybody xplain how does the attribute change run works for Master data ?
    For e.g.
    There is 0spelling and it has master data
    On Day 1 there are 10 records
    day 2 it has 12 records
    so with attribute change run this 2 new records will get added....
    The values for this  12 records will added seperately in Data load
    Is this how it workss
    So how about Aggregates which has Master data.????

    for e.g.
    u have 0spelling whicha has attributes x,y and z on day 1 with 10 records
    so do ur aggregates on day1 with same values
    now on day2 u had new values of attributes y,z,s,d and new hierarchies and so u add new records
    with data load u will load the data with version M of modified and is not available for reporting
    If u do attribute change run then this modified version is activated to A i.e. active version .
    It will also do the change run alignment for Aggregate for new attribute values and new hierarchy values for aggregate.
    now in order for this data to be available for reporting u will need to do the roll up of aggregate.....
    if u roll up aggregate before attribute change run , new data is not avaialable for reporting
    if u roll up aggregate after attribute change run, then data is available for reporting
    if u dont roll up aggregate eventhough new data is in dataprovider, still new data will not be available for reporting.
    this is how it works

  • Problem with rerendering h:panelGrid with rendered attribute

    Hi,
    I am new to jsf and trying to learn its features as I find it easy and fast for development purpose.I have been developing with jsf for past few weeks and got myself stuck with a problem, tired of which I had to take the forum's help :). My problem is that I need to show/hide h:panelGrid using any of the options below:
    I tried putting the grid in the div and show/hide that div using javascript..works fine but the problem with this is, even when the div is hidden the components (h:inputText ) within the grid are submitted with the form, which should not be the case since its hidden (as with normal jsps).
    I worked around with rendered attribute of the grid, and show/hide this grid using the backing bean method which is actually a valueChangeListener of h:selectOneMenu and set the boolean for the rendered to true/false as required, the grid is hide/shown correctly, but this isn't giving me any solution because when I submit the form with this grid shown on the view, its components values are still not submitted :( I dont know whats the reason behind this or what clue am I missing here. I dont know why when the grid is shown correclty, its components values are not submitted.. hence not validated too..
    Any help will be highly appreciable.
    Regards
    srehman

    >
    gimbal2 wrote:
    No, in "normal jsps" you'll get the same thing - even though you
    visibly hide a component, it is still there and thus will still be part
    of a form submit. If you don't want form fields to submit, you'll have
    to make sure they are physically not there, or the fields are disabled.Well thanks alot for correcting me on this mate.
    Don't know either, it should work if you did everything correctly. Are
    you sure the databinding (to a JSF backing bean field) of the grid is
    correct? When you create a similar setup but without any of the
    show/hide logic, does it work then?I guess I have done it correctly but let me tell you, I have no direct binding to the grid itself, instead I have h:inputText fields in the grid that are bound to the backing bean's properties, which I need to submit and validate too. e.g{color:#800000}<h:panelGrid id="myPanel" columns="3" rendered="Bean.renderStatus">
    <h:outputText value="variable"/>
    <h:inputText id="v" value="Bean.property" required="true">
    <a4j:support ......... />
    </h:inputText>
    </h:panelGrid>{color}
    {color:#800000}<rich:message for="v"/>{color}
    Here I am able to hide and show the grid but I am unable to submit the field in any case whether its hidden or shown :( At first the grid is hidden and then on the valueChangeListener of h:selectOneMenu rendered value is set to either true or false.( renderStatus is set in the value change listener ).
    And yeah without this logic of hide/show its working fine with me. Any guess or idea what am I doing wrong here.
    Thanks for your time by the way.
    Regards,
    Shoaib

  • I want the Definitaion fo  Class and its Components  in ABAP . With Example

    Gowri

    <b>Classes</b>
    Classes are templates for objects. Conversely, you can say that the type of
    an object is the same as its class. A class is an abstract description of an object. You could say that it is a set of instructions for building an object. The attributes
    of objects are defined by the components of the class, which describe the
    state and behavior of objects.
    <b>
    Local and Global Classes</b>
    Classes in ABAP Objects can be declared either globally or locally. You define global classes and interfaces in the Class Builder (Transaction SE24) in the
    ABAP Workbench. They are stored centrally in class pools in the class library
    in the R/3 Repository. All of the ABAP programs in an R/3 System can access the global classes. Local classes are defined within an ABAP program. Local classes and interfaces can only be used in the program in which they are defined. When you use a class in an ABAP program, the system first searches for a local class with the specified name. If it does not find one, it then looks for a global class. Apart from the visibility question, there is no difference between using a global class and using a local class.
    There is, however, a significant difference in the way that local and global classes are designed. If you are defining a local class that is only used in a single program, it is usually sufficient to define the outwardly visible components so that it fits into that program. Global classes, on the other hand, must be able to be used anywhere. This means that certain restrictions apply when you define the interface of a global class, since the system must be able to guarantee that any program using an object of a global class can recognize the data type of each interface parameter.
    The following sections describe how to define local classes and interfaces in an ABAP program. For information about how to define local classes and interfaces, refer to the  Class Builder section of the ABAP Workbench Tools documentation.
    <b>Defining Local Classes</b>
    Local classes consist of ABAP source code, enclosed in the ABAP statements CLASS ... ENDCLASS. A complete class definition consists of a declaration part and, if required, an implementation part. The declaration part of a class <class> is a statement block:
    CLASS <class> DEFINITION.
    ENDCLASS.
    It contains the declaration for all components (attributes, methods, events) of the class. When you define local classes, the declaration part belongs to the global program data. You should therefore place it at the beginning of the program.
    If you declare methods in the declaration part of a class, you must also write an implementation part for it. This consists of a further statement block:
    CLASS <class> IMPLEMENTATION.
    ENDCLASS.
    The implementation part of a class contains the implementation of all methods of the class. The implementation part of a local class is a processing block. Subsequent coding that is not itself part of a processing block is therefore not accessible.
    <b>Structure of a Class</b>
    <u>The following statements define the structure of a class:</u>
    A class contains components
    Each component is assigned to a visibility section
    Classes implement methods
    The following sections describe the structure of classes in more detail.
    <b>Class Components</b>
    The components of a class make up its contents. All components are declared in the declaration part of the class. The components define the attributes of the objects in a class. When you define the class, each component is assigned to one of the three visibility sections, which define the external interface of the class. All of the components of a class are visible within the class. All components are in the same namespace. This means that all components of the class must have names that are unique within the class.
    There are two kinds of components in a class - those that exist separately for each object in the class, and those that exist only once for the whole class, regardless of the number of instances. Instance-specific components are known as instance components. Components that are not instance-specific are called static components.
    In ABAP Objects, classes can define the following components. Since all components that you can declare in classes can also be declared in interfaces, the following descriptions apply equally to interfaces.
    <b>Attributes</b>
    Attributes are internal data fields within a class that can have any ABAP data type. The state of an object is determined by the contents of its attributes. One kind of attribute is the reference variable. Reference variables allow you to create and address objects. Reference variables can be defined in classes, allowing you to access objects from within a class.
    <b>Instance Attributes</b>
    The contents of instance attributes define the instance-specific state of an object. You declare them using the DATA statement.
    <b>Static Attributes</b>
    The contents of static attributes define the state of the class that is valid for all instances of the class. Static attributes exist once for each class. You declare them using the CLASS-DATA statement. They are accessible for the entire runtime of the class.
    All of the objects in a class can access its static attributes. If you change a static attribute in an object, the change is visible in all other objects in the class.
    <b>Methods</b>
    Methods are internal procedures in a class that define the behavior of an object. They can access all of the attributes of a class. This allows them to change the data content of an object. They also have a parameter interface, with which users can supply them with values when calling them, and receive values back from them The private attributes of a class can only be changed by methods in the same class.
    The definition and parameter interface of a method is similar to that of function modules. You define a method <met> in the definition part of a class and implement it in the implementation part using the following processing block:
    METHOD <meth>.
    ENDMETHOD.
    You can declare local data types and objects in methods in the same way as in other ABAP procedures (subroutines and function modules). You call methods using the CALL METHOD statement.
    <b>Instance Methods</b>
    You declare instance methods using the METHODS statement. They can access all of the attributes of a class, and can trigger all of the events of the class.
    <b>Static Methods</b>
    You declare static methods using the CLASS-METHODS statement. They can only access static attributes and trigger static events.
    <b>Special Methods</b>
    As well as normal methods, which you call using CALL METHOD, there are two special methods called CONSTRUCTOR and CLASS_CONSTRUCTOR, which are automatically called when you create an object (CONSTRUCTOR) or when you first access the components of a class (CLASS_CONSTRUCTOR).
    <b>Events</b>
    Objects or classes can use events to trigger event handler methods in other objects or classes. In a normal method call, one method can be called by any number of users. When an event is triggered, any number of event handler methods can be called. The link between the trigger and the handler is not established until runtime. In a normal method call, the calling program determines the methods that it wants to call. These methods must exist. With events, the handler determines the events to which it wants to react. There does not have to be a handler method registered for every event.
    The events of a class can be triggered in the methods of the same class using the RAISE EVENT statement. You can declare a method of the same or a different class as an event handler method for the event <evt> of class <class> using the addition FOR EVENT <evt> OF <class>.
    Events have a similar parameter interface to methods, but only have output parameters. These parameters are passed by the trigger (RAISE EVENT statement) to the event handler method, which receives them as input parameters.
    The link between trigger and handler is established dynamically in a program using the SET HANDLER statement. The trigger and handlers can be objects or classes, depending on whether you have instance or static events and event handler methods. When an event is triggered, the corresponding event handler methods are executed in all registered handling classes.
    <b>Instance Events</b>
    You declare instance events using the EVENTS statement. An instance event can only be triggered in an instance method.
    <b>Static Events</b>
    You declare static events using the CLASS-EVENTS statement. All methods (instance and static methods) can trigger static events. Static events are the only type of event that can be triggered in a static method.
    <u>See also Triggering and Handling Events.</u>
    <b>Types</b>
    You can define your own ABAP data types within a class using the TYPES statement. Types are not instance-specific, and exist once only for all of the objects in a class.
    <b>Constants</b>
    Constants are special static attributes. You set their values when you declare them, and they can then no longer be changed. You declare them using the CONSTANTS statement. Constants are not instance-specific, and exist once only for all of the objects in a class.
    <b>Visibility Sections</b>
    You can divide the declaration part of a class into up to three visibility areas:
    CLASS <class> DEFINITION.
      PUBLIC SECTION.
      PROTECTED SECTION.
      PRIVATE SECTION.
    ENDCLASS.
    These areas define the external visibility of the class components, that is, the interface between the class and its users. Each component of a class must be assigned to one of the visibility sections.
    <b>Public Section</b>
    All of the components declared in the public section are accessible to all users of the class, and to the methods of the class and any classes that inherit from it. The public components of the class form the interface between the class and its users.
    <b>
    Protected Section</b>
    All of the components declared in the protected section are accessible to all methods of the class and of classes that inherit from it. Protected components form a special interface between a class and its subclasses. Since inheritance is not active in Release 4.5B, the protected section currently has the same effect as the private section.
    <b>Private Section</b>
    Components that you declare in the private section are only visible in the methods of the same class. The private components are not part of the external interface of the class.
    <b>Encapsulation</b>
    The three visibility areas are the basis for one of the important features of object orientation - encapsulation. When you define a class, you should take great care in designing the public components, and try to declare as few public components as possible. The public components of global classes may not be changed once you have released the class.
    For example, public attributes are visible externally, and form a part of the interface between an object and its users. If you want to encapsulate the state of an object fully, you cannot declare any public attributes. As well as defining the visibility of an attribute, you can also protect it from changes using the READ-ONLY addition.
    "Example  :
    CLASS C_COUNTER DEFINITION.
      PUBLIC SECTION.
        METHODS: SET_COUNTER IMPORTING VALUE(SET_VALUE) TYPE I,
                 INCREMENT_COUNTER,
                 GET_COUNTER EXPORTING VALUE(GET_VALUE) TYPE I.
      PRIVATE SECTION.
        DATA COUNT TYPE I.
    ENDCLASS.
    CLASS C_COUNTER IMPLEMENTATION.
      METHOD SET_COUNTER.
        COUNT = SET_VALUE.
      ENDMETHOD.
      METHOD INCREMENT_COUNTER.
        ADD 1 TO COUNT.
      ENDMETHOD.
      METHOD GET_COUNTER.
        GET_VALUE = COUNT.
      ENDMETHOD.
    ENDCLASS.
    The class C_COUNTER contains three public methods - SET_COUNTER, INCREMENT_COUNTER, and GET_COUNTER. Each of these works with the private integer field COUNT. Two of the methods have input and output parameters. These form the data interface of the class. The field COUNT is not outwardly visible.
    Reward   points  if it is usefull...
    Girish

  • Query Region Rendering Issue between RUP4 and RUP5 Env.

    Dear OAF gurus
    We currently face an issue with a custom built OAF query region, where the regions works perfectly well, i.e. the page renders in a timely fashion with all its fields in one Apps environment (Dev) and then “Hangs and eventually times-out” in another environment (SysTest).
    Clearly this leads us to believe that there must be an issue with the environment configuration and/or patch/product levels, namely the OAF tech-stack.
    The Development Env. where this is working:
    ===========================================
    OAF Version : 11.5.10 RUP 4.
    MDS Version : 9.0.5.4.89 (build 555)
    UIX Version : 2.2.24
    BC4J Version: 9.0.3.13.93
    The System Test Env. where this is NOT working:
    ===========================================
    OAF Version : 11.5.10 RUP 5.
    MDS Version : 9.0.5.4.89 (build 555)
    UIX Version : 2.2.24.1.0
    BC4J Version: 9.0.3.13.97
    As you can see there are differences in Rollup Patches and OAF platform.
    The System Test Environment is clearly a head of the Development environment and this is where we are facing the issue. If we patch the Development environment to the same level as the Test, then the issue will manifest itself in both environments. The client will be going live with RUP5 or higher.
    The offending region is has the following structure:
    The parent/root page is : XxxMyQueyRegionRN, which is a “defaultSingleColumn” Region Style with its own controller class.
    Immediately under the above region there is a “query” region style child, which has the following attributes:
    Construction Mode : resultBasedSearch
    Include Simple Panel : False
    Include Views Panel : False
    Include Advanced Panel : True
    Initial Panel : advanced
    Show Views Panel Control: True
    The above Query Region has underneath it a “table” region style, which essentially is the results table.
    This table node has a number of “messageStyledText” fields under it. Each field is mapped to a VO and VO attribute.
    A number of these items have their “Search Allowed” property set to True, which means that are search-able fields in the Search Panel.
    There is nothing special or extraordinary about the above region and yet it renders in one environment and then hangs (i.e. the page times-out) in another. How do I know it is this specific region that causes the time-out? well when I take it out of the parent Page, the page works fine in both environments and as soon as include it, it times-out.
    Has anyone encountered this issue before? Has the OAF technology changed between RUP 4 and RUP5 sufficiently, so that certain custom pages will have to be re-developed?
    Any help and Guidance is appreciated.
    Thanks
    Patrice.

    Patrick,
    Check the apache log to see if contains any error or whether it lists the process which is taking so much time to lead to timeouts.
    In case you have a blind query based search result table population on page rendering, try to render the page without the query execution.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • "The Microsoft Exchange Administrator has made a change that requires you quit and restart Outlook" in Exchange 2013

    In Exchange 2013, Outlook finds a new connection point made up of the user’s mailbox GUID + @ + the domain portion of the user’s primary SMTP address. This change makes
    it much less likely that users will see the dreaded message “Your administrator has made a change to your mailbox.”
    http://technet.microsoft.com/en-us/library/dd298114(v=exchg.150).aspx
    Although the error message in the topic has been already improved a lot in Exchange 2013, the users may still encounter them in some specific scenarios. We have collected them and let’s discuss them in this thread.
    Symptom
    =======================================
    Consider the following scenario:
    Exchange 2013 was installed for a migration from Exchange 2007/2010.
    The legacy Exchange server is removed after successful migration.
    Exchange 2013 may be updated to Exchange 2013 SP1.
    Some users were being randomly prompted with a popup in their outlook client with the following message when connecting with Exchange 2013 server:
    “The Microsoft Exchange Administrator has made a change that requires you quit and restart Outlook”
    Cause
    =======================================
    The issue may be caused due to Public Folders.
    The msExchHomePublicMDB attribute on Exchange 2013 databases was set to deleted legacy public folder object.
    Solution
    =======================================
    Removed the Public Folder from all the Exchange
    2013 Databases. To do it, we can use ADSIedit.msc and remove the arrtibute - msExchHomePublicMDB from all the Databases:
    1. Open ADSIEdit.
    2. Connect to the Configuration container.3.
    Expand Configuration, expand CN=Configuration,DC=Domain,DC=com.4. Expand CN=Services -> CN=Microsoft Exchange -> CN=Domain -> CN=Administrative Groups -> CN=Exchange
    Administrative Group -> CN=Databases.5. In the right hand pane you will see a list of databases.6.
    Right-click the listed database object -> Properties.7. Check whether the msExchHomePublicMDB value is set to an unavailable value. If you see reference to the old database,
    please clear the value.8. Click OK.9. Check the rest of the databases to make sure
    that they are not populated in the same way.
    References:
    https://social.technet.microsoft.com/Forums/en-US/2f736bdd-1c00-4a22-97a5-95faeadf1495/exchange-2013-sp1-users-randomly-prompted-with-the-microsoft-exchange-administrator-has-made-a?forum=exchange2010
    https://social.technet.microsoft.com/Forums/lync/en-US/7a7b3cf8-8761-421c-9d55-6c84e05531c0/the-administrator-has-made-a-change?forum=exchangesvrclients
    https://social.technet.microsoft.com/Forums/en-US/0d71c843-b662-493c-ab6e-30708929ef18/2013-sp1-problem-the-microsoft-exchange-administrator-has-made-a-change-that-requires-you-quit-and?forum=exchangesvrdeploy
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    This one? http://support.microsoft.com/kb/2934750

  • Possible bug when rendered attribute set with EL

    I have the following outer panelform:
    <af:panelForm rendered="#{RoleSearch.roleSelected == RoleSearch.SUPERVISOR}">
    within this panelform i have a table and a selectone commandbutton,
    <af:commandButton text="Edit"
    action="#{RoleSearch.editDetails}">
    <af:setActionListener from="#{row.Userid}"
    to="#{processScope.userIdSelected}"/>
    </af:commandButton>
    don't worry about the parameter my action listener is settting.
    the problem is, when the commandbutton is encapsulated with an outer rendered component, it does not function, it does not trigger the action. if i manually set the rendered attribute to "true" things work fine.
    The components are displayed correctly, i.e. rendered correctly depending on my holder, however the commandbutton won't fire off the action when it is used like this.
    has anyone faced this problem before? is this a known issue?
    any help is much appreciated, i have had to write a few workarounds to resolve similar issues i have run into when developing with ADF BCs.
    thanks.

    Hi,
    i can't see any obvious problems with what you are doing especially considering that it works ok if you manually set the rendered attribute of the panelForm to true.
    Have you tried setting the rendered attribute at the command button level and leaving the panelForm rendered?
    Brenden

  • Rendering issue with Netbeans and Firefox

    Very new at using JSF, in fact I am using it from Nebeans 6.1. Once I create the pages using the visual designer, in IE, for the most part they look as they were designed, however when I view them in Firefox, listbox seems to be the original size and spacing between components is larger than IE. Not sure how to fix this, any help appreciated.
    Edited by: robucf3 on Jun 4, 2008 8:35 AM

    I have read up on the two subjects and I have looked at the generated code, in fact I had to tweak some of it to get the CSS to work. In any case, is there anything specific for me to look at, some attribute that maybe needs setting, etc?
    Found this:
    # Issue #95022: Resizing of textfield and other components does not work.
    Description: Due to a change in Woodstock components, resize handles have been removed from the following Woodstock components: TextField, TextArea,PasswordField, DropDown and ListBox. This issue impacts especially projects imported from Java Studio Creator and NetBeans Visual Web Pack 5.5/5.5.1. Resized components may look different from how they looked in previous releases.
    Workaround: For TextField and TextArea components, use the columns and rows attributes, respectively. DropDown and ListBox components are automatically resized to the size of the longest item by the browser.
    Edited by: robucf3 on Jun 4, 2008 9:11 AM

  • Dynamically change in size of the custom container using ALV GRID (OOPS)

    Hi Gurus!!!!
    I have an issue with the output of the report which is developed using ALV GRID (OOPS). I have used the custom container occupying full screen (Screen painter). When I execute the report using my PC the output displays report as expected in full screen. The problem is when we execute this report in 19 INCH monitor then there is always gap below the report.
    As per my understanding we should have a code to change the size of custom container dynamically.
    Please suggest some help on this.
    Thanks,
    Hemal Shah

    Hi,
    If you set the attributes, Resizing - Vertical and Horizontal for the customer container, than system will resize the size of the custome continer as per the resolution.
    Hope it helps,
    Sumana

  • 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.

  • How do I update "Rendered" attribute property from VO in runtime?

    I can override isAttributeUpdateable() in RowImpl for "updateable" attribute property of a VO in runtime.
    Is there API to update "Rendered" attribute property? I need to set it based on some condition or business rule in runtime.
    thanks,

    If you have a work flow there are several ways to do this. If the attribute is global, and can change on all resources, you can set user.global.<attribute> to what ever you want and it will usually propagate out fine. You can also update the attribute specifically on the resource with user.accounts[LDAP].<attribute>.

Maybe you are looking for

  • Satellite A300 PSAG0A - Games Will Not Display in Full Screen Size

    I have a large number of games installed on my computer. At least 90% of them will not display in full screen size but display in a small window with a large amount of black screen surrounding the window. I am running Windows Vista Home Premium 32 bi

  • Item Category determination while copying

    Hello Guys, What is the difference between Normal Item Category determination and Item category determination while copying? What could be the business logic behind this? Thanks in advance. Ravi

  • Downloading new photos - iPhoto doesn't work after upgrading to Yosemite

    Hello, Since I upgraded to Yosemite, iPhoto has stooped working after downloading photos from my Sd card. Some picutres downloaded are black while some others are ok, but in any case I have to restart my iMac because every apps running can't be used

  • JComboBox problem.

    Hi All, I have a JComboBox to which i added an actionlistener. On selecting 'New Data' it will popup another window to add a new data. This works fine when i use my mouse for selection where as when I use the keyboard for selection after the poped up

  • Photo grid

    Is there any way to add album style (photo grid) to images on a non photo page?