Hi,
you should render partially the box or panel inside the popup not the popup
itself when the App button is clicked.
Helmut
----- Original Message -----
From: "Tobias Reifenstuel" <[EMAIL PROTECTED]>
To: <users@myfaces.apache.org>
Sent: Friday, May 16, 2008 5:03 PM
Subject: [Tobago] a listbox in a popup
Hi All,
I have a problem with building a popup with a listbox.
Case 1 (see code below):
If I click on the "Add" button the popup will be partially rendered, but
without the new entry inside the listbox. The new entry should be added by
the actionListener.
Case 2 (also code below, but without the attribute tag inside the "Add"
button tags):
If I drop the tag <tc:attribute name="renderedPartially"
value=":page:popup" /> within the "Add" button tags, the popup disappears
after clicking on the button "Add". I can open it again and the new entry
is available, but this is not very user-friendly.
For me it seems that the combination of actionListener and
renderedPartially doesn't work.
<tc:popup id="popup" width="300px" height="200px" >
<tc:box label="Author input">
<f:facet name="layout">
<tc:gridLayout rows="*;50px"/>
</f:facet>
<tc:selectOneListbox id="listbox"
value="#{author.selectedAuthor}">
<f:selectItems value="#{author.authors}" />
</tc:selectOneListbox>
<tc:panel id="buttons">
<f:facet name="layout">
<tc:gridLayout columns="*;*;*" />
</f:facet>
<tc:button actionListener="#{author.onNew}"
label="Add">
<tc:attribute name="renderedPartially"
value=":page:popup" />
</tc:button>
<tc:button label="Ok">
<tc:attribute name="popupClose"
value="afterSubmit" />
<tc:attribute name="renderedPartially"
value=":page:popup" />
</tc:button>
<tc:button label="Cancel">
<tc:attribute name="popupClose"
value="immediate" />
</tc:button>
<tc:cell />
</tc:panel>
</tc:box>
</tc:popup>
Thanks for any helping.
Tobi