0

don't
This is my first time I work on JSF and happens a strange things. I'm using JSF with the xhtml file (hopes this information help to solve it), I have a ice:dataTable that iterate over a list and construct some html.

When the application start the list is empty.

In the html I have this:

<div class="Token" id="Token#{listItem.id}"></div>

With this it throws an exception:

Caused by: javax.el.PropertyNotFoundException: /jspf/fragments/form.jsp @159,62 id="Token#{listItem.id}": ELResolver cannot handle a null base Object with identifier 'listItem'

But if I change the code in:

<div class="Token" id="Token">#{listItem.id}</div>

It works!

Why also if the list is empty it don't execute the first piece of code???

rascio
  • 8,968
  • 19
  • 68
  • 108

1 Answers1

0

In the 1st case, you try to specify it as part of the div's id attribute, in the 2nd case, you put it in the content of the divs, so that's something completely different - what is it you planned to express with it?

Alexander Rühl
  • 6,769
  • 9
  • 53
  • 96
  • Thank you! Now I understand why it don't works...but there is a way to get the ID I need it because I have to put it in a javascript string... – rascio Jul 25 '11 at 12:45