PanelGrid component behavior - initialization

I have a behavior that I do not understand.
I have a page that has several components including a 'gridPanel' and a 'pageFragment' with a javascript date slection menu. On the page fragment, I have an 'OK' button that initiates a display sequence within the 'gridPanel'. The display sequence is in a separate session bean and consists of creating a set of components within the 'gridPanel'.
Here is what I can do.
1) Navigate to the page.
2) Push the 'OK' button.
3) The 'OK' button returns null and the page passes through the prerender code for a second time and calls the display code in the session bean.
4) The display is drawn as expected.
Here is what I want to do, but cannot.
1) Navigate to the page.
2) In the 'prerender()' method, do something that will call the display sequence in the session bean. without having to push the OK button.
Basically, I want the display to come up when the page is navigated to, without having to push another button to generatre another redisplay.
When I attempt to call the display sequence in the session bean directly, the components that are used are null.
Here is the layout for the 'gridPanel' in the page
<h:panelGrid binding="#{OverviewPage.tsOverviewPanel}" id="tsOverviewPanel">
     <ui:panelLayout binding="#{OverviewPage.titlePanel1}" id="titlePanel1">
          <h:panelGrid binding="#{OverviewBean.titleGrid}" >
     </ui:panelLayout>
     <ui:panelLayout binding="#{OverviewPage.summaryPanel1}" id="summaryPanel1" >
          <h:panelGrid binding="#{OverviewBean.summaryGrid}" id="summaryGrid"/>
          <h:panelGrid binding="#{OverviewBean.errorGrid}" id="errorGrid"/>
     </ui:panelLayout>
</h:panelGrid>
The main panelGrid component 'tsOverviewPanel' belongs to the page 'OverviewPage'. It contains two additional panels that belong to the page "OverviewPage". These panels contain one or two panelGrid components that belong to the session bean 'OverviewBean'.
When I attempt to draw directly from the prerender() method of the page 'OverviewPage" the components that belong to the session bean 'OverviewBean" are null, however, the session bean is not. Once I push the 'OK" button it apparently submits the page to be redrawn in the JSF context and the components get initialized
What I suspect is happening is that I am getting messed up with the display phases of JSF.
When I attempt to draw directly from the prerender() method, the components belonging to the session bean 'OverviewBean" have not been instantiated, even though the 'init()' method of the session bean is being called, based on my logging.
Does anyone know how I can get the necessary components to initiate in this phase?
I do not have the option of moving everything into the page itself.
Thanks.

Well, I discovered how to resolve this.
The component that you bind to can not be recreated in the backing bean. Only the components within the bound component can be recreated. So what i did was added a panelGroup and binded that to my backing bean and then was able to recreate the panelGrid that was a child of the panelGroup.

