cancel
Showing results for 
Search instead for 
Did you mean: 

must not modify the datatype of a mapped attribute

Former Member
0 Kudos

MappedAttributeInfo(MailOutboundView.excel): must not modify the datatype of a mapped attribute.


IWDAttributeInfo attInfo=wdContext.getNodeInfo().getAttribute(IPrivateMailOutboundView.IContextElement.EXCEL);
IWDModifiableBinaryType binaryType=(IWDModifiableBinaryType)attInfo.getModifiableSimpleType();
binaryType.setFileName("MailOutboundReport");
binaryType.setMimeType(WDWebResourceType.XLS);

i opted for solution2 but i dont know how to start.

In the componentController

i defined a excelfile --binary after that i mapped to the view

In view i need to create another excelfile2-binary.

after that i copy excelfile to excelfile2 of type binary.

then i start modify excelfile2 ?

but in coding , i don't how to do ...

anyone pls help

solution 1

Actually, it doens't matter whether it is view or interface controller, the key point here is that you must modify only "origin" node attribute, not mapped one.

solution 2

So either modify "origin" in used component, or create separate attribute in owning controller, alter it, and then copy elements back and force.

Message was edited by:

yzme yzme

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

In view controller u cant able to modify attribute and its properties.Only the way is u can able to modify in an component component controller...

Regards,

Suresh.

Former Member
0 Kudos

If i created an excelfile in the component controller i am going to modify this

code which is from IPrivateMailOutboundView

my componentcontrollername is IPrivateSmsGatewayAppComp

IWDAttributeInfo attInfo=wdContext.getNodeInfo().getAttribute(IPrivateMailOutboundView.IContextElement.EXCEL_FILE);

IWDModifiableBinaryType binaryType=(IWDModifiableBinaryType)attInfo.getModifiableSimpleType();

binaryType.setFileName("MailOutboundReport");

binaryType.setMimeType(WDWebResourceType.XLS);

Former Member
0 Kudos

component controller name is not need...just u have to access using view name PrivateMailOutboundView its enough.

Former Member
0 Kudos

Hi ,

Just put this piece of code in wdDoInit of component controller... and delete the similare lines in view..


IWDAttributeInfo attInfo=wdContext.getNodeInfo().getAttribute(IPublicSmsGatewayAppComp.IContextElement.EXCEL_FILE);
IWDModifiableBinaryType binaryType=(IWDModifiableBinaryType)attInfo.getModifiableSimpleType();
//set other details using "binaryType"

This would suffice..

Regards

Bhararthwaj