users@woodstock.java.net

Re: JSF parameterized includes

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Wed, 21 May 2008 16:01:40 -0700

Hi Arnaud,

AFAIK, #{param.value} or #{param['value']} is only used for request parameters (i.e.  query string parameters).  I do know know if there is special support for using <f:param> with JSP, although I haven't heard that there is.

In general JSP does not work well with JSF compared to Facelets or JSFTemplating which were made for JSF.  The Facelets "ui:param" concept works well in most cases and is supported in JSFT as well (actually JSFT scopes the values more correctly).

New JSF concepts which will be introduced in JSF 2.0 may not support JSP, but will support Facelets/JSFT.  You'd be better off switching now.

Good luck!

Ken

Arnaud Brand wrote:
Hi everybody,

I was trying to include a JSF with params in another JSF, templating if you prefer.
Both JSF use woodstock of course.

I've read in various forums that I could use jsp:include for that and it actually works... to some extent...

As long as I have no parameters to give to the included JSF, there's no problem at all.
I can access request beans for the including pages (with the correct values I mean), I can run ajax calls (refresh and the like) on the including page to refresh components on the included page, everything runs fine.

But if I add an f:param to the jsp:include (say <f:param name="testparam" value="#{BaseBean.test}"/> for example), I can't get the param value in the included page.
I've tried various syntax found on the net (#{testparam}, #{param.testparam}, #{param['testparam']}), but none seems to work.

May be I'm totally wrong, that's not doable like that and I should use facelets or something else for that.

Could someone please confirm (or infirm) that ?
Do facelets run well with woodstock ?


Anyway, during the last two days I tried various approaches to pass the params.
The easiest I found was to use a tomahawk component named AliasBean, since I already have tomahawk in the libs for it's schedule component.
It works pretty well... to some extent...

As long as you submit pages, there's no problem, I can created limited visibility variables that are made available to the aliasbean's child components.
But as soon as I try to use ajax calls on the aliasbean's childs components (woodstock), these variables appear to be empty after the call.

Has someone already experienced such a setup ?
Did I miss an init-param or some other necessary setting ?

Thanks for your help.

Best regards,
Arnaud

--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@woodstock.dev.java.net For additional commands, e-mail: users-help@woodstock.dev.java.net