cancel
Showing results for 
Search instead for 
Did you mean: 

OVS byte array problem

Former Member
0 Kudos

Hi,

I have created a custom controller that implements the functionality for OVS.

The OVS retrieves a parameter called guid of the datatype byte[].

I need to set this guid (from cust controller)to a context attribute called Elementid (on View) which is also of the same datatype i.e. byte[].

The application throws an exception if the guid is a part of the OVSOutputNode.

How can I set the guid to Elementid without having it on the OVSOutputNode?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Shikha,

if it's possible, try to move byte[] attribute to 1..1 non-singleton subnode of OVSOutputNode. Re-map attribute in View controller to attirbute in sub-node.

VS

Former Member
0 Kudos

Hi VS,

I moved the byte[] attribute to 1..1 non-singleton subnode of OVSOutputNode and Re-mapped attribute in View controller to attirbute in sub-node, but the guid remains to be null.

Shradha.

Former Member
0 Kudos

Hi,

Every time onQuery gets executed, I copy the model output node to the OVSOutputNode (and explicitly copy the guid from model output node to the sub node).

Now when I try to access the guid, it returns the first element of the search result.

How can I get the reference of the selected element of the search result?

Former Member
0 Kudos

Shikha,

Make sure your sub-node for GUID is non-singleton, i.e. singleton=false.

If this doesn't help automatically, post your code for copying GUID.

VS

Former Member
0 Kudos

Hi,

The sub node for guid is 1..1 and non-singleton.

This is the code I use in applyResult() where I set the Elementname:

applicationNodeElement.setAttributeValue("Elementname", queryOutputNodeElement.getAttributeAsText("Text1"));

The code in the main controller, where I am trying to set the ElementId.

if(wdContext.currentOVSBuckOutputElement() != null){

wdContext.currentOrgaViewElement().setElementid(wdContext.currentOVSBuckOutputElement().nodeBuckGuid().currentBuckGuidElement().getGuid());

}

Can I set the Elementid in the applyResult() itself like Elementname, if so, how do I do it?