On 2/28/06, Rogers Reilly <[EMAIL PROTECTED]> wrote:
> I actually just finished doing the same thing, so I sympathize w/you,
> Frank.  :-)       Totally worth it, though- the ADF components are
> fantastic, and Facelets is great to work with.
>
> Couple other tips I thought I'd chime in with, in the hopes of sparing
> others some time/web hunting:
>
> 2) the latest drop I got hold of (the MyFaces drop, not the last
> "Oracle" version) had two facelet-taglib files, af.taglib.xml and
> afh.taglib.xml, which had incorrect XML syntax and blew up Tomcat on
> startup--specifically, the docTypes were 'taglib' but the root element
> was 'facelet-taglib'.  I unzipped adf-faces-implxxx and changed them,
> then zipped it back up; then was fine for a while.  I learned later,
> however, that these files (while seeming to provide facelets support out
> of the gate) were actually interfering with adf-facelets.jar, which
> provides real Facelets support.  (the other files worked for many
> things, but couldn't handle String[] attributes for whatever reason)  So
> I went back and removed af.taglib.xml and afh.taglib.xml from
> adf-faces-implxxx, letting adf-facelets.jar handle all the facelets
> stuff, and everything worked.

Ugh, yeah.  I'll try to improve this in the next MyFaces drop
(the real one headed to incubator) so that the generated taglib.xml's
are completely right.  You'll still need adf-facelets.jar, at least
until Facelets is in a public Maven repos.

> 3) a tangent, but related- if you find yourself trying to get Tomahawk &
> ADF components working together, you may find this example helpful.  The
> Tomahawk EqualsValidator won't work if you're comparing the component to
> an ADF component, and here's why:
> UIInput foreignComp = (UIInput) uiComponent.getParent().findComponent(_for);
>  in EqualsValidator (line 72) is casting the "compare to" component to
> UIInput, but ADF input components don't extend UInput.  You can create a
> custom ADFEqualsValidator by replacing the above with:
> UIXEditableValue foreignComp = (UIXEditableValue)
> uiComponent.getParent().findComponent(_for);
> or, of course, create an overarching EqualsValidator that tries both casts.
>
> In general, if a Tomahawk component isn't playing nice with ADF, that
> might be a good first place to look- the ADF components' hierarchy jumps
> straight from UIComponent to UIXComponent, so any casts from
> UIComponentBase down are going to fail.  Perhaps this will change as ADF
> code moves into the fold, but for now, this is something you'll need to
> work around.

The really common scenarios are going to be about failures
to use EditableValueHolder/ValueHolder/ActionSource
where appropriate.  UIForm is going to cause more pain;  I tried
to persuade  Craig and Ed back in JSF 1.0 that we should
have a generic interface for forms, but they balked.

-- Adam

Reply via email to