[JBoss Seam] - Re: ClassCastException with @DataModel
by tony.herstell@gmail.com
This might have helped... (scope page)
| // Used to diaply the final choices in the menu section
| @DataModel(value="finalKeywordsDatamodel", scope=ScopeType.PAGE)
| private LinkedHashSet<Keyword> finalKeywordsSet;
|
| // Used to diaply the final choices in the menu section
| @DataModel(value="finalCategoriesDatamodel", scope=ScopeType.PAGE)
| private LinkedHashSet<Category> finalCategoriesSet;
|
But what really got me out of the poo was NOT using @DataModelSelection!
Use EL instead and pass in the selected item (if you can) as a parameter as I have shown below (action="#{keywordsStepController.deleteKeyword(eachKeyword)}"):
| @DataModel(value="keywordsDatamodel", scope=ScopeType.PAGE)
| private LinkedHashSet<Keyword> keywordsSet;
|
| <h:dataTable var="eachKeyword" value="#{keywordsDatamodel}" rendered="#{keywordsDatamodel.rowCount>0}">
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="#{messages.keyword}" />
| </f:facet>
| <h:outputText value="#{eachKeyword.keyword}" />
| </h:column>
|
| <h:column>
| <h:commandButton value="#{messages.button_delete}"
| action="#{keywordsStepController.deleteKeyword(eachKeyword)}"/>
| </h:column>
| </h:dataTable>
|
I didnt put this in Jira.. but I could not get DataModelSelection to work for me!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043510#4043510
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043510
19 years
[JBoss jBPM] - Re: JBPM Timer Problem
by avivstav
Yes it looks like hibernate cfg file problem, the only relevant entries related to hibernate is placed in applicationContext-jbpmhibernate.xml file is:
| <bean id="jbpmDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
| <property name="driverClassName"><value>oracle.jdbc.driver.OracleDriver</value></property>
| <property name="url"><value>jdbc:oracle:thin:@srv-ora:1521:orcl</value></property>
| <!-- property name="username"><value>build</value></property>
| <property name="password"><value>build</value></property -->
| <property name="username"><value>jbpm</value></property>
| <property name="password"><value>jbpm</value></property>
| </bean>
|
| <!-- JBPM Hibernate SessionFactory -->
| <bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
| <property name="dataSource" ref="jbpmDataSource"/>
| <property name="mappingLocations">
| <value>classpath*:/org/jbpm/**/*.hbm.xml</value>
| </property>
|
| <property name="hibernateProperties">
| <props>
| <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
| <prop key="hibernate.cache.use_second_level_cache">false</prop>
| <prop key="hibernate.cache.use_query_cache">false</prop>
|
| <prop key="hibernate.hbm2ddl.auto">update</prop>
| </props>
| </property>
| </bean>
And it well defined towards the hibernate jbpm dtd.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043501#4043501
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043501
19 years
[JBoss jBPM] - Re: JBPM Timer Problem
by avivstav
I know there is a problem with the hibernate.cfg.xml file but I wonder if it's my application configuration problem, I add the following entries relevant to hibernate config as documented:
<bean id="jbpmDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
| <property name="driverClassName"><value>oracle.jdbc.driver.OracleDriver</value></property>
| <property name="url"><value>jdbc:oracle:thin:@srv-ora:1521:orcl</value></property>
| <!-- property name="username"><value>build</value></property>
| <property name="password"><value>build</value></property -->
| <property name="username"><value>jbpm</value></property>
| <property name="password"><value>jbpm</value></property>
| </bean>
|
| <!-- JBPM Hibernate SessionFactory -->
| <bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
| <property name="dataSource" ref="jbpmDataSource"/>
| <property name="mappingLocations">
| <value>classpath*:/org/jbpm/**/*.hbm.xml</value>
| </property>
|
| <property name="hibernateProperties">
| <props>
| <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
| <prop key="hibernate.cache.use_second_level_cache">false</prop>
| <prop key="hibernate.cache.use_query_cache">false</prop>
|
| <prop key="hibernate.hbm2ddl.auto">update</prop>
| </props>
| </property>
| </bean>
Nothing else
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043500#4043500
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043500
19 years