Feature #2583
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 over 8 years ago.
Updated over 8 years ago.
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}
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>
- 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
- Tracker changed from Bug to Feature
- Project changed from Wt to JWt
- Status changed from InProgress to New
- Assignee deleted (
Koen Deforche)
Also available in: Atom
PDF