incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cosma Colanicchia" <cosma...@gmail.com>
Subject Re: ADF Faces breaks many Tomahawk components
Date Mon, 17 Jul 2006 15:31:29 GMT
Adam, technically it could be done, but I'm wondering where we can do that.

Having some centralized code in a renderer that inject the javascript
don't bring us again on the same problem? (it would be
renderer-dependent)

In my hack, is the routine itself that manipulate the DOM, but I don't
think this solution can be adopted at large scale.

Cosma


2006/7/17, Adam Winer <awiner@gmail.com>:
> Modern browsers have no difficulty being told to add hidden fields
> to the DOM on the fly;  MyFaces could use this solution, which
> Trinidad uses (at least in some parts of the code).
>
> -- Adam
>
>
> On 7/17/06, Cosma Colanicchia <cosmacol@gmail.com> wrote:
> >
> > This makes things more complex.. anyway, I don't clearly see your
> > solution: will it solve the JSCookMenu problem? There we have a
> > javascript code that explicitly search a form field with a fixed name
> > (see MyFacesHack.js), that is added by the form renderer.
> >
> > Question: is there any reason for components that need an hidden
> > field, to dinamically add one component to the tree that renders it? I
> > see two problem with this:
> >
> > 1) If it is done in the renderer of component A child of form B, are
> > we sure that a child added to B at this stage would get rendered?
> >
> > 2) Does a standard component to render an hidden field that is not
> > value-bounded exists?
> >
> >
> > Cosma
> >
> >
> > 2006/7/17, Martin Marinschek <martin.marinschek@gmail.com>:
> > > Right now, no way. We don't have a common codebase between Trinidad
> > > and Tomahawk. I wonder if this is a problem that can be solved on a
> > > purely javascript basis - client side. How about each link attaching
> > > itself as a submit handler?
> > >
> > > Werner, what do you think? Javascript nightmares ahead?
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 7/17/06, Cosma Colanicchia <cosmacol@gmail.com> wrote:
> > > > First attemp:
> > > >
> > > > move addHiddenCommandParameter method in an external interface (such
> > > > as FormRendererUtils), and make both Trinidad and MyFaces form
> > > > renderers implement it. Components that need that service must then
> > > > code against that interface, and deal with renderers that doesn't
> > > > implement it.
> > > >
> > > > At least, this way we can control/check at compile time the usage of
> > > > those non-standard services.
> > > >
> > > > Cosma
> > > >
> > > > 2006/7/17, Martin Marinschek <martin.marinschek@gmail.com>:
> > > > > We should fix this. Once and for all.
> > > > >
> > > > > Any suggestions?
> > > > >
> > > > > regards,
> > > > >
> > > > > Martin
> > > > >
> > > > > On 7/17/06, Cosma Colanicchia <cosmacol@gmail.com> wrote:
> > > > > > I've only modified the JSCookMenu javascript to create that
field
> > in
> > > > > > the DOM if it isn't there. It's not an elegant solution, I know..
> > > > > >
> > > > > > Cosma
> > > > > >
> > > > > >
> > > > > > 2006/7/17, Cosma Colanicchia <cosmacol@gmail.com>:
> > > > > > > P.S. I think that a component relying on other renderers
isn't a
> > good
> > > > > > > design and we should try to avoid it..
> > > > > > >
> > > > > > >
> > > > > > > 2006/7/17, Cosma Colanicchia <cosmacol@gmail.com>:
> > > > > > > > It looks like Martin has done a similar work, fixing
all the
> > form
> > > > > > > > searching routines, so that part of my patch should
be
> > dropped. The
> > > > > > > > addHiddenCommandParameter problem seems to be still
there.. do
> > we want
> > > > > > > > to wait for a complete solution or, in the meantime,
apply the
> > js hack
> > > > > > > > to make JSCookMenu work?
> > > > > > > >
> > > > > > > >
> > > > > > > > Cosma
> > > > > > > >
> > > > > > > >
> > > > > > > > 2006/7/17, Cosma Colanicchia <cosmacol@gmail.com>:
> > > > > > > > > Yes, I mean TOMAHAWK-516, it includes a change
that is very
> > similar to
> > > > > > > > > the Martin code, with other things:
> > > > > > > > >
> > > > > > > > > 1) The _ComponentUtils method is not used everywhere.
For
> > example,
> > > > > > > > > HtmlJSCookMenuRenderer implements one of its
own, and other
> > > > > > > > > rendererers do it as well. I tried to refactor
those method
> > to use the
> > > > > > > > > _ComponentUtils one, see the JIRA for details.
> > > > > > > > >
> > > > > > > > > 2) Another potential source of trouble for Trinidad/Tomahawk
> > > > > > > > > integration is the
> > HtmlFormRendererBase.addHiddenCommandParameter
> > > > > > > > > method. This is called at least by the JSCookMenu
(but
> > presumibly also
> > > > > > > > > by other components) to queue adding hidden form
parameters,
> > but with
> > > > > > > > > that rendered will not be used in a Trinidad
project leading
> > to
> > > > > > > > > javascript errors. In my patch for JSCookMenu
I workarounded
> > this
> > > > > > > > > hacking into MyFacesHack.js, but I think it should
be
> > addressed
> > > > > > > > > someway.
> > > > > > > > >
> > > > > > > > > Well I don't know SVN very well, but if it works
as CVS we
> > have two
> > > > > > > > > different patch applied to the same lines of
code (the
> > > > > > > > > _ComponentUtils.findNestingForm method), so a
merge will be
> > required
> > > > > > > > > if TOMAHAWK-516 will be commited.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Cosma
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > 2006/7/17, Matthias Wessendorf <matzew@apache.org>:
> > > > > > > > > > Yes that stuff is committed. _CompontUtils
too.
> > > > > > > > > >
> > > > > > > > > > You mean TOMAHAWK-516 ? I just asigned it
to me.
> > > > > > > > > > Will (or must) take a look on it.
> > > > > > > > > >
> > > > > > > > > > Can you please give an update of the status
?
> > > > > > > > > > Also what's the *conflict* now is?
> > > > > > > > > >
> > > > > > > > > > Would be great!
> > > > > > > > > >
> > > > > > > > > > -Matthias
> > > > > > > > > >
> > > > > > > > > > On 7/16/06, Cosma Colanicchia <cosmacol@gmail.com>
wrote:
> > > > > > > > > > > Martin,
> > > > > > > > > > >
> > > > > > > > > > > have you already committed that change?
As I pointed out
> > in another
> > > > > > > > > > > thread, I've submitted a patch that
will likely conflict
> > with yours if
> > > > > > > > > > > commited.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Ciao
> > > > > > > > > > > Cosma
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > 2006/7/17, Martin Marinschek <
> > martin.marinschek@gmail.com>:
> > > > > > > > > > > > As a workaround for the form problem,
I've made the
> > form searching
> > > > > > > > > > > > routing of MyFaces aware of the
Trinidad form family -
> > so the trinidad
> > > > > > > > > > > > form should be found as well.
> > > > > > > > > > > >
> > > > > > > > > > > > I'd be glad about any test results!
> > > > > > > > > > > >
> > > > > > > > > > > > regards,
> > > > > > > > > > > >
> > > > > > > > > > > > Martin
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > On 5/26/06, Cosma Colanicchia
<cosmacol@gmail.com>
> > wrote:
> > > > > > > > > > > > > Thomas, I'm using the MyFaces
RI. I think that the
> > <t:commandLink>
> > > > > > > > > > > > > problem is related to *not*
using the MyFaces
> > renderer for the
> > > > > > > > > > > > > <h:form> component
(like in TOMAHAWK-416).
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > 2006/5/25, Thomas Spiegl
<thomas.spiegl@gmail.com>:
> > > > > > > > > > > > > > Cosma, seems like you
are using the Sun RI as JSF
> > implementation.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > see
> > http://issues.apache.org/jira/browse/TOMAHAWK-416
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On 5/25/06, Martin Marinschek
<
> > martin.marinschek@gmail.com> wrote:
> > > > > > > > > > > > > > > So it is a must
that a renderer for a certain
> > component family needs
> > > > > > > > > > > > > > > to be able to render
out all components
> > belonging to this family? I
> > > > > > > > > > > > > > > don't see why you
couldn't just use a different
> > renderer-type for the
> > > > > > > > > > > > > > > UIXForm component...
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > regards,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Martin
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > On 5/24/06, Adam
Winer <awiner@gmail.com> wrote:
> > > > > > > > > > > > > > > > On 5/24/06,
Martin Marinschek <
> > martin.marinschek@gmail.com> wrote:
> > > > > > > > > > > > > > > > > Hi Adam,
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > I don't
remember a thread talking about
> > component families, we only
> > > > > > > > > > > > > > > > > talked
about extending from UIForm - so
> > UIXForm does not even have the
> > > > > > > > > > > > > > > > > same
component family as UIForm?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > No, it doesn't,
which is more-or-less implied
> > by not extending UIForm.
> > > > > > > > > > > > > > > > In general,
component family should follow
> > subclassing
> > > > > > > > > > > > > > > > as well, because
otherwise you'd get
> > ClassCastExceptions in
> > > > > > > > > > > > > > > > Renderers.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > -- Adam
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > regards,
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Martin
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > On 5/24/06,
Adam Winer <awiner@gmail.com>
> > wrote:
> > > > > > > > > > > > > > > > > >
Actually, probably not...  UIXForm is in a
> > different component
> > > > > > > > > > > > > > > > > >
family from UIForm.  (An earlier thread
> > talked about that.)
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
-- Adam
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
On 5/24/06, Martin Marinschek <
> > martin.marinschek@gmail.com> wrote:
> > > > > > > > > > > > > > > > > >
> Problem 1) should have been fixed by
> > Mario's recent addition of
> > > > > > > > > > > > > > > > > >
> searching for the component family
> > instead of the instance of UIForm.
> > > > > > > > > > > > > > > > > >
>
> > > > > > > > > > > > > > > > > >
> regards,
> > > > > > > > > > > > > > > > > >
>
> > > > > > > > > > > > > > > > > >
> Martin
> > > > > > > > > > > > > > > > > >
>
> > > > > > > > > > > > > > > > > >
> On 5/24/06, Cosma Colanicchia <
> > cosmacol@gmail.com> wrote:
> > > > > > > > > > > > > > > > > >
> > I've done some other tries:
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> > 1) When using the <af:form> component,
> > a dummy form and its clear
> > > > > > > > > > > > > > > > > >
> > method are created. Clicking on
> > <t:commandLink> or
> > > > > > > > > > > > > > > > > >
> > <t:commandSortHeader> does trigger a
> > submit, but the expected
> > > > > > > > > > > > > > > > > >
> > behaviour isn't executed. Probably
> > this is because the _link_hidden_
> > > > > > > > > > > > > > > > > >
> > value is set telling JSF that a
> > "linkDummyForm:commandLinkId" has been
> > > > > > > > > > > > > > > > > >
> > triggered, but the actual name of the
> > component is different (its name
> > > > > > > > > > > > > > > > > >
> > contaner has a different id).
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> > 2) When using an <h:form> component,
> > the dummy form isn't created
> > > > > > > > > > > > > > > > > >
> > (seems that the <t:commandLink>
> > recognize its parent form), but no
> > > > > > > > > > > > > > > > > >
> > clear_ method is generated in the
> > page, so the onclick javascript
> > > > > > > > > > > > > > > > > >
> > fails to submit the form.
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> > Cosma
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
> > 2006/5/23, Cosma Colanicchia <
> > cosmacol@gmail.com>:
> > > > > > > > > > > > > > > > > >
> > > It would be useful to share info
> > about making they work togheter, if
> > > > > > > > > > > > > > > > > >
> > > someone has resolved these problems.
> > > > > > > > > > > > > > > > > >
> > >
> > > > > > > > > > > > > > > > > >
> > > Anyway I'm using the latest
> > snapshots.. and I tried with both <h:form>
> > > > > > > > > > > > > > > > > >
> > > and <af:form>. I had some issues
> > with dummyForm at first, if I can get
> > > > > > > > > > > > > > > > > >
> > > some detail I'll try to post it
> > tomorrow, now I'm leaving the office.
> > > > > > > > > > > > > > > > > >
> > >
> > > > > > > > > > > > > > > > > >
> > > Bye
> > > > > > > > > > > > > > > > > >
> > > Cosma
> > > > > > > > > > > > > > > > > >
> > >
> > > > > > > > > > > > > > > > > >
> > >
> > > > > > > > > > > > > > > > > >
> > > 2006/5/23, Matthias Wessendorf <
> > matzew@apache.org>:
> > > > > > > > > > > > > > > > > >
> > > > Hi-
> > > > > > > > > > > > > > > > > >
> > > >
> > > > > > > > > > > > > > > > > >
> > > > time by time there are people on
> > the list, using both.
> > > > > > > > > > > > > > > > > >
> > > > MyFaces (incl. Tomahawk) and ADF
> > Faces
> > > > > > > > > > > > > > > > > >
> > > >
> > > > > > > > > > > > > > > > > >
> > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > 1) <t:commandLink>
> > components (and <t:commandSortHeader>s) don't work,
> > > > > > > > > > > > > > > > > >
> > > > > > > because the MyFaces
> > javascript functions such as clear_myFormId don't get
> > > > > > > > > > > > > > > > > >
> > > > > > > generated. Also the
> > _link_hidden_form isn't generated anymore. The rendered
> > > > > > > > > > > > > > > > > >
> > > > > > > HTML includes the string
> > <!-- MYFACES JAVASCRIPT -->, and looking at the
> > > > > > > > > > > > > > > > > >
> > > > > > > stack I can see that both
> > the adfFaces and the ExtensionsFilter are invoked,
> > > > > > > > > > > > > > > > > >
> > > > > > > but no MyFaces script are
> > actually rendered in the page.
> > > > > > > > > > > > > > > > > >
> > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > I'm not sure why this would
> > happen, but this may be a MyFaces
> > > > > > > > > > > > > > > > > >
> > > > > > bug;  I know there's been some
> > discussion on the main MyFaces
> > > > > > > > > > > > > > > > > >
> > > > > > list about issues like this.
> > > > > > > > > > > > > > > > > >
> > > > >
> > > > > > > > > > > > > > > > > >
> > > > > I'll try to search more
> > carefully in the archives.. do you know if
> > > > > > > > > > > > > > > > > >
> > > > > someone had success using
> > MyFaces, Tomahawk and ADF Faces in a
> > > > > > > > > > > > > > > > > >
> > > > > project?
> > > > > > > > > > > > > > > > > >
> > > > >
> > > > > > > > > > > > > > > > > >
> > > >
> > > > > > > > > > > > > > > > > >
> > > > Which version (of MyFaces) are you
> > using?
> > > > > > > > > > > > > > > > > >
> > > > Can you wrapp <h:form> around
> > commandLink?
> > > > > > > > > > > > > > > > > >
> > > >
> > > > > > > > > > > > > > > > > >
> > > > There where some issue - discussed
> > on myfaces dev - regarding "auto
> > > > > > > > > > > > > > > > > >
> > > > generated form" aka dummy form
> > > > > > > > > > > > > > > > > >
> > > >
> > > > > > > > > > > > > > > > > >
> > > > -Matthias
> > > > > > > > > > > > > > > > > >
> > > >
> > > > > > > > > > > > > > > > > >
> > >
> > > > > > > > > > > > > > > > > >
> >
> > > > > > > > > > > > > > > > > >
>
> > > > > > > > > > > > > > > > > >
>
> > > > > > > > > > > > > > > > > >
> --
> > > > > > > > > > > > > > > > > >
>
> > > > > > > > > > > > > > > > > >
> http://www.irian.at
> > > > > > > > > > > > > > > > > >
>
> > > > > > > > > > > > > > > > > >
> Your JSF powerhouse -
> > > > > > > > > > > > > > > > > >
> JSF Consulting, Development and
> > > > > > > > > > > > > > > > > >
> Courses in English and German
> > > > > > > > > > > > > > > > > >
>
> > > > > > > > > > > > > > > > > >
> Professional Support for Apache MyFaces
> > > > > > > > > > > > > > > > > >
>
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > --
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > http://www.irian.at
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Your
JSF powerhouse -
> > > > > > > > > > > > > > > > > JSF Consulting,
Development and
> > > > > > > > > > > > > > > > > Courses
in English and German
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Professional
Support for Apache MyFaces
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > --
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > http://www.irian.at
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Your JSF powerhouse
-
> > > > > > > > > > > > > > > JSF Consulting,
Development and
> > > > > > > > > > > > > > > Courses in English
and German
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Professional Support
for Apache MyFaces
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --
> > > > > > > > > > > > > > http://www.irian.at
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Your JSF powerhouse
-
> > > > > > > > > > > > > > JSF Consulting, Development
and
> > > > > > > > > > > > > > Courses in English and
German
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Professional Support
for Apache MyFaces
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > >
> > > > > > > > > > > > http://www.irian.at
> > > > > > > > > > > >
> > > > > > > > > > > > Your JSF powerhouse -
> > > > > > > > > > > > JSF Consulting, Development and
> > > > > > > > > > > > Courses in English and German
> > > > > > > > > > > >
> > > > > > > > > > > > Professional Support for Apache
MyFaces
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Matthias Wessendorf
> > > > > > > > > >
> > > > > > > > > > further stuff:
> > > > > > > > > > blog: http://jroller.com/page/mwessendorf
> > > > > > > > > > mail: mwessendorf-at-gmail-dot-com
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF powerhouse -
> > > > > JSF Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > >
> > >
> > >
> > > --
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> >
>
>

Mime
View raw message