incubator-adffaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cosma Colanicchia" <>
Subject Re: JSCookMenu, dummy form and Trinidad problems
Date Wed, 05 Jul 2006 14:53:56 GMT
I found two problems using jscookmenu and Trinidad:

1) The class HtmlJSCookMenuRenderer tries to find the parent form
searching for an UIForm component, but the Trinidad CoreForm doesn't
extend UIForm. This cause the the dummyform stuff rendered in the

2) Using either <af:form> or <h:form>, calling
addHiddenCommandParameter on HtmlFormRendererBase doesn't seem to
work, and the jscook hidden field isn't rendered on the form, causing
a javascript error when trying to use the menu. This is probably
caused by the Trinidad renderer used insted of the MyFaces one.

To solve problem 1), I modified the in
order to recognize also the <af:form> component as a parent form. I
used getClass().getName() instead of an instanceof for the comparison
in order to avoid a compile-time dependency.

For problem 2), I haven't found a way to add an hidden field using the
Trinidad form renderer.. maybe it is possible to add a child
inputHidden component to the parent form dinamically, but I don't know
how to set its "name" attribute and I'm not sure that, in that stage,
it will be actually rendered. So I modified the MyFacesHack.js to add
the hidden field to the DOM when it is missing. I tried the code in
IE6 and FireFox, but it shoud work also with IE5.

I have attached a patch file, can any committer take a look?

Thank you

2006/7/5, Cosma Colanicchia <>:
> Hello,
> I'm trying to use the Tomahawk JSCookMenu in my
> MyFaces/Trinidad/Facelets project, but I have some troubles. Note that
> I use an "home.jspx" page with an iframe. I want my menu on the outer
> page, and links opened in the iframe.
> First attemp:
> Simply put the <t:jscookMenu> inside my <af:form
> targetFrame="iframeContent">. Problem: all the dummy stuff is
> generated, probably because the <af:form> doesn't get recognized.
> Second attemp:
> Tried to use <h:form> instead of <af:form>. Just a try, because the
> <h:form> doesn't give me a chance to set a target.. anyway this
> doesn't work, a javascript error "dummyForm.elements.jscook_action has
> no properties" occours.
> Third attemp:
> Used <h:form> but put <t:jscookMenu> outside of this, this half works:
> another dummyform is generated with the "_self" target, and the page
> isn't opened in the iframe.
> Fourth attemp:
> Same as 3td but using <af:form>. Also same result..
> I use latest 1.1.5 snapshot of MyFaces (updated and rebuilt
> yesterday). I noted that also MyFacesHack.js cmItemMouseUp function
> looks for a form with the "_self" target..
> Any help on this?
> Cosma

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message