[JBoss Seam] - Seam Gen template error?
by damianharvey
(This is a bit pedantic but thought it belonged here anyway)
If you have a ManyToOne association that goes more than one level deep eg. A PERSON associated with a COMPANY associated with a COUNTRY then the SeamGen view template has a small error on line 83 of the view.xhtml.ftl
It is currently:
${'#'}{${parentName}.${parentProperty.name}.${parentPojo.identifierProperty.name}}
but should be:
${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
It results in an error in the generated View page as the property is set as such:
<h:column>
| <f:facet name="header">countryCode countryId</f:facet>
| #{company.countryCode.companyId} <!--is this the problem -->
| </h:column>
|
Cheers,
Damian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017524#4017524
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017524
19Â years, 2Â months
[JBoss/Spring Integration] - Re: Using beans from other spring module
by jussi_po
I solved this by using Delegate class from web application to access Spring module beans. I defined business services for the web application, I tried to make the web application as slim as possible.
Made a delegate class which extends the business interface. And for that class I get the business class from the Application Context.
| public class BusinessSearchDelegateImpl implements BusinessSearch {
| private ApplicationContext springModuleContext;
| private final String BEAN = "BusinessSearchService";
|
| public void setSpringModuleContext(ApplicationContext springModuleContext) {
| this.springModuleContext = springModuleContext;
| }
|
| private BusinessSearch getSearchService()
| throws TechnicalException {
|
| if (springModuleContext.containsBean(BEAN)) {
|
| BusinessSearch service = (GenericSearchService) springModuleContext
| .getBean(BEAN);
| return service;
| } else {
| LOG.error("Component with name(" + BEAN + ") not found. ");
| throw new TechnicalException("Component with name(" + BEAN
| + ") not found. ");
| }
| }
|
| public Customer findCustomer(String id) throws TechnicalException {
| return getSearchService().findCustomer(id);
| }
|
| }
This class is configured in web application context as following:
<!-- Business Service beans -->
| <bean id="BusinessContext"
| class="org.springframework.jndi.JndiObjectFactoryBean">
| <property name="cache">
| <value>true</value>
| </property>
| <property name="jndiName">
| <value>d_business-enabler</value>
| </property>
| </bean>
|
| <bean id="BusinessSearchDelegate"
| class="com.som.pac.web.BusinessSearchDelegateImpl">
| <property name="springModuleContext">
| <ref bean="BusinessContext" />
| </property>
| </bean>
And then that BusinessSearchDelegate is given to those controllers which needs the business services.
I made it his way, and best thing was that I could add this delegate class to our utility jar, which is a jar module in ear file.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017520#4017520
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017520
19Â years, 2Â months
[JBoss Portal] - Re: Workflow in Portal
by yoyoyoyo
Hi,
I am trying to convert the jbpm webapp into portlets. There is no success yet. I am thinking maybe I have to write the portlets from scratch, instead of adjusting the existing webapp.
The major problems are:
1. JSF seems to be not working well within portal, maybe due to different scopes and contexts.
2. JBPM has its own identity component, while in a portal environment we want of cause leverage the user-mgmt of portal. But the WF engine is writen for its own identity components. To solve this, i am thinking of using some trigers in the database to keep the jbpm tables updated whenever the user info changed in portal.
I see you have made some efforts there, it will be appreciated if you could share some expierence on this topic. tks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017515#4017515
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017515
19Â years, 2Â months