Author |
Message |
21/03/2010 22:14:14
|
mreich
Power User
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
|
|
|
22/03/2010 05:24:36
|
CaptainCasa
Power User
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 |
|
|
22/03/2010 06:55:13
|
mreich
Power User
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
|
|
|
22/03/2010 08:09:35
|
CaptainCasa
Power User
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 |
|
|
|