users@woodstock.java.net

Re: JSF parameterized includes

From: Arnaud Brand <arnaud.brand_at_free.fr>
Date: Thu, 22 May 2008 13:48:37 +0200

Hi Ken,

I've read much last night on facelets and it effectively seemed to be
the best solution.

I tried it this morning, but as soon as I put a <w:head> or a
<w:themeLinks>, javascript crashes on firefox (works well on IE).
Firebug only show a partial error message : [Object cannot be created in
this context" code: "9].
Some googling told me it was relative to dojo and occurs when javascript
code tries to get the computed css style for an inexistent element.
Googling also showed that woodstock had problems with facelets on
firefox (if I remember well someone got a special 4.0 snapshot from you
back in 2007).

Anyway, I'll try and use jsftemplating this afternoon.

Have a nice day,
Arnaud

Ken Paulsen a écrit :
>
> 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_at_woodstock.dev.java.net For
>> additional commands, e-mail: users-help_at_woodstock.dev.java.net
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net For
> additional commands, e-mail: users-help_at_woodstock.dev.java.net