[JBoss Seam] - Re: how to use s:button to execute action first before jump
by tim_ph
Ok, it works if I use navigation with redirect AND param.
(I've been using Seam Framework generated by seam-gen with modification to jump start my app.)
In ApplicationEdit.page.xhtml
| ...
| <navigation from-action="#{applicationHome.addLocation}">
| <rule if-outcome="done">
| <redirect view-id="/policy/LocationEdit.xhtml">
| <param name="locationId" value="#{applicationHome.location.id}"/>
| <param name="locationFrom" value="ApplicationEdit2"/>
| <param name="applicationId" value="#{applicationHome.applicationId}"/>
| </redirect>
| </rule>
| </navigation>
| ...
|
and inside ApplicationEdit.xhtml, change s:button "Add New Location" to
| <s:button value="Add New Location"
| action="#{applicationHome.addLocation}"
| propagation="join"
| />
|
In ApplicationHome.java, change addLocation()
| public String addLocation()
| {
| location = new Location();
| getInstance().getLocations().add(location); // add new location to application
| getEntityManager().persist(location); // to get id from Hibernate
| return "done";
| }
|
If you think it's not the most efficient way to do it, let me know.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075996#4075996
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075996
18Â years, 10Â months
[JBoss Seam] - Re: Mail examples broken in CVS?
by lowecg2004
After reading the Seam reference for 2.0.0.b1 I think I've found some niggles (which you're probably well aware of, but I'll raise them anyway ;)
I believe the deployment instructions for mail-ra.rar need revising since the file mail-ra.rar is no longer part of JBoss 4.2.x - this is implied when the doc states "replacing the default rar with the one distributed with Seam". To resolve, I copied the Seam mail-ra.rar to default/deploy. Is this still correct? Or should I be removing/replacing any other mail files?
The doc refers the reader to http://wiki.jboss.org/wiki/Wiki.jsp?page=InboundJavaMail for more information on mail-ra.rar. The wiki currently does not have any information on this file.
To a vanilla seam-gen project, the Eclipse build path needs updating to add lib/mail.jar and lib/mail-ra.jar (note: JAR and not RAR) - it would be useful to get this from the docs rather than having to work it out.
The docs states that "Most seam annotations will work inside a MDB but you musn't access the persistence context." - Why is this? Isn't that quite a severe limitation? Can anything be done to get around this?
Some very useful information comes to light in this thread:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115420
Particularly later on when the OP is talking about ports. I would like to see that in the docs.
Finally, the takeaway example needs tweaking before it will build from CVS: the build.xml contains an import to ../../build.xml which should be ../build.xml? Also the references to jboss-el.jar and jbpm-jpdl.jar in application.xml should be relative to lib/. After these changes the example builds but I just get a completely blank page when I run it. It would be great if this sample used the Meldware server.
Cheers,
Chris
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075993#4075993
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075993
18Â years, 10Â months
[JBoss Seam] - JBoss EL
by magbyr
Hello.
Hope this is the right place to post (seems like jboss el is part of the seam project).
I would like to use JBoss EL as a standalone EL provider. Is this possible? I'm using Tomcat 6, JSF 1.2 and Facelets. I've tried putting the el jars in /lib folder, but I'm getting this error:
java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.addELResolver(Ljavax/el/ELResolver;)V" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, org/apache/myfaces/webapp/DefaultFacesInitializer, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ELResolver used in the signature
Can't find much information about this on the net.
---
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075986#4075986
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075986
18Â years, 10Â months
[JNDI/Naming/Network] - JNDI classCastException
by chandrakanth_76
When i start the JBOSS server , i am getting the following error:--
------------------------------------------------------------------------------------
[DatasourceConnectionProvider] Using datasource: java:/JDBC/MIB
07:43:21,140 INFO [TransactionFactoryFactory] Transaction strategy: net.sf.hibernate.transaction.JTATransactionFactory
07:43:21,250 INFO [NamingHelper] JNDI InitialContext properties:{}
07:43:21,265 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: net.sf.hibernate.transactio
n.JBossTransactionManagerLookup
07:43:21,265 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
07:43:21,265 INFO [NamingHelper] JNDI InitialContext properties:{}
07:43:21,281 INFO [STDOUT] [HR] Exception caught while calling l_hibCfg.buildSessionFactory()
07:43:21,296 INFO [STDOUT] java.lang.ClassCastException
07:43:21,296 INFO [STDOUT] at net.sf.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDIT
ransactionManagerLookup.java:23)
07:43:21,296 INFO [STDOUT] at net.sf.hibernate.transaction.JTATransactionFactory.configure(JTATransactionFactory.ja
va:48)
07:43:21,312 INFO [STDOUT] at net.sf.hibernate.transaction.TransactionFactoryFactory.buildTransactionFactory(Transa
ctionFactoryFactory.java:48)
07:43:21,312 INFO [STDOUT] at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
07:43:21,312 INFO [STDOUT] at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1172)
07:43:21,328 INFO [STDOUT] at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:803)
07:43:21,328 INFO [STDOUT] at com.jnc.hibernate.HibernateRegistry.registerFactory(HibernateRegistry.java:225)
07:43:21,343 INFO [STDOUT] at com.jnc.hibernate.HibernateRegistry.initializeRegistry(HibernateRegistry.java:80)
07:43:21,343 INFO [STDOUT] at com.jnc.hibernate.HibernateRegistry.(HibernateRegistry.java:41)
07:43:21,343 INFO [STDOUT] at com.jnc.novell.director.impl.HibernateRegistryManager.resourceSetAvailable(HibernateR
egistryManager.java:110)
07:43:21,343 INFO [STDOUT] at com.jnc.novell.director.impl.HibernateResourceListener$BootStaller.run(HibernateResou
rceListener.java:93)
07:43:21,359 INFO [STDOUT] [HR] path /hibernate/OSTModel.cfg.xml
------------------------------------------------------------------------------------
Could any one please tell me what could be the probem.
I am new to the jboss forums.
If any one feels that the problem is not related to this topic then pls suggest me.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075985#4075985
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075985
18Â years, 10Â months