Similar Messages

  • ARB Issue: Pattern for Exposing Component Behaviors

    Posted today:
    http://opensource.adobe.com/wiki/display/flexsdk/Pattern+for+Exposing+Component+Behaviors
    Please post comments by Wednesday COB. Thanks!

    The best forum for general question like this are the JDeveloper ADF forum here:
    JDeveloper and ADF
    When posting there, could you clarify what you mean by "be rendered aside"

  • PanelGrid component binding problem

    I have a panelGrid that is bound to an object in my backing bean. When the page loads the panelGrid is empty. When the user clicks on a button it is suppose to populate the panelGrid. But the panelGrid doesn't render after clicking the button. Here is my code:
    jsp
    <div style="margin-left:30px;">
                 <div>
                     <ice:outputText value="Click 'Run Diagnostics' to begin tests." />
                 </div>
                 <div style="margin-left:20px;padding-bottom:40px;">
                     <ice:commandButton value="Run Diagnostics"
                                         action="#{SystemDiagnostics.runDiagnostics_clicked}"/>
                     <ice:outputText value="#{SystemDiagnostics.resultsText}"/>
                 </div>
                 <div>
                     <ice:outputText style="font-decoration:underline;"
                                     value="Diagnostics" />
                 </div>
                 <div style="margin-left:20px;">
                     <ice:panelGrid binding="#{SystemDiagnostics.diagnosticsPanelGrid}" >
                          <!--Dynamic values go here -->
                     </ice:panelGrid>
                 </div>
             </div> bean
    public void runDiagnostics_clicked() {
             PdlgCommandCollectionResult result = Pdlg.instanceOf().runDiagnostics();
                 if (result.isSuccessful()) {
                     HtmlPanelGrid grid = new HtmlPanelGrid();
                     grid.setColumns(2);
                     HtmlOutputText output = new HtmlOutputText();
                     output.setValue("Boot Disk");
                     grid.getChildren().add(output);
                     output = new HtmlOutputText();
                     output.setValue("Success");
                     grid.getChildren().add(output);
                     setDiagnosticsPanelGrid(grid);
         public HtmlPanelGrid getDiagnosticsPanelGrid() {
             return m_diagnosticsPanelGrid;
         public void setDiagnosticsPanelGrid(HtmlPanelGrid value) {
             m_diagnosticsPanelGrid = value;
         }Does anyone know why this is not rendering?
    Thanks,
    David

    Well, I discovered how to resolve this.
    The component that you bind to can not be recreated in the backing bean. Only the components within the bound component can be recreated. So what i did was added a panelGroup and binded that to my backing bean and then was able to recreate the panelGrid that was a child of the panelGroup.

  • Unexpected skipLinkTarget component behavior

    Hello,
    I am working on a web application created with JDeveloper 11.1.1.6 and ADF that needs to meet accessibility requirements such as Section 508. I have noticed a strange behavior of the af:skipLinkTarget component - Rather than jumping to the start of the content area (defined by the content facet), it jumps to the first button or link in the content area.
    This is very problematic for our visually impaired users who must rely on screen reader software to use the application. As a workaround, we have told them to ignore the "Skip to content" link and use the H key to jump to the h1, which marks the start of the content area.
    We would like to find a good solution rather than relying on this workaround so that our site is compliant with today's accessibility standards and our visually impaired users have the same experience as sighted users.
    Like our users, I would expect a "Skip to content" link to actually skip to the content. After all, the link does not say "Skip to the first button in the content"
    Thank you for reading and any assistance is greatly appreciated!
    JW

    Hi,
    my best suggestion for you is to contact customer support and open a service request if you have a customer support contract. Not many in this forum have a screen reader setup to reproduce the issue, which I think would be required to help you out
    Frank

  • Bizzare component behavior

    Hello,
    I have created a custom component called a ChartCell based
    off a tilelist. I have a SuperPanel (from
    http://www.wietseveenstra.nl)
    with a viewstack and a tabbar, with 4 types of ChartCells inside
    (see code below).
    I retrieve data from an external xml file and sort the data
    based on types (in this case, glyph_form_type_id) into each
    ChartCell using the populatePanels function.
    the problem: if I only supply the first ChartCell with data,
    (therefore, commenting out the other addItem methods in
    populatePanels as illustrated below) everything works as expected.
    But if i uncomment any other addItem (eg:
    graphemes.dataProvider.addItem(i);) then a "cannot access a null
    reference" error is thrown in the debugger. What completely baffles
    me is, in the debugger->variables tab, the first chartCell
    (phonemes) has a value of ChartCell, but the others (graphemes,
    allophones, and sources) have a value of null! How can this be
    possible? I've been banging my head over this for hours, please
    help! (and let me know if you need any other information) Thanks in
    advance

    "bmilesp" <[email protected]> wrote in
    message
    news:glrkcs$4ku$[email protected]..
    > Hello,
    >
    > I have created a custom component called a ChartCell
    based off a tilelist.
    > I
    > have a SuperPanel (from
    http://www.wietseveenstra.nl)
    with a viewstack and
    > a
    > tabbar, with 4 types of ChartCells inside (see code
    below).
    > I retrieve data from an external xml file and sort the
    data based on types
    > (in
    > this case, glyph_form_type_id) into each ChartCell using
    the
    > populatePanels
    > function.
    >
    > the problem: if only supply the first ChartCell with
    data, (therefore,
    > commenting out the other addItem methods in
    populatePanels as illustrated
    > below) everything works as expected. But if i uncomment
    any other addItem
    > (eg:
    > graphemes.dataProvider.addItem(i);) then a "cannot
    access a null
    > reference"
    > error is thrown in the debugger. What completely baffles
    my is, in the
    > debugger->variables tab, the first chartCell
    (phonemes) has a value of
    > ChartCell, but the others (graphemes, allophones, and
    sources) have a
    > value of
    > null! How can this be possible? I've been banging my
    head over this for
    > hours,
    > please help! (and let me know if you need any other
    information) Thanks in
    > advance
    http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
    Q5
    You may also find this example useful for other things you're
    doing:
    http://flexdiary.blogspot.com/2008/09/groupingcollection-example-featuring.html

  • Weird jsf component behavior after exporting pdf to outputStream ~~

    Hi,
    I have a page which has a selectOneMenu control (allows user to select a workshop name) and a commandLink (generates a corresponding workshop pdf and opens in a separate browser window). All command actions are working fine(including the pdf generation).
    I used the following code to export pdf to the browser
                    HttpServletResponse response =
                       (HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext ().getResponse ();
                 response.setContentType ("application/pdf");
                 response.getOutputStream ().write (bytes);
                 response.getOutputStream ().flush ();
                 response.getOutputStream ().close ();
                 FacesContext.getCurrentInstance().responseComplete ();However, after viewing and exporting the pdf successfully from the browser, when I choose a different value in the slectOneMenu control again, the page then displays
    %PDF-1.4 %���� 4 0 obj <>stream x&#156;�&#155;]o�6&#134;��+�&#155;�T~&#136;"��dm �$z1��&#147;&#153;��ey�&#146;b�~&#148;(:�c3&#134;���K_RP�kr9I81����&#133; I&#149;|�����}������&#151;I��Cn�&#150; ?�&#131;;�G��&#159;��Y"�&#153;�*Q&#134;�{&#139;�����?�2���o��vv7ehpvv7er��1Fe��U���A4&#147;)�&#155;.g]&#151;}W]���f����~�X��q`����u34�c�)�� ��H�"i2SP�T�_���(L|�&#155;1C�'&#149;O�27&#148;&#145;��X#&#147;��te�r&#135;~ ��1�H&#149;���U3&#154;)�7&#147;�T�
    instead of the same page with a different value in the selectOneMenu control.
    Any ideas or suggestions? Thanks in advanced!!
    Moreover, while searching for a solution for the problem on google and developer forums, I found a posting suggesting adding
    {code}
    context.getApplication().getStateManager().saveSerializedView(context);
    {code}
    before
    {code}
    FacesContext.getCurrentInstance().responseComplete ();
    {code}
    however, the suggestion did not solve the problem.
    Any ideas or suggestions would be greatly appreciated. Thanks!!

    Hi all,
    I was able to resolve this issue by forcing the page to refresh itself when the commandLink control was clicked. However, for IE users, there would be a dialog box asking the user to click on "Retry" in order to refresh the page.
    Any ideas or suggestions on how to eliminate the dialog box in IE would be greatly appreciated. Thanks in advanced!!

  • Problem with attributes in custom component

    Hi All,
    I am creating a simple jsf PanelGrid custom component....in that component I am adding two new attributes....
    when I use that tag in my jsf application it is rendering fine in the client side....but the parent class that is PanelGrid component's attributes are not inheriting to my custom panelgrid....
    can any one tell me how can I use the attributes of the super class PanelGrid??
    Thanks...

    Have you configured the attributes in the tag library descriptor?

  • Flash 8 pro flv playback behaviors

    Could someone show me where I can get the FLV playback
    component behaviors
    for flash 8 pro? I couldn't find them on the Adobe exchange.
    Thanks
    -mark

    I got them, thanks.
    > That came from here
    >
    http://www.adobe.com/devnet/flash/articles/flvplayback_behaviors.html

  • Problem in setting header for a panelgrid in backing bean

    Hi , this is urgent... pls...
    Actually my problem is to set header for a panelgrid. I am generating panelgrid component in the backing bean itself , there i need to set header for that panelgrid.
    Here is some sample code which i have written pls let me know whether any problem in this code or let me know whether there is any method possible other than this.
    Code:
    Application application=FacesContext.getCurrentInstance().getApplication();
    keyFeaturesGrid = (HtmlPanelGrid) application.createComponent (HtmlPanelGrid.COMPONENT_TYPE);
    keyFeaturesGrid.setColumns(4);
    keyFeaturesGrid.setColumnClasses("subColumn");     
    FacetTag facetTag=new FacetTag();
    facetTag.setName("header");
    HtmlOutputText facetText=new HtmlOutputText();
    facetText.setValue("Key Features");
    facetTag.setValue("value",facetText);
    keyFeaturesGrid.getChildren().add(facetTag);
    i am calling this method in constructor.. if i place that facetTag code part in my method... i am getting an error while instantiating the constructor...
    waiting for solution...
    Thanks in advance...

    Hai...
    I got it...
    Here i am posting the solution which i got...
    no need to think this much ... it is very simple... let me share the solution here...
    Instead of creating FacetTag object u can do this like this...
    HrmlPanelGrid panelGrid=new HtmlPanelGrid();
    HtmlOutputText headerText=new HtmlOutputText();
    headerText.setValue("Header For The Grid");
    panelGrid.getFacets().put("header",headerText);
    u r always welcome to send any suggestions...
    and also one doubt... how to use JSF core tag verbatim in backing bean

  • Jsf / richfaces / tomahawk / panelgrid rendered problem

    hi..
    i am trying to set the rendered attribute of a t:panelGrid component as follows
    <a4j:region id="fixedLineSelectionRegion">
    <t:selectOneListbox value="#{orderCapture.currentOrderItemCapture.orderCaptureHelper.selectedFixedLine}">
    <f:selectItems id="si" value="#{orderCapture.currentOrderItemCapture.orderCaptureHelper.fixedLineServicesSelectItems}" ></f:selectItems>
    <a4j:support event="onchange" reRender="fixedLineDetailsPanelGrid, transferTypePanelGrid_1 transferTypePanelGrid_2, certificate_provided, select_transfertype"/>
    </t:selectOneListbox>
    </a4j:region>
    <t:panelGrid rendered="#{orderCapture.currentOrderItemCapture.orderCaptureHelper.residential}" id="transferTypePanelGrid_1" .....
    </t:panelGrid>
    in this case when i update the listbox in the fixedLineSelectionRegion, all the components listed in the reRender tag are updated but the panelGrids transferTypePanelGrid_1 and transferTypePanelGrid_2 are not...
    is this some kind of limitation or am i doing something wrong ?

    Lakshmi,
    I'm working on that component right now, so I'll take a look at that. Could you file an issue on that so that we can track it?
    https://javaserverfaces.dev.java.net/issues/enter_bug.cgi?issue_type=ENHANCEMENT&subcomponent=sandbox
    Thanks! :)
    jason lee

  • ARB Issue: Styling Component Parts

    Posted Today:
    http://opensource.adobe.com/wiki/display/flexsdk/Styling+Component+Parts
    Please comment by EOD April 6th. Thanks!

    Hey there again,
    Just bringing a few updates to this subject. I have tried to enforce some specific behavior on af|menu::child-container, calling it according to its container, like this:
    af|panelGroupLayout.MyClass1 af|menu::child-container {
         position:fixed !important;
         top:100px !important;
    af|panelGroupLayout.MyClass2 af|menu::child-container {
         position:fixed !important;
         top:200px !important;
    and, even though the browsers see this exact code (tried with both IE Dev Tool and Firebug), the behavior is still the default one (position:static I guess and, by default, the top property is ignored). I also tried the same for af|menu::scroll-box, af|menu::scroll-content and tried the syntax af|menu::bar-item > table.nth-child(2) {position: fixed; top:100px} (tried this because the 2nd child of the af|menu::bar-item is an html table and indeed, as I said above, the browser sees my specifications for this component but still does not apply them.)
    Just to make it clear, when I say that the browser sees my specifications I mean that it's not just some css that's overwritten by the default component behavior. Firebug / IE Dev Tool say that my specifications are applied, yet the desired behavior does not happen. It's the first time that I encounter a component that does not respect the specifications stated in Firebug / IE Dev Tool.
    I honestly believe this is a framework bug. If anybody has any clue about this kind of behavior, please let me know.
    Thanks,
    Toma

  • Using HTML table tags instead of panelGrid

    Is is possible to avoid using the panelGrid component for table-based HTML layouts, and still take advantage of JSF functionality?
    Basically, I have a reasonably complicated HTML layout using traditional <table> tags and don't really want to convert it to use the panelGrid component, largely because the latter doesn't seem to make it easy to precisely control inidividual cell dimensions/alignments etc. Can I still use JSF components within this table or do they have to be within a panelGrid?
    My early experimentation hasn't been too promising. The table-based layout displays fine, but any attempt to put inputText components within the layout, simply displays them at the very top of the screen. Am I missing something fundamental?
    Any help or suggestions would be gratefully appreciated. I'm new to JSF and like what I've seen so far, but it would worry me if I was forced to use JSF tags for layout.
    Cheers,
    Simon.

    Thanks very much for that suggestion - using this taglib does indeed enable me to succesfully use JSF components within standard html tables.
    Cheers,
    Simon.

  • Dialog/Widget to behave like a parsys component

    Hello All:
    I have a client requirement to basically develop a custom component which will allow the authors to drag & drop any component (which is available from sidekick) on to the wizard and configure it. In a way, essentially they would like to mimic the parsys component behavior on the page to the dialog/widget. Ideally dialog should have something like parsys and which should allow drag & drop of other components into this dialog/widget. I was just wondering whether is it technically possible to have something like this? I know ideal usage component is not like this - but unfortunately this is what my client wants - please throw some ideas/ approach... Appreciate your time!!!
    - Kc

    This forum is for C# code related issues, please move your question to MVC forums for a better assistance on your issue:
    http://forums.asp.net/1146.aspx
    Fouad Roumieh

  • NPE in initialize

    Hi,
    After reading introduction_to_fxml I got an impression that an initialize method can be used as spring's afterPropertiesSet or EJB's a @PostConstruct method - that is expected all member variable set when it is invoked. But when I tried I got NPE. The code I tried looks like following.
    Main app:
    public class MyApp extends Application {
        @Override
        public void start(Stage stage) throws Exception {
            Parent root = FXMLLoader.load(getClass().getResource("/myapp.fxml"));///MAIN LOAD
            Scene scene = new Scene(root, 320, 240);
            scene.getStylesheets().add("/myapp.css");
            stage.setScene(scene);
            stage.setTitle("my app");
            stage.show();
        public static void main(String[] args) { launch(); }
    }myapp.fxml:
    <VBox fx:id="root" xmlns:fx="http://javafx.com/fxml" >
           <ControlA>
               <SomeClass>      
               </SomeClass>
           </ControlA>
    </VBox>SomeClass.java:
    @DefaultProperty("aproperty")
    public class ControlA extends StackPane {
       private SomeClass aproperty;
         public ContentPane(){
            try {
                FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/controls/ControlA.fxml"));
                fxmlLoader.setRoot(this);
                fxmlLoader.setController(this);
                fxmlLoader.load();//ControlA LOAD
            } catch (IOException exception) {
                throw new RuntimeException(exception);
        public void initialize() {
             //aproperty is null here, called from ControlA LOAD
       //aproperty get/set
       public void setAproperty(SomeClass p){//it is called from MAIN LOAD
    }The component's initialize method is called from its load method and its property is being set from parent's load method which is called later. And it looks understandable, a component's property values can't be constructed until parent fxml is read. But if so, what is best practice to init a component before it will be used and after all the props were initialized?
    Best regards, Eugene.

    Hi Eugene,
    I would perform the initialization steps that do not depend on the value of A property in initialize(), and perform the initialization steps that depend on the value of A property whenever that value is changed.
    If A is a simple bean property - that would probably mean doing part of the initialization in the setter for A. If A is an observable property, then you could register a ChangeListener (or InvalidationListener) on A in initialize - and defer the initialization/set up of everything that depends on the value of A to that listener.
    Hope this helps,
    -- daniel

  • Application "creationComplete" or "Initialize" ?

    Hi
    I want to create a chart component dynamically through action scripts at the time of application loading.  Which option is the best?
    CreationComplete  or  Initialize.
    Whats the difference between above 2?   Whats the difference in loading a component during initialization and after intialization(creation complete).
    Please revert back ASAP.
    Thanks!

    'preinitialize' - before children have been created
    'initialize' - after children have been created, but before they have been laid out
    'creationComplete' - after chidlren have been created and laid out
    If you need the x/y/width/height of all descendants to be correct, use creationComplete. Otherwise, use initialize. Modifying things in a creationComplete handler can cause another layout pass.
    Gordon Smith
    Adobe Flex SDK Team

Maybe you are looking for

  • SQL Query if or case omit fields but not line.

    I have the below SQL Query my goal is to not show Aging or Storage Date if QTY is greater than 0.  I know I can omit the line but I still want to show just not those two fields is this possible? Select sl.SKU, sl.LOC, (editdate) AS "Storage Date", CA

  • How to do this with Logic?

    Hy! Any ideas how i can realize this with Logic?: http://www.youtube.com/watch?v=tE7GHgbmlP0 Are there any (freeware) loop plug ins or something else I could use?

  • "Set Region" button grayed out, but I still have 3 region changes left!

    Greetings! In my black MacBook 13", the DVD Player's "Drive Region" dialog says I can change the region 3 more times. The current drive region is Region Code 1. I want to play a Region Code 4 DVD. The dialog says "Select New Region for Drive", and ha

  • I965, 3 monitors. xrandr: unable to configure ctc2, Xorg: invalid 22

    Hello! Firstly, thankyou for your time if you're reading this question. I got one out of two external monitors working by connecting it via a VGA cable, and using xrandr, and I was hoping to be able to get the other one working using a DVI (monitor e

  • 1242AG to 1242AG bridge problem

    Hi, I have problem setting up a wireless bridge between two 1242AG APs. When i set either of them to any role different than Access Point or Root Bridge i get the interface Software status: Disabled and Hardware: Down. Can anyone tell what is it i am