|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
JSTL tags not working as expected.Hi,
I think I have found out a bug, or an unexpected behaviour. I have ported the the following code from a JSP view: <c:choose> <c:when test="${sessionScope.WW_TRANS_I18N_LOCALE=='en'}"> <cc:calendar id="calendar1" returnFunction="onENStartDateSelected" size="20" value="#{calendarSchedulingBean.startDate}" /> </c:when> <c:otherwise> <cc:calendar id="calendar1" returnFunction="onFIStartDateSelected" size="20" value="#{calendarSchedulingBean.startDate}" /> </c:otherwise> </c:choose> On the JSP there is no problem with the code, but with Facelets I get the "duplicate id" error, because there are two instances of "calendar1". The way I see it, the component tree should only have the component that was built, depending on the "when" condition, but it seems both paths get processed. Why does Facelets where work diferently than JSPs? Thanks, Paulo |
|
|
Re: JSTL tags not working as expected.2009/2/3 Paulo Pinto <pjmlp@...>:
> Hi, > > I think I have found out a bug, or an unexpected behaviour. > > I have ported the the following code from a JSP view: > > <c:choose> > <c:when test="${sessionScope.WW_TRANS_I18N_LOCALE=='en'}"> > <cc:calendar id="calendar1" > returnFunction="onENStartDateSelected" > size="20" > value="#{calendarSchedulingBean.startDate}" /> > </c:when> > <c:otherwise> > <cc:calendar id="calendar1" > returnFunction="onFIStartDateSelected" > size="20" > value="#{calendarSchedulingBean.startDate}" /> > </c:otherwise> > </c:choose> > > > On the JSP there is no problem with the code, but with Facelets I get the > "duplicate id" > error, because there are two instances of "calendar1". > > The way I see it, the component tree should only have the component that was > built, > depending on the "when" condition, but it seems both paths get processed. > > Why does Facelets where work diferently than JSPs? > > Thanks, > Paulo > Hi, you can try with two <c:if ...> Some tags are runtime tags, others compile-time tags. <c:if > is a compile-time tag. It means that it will influence the build of the JSF tree. Yann --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: JSTL tags not working as expected.Hi,
I also had the same problem with <c:if/> But shouldn't the behaviour be kept compatible with the former JSP model? -- Paulo On Tue, Feb 3, 2009 at 2:07 PM, Yann Simon <yann.simon.fr@gmail.com> wrote: 2009/2/3 Paulo Pinto <pjmlp@...>: |
|
|
|
|
|
Re: JSTL tags not working as expected.Hi,
for what the code is doing, the "rendered" attribute is not enough. But now I got them working. The problem was related to the JSTL version the page was using. The page was declaring the 1.0 version of JSTL, when I changed to the proper namespace, it worked. Thanks for the feedback, Paulo On Wed, Feb 4, 2009 at 3:19 PM, Raymond K. DeCampo <rkdecampo@...> wrote:
|
| Free embeddable forum powered by Nabble | Forum Help |