Author |
Message |
10/06/2011 14:54:25
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi,
Sometimes I would have appreciated a method getValidValue(String value) for the ValidValuesBinding class that returns a ValidValue. Of course I could get the value by iterating, but this wouldn't be efficient. Perhaps you could provide it?
There is already a similar method: removeValidValue(java.lang.String value).
Regards, Daniel
|
|
|
10/06/2011 16:09:23
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
the week seems to end with a request that is simple to fulfill for us...!
We will provide this method with the next update.
Thanks + regards!
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
20/06/2011 17:28:32
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi,
I have tried out the new method getValidValueByName(...) and it doesn't work as I expected.
Could you check?
Regards, Daniel
|
|
|
21/06/2011 06:58:54
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
hmmm the methods are:
Code:
/**
* Passes back valid value for corresponding value.
*/
public ValidValue getValidValueByValue(String value)
{
for (ValidValue vv: m_validValues)
{
if (ValueManager.checkIfStringsAreEqual(value,vv.getValue()) == true)
{
return vv;
}
}
return null;
}
/**
* Passes back valid value for corresponding name. In case of multiple values
* having the same name, the first value will be returned.
*/
public ValidValue getValidValueByName(String value)
{
for (ValidValue vv: m_validValues)
{
if (ValueManager.checkIfStringsAreEqual(value,vv.getText()) == true)
{
return vv;
}
}
return null;
}
Are you calling the wrong one?
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
21/06/2011 08:42:55
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi,
Yes, I used the wrong one. I overlooked the other method. Sorry for incovenience.
Regards, Daniel
|
|
|
|