Need help on expression into rendered field
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icesoft.org  [Login] Login 
Need help on expression into rendered field  XML
Forum Index -> Components
Author Message
Baleyba

Joined: 16/11/2006 00:00:00
Messages: 110
Offline


Hi,

Hi,
I want to create a condition on the rendered attribute of several components.

So I must do a comparison between list lenght and one integer.

I have tried to do that but it doesn't work:
rendered="#{fn:length(bean.list) > bean.number}"


Do you have idea to solve this problem without using bean attribute ?

thanks for your help.

regards
Bal.



JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
michael.thiem


Joined: 04/06/2007 00:00:00
Messages: 704
Offline


Hi,

I don't think you can do this within a default ICEfaces environment. Is it not
possible for you to use the EL expression on a backing bean property which
returns a boolean result?

However, a comparison the way you want to do it can be achieved when
using i.e. JBoss Seam where you can access a list's size within your EL
expression.

Regards,
Michael
Baleyba

Joined: 16/11/2006 00:00:00
Messages: 110
Offline


Thanks a lot for your answer michael.thiem!

In fact, I just want to render or not the datatable paginator on a lot of screens. I render paginator only if there are several datatable pages to show.

A global configuration var is fixing the number of items by datatable page.

And I don't want to have to create a lot of backing bean property for each screen...
That is why I would like to create condition into the jsp file. Easy solution to use.

We don't use JBOSS seam in our project.

I will search an other solution.

Thanks again for your help

regards
Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team