-
1. Re: Block Module, need help
noel.rocher Jul 8, 2003 11:54 AM (in response to noel.rocher)Attachement didn't work
-
2. Re: Block Module, need help
julien1 Jul 8, 2003 4:16 PM (in response to noel.rocher)ok so what you want to do is to discover block properties dynamicly ?
julien -
3. Re: Block Module, need help
noel.rocher Jul 9, 2003 4:21 AM (in response to noel.rocher)Hi Julien,
Discovering properties is easy with reflection, the problem is to provide a way to only select the one that can be exposed and , for example, a way to know if a string property require a simple line or a textarea.
Is it reasonable to think that blocks should come with a helper class that allow property settings and a render method ?
Noel -
4. Re: Block Module, need help
julien1 Jul 9, 2003 5:31 AM (in response to noel.rocher)yeah right.t his already exist in some kind.
jboss make use of javabean property editors to make the conversion between strint<->data
look at the nukes JMX module that is doing that.
on the other side, PN original block allow them to dispkay HTML for configuration and handle the changes.
maybe we can found a neat way to do that, what do you think ? -
5. Re: Block Module, need help
noel.rocher Jul 9, 2003 5:42 AM (in response to noel.rocher)It is a good thing to let blocks controlling what can be manipulated. However, block module is the right place to execute the changes.
Helper classes or directly in blocks ?
Helper classes is clearer but directly in blocks is simpler. -
6. Re: Block Module, need help
noel.rocher Jul 9, 2003 6:07 AM (in response to noel.rocher)BTW,
Try it, it's funny to see blocks moving in live. -
7. Re: Block Module, need help
julien1 Jul 9, 2003 8:22 AM (in response to noel.rocher)I agree... a block should be asked to display a part of its configuration data.
it was part of the first block commit I did actually, I remember :
public final void edit(Page page) { } is supposed to be called by the Block module to include the custom config of the block instance.
public final void update(Page page) { } is supposed to be called by the Block module to give a chance to the block instance to update its state.
you should put them again in BlockSupport class and use them.
julien