Ok, that explains why I couldn't do it ;-) Just thought it'd be nice to be
able to call methods like that and pass it String arguments.

I did already wrap my lucene search results in a List so I could pass that
list to the dataTable. But the Hit's in the list had a
Hit.getDocument.fiels() method returning the Fields (no get you see). I now
also wrapped the Hit's and added the getters I needed.

Thank you,
joost 

JS Portal - Support
Dasstraat 21
2623CB Delft
the Netherlands
E: [EMAIL PROTECTED]
W: www.jsportal.com 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Wednesday, January 17, 2007 2:45 AM
To: user@shale.apache.org
Subject: Re: EL question

On 1/16/07, JS Portal Support <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
>
> Maybe an ignorant (and more a simple JSP) question, but I can't seem to
> figure out how to make an EL call that does:
>
>
>
> org.apache.lucene.document.Document.get(String nameOfField)
>
>
>
> I have my Hits (wrapped in a custom HitsToListWrapper) nicely accessible
> for
> each row of my dataTable (#{hit.document.butWhatHere}), but am struggling
> with just this last seemingly simple step.


The EL used by JSP and JSF does not include support for arbitrary method
calls with parameters.  It can only call JavaBeans property getters (and
setters, in the case of JSF expressions).  You'll need to point your
expression at something that looks like getFoo().

The other thing to note is that a data table already knows how to iterate
over a List or array, so just pointing at one of those directly is the
easiest approach.

Thanks,
>
> Joost


Craig

Reply via email to