Hello, Take a look at yout onClick method. Actually you aren't setting it to false. edit==false compares values..... you need to set it. edit = false;
[]ś -- Luís Augusto Machado Moretto. Esp. SCJP - Sun Certified Java Programmer 5 SCJA - Sun Certified Java Associate http://member.acm.org/~malacma skype:luisaugustomachadomoretto msn:mala...@hotmail.com mala...@acm.org +55 48 8431-7904 On May 2, 12:41 pm, Rafał Laczek <rafal_lac...@wp.pl> wrote: > Hi, > > Can you help me please. > In my below code initial value of edit Boolean variable is TRUE. > The problem is that clicking on link I am not able to pass the new FALSE > value in order to execute the code in ELSE condition. > I'm checking and onClick method works. > Due to complexity of the project I don't want to execute anything in > onClick() except sending new value of the edit variable. > Thank you in advance for your help. > > Best regards, > Rafal > > Boolean edit = true; > > if(edit){ > form.add(new Fragment("Panel","nk0").add(newLabel("Kode0","Test"))); > Fragment fragmentButton = new Fragment("newButtons","newbuttons0"); > form.add(fragmentButton); > fragmentButton.add(new Link("newDataLink"){ > @Override > public void onClick(){ > edit == false; > } > }); > > }else{ > > form.add(new Fragment("Panel","nk1").add(new TextField<String>("Kode1"))); > > }); > > -- > You received this message because you are subscribed to the Google > Groups "Java EE (J2EE) Programming with Passion!" group. > To post to this group, send email to > java-ee-j2ee-programming-with-passion@googlegroups.com > To unsubscribe from this group, send email to > java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/java-ee-j2ee-programming-with-passion?... -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en