cancel
Showing results for 
Search instead for 
Did you mean: 

Blog Code Formatting

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

David
Advisor
Advisor
0 Kudos

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);
             }
             
            

Former Member
0 Kudos

Hi David,

I am using FIrefox(2.0.0.5) too. I think what you say is right ! I checked the same today and it didn't have any issues. Thank you once again for looking into the issue straight away.

Regards,

Subramanian V.

Answers (0)