on 07-24-2007 10:45 AM
Hi,
I am not sure what changes have taken place in blogging tool but the textarea tag no longer works.
Look at this blog and the entire code is messed up now - https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/4591. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
How do I solve this issue ?
Regards,
Subramanian V.
Hi,
Someone else wrote in saying more or less the same thing about that page. Today it seems to be OK. They were trying to use a newer version of Firefox which returned XML code instead of the script area. Maybe that some browsers are having problems interpreting the text tags. I've embedded the code from that page below.
Best
DB
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateTestCompView.IContextElement.FILE_RESOURCE);
IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) attributeInfo.getModifiableSimpleType();
IContextElement element = wdContext.currentContextElement();
if(element.getFileResource()!= null)
{
try
{
String mimeType = binary.getMimeType().getFileExtension();
wdComponentAPI.getMessageManager()=.reportSuccess("File " + binaryType.getFileName() + " has been successfuly uploaded ! ");
}
catch(Exception e)
{
throw new WDRuntimeException(e);
}
}
else
{
wdComponetAPI.getMessageManager().reportException("File could not be uploaded", true);
}
// Till here the code remains the same as in File Upload tutorials
// Now the code for retrieving the values from the Excel sheet
try
{
ByteArrayInputStream bais = new ByteArrayInputStream(element.getFileResource());
Workbook workbook = Workbook.getWorkbook(bais);
Sheet sheet = workbook.getSheet(0);
Cell a1 = sheet.getCell(0,0);
Cell a2 = sheet.getCell(0,1);
wdComponentAPI.getMessageManager().reportSuccess("Value of cell a1 = " + a1.getContents());
wdComponentAPI.getMessageManager().reportSuccess("Value of cell a2 = " + a2.getContents());
}
catch(Exception ex)
{
wdComponentAPI.getMessageManager().reportException(ex.getLocalizedMessage(),true);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.