You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Luka Surija <lu...@iytim.hr> on 2007/04/25 07:55:58 UTC

Re: how do I refresh a table component after selecting and deletingone or more rows ?

If you want to use PPR you can add on actionListener method following 
lines to resolve the problem:

public void myAction(ActionEvent event){

    // action code

    RequestContext requestContext = RequestContext.getCurrentInstance();
    
requestContext.addPartialTarget(event.getComponent().findComponent("trTableId"));
}

and this action will refresh only tr:table with id="trTableId".

Edmond B. Mulemangabo wrote:
> Problem solved; thank you.
>
> Simon Lessard wrote:
>
>   
>> Add "table:discard_selected" as partialTarget, tr:table is a naming
>> container, and I don't think we have a children trigger detection algorithm
>> implemented yet.
>>     
>
> Thank you for the information.
> I didn't have to use partialTarget; I , instead, added an "action"
> attribute to my commandButton component to force page refresh.
>
>   
>> Also, you should not keep a a bound component in session (using binding
>> attribute). I read that you want to keep the bean session scoped, so you'll
>> have to split it in two beans:
>>     
>
> I've removed the binding attribute from the table component.
>
> regards.
>
> --
> Edmond/
>
>   


Re: how do I refresh a table component after selecting and deletingone or more rows ?

Posted by "Edmond B. Mulemangabo" <ed...@uclouvain.be>.
Luka Surija wrote:
> If you want to use PPR you can add on actionListener method following
> lines to resolve the problem:
> 
> public void myAction(ActionEvent event){
> 
>    // action code
> 
>    RequestContext requestContext = RequestContext.getCurrentInstance();
>   
> requestContext.addPartialTarget(event.getComponent().findComponent("trTableId"));
> 
> }
> 
> and this action will refresh only tr:table with id="trTableId".

I appreciate your help; thanks.

--
Edmond/