myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rogers Reilly <>
Subject Re: ADF Faces javascript rendering
Date Wed, 22 Feb 2006 21:30:00 GMT
Werner Punz wrote:

>Laurie Harper schrieb:
>>The Tomahawk components 'inject' Javascript file references into the
>><head> section of the response by using a filter to buffer and
>>post-process the response. I'm assuming ADF Faces has some mechanism for
>>injecting Javascript too, but I can't seem to track it down...
>>I've found the code that handles serving static resources, just not the
>>code responsible for injecting references to Javascript files. The
>>reason I'm looking for it is so I can make a component library I'm
>>working on use it.
>>Can anyone give me a pointer to the right area in the ADF Faces code, or
>>even better a quick explanation of how to use it to do what I want?
>Laurie, cannot help you there, but a minor sidequestion, did you use my
>dojo hooks I provided in the sandbox?
>If yes please give me feedback if you need something changed
>or added, now is a perfect time for doing it, the whole dojo base will
>be moved into Tomahawk after 1.1.2, and then it will be much harder to
>break existing interfaces if needed.
>The reason why I am asking is that I need comments and feedback from
>people who do serious component development so that I get more insight
>on what is needed (for now I only have the stuff in I need)
I haven't made a full-blown Dojo component yet, but I have used the 
<af:inputHidden value="#{backingBean.var}" id="myId" /> component of ADF 
with Dojo widgets, passing the widget a simple onFoo function along the 
lines of 'document.getElementById('myId').value = 
MyWidget.getSomeValue();' to sync up the widget with JSF.  (note- you 
can also submit a display:none CommandButton in this onFoo function, and 
do a Partial Page Refresh ... very cool!)

Now, I've just done this hookup with a Facelet--which works fine for 
now, can even be packaged into a tag if I want--and not an actual 
component, so I can't say what I'd want from a platform perspective to 
facilitate this kind of simple Dojo/JS-to-JSF integration.  (toDoList[0] 
= learn custom components)

Did want to share the pattern, though, as it seems like the kind of 
thing MyFaces could facilitate.

View raw message