Hi,

  See intermixed.

    Cedric

Nathan Coast wrote:

> Hi,
>
> I'm trying to develop a basic portal app using tiles.  Each user may have
> selected different components that they want to display in different
> locations.  At the moment the I'm thinking of implementing this by
> dynamically building up a Definition for each user containing their
> preferences - an object representation of something like this:
>
> <definition name="main.portal.body" path="/layout/columnsLayout.jsp">
>           <put name="numCols" value="2" />
>           <putList name="list0" >
>             <add value="/tutorial/portal/login.jsp" />
>             <add value="/tutorial/portal/messages.jsp" />
>             <add value="/tutorial/portal/newsFeed.jsp" />
>             <add value="/tutorial/portal/advert2.jsp" />
>           </putList>
>           <putList name="list1" >
>             <add value="/tutorial/portal/advert3.jsp" />
>             <add value="/tutorial/portal/stocks.jsp" />
>             <add value="/tutorial/portal/whatsNew.jsp" />
>             <add value="/tutorial/portal/personalLinks.jsp" />
>             <add value="/tutorial/portal/search.jsp" />
>           </putList>
> </definition>
>
> when saving a users preferences I'd convert the object tree to xml and store
> it somewhere.
>
> Is this a good idea?

  Its one possibility. You can also build programmatically the definition tree,
and save it / read it as a serialized object.

>
> Is there a standard way of reversing the Digester code (taking an object
> tree and generating XML) - do we need a regurgitater :)

  I don't know about a standard way to revers digester code. Could be
interesting.

>
> Is it possible to re-use the digester that tiles uses to read the
> tilesDefinition.xml to generate the object tree when retrieving the
> preferences from the database?

  Tile use the digester to read xml files. You can reuse it to read any file
with appropriate format.  But if you want to read from a read DB, you can only
reuse part of it.
  This could be an interesting extension/new feature for Tiles.

>
>
> Cheers
> Nathan
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper at LevelSeas for the presence of computer viruses.
>
> www.mimesweeper.com
> **********************************************************************

Reply via email to