You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Dennis Byrne <de...@dbyrne.net> on 2005/11/19 20:17:01 UTC

dataTable exceptions w/ 1.1.1

just moved an app from 1.0.9 to 1.1.1 .  I get one of these 
even though there is no JSTL in the whole app:

java.lang.NoClassDefFoundError:javax/servlet/jsp/jstl/sql/Resu
lt

Not a show stopper.  Putting the jstl.jar in the classpath 
solves this (the one received from ibiblio when running the 
download-deps ant task) .

However I still get this:

javax.faces.el.PropertyNotFoundException: Bean: 
org.hibernate.collection.PersistentSet, property: gameId

... using the following in the JSP:

<h:dataTable styleClass="dataTable"  var="item" 
    value="#{TeamCrud.unit.gamesForAwayTeamId}" >
    <h:column>
      <h:commandLink immediate="true" 
          value="Game #{item.gameId}" 
          action="#{GameCrud.retrieve}" >
           <t:updateActionListener 
                 property="#{GameCrud.id}" 
                 value="#{item.gameId}" />
      </h:commandLink>
     </h:column>
</h:dataTable>

Note that the EL does not reference "gameId" of the Set, but 
rather "gameId" of an item in the Set.  

Furthermore, the PropertyNotFoundException will go away if I 
change h:dataTable to t:dataTable .

Have either of these issues been addressed already?

Dennis Byrne

Re: dataTable exceptions w/ 1.1.1

Posted by Simon Kitching <sk...@obsidium.com>.
Dennis Byrne wrote:
> just moved an app from 1.0.9 to 1.1.1 .  I get one of these 
> even though there is no JSTL in the whole app:
> 
> java.lang.NoClassDefFoundError:javax/servlet/jsp/jstl/sql/Resu
> lt
> 
> Not a show stopper.  Putting the jstl.jar in the classpath 
> solves this (the one received from ibiblio when running the 
> download-deps ant task) .

See the Sun javadoc for UIData.getValue(). This requires a DataModel to 
automatically be created to wrap the user model when that is any of:
java.util.List, java.sql.ResultSet, javax.servlet.jsp.jstl.sql.Result.

So the dependency is really needed, ie the spec basically mandates that 
jstl is in the classpath when JSF is used. JSTL is listed as a 
dependency for MyFaces in the build.xml file.


> 
> However I still get this:
> 
> javax.faces.el.PropertyNotFoundException: Bean: 
> org.hibernate.collection.PersistentSet, property: gameId
> 
> ... using the following in the JSP:
> 
> <h:dataTable styleClass="dataTable"  var="item" 
>     value="#{TeamCrud.unit.gamesForAwayTeamId}" >
>     <h:column>
>       <h:commandLink immediate="true" 
>           value="Game #{item.gameId}" 
>           action="#{GameCrud.retrieve}" >
>            <t:updateActionListener 
>                  property="#{GameCrud.id}" 
>                  value="#{item.gameId}" />
>       </h:commandLink>
>      </h:column>
> </h:dataTable>
> 
> Note that the EL does not reference "gameId" of the Set, but 
> rather "gameId" of an item in the Set.  
> 
> Furthermore, the PropertyNotFoundException will go away if I 
> change h:dataTable to t:dataTable .
> 
> Have either of these issues been addressed already?

Sorry, don't know anything about this one.


Regards,

Simon