myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leyzerzon, Simeon" <simeon.leyzer...@credit-suisse.com>
Subject State doesn't get updated
Date Tue, 12 Sep 2006 14:52:46 GMT
Hi,

Could someone explain this behavior please:

I have an html panel grid bound to a backing bean property and populated dynamically.  It
seems that it only works once, all the subsequent times, the grid's getter in the backing
bean (getPanelGrid() method below) is bypassed and the state of all the children's of the
grid doesn't get changed.  Why is that?

Here are the relevant code snippets:

<h:panelGrid footerClass="subtitle" headerClass="" styleClass=""
	columnClasses="" binding="#{selector.panelGrid}">

   public HtmlPanelGrid getPanelGrid() {

        System.out.println(">>>>>>>Inside the getPanelGrid().....");
        panelGrid = new HtmlPanelGrid();
        panelGrid.setColumns(4);
        panelGrid.setBgcolor("red");

        HtmlSelectOneMenu chooser = new HtmlSelectOneMenu();
        chooser.setId("reportsOfCategory");
        chooser.setOnchange("submit()");
        chooser.setValue("${selector.reportName}");
        chooser.setValueChangeListener(application.createMethodBinding(
                "#{selector.buildControls}",
                new Class[] { ValueChangeEvent.class }));
        chooser.setTitle("Please select a report to run");
        ValueBinding chooserBinding = application.createValueBinding("#{selector.chooserBinding}");
        System.out.println("Value binding for the chooser is set to: " + chooserBinding);
        chooser.setValueBinding("value",chooserBinding);
        chooser.getChildren().add(
                ReportsPerCategoryMapper.getOptionItems(this.getCategory()
                        .getName()));

        panelGrid.getChildren().add(chooser);
        // this is only for testing
        panelGrid.getChildren().add(displayCategory());
        return panelGrid;
    }


Thanks for the answers,

Simeon Leyzerzon


==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:


http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================

Mime
View raw message