-
1. Re: Dynamic Blocks
julien1 Jul 20, 2003 3:05 PM (in response to lynchie)I will look at it, thanks
julien -
2. Re: Dynamic Blocks
julien1 Jul 22, 2003 6:06 PM (in response to lynchie)I have just started to look at your work, it seems that you are doing to jobs in one :
1.managing dynamic blocks
2.managing RSS blocks
I think I will split that in two parts. Can we discuss that ?
I have a question, why are you using an EJB there ? it is possible to persist blocks in the database, i.e each deployed block through the JDBCDeploymentScanner will survive at a restart and the block will keep the values they add before.
So please tell me if there is another use for that EJB I did not see.
Thanks for your work it looks great, it will enhance Nukes a lot.
julien -
3. Re: Dynamic Blocks
lynchie Jul 23, 2003 3:17 PM (in response to lynchie)Im not sure how you intend on splitting them into two parts? The idea of the block is so that you can put any content into it, so you can just display some static html text, or get the content from another source, i.e. an RSS feed.
Looking at it now, there is no need for the EJB at all. Im only getting to grips with JMX at the moment, but I can now see that I could remove all the EJB code and use JMX to set the attributes. Ill update the code this weekend, probably Friday evening, removing all the EJB stuff, clean it up, and ill send it back to ya when its done. -
4. Re: Dynamic Blocks
julien1 Jul 23, 2003 3:25 PM (in response to lynchie)I am currently working on the block module.
It enables you to create block dynamicly. So you don;t have to take care of that.
If you want your block to provide customisation use the methods :
public void edit(org.jboss.nukes.html.Page page);
public void update(org.jboss.nukes.html.Page page);
in edit : you can display the html you need to configure a block instance
in update you : update the block with the url you created in edit.
then the changes are persisted in the database (mbean attributes)
when a block is configured by the block module it calls the edit method to give the block to provide extra configuration.
this module also enables you to act on block : change position and start/stop/create/destroy
so you can focus on RSS only. in fact the only customization that block would need would be the URL of the target (being an rss feed ot something else)
with the content type of the URL you can adapt your block to the rendering : RSS, image, text, html, etc...
if its an rss, parse it and display it
if its an image, put a bare img tag
etc....
julien