[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Bug in t:checkbox selected = false  XML
Forum Index -> Development
Author Message
rheinrichs

Power User
[Avatar]

Joined: 08/05/2009 10:05:36
Messages: 209
Offline

Hi!

I include a "t:checkbox" in a "t:fixgrid" an bind the attribute "selected" to an BeanUI.

if the init-value (in bean) is "true" everything works fine,
if the init-value (in bean) is "false" the checkbox doesn't work as assume.
that means:
- selection only posible after "double-click"
- table only support single selection.

Is this a know bug?

regards
;o) Roland
gargula

Power User

Joined: 18/01/2008 13:01:44
Messages: 34
Offline

Hi Roland,

have you the attribute "value" included too???
The attribute "flush" should be set true....

We have both attributes includet and it works fine?!

regards
Christian
gargula

Power User

Joined: 18/01/2008 13:01:44
Messages: 34
Offline

Sry, there is no attribute "value"... We use a macro for checkbox and radiobutton...
Please check the attribute "flush"...

Christian
rheinrichs

Power User
[Avatar]

Joined: 08/05/2009 10:05:36
Messages: 209
Offline

Hi!

Thx for help, after activating "flush" the behavior between init with "true" or "false" is identical.
Now both doesn't work. :-S

any other idea?

regards
;o) Roland
gargula

Power User

Joined: 18/01/2008 13:01:44
Messages: 34
Offline

Hi,

in the Bean you have a "public" getter and setter, that the checkbox can react and show the content
They should be boolean

regards
Christian
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Offline

Hi,

the idea of setting "selected" directly is not too perfect ;-). See JavaDoc of FIXGRIDItem:


Code:
     /**
      * Do not set the selection direclty on item level. Use the method
      * FIXGRIDListBinding.selectItem(...) in order to do so.
      */
     public void setSelected(boolean value) { m_selected = value; }
 


So what you can do is: have on own property "mySelected" and then implement set/get to call selectItem/deselectItem in the implementation.

Reason: the FIXGRIDBinding keeps a list of selected items as well, only selectItem/deslectItem ensure that the selections on FIXGRIDBinding and on FIXGRIDItem level are in synch.

An, b.t.w.: getSelected() will always pass bach the correct result.

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team