if i have in my jsp-file the following code:
<h:panelGrid binding="#{CrosswordPage.gridPanel1}" id="gridPanel1" rendered="#{SessionBean1.showRenderer}" style="height: 200px; left: 0px; top: 0px; position: absolute; width: 300px"/>
and in the backing bean i write:
gridPanel1 = new HtmlPanelGrid();
then i overwrite the settings from the jsp-file is that right?
and if i say gridPanel1.setRendered(false) when i click on a button the gridPanel is still here...
It just works here ..
JSF<h:form>
<h:commandButton value="toggle" action="#{myBean.toggle}" />
</h:form>
<h:panelGrid binding="#{myBean.grid}">
<h:outputText value="foo" />
</h:panelGrid>
MyBeanprivate HtmlPanelGrid grid; // + getter + setter
public void toggle() {
grid.setRendered(!grid.isRendered());
}
JSF 1.2_04 by the way.
it doesn't work in my example:
crosswordPageForm = new Form();
crosswordPageForm.setId("crosswordPageForm");
gridPanel1 = new HtmlPanelGrid();
// gridPanel1.setStyle("background-color: purple; height: 200px; left: 0px; top: 0px; position: absolute; width: 300px");
gridPanel1.setId("gridPanel1");
gridPanel1.setRendered(true);
public String b_deleteCw_action() {
// TODO: Process the button click action. Return value is a navigation
// case name where null will return to the same page.
// getSessionBean1().setShowRenderer(false);
gridPanel1.setRendered(false);
}