Dynamic ht. of center facet of a panelStretchLayout depending on contents?

I have a customer who is using a panelStretchLayout for the content area of the page. They want the center facet to grow in height as child components differ from page to page. Is there a way to get the center facet to grow in height depending on its contents?
Thanks,
TheGoose
Edited by: TheGoose on May 30, 2012 12:31 PM

In the center facet for the panelStretchLayout - ensure that all the components are enclosed in a panelGroupLayout with layout set to vertical.
This would ensure height of panelStretchLayout is set depending upon the components inside it.
        <af:panelStretchLayout id="psl1" styleClass="AFStretchWidth">
          <f:facet name="bottom"/>
          <f:facet name="center">
            <af:panelGroupLayout id="pgl1" layout="vertical">
            </af:panelGroupLayout>
          </f:facet>
          <f:facet name="start"/>
          <f:facet name="end"/>
          <f:facet name="top"/>
        </af:panelStretchLayout>Thanks,
Navaneeth

Similar Messages

  • Panel Stretch Layout - Center facet needs to be adjustable

    I am using JDev 11.1.1.3.0; building a public facing website.
    I have set up the basic page layout with a Panel Stretch layout with facets at the top, center abd bottom. The top is the header, the bottom is the footer, the center is the content.
    The payout needs to adjust based on how much content is contained within the center. Howeverm right now, that is not occuring. What is occuring is that if the content in the center exceeds the initial space, it creates a scoll bar.
    I have the PSL contain set for a specific width. If I do NOT specify a height, it simply collapses. If I specify a width, taht width remains fixed.
    Am I using the wrong container to define my variable content ?

    wait a second here. I am confused.
    When you have a normal web page, whether the content is contained within a <div> or a <table>, BOTH of those components strecth to allow the content flooding into them to show. If the content itself exceeds the height of a browser, the browser creates a scroll bar to allow the user to scroll up and down to vie wthe content. All very normal web protocol.
    Here, the "PSL" comonent seems to do neither. I created a test page. It has nothing more than a PSL on it, with a TON of text I added in a <verbatim> tag and I put that in the center facet of the PSL.
    Not only does the center facet NOT "push" the bottom facet down to reveal ALL of the content of the center div, (it just cuts right off mid-line) but if I remove the bottom facet, the broswer page does not stretch. the content simply runs off the page.
    Why?
    This should be MUCH easier than this. These ADF components are a joke. This is NOT web 2.0. What am I missing here? I want to design a simple web page where the center facet stretches top to bottom to grown with the content being added. This is my basic page layout:
    <markup>
    <af:panelStretchLayout startWidth="251px" id="pt_psl1"
    endWidth="0px" inlineStyle="width:1000px;">
    <f:facet name="start">
    <f:subview id="sv2">
    <jsp:include page="/fragments/home_side.jsff"/>
    </f:subview>
    </f:facet>
    <f:facet name="center">
    <af:panelStretchLayout id="pt_psl2" rendered="true"
    startWidth="0px" endWidth="0px"
    bottomHeight="0px" topHeight="99px">
    <f:facet name="center">
    <af:facetRef facetName="main"/>
    </f:facet>
    <f:facet name="top"><f:subview id="sv1">
    <jsp:include page="/fragments/head_top.jsff"/>
    </f:subview>
    </f:facet>
    <f:facet name="end"/>
    </af:panelStretchLayout>
    <!-- id="af_twocol_left_sidebar_stretched" -->
    </f:facet>
    </af:panelStretchLayout>
    <af:panelStretchLayout id="footer_psl" topHeight="30px"
    inlineStyle="width:1000px;height:30px;"
    bottomHeight="0px">
    <f:facet name="top">
    <f:subview id="sv3">
    <jsp:include page="/fragments/footer.jsff"/>
    </f:subview>
    </f:facet>
    </af:panelStretchLayout>
    </markup>
    the facetref named "main" is where I am dragging portlets. Some of those portlets contain a little data, some contain a lot. Either way, the page needs to strectj to accomodate the data.
    Can this even be DONE? If so, what am I missing?
    Pat

  • How to upright center the data of the smartforms' table content?

    Hello,experts,
    I find that  smartforms 's format can make the table 's data level-centered ,how to make it upright centered?
    pls help me out.thanks

    in fact ,I have such a problem:I write a print program  with smartforms ,and use A4 paper to print ,the result is good ,but when changed to stylus printer ,some line can not display.
    I changed the width of the table from CM to MM.,1CM=10MM.
    the col line that can not printed at fist now can be printed .so I wonder if I make the data of the table content upright centered ,whether it will be ok:I hope this measure can make  the row line that can not printed out previously can be printed out .
    so can you give me some  solution .I will be appreciate.

  • ADF Tree 11g column 100% to fit the avilable space in af:panelCollection

    Hi All,
    I want to stretch the tree column to fit all the available space in af:panelCollection. I ve changed its InlineStyle to width:100% but its is suggesting to use StyleClass to AFStretchWidth. I tried both the options but didn't achieve desired output.
    Any hint or suggestion will be highly appreciated.
    Thanks in advance.
    Best Regards
    Bilal
    Edited by: Bilal on Oct 3, 2011 7:41 PM

    Hi All,
    I have tried various options but in vain.
    A clarification is that I have a page having ADF query panel with tree table. I don't want to show the other columns in the result. Just tree is enough to display the contents.
    I want to maximize the tree column to fit into the available space of af:panelCollection.
    Option 1. I set the styleClass to AFStretchWidth for af:column of the ADF tree. It didn't work.
    Option 2. I encapsulated af:column of the tree into the f:center facet of af:panelStretchLayout and set af:panelStretchLayout styleClass to AFStretchWidth. The af:column of the tree disappeared. No output.
    Option 3. I encapsulated af:treeTable into the f:center facet of af:panelStretchLayout. It is giving error that af:panelStretchLayout is not a valid child of af:panelCollection, so it also didn't work.
    Option 4. I encapsulated af:panelCollection into the f:center facet of af:panelStretchLayout. It also didn't work.
    Any thing I am missing ... Any other option to try out.
    Any help will be highly appreciated.
    Thanks ... Best Regards
    Bilal
    Edited by: Bilal on Oct 4, 2011 5:06 AM

  • How to make panel collection with auto width and height in popup dialog ?

    Hi,
    I have ony af:popup in that I have added af:dialog. And in this af:dialog I have added af:table which is surrounded by af:panelCollection.
    Means my popup structure is like as below
    af:popup
    af:dialog
    af:panelCollection
    af:table
    If I set resize="on" in af:dialog then I can able to resize my popup dialog but the panelCollection inside the af:dialog is not become auto adjusted.
    I am able to make panelCollection width auto adjusted by using AFStretchWidh style class but not able to adjust its height.
    Hope you can understand my problem and pls try to provide me its solution if you have already implemented this.
    Regards,
    DevD

    I believe you are using af:panelGroupLayout because there are some other components except af:panelCollection, so try this combination
    <af:popup id="p1">
      <af:dialog id="d2" resize="on" stretchChildren="first">
        <af:panelStretchLayout id="psl2">
          <f:facet name="bottom"/>
          <f:facet name="center">
            <af:panelCollection id="pc1">
              <f:facet name="menus"/>
              <f:facet name="toolbar"/>
              <f:facet name="statusbar"/>
              <af:table var="row" rowBandingInterval="0" id="t1">
                <af:column sortable="false" headerText="col1" id="c1">
                  <af:outputText value="#{row.col1}" id="ot5"/>
                </af:column>
                <af:column sortable="false" headerText="col2" id="c3">
                  <af:outputText value="#{row.col2}" id="ot4"/>
                </af:column>
                <af:column sortable="false" headerText="col3" id="c2">
                  <af:outputText value="#{row.col3}" id="ot3"/>
                </af:column>
                <af:column sortable="false" headerText="col4" id="c4">
                  <af:outputText value="#{row.col4}" id="ot2"/>
                </af:column>
                <af:column sortable="false" headerText="col5" id="c5">
                  <af:outputText value="#{row.col5}" id="ot1"/>
                </af:column>
              </af:table>
            </af:panelCollection>
          </f:facet>
        </af:panelStretchLayout>
      </af:dialog>
    </af:popup>Put only af:panelCollection in CENTER facet of af:panelStretchLayout and use other facets of af:panelStretchLayout for other components.

  • Hi Unable to see any horizontal scroll bar on tree table

    Hi my tree table is in this format
    <af:treeTable rowBandingInterval="0" columnStretching="last"
    horizontalGridVisible="false"
    verticalGridVisible="false"
    inlineStyle="text-align:center; background-color:White;height:220px;"
    value="#{C2SearchBean.treeModel}" var="node2"
    initiallyExpanded="false" contentDelivery="lazy"
    id="ProductCharcTreeId"
    width="189px">
    i was not able to see the horizontal scroll bat can you please help me out.

    surround your treeTable with a panleCollection, or place it in a component that will stretch it like in the center facet of a panelStretchLayout.

  • PanelTabbed, expand to all page (width and Height)

    Hello I'm using jedevelper 11g
    I succesfully set the width of a af:panelTabbed. How can I set the height (I cannot use height: 100%)?
    Currently I have:
    <af:panelTabbed id="pt2">
    <af:showDetailItem text="Archives" id="sdi1"
    styleClass="AFStretchWidth">
    Cristian
    Edited by: baol on Feb 24, 2010 7:07 AM

    japher wrote:
    Have you tried putting the panelTabbed into the center facet of a panelStretchLayout?Yes, it is into into the center facet of a panelStretchLayout.
    Cristian

  • How to set display size of a Region or Dynamic Region?

    Hi,experts,
    In jdev 11.1.2.3,
    I drag and drop a task-flow into a jsf page to create a Region,
    and set display size for the region, source code as:
    ===================
    <f:facet name="second">
    <af:decorativeBox theme="medium" id="db1">
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll" id="pgl1"
    inlineStyle="width:1200px;height:700px;">
    <af:region value="#{bindings.trainflow11.regionModel}" id="r1"
    inlineStyle="width:1200px;height:700px;"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:decorativeBox>
    </f:facet>
    =================
    But, the Region is only showed a small fraction area on the parent jsf page whenever during design or run time.
    How to set display size of a Region or Dynamic Region?
    Thanks!

    Hi,
    the decorative box is supposed to stretch components in the center facet, so at runtime the region should stretch. Can you try with a static region to see if this is an issue with dynamic regions?
    Frank

  • How to Get PanelStretchLayout to stretch to screen height

    Hi,
    I would like to have a panelstretchlayout stretch to screen height whilst other components are scrollable within the panelstretchlayout.
    I have gotten the panelstretchlayout together with some components within it with scroll and I am able to get it properly with the layout within as scrollable when I set a height of 500 px. However, I am unable to set the height to the screen height as it does not stretch to it.
    I have tried AFStretchHeight and it does not seem to work. AFStretchWidth does work well.
    Any advice or help will be much appreciated.
    Thanks,
    Zijian

    PanelGroupLayout(scroll) does not stretch its children. This is the reason the 2nd PanelStretchLayout does not strecth (because it is a child of a PanelGroupLayout).
    \Hint: Remove the outer PanelGroupLayout(scroll) (by moving its children to the "header" facet of the outer PanelStretchLayout and left the inner PanelStretchLayout as a single child of the center facet of the outer's PanelStretchLayout:
    <af:panelStretchLayout>
      <f:facet name="header">
        ... The components from the outer PanelGroupLayout (possibly enclosed in a PanelGroupLayout(scroll)) ...
      </f:facet>
      <f:facet name="center">
        <af:panelStretchLayout>
          <f:facet name="header">
          </f:facet>
          <f:facet name="center">
            <af:panelGroupLayout layout="scroll>
              ... The components from the inner PanelGroupLayout ...
            </af:panelGroupLayout>
          </f:facet>
        </af:panelStrecthLayout>
      </f:facet>
    </af:panelStrecthLayout>Dimitar

  • Is there a way to automatically size the facet Top of a pan stretch layout?

    I have the following structure
                <af:panelStretchLayout id="psl1" topHeight="215px" partialTrigger="pbox" >
                        <f:facet name="top">
                               <af:panelBox id="pbox"As you can see the topHeight property of the top facet of the panelStretchlayout is fixed.
    The value can exactly contain the panelBox contained when it is disclosed. When the user undiscloses the panelbox, I want to automatically resize the top facet height to exactly contain the undisclosed panel box.
    Is there anyway to do this via expression language on pre-defined propertries of the components?
    If possible I would like to avoid to create a bean which gets the height programmatically from the panelBox.

    Yes just use "*auto*" like this:
    <af:panelStretchLayout id="psl1" topHeight="auto" partialTrigger="pbox" >
    <f:facet name="top">
    <af:panelBox id="pbox">
    just this will take care of it.... though u will get warning yellow line but is perfectly fine.... i would rather say, jdev should nt show that line instead.
    cheers

  • Linking a class to a dynamic text field to load XML data.

    Hi,
    I'm quite new to ActionScript and would be grateful for any help here.
    I want to load text into a dynamic text field (called 'about_tab') using  a class depending on the language selected (by clicking on a flag icon)  by the user.
    I managed to get this to work when the ActionScript was written directly  in the timeline, but am having problems with doing the same thing via a  class.
    This is my class file:
    package
    import flash.display.SimpleButton;
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.events.Event;
    public class ChangeLang extends SimpleButton
    public function ChangeLang()
    addEventListener(MouseEvent.CLICK, switchLang);
    trace("ChangeLang class working");
    public function switchLang(event:MouseEvent):void
    var lang = event.target.name;
    var req:URLRequest = new  URLRequest("languages/"+lang+".xml");
    var loader:URLLoader = new URLLoader();
    var substance:XML;
    function xmlLoaded(event:Event):void
    trace("function xmlLoaded is running");
    substance = new XML(loader.data);
    about_tab.text =  substance.about_lbl;
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    loader.load(req);
    Here's one of my XML files (the other is the same except "About" is  written in German):
    <substance>
    <about_lbl>About</about_lbl>
    </substance>
    When I run it, it returns my trace statements that the class ChangeLang  and the function xmlLoaded are running, but no text appears in the  dynamic text field (I should/want to see the word 'About'). I get this  error message:
    1120: Access of undefined property about_tab
    The problem, I'm guessing, is in the part in red in my code. I think I need to target the text field in the display list by creating a  reference to it. If so, could someonw point out how I do this, or perhaps a tutorial that would help. I've tried adding the word stage (i.e.,stage.about_tab.text =  substance.about_lbl; ) but it still doesn't connect. I guess there's something really simple I'm missing, so I  apologize if this comes across as a stupid question
    Thanks for any help.

    Hello flashrocket!
    I'm also new to AS3 and I've just started using external classes and I think I know what you should do to put your code to work.
    Instead of using the text field you created inside your flash file, why don't you use the "TextField" class to create an instance of this object? It's the exact same thing as when you create and instantiate a new text field inside Flash.
    First, import flash.text.*; (includes classes like TextField, TextFieldAutoSize, TextFormat, TextFormatAlign, etc)
    Than you just have to create a var like
    public var about_tab : TextField;
    or
    public var about_tab : TextField = new TextField();
    then, to adjust the properties of this tab you use dotsyntax as if it where on your stage like:
    about_tab.x = 50; about_tab.alpha = .5; etc...
    you can even create a function to "config your textField"
              private function createAndConfigTextField() : void {
                   about_tab = new TextField(); //you only need this line if you
              // only typed something like "public var about_tab:TextField;
              // if instead you used "public var about_tab:TextField = new TextField(); outside
              // this function, just skip this first line because you already have an instance of
              // text field named "about_tab"...
                            about_tab.autoSize = TextFieldAutoSize.CENTER;
                   about_tab.background = true;
                   about_tab.border = true;
                   var aboutTextFormat : TextFormat = new TextFormat();
                   format.font = "Arial";
                   format.color = 0x000000;
                   format.size = 11;
                   format.bold = true;
                   format.align = TextFormatAlign.CENTER;
                   about_tab.defaultTextFormat = aboutTextFormat;
                   addChild(about_tab);
    This is just an example of what you can do... I hope you get it... let me know if you have any doubt...

  • Issue while deploying dynamic region to stand alone server

    Hi,
    In my application there is one page I have panel splitter, where i have drag and dropped menu-taskflow as regionModel, and created dynamic region on second facet panel.
    <af:region value="#{bindings.menutaskflow1.regionModel}" id="r1"/>
    <af:region value="#{bindings.dynamicRegion4.regionModel}" id="r2"/>
    I have created application level class to handle dynamic region loading.
    This settings are working fine when i run application with integrated web logic server, When I deployed my application to stand alone server, its giving me exception as
    java.lang.IllegalStateException: The expression "#{bindings.menutaskflow1.regionModel}" (that was specified for the RegionModel "value" attribute of the region component with id "r1") evaluated to null.
    This is typically due to an error in the configuration of the objects referenced by this expression.
    If it helps, the expression "#{bindings.menutaskflow1}" evaluates to "null".
    If it helps, the expression "#{bindings}" evaluates to "null". Now using an empty RegionModel instead.
         at oracle.adf.view.rich.component.fragment.UIXRegion.getRegionModel(UIXRegion.java:439)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:109)
         at jsp_servlet.__editopportunity_jspx._jspx___tag18(__editopportunity_jspx.java:923)
         at jsp_servlet.__editopportunity_jspx._jspService(__editopportunity_jspx.java:452)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:526)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:473)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:141)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:710)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:205)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    I tried to update bindings with data level binding as
    <af:region value="#{data.view_MenuPageDef.menutaskflow1.regionModel}" id="r1"/>
    <af:region value="#{data.view_MenuPageDef.dynamicRegion4.regionModel}" id="r2"/>
    but it is rendering empty page with another exception..
    Please help
    Regards,
    Meera

    Hi,
    Check
    Runtime errors with ADF Dynamic region
    java.lang.IllegalStateException: The expression "#{bindings.dynamicRegion1.
    Problem with bounded task flow: binding lost?

  • JSF Page extending a template page contains no facet tags

    Using JDeveloper 11g Version 11.1.2.1.0
    With an ADF Fusion Web Application
    I created a JSF template page by following this link:
    [http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/adf_richclient/adfrichclient.htm]
    However, when I create a JSF page based on the template no facet tags show up on the page.
    In the new JSF page I can see the template layout with the header, left and the center facet but the regions are uneditable
    and no faceets shows up under the Structure window or in the source that were in the template page.
    The last item that shows up in the Structure window is <>af:pageTemplate
    Using the Oracle Three Column Layout template the tags show up just fine.
    Any recommendations?

    Frank,
    Yes, I did have the facetRef tags in the template. I had saved the template page as a .jsf since then I have gone back and created a new template as a jspx.
    Now the facet tags do show up in the structure window and I can add layout components from the component palette and data controls as well.
    But None of that content shows up in the Designer window and when I run the page the whole area with the content just shows up as gray.

  • Dynamically created HTMLDataTable does not update its chlidren

    I have a very delicate problem that I hope to get help with. I have created a HTML data table dynamically in the Java code. The left-most column contains a checkbox so that I can select and deselect rows in the table. The problem is that the checkbox value is only read from my backing bean but changes to it are not written back.
    The strange thing is that if I create exactly the same data table statically (i.e., as tags in the JSP-page) everything works perfectly fine.
    Is there some strange property that needs to be set when creating the data table dynamically that the JSF-framework automatically sets when it creates the table from the tags?
    Below you see the code for the creation:
    HtmlDataTable component = new HtmlDataTable() ; 
    CColumnHeader   column;
    UIColumn        tableColumn;
    tableColumn = new UIColumn();
    HtmlOutputText textHeader = new HtmlOutputText() ;
    textHeader.setValue("");
    tableColumn.setHeader(textHeader);
    HtmlSelectBooleanCheckbox tCheckBox = new HtmlSelectBooleanCheckbox() ;
    tCheckBox.setValueBinding(  "value", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{data.subItems[0].selected}")) ;                       
    tableColumn.getChildren().add( tCheckBox ) ;
    component.getChildren().addAll( this.uicolumns ) ;
    JSF tag is defined as...
    <h:dataTable id="table" value="#{bean.model}" binding="#{bean.component}" var="data" />This do not work!
    However, the below code do...
    <h:dataTable id="table2" value="#{bean.model}" var="data">
    <h:column >
    <f:facet name="header">
         <h:outputText value="" />
    </f:facet>
    <h:selectBooleanCheckbox value="#{data.subItems[0].selected}" />
    </h:column>
    </h:dataTable>          For what I know these to examples should be equivalent.
    Furthermore, I noticed in the debugger that the attributes of my dynamically created table was not the same as the attributes on the one that JSF created for me. For example, each component that JSF created has got a map entry with the key javax.faces.webapp.COMPONENT_IDS for a ListArray containing the ids of its children. However if I try set this attribute in my code the column is not rendered at all. The UIColumn in the JSF-created table did have a javax.faces.webapp.FACET_NAMES=[header] in its attribute map. I don�t know if this has something to do with it, it was just one thing I noticed.
    Is this a bug or am I missing something?

    Why is that?
    What is it that actually goes wrong here? The two example works
    exactly the same in every aspect but in the first example, the JSF-
    framework only calls the getter method of the selected property and the
    latter case it calls both the getter and the setter. Otherwise the two
    tables works correctly.
    I use the binding attribute to be able to create the HtmlDataTable
    before the actual page is loaded and dynamically populate it with
    different numbers of columns depending on different system states.
    This is the reason why I have to create it dynamically and why I have to
    use the binding attribute.
    What is the reason for this not working? Am I breaking anything in the
    specification?
    What do you mean by "...with the hope that JSF will draw.."? It's is
    drawn, it is just the setter method that is not beeing invoked correctly.

  • How to create dynamic numbering in report?

    Hi all,
    Can we generate a dynamic numbering of records that appear on
    report depending how many record queried? For example if the
    query return 5 records than we will add the number from 1 to 5
    at the beginning of the record. If 8 records returned then it
    will be 1 to 8.
    like
    1. <record1>
    2. <record2>
    3. ....
    I think this feature is (should) existed in report. Any help is
    greatly appreciated.

    Hi,
    you can have the Summary column in that group . Give the function
    as count and source as the Primary key of that table.
    Draw the layout . It will work..
    Hope this Helps :-)))

Maybe you are looking for

  • Mac Mini Server with Leopard

    I installed a Mac Mini Server in my media room. Connected it on my Ethernet, where i also have two other mac mini's a Mac Book Pro throughout the house. They all do "see" and "talk" to each other, and share files, like they are supposed to do. The on

  • How do I print a week of calendar events as a list

    How do I print a week of calendar events as a list?

  • Cisco DVR constantly loses subscription infomration

    I just "upgraded" to the Cisco DVR, and I'm finding that it frequently (like several times an evening) pops up a message indicating "You are not subscribed to"" whatever channel I'm watching. So I go through the troubleshooting, or reboot the box, or

  • Bates numbering error

    I am having trouble bates stamping.  I am working with 4300 files.  When I select "replace file name with starting and ending bates number" option I get an error when I complete the process that says "The file may be read-only, or another user may ha

  • Best Practices for AD and Windows Environment

    Hello Everyone, I need to create a document having the best practices for AD containing best practices for DNS, DHCP, AD Structure, Group Policy, Trust Etc. I just need the best practices irrespective of what is implemented in our company. I just nee