cancel
Showing results for 
Search instead for 
Did you mean: 

Errors using Node for File Uploading

Former Member
0 Kudos

Hi all,

I have a Node (FileNode) and 2 attributes under FileNode, fileName (string) and fileData (binary).

FileNode

- fileName (string)

- fileData (binary)

They are assign to the FileUpload UI element, data and filename respectively.

In my wdDoInit(), it throws a null pointer exception when it reaches this statement. attributeInfo.getModifiableSimpleType();


IWDAttributeInfo attributeInfo =  wdContext.getNodeInfo().getAttribute(IPrivateKnowledgeManagementView.IFileNodeElement.FILE_DATA);
attributeInfo.getModifiableSimpleType();

What could be the reason?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

As your context is

FileNode

fileName (string)

fileData (binary)

Change the following

IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateKnowledgeManagementView.IFileNodeElement.FILE_DATA);

attributeInfo.getModifiableSimpleType();

To

IWDAttributeInfo attributeInfo = wdContext.nodeFileNode().getAttribute(IPrivateKnowledgeManagementView.IFileNodeElement.FILE_DATA);

attributeInfo.getModifiableSimpleType();

Regards

Ayyapparaj

former_member312910
Participant
0 Kudos

Hi

Try this piece of code.

ISimpleTypeModifiable reasonCode =wdContext.nodeVn_upload().getNodeInfo().getAttribute("Va_filedata").getModifiableSimpleType();

where "Va_filedata" is the name of the value attribute in the node.

Make sure you write the code in the component controller. not in the view init

cheers

Deepu