[JBoss Seam] - Re: ManyToOne OneToMany
by david.spark
OK so assuming that athleteList.xthml is correctly generating a list of athlete objects I would change your s:link to be something like:
<h:column>
| <f:facet name="header">Calendar</f:facet>
| <h:commandLink id="athlete"
| value="Calendar"
| action="#{uploadWorkout.selectAthlete(athlete)}"/>
| </h:column>
and create a corresponding method in the backing bean:
public String selectAthlete(Athlete athlete)
| {
| this.athlete = athlete;
| return "/workoutList.xhtml";
| }
The reason for using h:commandLink rather than s:link is that h:commandLink submits the form whereas s:link doesn't so the value isn't passed. There's no view attribute on h:commandLink so we have to navigate by returning the view ID from the method.
This should work, and you can also remove the @In annotation from athlete as it's not needed.
Hopefully this will do what you want :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072586#4072586
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072586
18Â years, 10Â months
[JBoss Seam] - Persistence Strategy for Seam + Spring
by dapeng
Hi,
for a new application, I plan to use use a layered architecture based one seam + spring + hibernate.
The spring example in Seam 2.0 shows how to use JpaTemplate to implement data access. I have a couple of questions:
1.) It is still possible to use classical Hibernate POJO + Mapping file, but I will not be able to use Hibernate metadata validation. Right?
2.) If I choose to use JPA, do I have to make the hibernate class EJB entity beans with @Entity? What is exactly the difference between Hibernate annotation and JPA (beside different configuration files) and EJB3 entity beans?
3.) What is the best way to handle PersistenceContext or HibernateSession? Configure and manage it in Seam? But how can I get them injected into my Spring DAOs without using Seam annotation?
Any feedback is appreciated.
Dapeng
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072585#4072585
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072585
18Â years, 10Â months
[JBoss Portal] - Re: Giving Admin Priviledges to another Role
by swisst
I am also using jBoss-4.2.1-GA and JBoss_Portal_2_6_1
Pretty sure I didn't miss anything...I went through it a couple of times. Here's what I did notice:
* If I attempt to login with an id that is not in AD, I get the expected "Invalid user ID/Password" message.
* If I attempt to login with an id that is in AD, I get the error message I posted.
It appears that it is able to search LDAP and find users. It just seems like it does not like the shape of my LDAP entry that it finds, resulting in the error:
Caused by: javax.security.auth.login.LoginException: org.jboss.portal.identity.IdentityException: Co
| uldn't create LDAPUserImpl object from ldap entry (SearchResult)
Is the code that builds the LDAPUser looking for specific fields in LDAP that I do not have? How do I know what is required?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072584#4072584
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072584
18Â years, 10Â months
[JBoss Seam] - selectItems
by hager
Hello,
i'm using <s:selectItems and i have an exception
this is my code
<h:selectOneMenu id="selectOneSituationDeFamille" value="#{collaborateurHome.instance.situationDeFamille}" >
| <s:selectItems value="#{collaborateurHome.situationFamilleMap.keySet}" var="situationFamilleIterator" label="#{collaborateurHome.situationFamilleMap[situationFamilleIterator]}" id="selectSituations"/>
| </h:selectOneMenu>
situationFamilleMap is a Map<String,String>
Exception:
GRAVE: Error Rendering View[/CollaborateurEdit.xhtml]
| javax.faces.el.PropertyNotFoundException: /CollaborateurEdit.xhtml @201,199 label="#{collaborateurHome.situationFamilleMap[situationFamilleIterator]}": Bean: com.fitnetapplication.resources.model.CollaborateurHome_$$_javassist_143, property: situationFamilleMap
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:58)
| at org.jboss.seam.ui.JSF.getStringValue(JSF.java:186)
| at org.jboss.seam.ui.UISelectItems.getLabel(UISelectItems.java:109)
| at org.jboss.seam.ui.UISelectItems.asSelectItems(UISelectItems.java:223)
| at org.jboss.seam.ui.UISelectItems.getValue(UISelectItems.java:170)
| at org.apache.myfaces.util.SelectItemsIterator.hasNext(SelectItemsIterator.java:103)
| at org.apache.myfaces.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:485)
| at org.apache.myfaces.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:461)
| at org.apache.myfaces.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:272)
| at org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:246)
| at org.apache.myfaces.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:54)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at org.jboss.seam.ui.JSF.renderChild(JSF.java:180)
| at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
| at org.jboss.seam.ui.JSF.renderChild(JSF.java:178)
| at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
| at org.jboss.seam.ui.UIDecorate.encodeChildren(UIDecorate.java:234)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:444)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:203)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:85)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
| at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:448)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:203)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:85)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:203)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:85)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:203)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:85)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:252)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
| at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
Can I use the method keySet? (value="#{collaborateurHome.situationFamilleMap.keySet}" )
what's the problem, because i didn't understand it?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072582#4072582
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072582
18Â years, 10Â months
[JBoss Seam] - Transaction Handling in Seam + Spring
by dapeng
Hi,
for a new application, I plan to use use a layered architecture based one seam + spring + hibernate. Because of some SOA requirements I choose such a layered architecture, so that spring service beans can be used to serve user interface and service interface requests.
I am now not sure about the best strategy to handle the transaction in this architecture. Until now, I use Spring AOP with @Transactional annotation to mark the transaction boundary. As far as I understand, this has the shortcoming of LayzInitializationException in JSF render response phase. Seam's solution is the TransactionalSeamPhaseListener, which starts 2 separate txs, one spanning update model and invoke application and one spanning render response. I have the following questions:
1. In case of redirect, the second tx will then span the new http request, which contains only the render response phase?
2. If the tx is already started by the PhaseListener, why does the spring example of Seam 2.0 still contains @Transactional annotation in spring beans? Is that only good for invocation outside of Seam, like WS?
3. Is that a good strategy to have both the PhaseListener and @Transactional annotation activated, so that one can handle JSF requests for GUI and the other can handle web service requests?
Any feedback is appreciated.
Dapeng
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072576#4072576
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072576
18Â years, 10Â months