myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: [Trinidad]
Date Fri, 14 Mar 2008 11:16:35 GMT
Hi,

On Wed, Mar 12, 2008 at 5:49 PM, Walter Mourão <walter.mourao@gmail.com> wrote:
> Hi folks,
> I wrote a code to re-render a <tr:panelLabelAndMessage/> after a dialog
> closes but it is not working. The dialog opens as expected and everything
> works fine except the panelLabelAndMessage is not being re-rendered after
> the dialog closes.
>  The code is similar to:
>
> <tr:form>
> ...
> <tr:panelLabelAndMessage ... partialTriggers="newCategoriaPessoaInstance">
>  ...
>   <tr:commandButton id="newCategoriaPessoaInstance" ...
>     partialSubmit="true" useWindow="true" windowWidth="500"
> windowHeight="450"/>
> </tr:panelLabelAndMessage>
>  ...
> </tr:form>
>
> Any hints ?


I'd do something like that (using MethodExpression on commandButton's
returnListener attribute):

  public void handleReturn(ReturnEvent event)
  {
    UIComponent comp =
event.getComponent().findComponent("idOfPanelLabelAndMessageComponent");
    RequestContext afContext = RequestContext.getCurrentInstance();
    afContext.addPartialTarget(comp);
  }

-Matthias

>
> Thanks in advance,
>
>
> --
> Walter Mourão
> http://waltermourao.com.br
> http://waltermourao.blogspot.com
>  http://arcadian.com.br
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Mime
View raw message