[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
FixGrid - Combobox  XML
Forum Index -> Development
Author Message
nbethke

Power User

Joined: 21/07/2009 12:22:41
Messages: 27
Offline

A new question ;-)
I want to build a FixGrild with a Combobox within.
Unfortunately looks it like the attached file.
In my understanding it´s logical, because I have the objectbinding in the fixgrid, so I get one combobox per row. But I want to have one combobox with all rows.
Shouldn´t I enter the objectbinding directly in the combobox? So I would get one comboboxitem per row.
Where is my error?

Thx and greets
Nadine
[Thumb - fixgrid.jpg]
 Filename fixgrid.jpg [Disk] Download
 Description
 Filesize 7 Kbytes
 Downloaded:  429 time(s)

gjones

Power User

Joined: 30/06/2009 16:52:33
Messages: 38
Offline

I'm not sure I completely understand you, but in my case I have a combo within a grid and it works just fine.

In the combobox's validvaluesbinding I have #{d.SomeClass.myvalues} and in the value property .{myvalue} (where "d" is my dispatcher and SomeClass is the class backing my "page"). Have you somehow put your value bindings object in the class providing the backing for the grid contents (i.e. for each row) or something?
nbethke

Power User

Joined: 21/07/2009 12:22:41
Messages: 27
Offline

Hmm...
this is my jsp:

[...]

<t:row id="g_7" >
<t:fixgrid id="g_8" objectbinding="#{masterdata.productgroups}" sbvisibleamount="10" width="100%" >
<t:gridcol id="g_9" text="Column" width="100" >
<t:combobox id="g_10" validvaluesbinding="#{masterdata.productgroups}" value=".{name}" width="100" >
<t:comboboxitem id="g_11" text=".{name}" value=".{name}" />
</t:combobox>
</t:gridcol>
</t:fixgrid>
</t:row>

[...]

I tried different entries with ".{name}", but nothing made it better. The fixgrid needs a objectbinding, what did you fill in there?
"productgroups" is a list of rows with the attribute "name" among others.
Did I understand wrong?
gjones

Power User

Joined: 30/06/2009 16:52:33
Messages: 38
Offline

nbethke wrote:
Hmm...
[...]
<t:row id="g_7" >
<t:fixgrid id="g_8" objectbinding="#{masterdata.productgroups}" sbvisibleamount="10" width="100%" >
<t:gridcol id="g_9" text="Column" width="100" >
<t:combobox id="g_10" validvaluesbinding="#{masterdata.productgroups}" value=".{name}" width="100" >
<t:comboboxitem id="g_11" text=".{name}" value=".{name}" />
</t:combobox>
</t:gridcol>
</t:fixgrid>
</t:row>

[...]

I tried different entries with ".{name}", but nothing made it better. The fixgrid needs a objectbinding, what did you fill in there?
"productgroups" is a list of rows with the attribute "name" among others.
Did I understand wrong? 


Wait. You want your grid contents and combo contents to be... the same thing?

I have
...
<t:fixgrid id="g_9" height="100%" objectbinding="#{d.SomeClass.gridEntries}" sbvisibleamount="20" width="100%" >
...
<t:gridcol id="g_18" text="#{rr.literals.labelproject}" width="100" >
<t:combobox id="g_19" validvaluesbinding="#{d.SomeClass.myvalues}" value=".{value}" width="100" />
</t:gridcol>

Where my class looks something like

class MyClass implements Serializable {

private ValidValuesBinding myvalues;
private FIXGRIDListBinding<SomeItem> gridEntries = new FIXGRIDListBinding<SomeItem>();
...
}
nbethke

Power User

Joined: 21/07/2009 12:22:41
Messages: 27
Offline

Thanks, I will check it tomorrow directly.
Greets
Nadine
nbethke

Power User

Joined: 21/07/2009 12:22:41
Messages: 27
Offline

It´s a bit embarrassing for me, but...I can´t find any infos about ValidValuesBinding
Now I have this:

<t:row id="g_7" >
<t:fixgrid id="g_8" objectbinding="#{masterdata.productgroups}" sbvisibleamount="10" width="100%" >
<t:gridcol id="g_9" text="Column" width="100" >
<t:combobox id="g_10" validvaluesbinding="#{masterdata.myvalues}" value=".{name}" width="100" />
</t:gridcol>
</t:fixgrid>
</t:row>

At adding values to "myvalues" I wrote

myvalues.addValidValue("name", <textINname>);

But now I have various comboboxes again. But in every box there is the same entry...
rheinrichs

Power User
[Avatar]

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

Hi!

Looks like my first experiences with comboboxes.
I attache a example with sourcecode, that works fine for me.

Did this solve your problem?

regards

PS: maybe you want to take a look at "ComboFields", too.
Now I use them for special database and reload elements. ;-)
 Filename combogrip.zip [Disk] Download
 Description
 Filesize 2 Kbytes
 Downloaded:  441 time(s)

rheinrichs

Power User
[Avatar]

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

additional screenshot for this example

[Thumb - screenshot.jpg]
 Filename screenshot.jpg [Disk] Download
 Description
 Filesize 46 Kbytes
 Downloaded:  356 time(s)

 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team