myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Marinschek <martin.marinsc...@gmail.com>
Subject Re: Fwd: findComponent, dataTable, messages
Date Sat, 21 Jan 2006 12:17:54 GMT
Sorry, I kind of left out the myfaces-list in the forward, put it again.

I don't want to access the data-model. I need to access the component
directly, cause I need to access it from another component. The
problem is e.g. with messages, when a validation fails and the input
field the message is referring to is wrapped in a dataTable.

I'm re-adding two of my original mails for more context.

regards,

Martin

=============================

Hi *,

I am having the following problem:

whenever I use dataTables

- and use messages alongside, or AJAX, or other stuff using findComponent -

I have the problem that I can't work with the components that are
children of the dataTables if I call a findComponent. Of course - I
won't find the correct component instance, due to the generated id and
the things the dataTable is doing to set the context of the current
row.

I've been thinking of a solution to this problem, and the only
solution that has come to my mind is to get rid of findComponent for
such things - and create an "executeOnComponent" method, which can be
implemented by all components doing special things with their
children.

I believe that components are too much of a black box for
findComponent ever to work at all - what's your impression?

Thoughts? feedback? Better ideas ;) ?

regards,

Martin

============================================

Example 1: try to use an input-field in your data-table, and look at
the output of the <h:messages> - the messages won't indicate the row
of the component in the dataTable - they can't, due to this problem.

Example 2: try to use the new AJAX-form components (which rely on the
usage of find-component heavily) in a dataTable.

regards,

Martin

On 1/20/06, Ed Burns <ed.burns@sun.com> wrote:
> >>>>> On Fri, 20 Jan 2006 15:36:29 +0100, Martin Marinschek <martin.marinschek@gmail.com>
said:
>
> MM> Can we have a comment of the experts on this ;) ?
> MM> This message - dataTable problem really bugs me in every project I'm
> MM> doing with JSF...
>
> You can use the DataProvider API that's a part of Creator.
>
> Or, you could find the table, get its DataModel, and use the DataModel
> API to get the row data.
>
> Ed
>
> --
> | ed.burns@sun.com  | {home: 407 869 9587, office: 408 884 9519 OR x31640}
> | homepage:         | http://purl.oclc.org/NET/edburns/
> | aim: edburns0sunw | iim: ed.burns@sun.com
>
>


--

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