Building a JSF component question

Hey,

I am trying to build two JSF components,

XMLManager and XMLTag

The idea is to have a composite JSF component(XMLManager) that binds an XML file

and XMLTag component that extends the standard 'HtmlInputText' to hold a certain XML tag of its parent XMLManager's XML file.

since XMLManager is just a composite component, I extended 'HtmlPanelGrid' and added several properties to it,

To keep it simple, my tags look like this:

<myspace:xmlManager file="file.xml">

<myspace:xmltag tagName="someTag"/>

</myspace:xmlManager>

I want to load the XML file ONLY ONCE when the xmlManager gets initialized in the view, and of course I want that the xmlManager file will be accessible for the 'xmlTag' tags.

So the xml file initialization must occur -before- the xmlTag childs access it,

How would I do that?

Thanks in advanced,

Asaf.

[942 byte] By [Troubya] at [2007-11-27 10:05:54]
# 1
What version of JSF are you using?Is the XMLManager initialized once per view, or less than that?
rlubkea at 2007-7-13 0:42:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

JSF 1.2,

I assume it can be used more than once in a page,

I think I should use the saveState/restoreState method but it seems that when the XMLTags childs 'encodeBegin' method starts before the restore phase, so probably I am mistaken with the flow of these methods...

Thanks

Troubya at 2007-7-13 0:42:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
What I mean is do you need to perform the initialization each time a new view is created?
rlubkea at 2007-7-13 0:42:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...