Skip to Content

EVS/SVS/OVS

Hi All,

I am trying to build value help in my application and have got stuck with few items. The value help I need is for a field "Product ID" that is being fetched from the backend system. In the backend system, the key is in format of GUID (binary). For the user, the ID is displayed (for e.g. ID - DEMO_PRODUCT and GUID is 41F2034242424DB00321). The user should be able to retrieve the Product ID based on certain query like Product ID or description. I tried to use OVS and it does not allow me to render the popin window since GUID (binary field) is part of the result set. Is there any way to avoid this? Remember, I need to have this GUID for my processing.

For simple/extended value help, how can I use GUID and ID combination and just show the ID to the user. Do anyone has some code sample to share on adding the valueset to the simple/extended valueset from the backend model?

I have this example code from sample application:

String attributeName = IPrivateMain.IContextElement.COLOR;

IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);

ISimpleType simpleType = attributeInfo.getSimpleType();

ISimpleValueSet valueset = simpleType.getSVServices().getValues(); //??????????

Object key = element.getAttributeValue(attributeName);

try {

simpleType.checkValid(key);

return valueset.getText(key);

} catch (DdCheckException e) {

return "";

}

I need to know how to set the valueset.

Thanks for your help.

Regards,

Hemanth

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Feb 07, 2007 at 05:37 AM

    valueSet is same as HashMap in Java, which contains a key,value pair

    After getting the attributeInfo object,i think you should proceed with following way

    //get simpleModifiable object for atrInfo.

    ISimpleTypeModifiable simpleType = atrInfo.getModifiableSimpleType();

    //get Modifiable value set for simple type.

    IModifiableSimpleValueSet valueSet = simpleType.getSVServices ().getModifiableSimpleValueSet();

    //If you want to put value in valueSet do

    valueSet.put("key","value");

    Add comment
    10|10000 characters needed characters exceeded