Project

General

Profile

Actions

Feature #2583

open

WTableView is not refreshed after clear() if create in the constructor and not init - see example (not sure if it is really a bug)

Added by Michael Vilsker about 10 years ago. Updated about 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
01/21/2014
Due date:
% Done:

0%

Estimated time:

Description

public class AppTableWidget extends FormView{

private WTableView t = new WTableView();

private WPushButton b = new WPushButton();

private WPushButton c = new WPushButton();

public AppTableWidget(){

super(tr("test"), null);

init();

}

private void init(){

clear();

bindWidget("t", t); // t will not work b will work.

bindWidget("c", c);

c.clicked().addListener(this, new Signal.Listener() {

@Override

public void trigger() {

init();

}

});

}



${t}${c}

Actions #1

Updated by Michael Vilsker about 10 years ago

Michael Vilsker wrote:

> public class AppTableWidget extends FormView{
> 
>   private WTableView t = new WTableView();
>   private WPushButton b = new WPushButton();
>   private WPushButton c = new WPushButton();
> 
>   public AppTableWidget(){
>       super(tr("test"), null);
>       init();
>   }
> 
>   private void init(){
>       clear();
>       
>       bindWidget("t", t); // t will not work b will work.
>       bindWidget("c", c);
> 
>       c.clicked().addListener(this, new Signal.Listener() {
>           @Override
>           public void trigger() {
>               init();
>           }
>       });
> }
> 
> 
> 
> 
>       <message id="test">
>           ${t}${c}
>       </message>
Actions #2

Updated by Koen Deforche about 10 years ago

  • Status changed from New to InProgress

Hey,

My understanding of this is that clear() will "delete" the bound widgets. While "delete" doesn't really exist in Java, the remove() will have side effects that might ruin its state. But perhaps this can be rectified in JWt.

koen

Actions #3

Updated by Koen Deforche about 10 years ago

  • Tracker changed from Bug to Feature
  • Project changed from Wt to JWt
  • Status changed from InProgress to New
  • Assignee deleted (Koen Deforche)
Actions

Also available in: Atom PDF