Thursday Apr 12, 2007

Unexpected Behavior: Visual Component Does Not Appear on Page

A component developer described the following problem to me:

I have developed the custom component in netbeans. There are no errors, I am able to build the complib successfully. But the problem is, when I drag and drop the component, I am not able to see that in design page or JSP page but I am able to see the component in outline window, Java source and properties…etc.

This caused me to add a troubleshooting section to a page that badly needs updating. The pertinent information is repeated here.

If you try to add a new visual component from the palette to a page in the IDE and expect something to appear on the page and instead only see the component in the Outline view, then this often means that the associated custom BeanInfo class of the component cannot be instantiated. In reality, a default BeanInfo class is created internally by introspection, but the default is not very useful. One way to check this is to write a unit test that instantiates the BeanInfo classes of your components.
About

edwingo

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today