This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 108293 - BP Ajax Rich Text Editor does not render/work
Summary: BP Ajax Rich Text Editor does not render/work
Status: RESOLVED WONTFIX
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Joseph Silber
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-27 15:04 UTC by Lark Fitzgerald
Modified: 2007-10-01 21:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
what we see (36.37 KB, image/jpeg)
2007-06-27 15:05 UTC, Lark Fitzgerald
Details
what we should see (46.15 KB, image/jpeg)
2007-06-27 15:06 UTC, Lark Fitzgerald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lark Fitzgerald 2007-06-27 15:04:20 UTC
VW 5.5.1 & 6.0 M10 (0.1.1 & current 0.1.2 in progress show this issue)

BP Ajax Rich Text Editor does not render/work (images attached)

------
In VWP 5.5 dojo toolkit was not added to the woodtsock jar. In 5.5.1 it was added. That is what is breaking the Blue 
print component (itself is has a bundled dojo toolkit)

I did some experiment.

- Remove dojo toolkit in blue print components and use the one from woodstock
- Upgrade the dojo toolkit from 0.4.1 to 0.4.3

None of them helped. I still see the problem. The toolbar is not rendered and only  a small bounding box is rendered.

Dan, Is there anything special needed to be done to render a dojo toolkit widget like Editor2 when used along with 
woodstock components.

- Winston 


I'm not familiar with how these particular widgets are defined in the page. However, if the Dojo is looking for "dojo" 
tags, our head and themeLinks tags support a parseWidgets attribute you can set to true. There is a considerable 
performance increase when this property is false because it prevents Dojo from parsing the page for "dojo" tags.

Dan 


Dan,

Rich Text Editor is rendered as element <textarea> with dojoType="Editor",  not in the usual dojo.widget.defineWidget
() method

       writer.startElement("textarea", editor);
       writer.writeAttribute("id", clientId, "id");
       writer.writeAttribute("name", clientId, "clientId");
       writer.writeAttribute("dojoType", "Editor", null);
       Object value = editor.getValue();
       if (value != null) {
           writer.write(value.toString());
           writer.write("\n");
       }
       writer.endElement("textarea");

Not sure if this is a problem, when combined with woodstock components.

- Winston 



Dojo needs to parse the page for this type of widget. Try setting head tag's parseWidgets=true property.

Dan 


Wow!, the solution is so simple. That is it. Widget is showing correctly now.

BTW, does this introduce any performance issue.

- Winston 


One of the performance suggestions in the Dojo manual is to set parseWidgets=false. This will improve page rendering 
performance because Dojo does not parse each and every HTML tag in the page looking for tags. Since we're creating 
widgets dynamically, this is not needed in most cases and makes sense to turn it off by default.

Dan
Comment 1 Lark Fitzgerald 2007-06-27 15:05:53 UTC
Created attachment 44460 [details]
what we see
Comment 2 Lark Fitzgerald 2007-06-27 15:06:25 UTC
Created attachment 44461 [details]
what we should see
Comment 3 Matthew Bohm 2007-06-29 21:07:20 UTC
This just needs to be documented (setting head tag's parseWidgets property to true). This is not actually a defect.
Comment 4 Jayashri Visvanathan 2007-07-16 19:53:33 UTC
Assigning this to be Joe. 
Work around recommended by Matt should be documented in the appropriate BP Ajax tutorials/articles.
Lowering this to a P3 because this is a sample component issue.
Comment 5 Jayashri Visvanathan 2007-10-01 21:28:37 UTC
RichTextEditor is no longer a supported component. Closing bug..