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 10335 - Not generating code from bean Customizer
Summary: Not generating code from bean Customizer
Status: CLOSED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: -FFJ-
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Tomas Pavek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-15 04:59 UTC by dpociu
Modified: 2003-06-30 18:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dpociu 2001-03-15 04:59:42 UTC
Tomas,

A little late, but here it is. I just tried another customizer today straight 
from  O'Reilly's Java examples on writing customizers, and it did the same 
thing: properties change on the screen but no code is generated. Here's the 
conversation thread we had on this in January:

David Pociu wrote:
> When building a Customizer to deal with multiple
> related properties of a bean, I want to know what
> triggers the generation of code in Forte. The
> GridBagLayout customizer is a good example of the
> type of functionality I need in my own customizer,
> in the sense that whenever a property is modified
> in the customizer screen, code is also generated
> for the setting of that property.


I suppose your customizer class implements java.beans.Customizer interface.
Forte then should add PropertyChangeListener to it and handle all changes
your customizer fires.


> I have succesfully generated code from a Property
> Editor, by using the
> public String getJavaInitializationString()
> method to return the code that Forte generates for
> that property, but had no luck with a Customizer.


Bean customizer itself is not intended to provide any java code for the bean
- it just sets properties for which code is then generated. If your bean
can't be set using properties then it must be serialized...
 
> In the customizer, I am currently able to change
> the properties (and see the properties change in the
> Component Inspector), but I don't know how to trigger
> code generation by Forte from within the customizer
> for the same properties.


This is certainly a bug in Forte - if properties are changed in Component
Inspector they should be also generated to code... Please file a bug to
bugzilla (at http://w ww.netbeans.org/bugs.html). Thanks.


- Tomas Pavek


-------------------------------------------------- -------------------
To unsubscribe, e-mail: nbusers-unsubscribe@netbeans.org
For additional commands, e-mail: nbusers-help@netbeans.org


 

 
 
 
Reply  
Tomas Pavek  05:23am Jan 18, 2001 PST  
 
 
I forgot to mention - file the bug against "form" module, assign to me
(tomas.pavek@netbeans.com).


Tomas Pavek wrote:
>> In the customizer, I am currently able to change
>> the properties (and see the properties change in the
>> Component Inspector), but I don't know how to trigger
>> code generation by Forte from within the customizer
>> for the same properties.
>
>This is certainly a bug in Forte - if properties are
> changed in ComponentInspector they should be also
> generated to code... Please file a bug to
> bugzilla (at http://w ww.netbeans.org/bugs.html). Thanks.
Comment 1 Tomas Pavek 2001-03-15 17:48:26 UTC
OK, I'll look at it.
Comment 2 Tomas Pavek 2001-03-15 18:28:06 UTC
I think I've fixed it. Should be available in NetBeans 3.2 Beta build 6 (also 
in dev build). Could you verify the fix? Thanks.
Comment 3 Tomas Pavek 2001-04-03 19:13:43 UTC
Reopening, as it is not fixed entirely yet...
Comment 4 Tomas Pavek 2001-04-04 09:59:10 UTC
Hopefully fixed now (in trunk and release 32 branch).
Comment 5 Marian Mirilovic 2001-04-09 17:30:08 UTC
verified
Comment 6 Tomas Pavek 2001-12-06 11:00:52 UTC
Unfortunatelly, this does not work again in 3.3.0. There's a security 
exception appearing suddenly, while the code in form module has not 
change since 3.2.1. Shame on us we did not notice this sooner - now 
it's too late to fix it.

I'll use AccessController.doPrivileged call to process changes fired 
from bean customizer - to avoid security problems, although there 
should not be any, but we probably cannot rely on it... This will be 
fixed for NB 3.3.1. For NB 3.3.0, a workaround is to run IDE with:
-J-Dnetbeans.security.nocheck=true
Comment 7 Tomas Pavek 2001-12-07 10:59:02 UTC
Fixed in dev and 3.3.1.
Comment 8 Marian Mirilovic 2002-02-08 07:45:39 UTC
verified in [nb_dev](20020207)
Comment 9 Quality Engineering 2003-06-30 18:25:37 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.