[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
t:combobox defaultvalue  XML
Forum Index -> Development
Author Message
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

Hi,

is there a possibilty to set the default value dynamic by index?
I use a central helper bean which creates/manages my valid value bindings, so I got the problem that I didn't know the values in the UI bean, but I need to be shure that the combobox value is not null!
So I need to set the value to the e.g. first entry in the VVB, but I don't know the id?

Markus
[WWW]
CaptainCasa

Power User
[Avatar]

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

Hi,

you can set the default value by expression and make sure that the server side code behind the get-ter passes back the value as you desire.

Kind regards, Björn

Björn Müller, CaptainCasa GmbH
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

Good morning,

my problem is, that I have the vvb object not in direct access in my bean.
When I think about this again, a solution would be to get my helper bean through the dispatcher and create the vvb again in my bean, but than it would be better to reference the combobox directly to the vvb object in the bean than in the helper bean.
So my idea of a global vvb helper bean is not that good anymore
[WWW]
CaptainCasa

Power User
[Avatar]

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

...am not totally sure, if I can follow you. ;-)

But I want to add one side-comment: the validValuesBinding likes stable references... i.e. if the COMBOBOXComponent (on server side) picks a vvb-object from your applicaiton and then repicks (e.g. with the next request) then it will check if the vvb-object has changed. For quick checking it does not scan the items, but it scans an internal index that is part of each vvb-object (the index is changed with any manipulation of the vvb-object).

Result: if you have some generic logic that constantly builds up new vvb-instances, then you bypass this "nothing-changed-detetction-by-index". This will not cause any errors - but significant higher data volume transferred to the client (all the items).

Hope, that this does not confuse too much...

Regards, Björn

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