[jboss-user] [JBoss Seam] - isNull not working for one-to-one relation

2007-09-28 Thread knuwu
When I try to create a criteria like the following:


  | Criteria c = ((SessionImpl) entityManager.getDelegate())
  |   .createCriteria(Person.class);
  | 
  | pCriteria.add(Restrictions.isNull(location));
  | 

where location is the attribute of an one-to-one relation, i don't get any hit 
in the resultlist, even there are records in the database matching this 
criteria.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4089570#4089570

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089570
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Stored procedure call causes connection close

2007-09-28 Thread knuwu
Hi nickarls

Read chapter 11.3.2. Extended session and automatic versioning of Seam 
Reference Manual Version 1.2.1 GA.

You can chance the flushMode of a session by calling:


  | Session s = (SessionImpl) entityManager.getDelegate();
  | s.setFlushMode(FlushMode.NEVER);
  | 

This prevents seam from closing the session automatically after the request 
finished

But you have to flush an close the session manually!


  | s.flush();
  | s.close();
  | 

Greetings Ralph

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4089576#4089576

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089576
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Stored procedure call causes connection close

2007-09-28 Thread knuwu
Ups! The mentioned chapter is in Hibernate reference documentation version 
3.2.0 GA which is used in seam 1.2.1.

There is even a better way if you are working with annotations. See chapter 
22.4. Annotations for context demarcation (Seam ref doc 1.2.1 - really ;-))


Just annotate the methode you are calling the SP with this annotation.

@Begin(flushMode=FlushModeType.MANUAL)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4089580#4089580

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089580
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How to pass param from inputText to s:link

2007-09-28 Thread knuwu
Hi jagr

Try using the rich faces ajax tags included in seam 1.2.1

in Class SomeBean


  | h:inputText id=paramFromUser value=#{someBean.paramFromUser}
  |a4j:support event=onkeyup ajaxSingle=true reRender=myLink/
  | /h:inputText
  | 
  | s:link id=myLink action=#{actions.doSomething} 
value=#{messages.actions_doSomething}
  |   f:param name=param1 value=#{someBean.paramFromUser}/
  | /s:link 
  | 

Every time the user is typing a character in the inputfield a ajax request is 
sended back to the server, the bean value is updated an the link element will 
be updated with the new bean value as a parameter.

Give it a try.

Greetings Ralph

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4089593#4089593

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089593
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Change Database Connection at Runtime

2007-09-28 Thread knuwu
Hi breaveFencer

In your resources/WEB-INF/components.xml configuration file you find the 
following line:


  | core:managed-persistence-context name=entityManager
  | auto-create=true
  | persistence-unit-jndi-name=java:/yourDBnameEntityManagerFactory /
  
  | 

Where yourDBname is normaly the name of your db reference in 
/META-INF/persistence.xml


  |persistence-unit name=yourDBname
  |   providerorg.hibernate.ejb.HibernatePersistence/provider
  |   jta-data-sourcejava:/yourDBnameDatasource/jta-data-source
  |   properties
  |  property name=hibernate.hbm2ddl.auto value=create-drop/
  |  property name=hibernate.cache.use_query_cache value=true/
  |  property name=hibernate.show_sql value=true/
  |  property name=jboss.entity.manager.factory.jndi.name 
value=java:/yourDBnameEntityManagerFactory/
  |   /properties
  |/persistence-unit
  | 

which is actually a reference to the jboss *-ds.xml configuration.

You may configure a second database connection (an addition *-ds.xml, a new 
enty in your persitence.xml and components.xml).


  | core:managed-persistence-context name=entityManager2
  | auto-create=true
  | persistence-unit-jndi-name=java:/yourOtherDBnameEntityManagerFactory 
/  
  | 

On code level you may reference the new entityManager with


  | entityManager= (EntityManager) Component.getInstance( entityManager2 );
  | 

The old one with

  | entityManager= (EntityManager) Component.getInstance( entityManager );
  | 
  | Or simply with annotation
  | 
  | @In EntityManager entityManager;
  | 

Can not garantee this works but i would try it.

Greetings Ralph

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4089585#4089585

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089585
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: testng unit tests not working with testng eclipse plugin

2007-08-21 Thread knuwu
anonymous wrote : You should add this to the SeamProblemsFAQ on the wiki.

I've added an entry to SeamProblemsFAQ.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4076132#4076132

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4076132
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - suggestionbox focus problem - urgent

2007-08-17 Thread knuwu
This is a repost of

http://www.jboss.com/index.html?module=bbop=viewtopict=116256

It's really a show stopper and urgent! Any help would be highly appreciated.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4075112#4075112

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4075112
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - suggestionbox-can't focus fields with mouse after popup disa

2007-08-16 Thread knuwu
Hi

The suggestionbox ist working fine, but I have the strange problem that input 
fields which had been coverd by the suggestion popup, can't be focused with the 
mouse after the popup disapeared. The tab key is working under most conditions.

This behaviour is IE specific. If you try the same page in Firefox all works 
fine.

Does anybody know something about that problem?

Greetings Ralph

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4074747#4074747

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074747
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: suggestionbox-can't focus fields with mouse after popup

2007-08-16 Thread knuwu
Sorry, this is a copy of the post in RichFaces User forum. I'm talking about 
the RichFaces component suggestion box.

The point to adress this forum is:

Seam is preconfigured to use RichFaces and it is a real nightmare to use 
something different!!!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4074899#4074899

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074899
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How to create hibernate criteria

2007-06-28 Thread knuwu
Thank you Fabricio

I will try your advice and let you know if it worked. Yes jboss-ejb3-all.jar is 
packaged.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4058572#4058572

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058572
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How to create hibernate criteria

2007-06-28 Thread knuwu
Great Fabricio

It worked!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4058595#4058595

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058595
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How to create hibernate criteria

2007-06-27 Thread knuwu
The JBoss Version is JBoss 4.0.5 GA.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057969#4057969

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057969
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - How to create hibernate criteria

2007-06-26 Thread knuwu
Hi

I like to create a hibernate criteria instead a normal query.


  |  @PersistenceContext(type=PersistenceContextType.EXTENDED)
  |  private EntityManager em;
  | 
  |   public void search()
  |   {
  | log.info(Get all users);
  | 
  | Criteria c = ((Session)em.getDelegate()).createCriteria(User.class)
  |   .setMaxResults(this.pageSize)
  |   .addOrder(Order.asc(userid));
  | 
  | if (user.getUserid() != null  user.getUserid().length()  0) {
  |   c.add(Restrictions.like(userid, user.getUserid() + %));
  | }
  | 
  | this.userList = c.list();
  | 

I always get an ClassCastException for the Session.


  | Caused by: java.lang.ClassCastException: org.hibernate.ejb.EntityManagerImpl
  | at 
com.swisscom.seat.modules.base.admin.UserManagerBean.search(UserManagerBean.java:132)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
  | at 
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
  | at 
org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
  | at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
  | ...
  | ...
  | 

How can one get the Hiberate Session to create a criteria?

Im using a standard seam 1.2.1 configuration generated by seam-gen.

Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057865#4057865

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057865
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: testng unit tests not working with testng eclipse plugin

2007-04-19 Thread knuwu
I found the reason for the failure by my self. It is needed to ad the 
test-build directory to the build-path of the eclipse project. Otherwise the 
embedded EJB-Container will not parse the EJB-classes for components.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4038750#4038750

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4038750
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: testng unit tests not working with testng eclipse plugin

2007-04-19 Thread knuwu
It' always a good idea to look for the initializations of your own components. 
This gave me the major clue.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4038751#4038751

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4038751
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - rule based security - hard wired names in ant project

2007-04-04 Thread knuwu
I'm a little bit unhappy with some hard wired dependencies, in case you are 
using the seam-gen generated ant eclipse project for deploying the application.

If you are looking to the components.xml Konfiguration you might get the 
feeling, that you are free to name and position your xxx.drl rule file.


  | security:identity authenticate-method=#{authenticator.authenticate}
  |   security-rules=#{securityRules} /
  | 
  | drools:rule-base name=securityRules
  | drools:rule-files
  | value/security.drl/value
  | /drools:rule-files
  | /drools:rule-base
  | 

But if you looking to the ant build.xml you see:


  |target name=ear description=Build the EAR
  | copy todir=${ear.dir}
  | fileset dir=${basedir}/resources
  | include name=*jpdl.xml /
  | include name=hibernate.cfg.xml /
  | include name=jbpm.cfg.xml /
  | include name=security.drl /
  | /fileset
  |   
  | 

Even worst - if you take a look to class 
org.jboss.seam.security.RuleBasedIdentity you see:


  |protected void initSecurityContext()
  |{
  |   if (securityRules==null)
  |   {
  |  securityRules = (RuleBase) 
Component.getInstance(RULES_COMPONENT_NAME, true);
  |   }
  |   
  |   if (securityRules != null)
  |   {
  |  securityContext = securityRules.newWorkingMemory(false);
  |   }
  |   
  |   if (securityContext == null)
  |   {
  |  log.warn(no security rule base available - please install a 
RuleBase with the name ' +
  |   RULES_COMPONENT_NAME + ' if permission checks are 
required.);
  |   }
  |}
  | 

where RULES_COMPONENT_NAME has the value securityRules which fixes the name 
of your rule base.

If you take a look in the manual, you find this example:


  | drools:rule-base name=securityRules
  |   drools:rule-files
  | value/META-INF/security.drl/value
  |   /drools:rule-files
  | /drools:rule-base
  | 

This simply does not work since the seam-gen generated build.xml ant project 
only deploys a file called security.drl position in the /resources directory.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4034528#4034528

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4034528
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - testng unit tests not working with testng eclipse plugin sin

2007-04-04 Thread knuwu
I had well working testng test in version 1.2.0 sp1, i could execute from ant 
or inside eclipse with the testng pugling.

Since 1.2.1 GA i get the following error message when i execute my login tests:


  | [RuleBasedIdentity] no security rule base available - please install a 
RuleBase with the name 'securityRules' if permission checks are required.
  | 

Full stack trace:


  | [Parser] Running:
  |   
C:\seat\workspace\aldebaran\src\test\com\swisscom\seat\services\security\test\testngServiceSecurityTest.xml
  | 
  | 14:47:08,821 INFO  [Scanner] scanning: 
/C:/seat/workspace/aldebaran/lib/jboss-seam.jar
  | 14:47:08,837 INFO  [Initialization] Namespace: 
http://jboss.com/products/seam/security, package: org.jboss.seam.security, 
prefix: org.jboss.seam.security
  | 14:47:08,837 INFO  [Initialization] Namespace: 
http://jboss.com/products/seam/drools, package: org.jboss.seam.drools, prefix: 
org.jboss.seam.drools
  | 14:47:08,837 INFO  [Initialization] Namespace: 
http://jboss.com/products/seam/mail, package: org.jboss.seam.mail, prefix: 
org.jboss.seam.mail
  | 14:47:08,837 INFO  [Initialization] Namespace: 
http://jboss.com/products/seam/web, package: org.jboss.seam.web, prefix: 
org.jboss.seam.web
  | 14:47:08,837 INFO  [Initialization] Namespace: 
http://jboss.com/products/seam/theme, package: org.jboss.seam.theme, prefix: 
org.jboss.seam.theme
  | 14:47:08,837 INFO  [Initialization] Namespace: 
http://jboss.com/products/seam/core, package: org.jboss.seam.core, prefix: 
org.jboss.seam.core
  | 14:47:08,837 INFO  [Initialization] Namespace: 
http://jboss.com/products/seam/jms, package: org.jboss.seam.jms, prefix: 
org.jboss.seam.jms
  | 14:47:08,837 INFO  [Initialization] Namespace: 
http://jboss.com/products/seam/framework, package: org.jboss.seam.framework, 
prefix: org.jboss.seam.core.framework
  | 14:47:08,837 INFO  [Scanner] scanning: 
/C:/seat/workspace/aldebaran/lib/jboss-seam-debug.jar
  | 14:47:08,837 INFO  [Scanner] scanning: 
/C:/seat/workspace/aldebaran/lib/jboss-seam-ui.jar
  | 14:47:08,853 INFO  [Initialization] reading 
jar:file:/C:/seat/workspace/aldebaran/lib/jboss-seam.jar!/META-INF/components.xml
  | 14:47:08,962 INFO  [Initialization] reading properties from: 
/seam.properties
  | 14:47:08,962 INFO  [Initialization] reading properties from: 
/jndi.properties
  | 14:47:08,962 INFO  [Initialization] initializing Seam
  | 14:47:08,993 INFO  [Scanner] scanning: 
/C:/seat/workspace/aldebaran/lib/jboss-seam-debug.jar
  | 14:47:09,071 INFO  [Scanner] scanning: 
/C:/seat/workspace/aldebaran/lib/jboss-seam-ui.jar
  | 14:47:09,274 INFO  [Scanner] scanning: 
/C:/seat/workspace/aldebaran/lib/jboss-seam.jar
  | 14:47:10,257 INFO  [Initialization] two components with same name, higher 
precedence wins: org.jboss.seam.persistence.persistenceProvider
  | 14:47:10,273 INFO  [Initialization] two components with same name, higher 
precedence wins: org.jboss.seam.security.identity
  | 14:47:10,304 INFO  [Component] Component: org.jboss.seam.core.init, scope: 
APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
  | 14:47:10,351 INFO  [Initialization] Installing components...
  | 14:47:10,367 INFO  [Component] Component: 
org.jboss.seam.core.applicationContext, scope: APPLICATION, type: JAVA_BEAN, 
class: org.jboss.seam.core.ApplicationContext
  | 14:47:10,367 INFO  [Component] Component: 
org.jboss.seam.core.businessProcessContext, scope: APPLICATION, type: 
JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
  | 14:47:10,367 INFO  [Component] Component: org.jboss.seam.core.conversation, 
scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Conversation
  | 14:47:10,367 INFO  [Component] Component: 
org.jboss.seam.core.conversationContext, scope: APPLICATION, type: JAVA_BEAN, 
class: org.jboss.seam.core.ConversationContext
  | 14:47:10,367 INFO  [Component] Component: 
org.jboss.seam.core.conversationEntries, scope: SESSION, type: JAVA_BEAN, 
class: org.jboss.seam.core.ConversationEntries
  | 14:47:10,367 INFO  [Component] Component: 
org.jboss.seam.core.conversationList, scope: PAGE, type: JAVA_BEAN, class: 
org.jboss.seam.core.ConversationList
  | 14:47:10,367 INFO  [Component] Component: 
org.jboss.seam.core.conversationStack, scope: PAGE, type: JAVA_BEAN, class: 
org.jboss.seam.core.ConversationStack
  | 14:47:10,382 INFO  [Component] Component: org.jboss.seam.core.eventContext, 
scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventContext
  | 14:47:10,382 INFO  [Component] Component: org.jboss.seam.core.events, 
scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Events
  | 14:47:10,382 INFO  [Component] Component: org.jboss.seam.core.exceptions, 
scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Exceptions
  | 14:47:10,382 INFO  [Component] Component: org.jboss.seam.core.expressions, 
scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Expressions
  | 14:47:10,382 INFO  [Component] Component: 

[jboss-user] [JBoss Seam] - Re: rule based security - hard wired names in ant project

2007-04-04 Thread knuwu
Yes... of course...no problem

But with each single change to the original ant project, you are getting more 
and more problems to keep track changes packed in future seam releases.

And there had been quite a lot of changes in the last months.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4034583#4034583

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4034583
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Load Resource Bundle

2007-04-04 Thread knuwu
Hi jbossja

Do you have a file messages_fr.properties in the directory /resources?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4034586#4034586

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4034586
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Load Resource Bundle

2007-04-04 Thread knuwu
I typically load Resources like this in my bean class:

  | ResourceBundle.instance().getString(this.label);
  | 

Attention: ResourceBundle is of type org.jboss.seam.core.ResourceBundle!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4034608#4034608

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4034608
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Selectable linklist without h:dataTable

2007-03-26 Thread knuwu
I changed the list to DataModel using DataModel Annotation:

@Stateful
  | @Name(configSelector)
  | @Scope(ScopeType.SESSION)
  | public class ConfigurationSelectorImpl implements ConfigurationSelector {
  |   
  |   @Logger private Log log;
  |   
  |   @DataModel
  |   private ArrayListModule moduleList = new ArrayListModule();
  |   
  |   @DataModelSelection
  |   @Out(required=false)
  |   private Module selectedModule;
  |   
  |   @SuppressWarnings(unused)
  |   @Create
  |   public void initModuleList() {
  | moduleList.add(AdminModule.getInstance());
  | moduleList.add(TestModule.getInstance());
  |   }
  |   
  |   public ArrayListModule getModuleList () {
  | return this.moduleList;
  |   }
  |   
  |   public void selectModule(Module pModule) {
  | this.selectedModule = pModule;
  | log.info(#0 selected, this.selectedModule.getName());
  |   }
  |   
  |   @Destroy @Remove
  |   public void destroy() {}
  | 
  | }

The first entry of the DataModel is automatically stored in variable 
selectedModule (DataModelSelection annotated). This is not may prefered 
behavior but would be acceptable if there's no other possiblity.

Unfortunatly the parameter pModule is still null in Methode selectModule() when 
I click another link in the list. The variable selected Module still points to 
the first list element.

Any idea?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4031524#4031524

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4031524
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Selectable linklist without h:dataTable

2007-03-23 Thread knuwu
I have a List of items stored in a session bean and i've created a link list on 
the page. When I click on the link, I want to transfer the underlying item to 
the action methode.

I used enhanced EL for that purpose, but the parameter of methode 
selectModule() is always 'null'.


  | div id=configList
  |   ul
  | c:forEach var=module items=#{configSelector.moduleList}
  |   lis:link value=#{module.name}
  |  action=#{configSelector.selectModule(module)}//li
  |  /c:forEach
  |   /ul
  | /div
  | 


  | @Stateful
  | @Name(configSelector)
  | @Scope(ScopeType.SESSION)
  | public class ConfigurationSelectorImpl implements ConfigurationSelector {
  |   
  |   @Logger private Log log;
  |   
  |   private ArrayListModule moduleList = new ArrayListModule();
  |   
  |   @Out(required=false)
  |   private Module selectedModule;
  |   
  |   @SuppressWarnings(unused)
  |   @Create
  |   public void initModuleList() {
  | moduleList.add(AdminModule.getInstance());
  |   }
  |   
  |   public ArrayListModule getModuleList () {
  | return this.moduleList;
  |   }
  |   
  |   public void selectModule(Module pModule) {
  | this.selectedModule = pModule;
  | log.info(#0 selected, this.selectedModule.getName());
  |   }
  |   
  |   @Destroy @Remove
  |   public void destroy() {}
  | 
  | }
  | 

I can't use h:dataTable because I do not want to render the list in a table.

I'm surely missing something. Please help

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4031213#4031213

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4031213
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - log.fatal() logged with debug level

2007-03-21 Thread knuwu
I already wrote a short notice about a logging error in the newest release, but 
did't not get any confirmation.

See

http://www.jboss.com/index.html?module=bbop=viewtopict=104121

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4030363#4030363

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4030363
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - log.fatal(Object object, Throwable t, Object... params) is l

2007-03-15 Thread knuwu
Hi

I might missing something, but when I call log.fatal(Object object, Throwable 
t, Object... params) methode, I can't find a message in the logfile or console.

Setting the log level to DEBUG suddenly brings the message to the log. And yes, 
it is logged with debug level.

Analysing the seam source code, I found this little piece of code in the Class 
org.jboss.seam.log.Log4JProvider at line 130, which might be guilty in the 
first degree. I guess a typical cut-and-paste error:


  |public void fatal(Object object, Throwable t)
  |{
  |   logger.log( getFQCN(), Level.DEBUG, object, t);
  |}
  | 

To see fatal messages with stacktraces only when debug level is activated might 
be ...ähm... a little bit fatal ;-)

Seam version used: 1.2.0Patch1

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4028275#4028275

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4028275

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - How to get Container properties

2007-03-15 Thread knuwu
I have the following problem:

I like to store some of my application configuration parameters outside the 
ear-package. The reason for that is, that some configuration values will have 
different values for development, test and production enviroment.

Best would be to store these values in a configuration file in the config 
directory of the container (equally to *-ds.xml configuration).

First difficulty: Find out where the container is running and where to find the 
config directory.

Second difficulty: If there are more than one application running on the same 
container, you have to chose a unique file name for your config file for each 
application running on that container. So the application must know it's name.

Third difficulty: All above should even work, when you are testing your 
application with testng and you are running in an embedded ejb3 container.

I found a solution for the first two problems. I get the deployment path from 
the Deploy Scanner MBean and calculate the path of the server config relative 
to that path. I derive the application name from the 
Init.instance().getJndiPattern() value.

You may also get the path information from System.getProperty calls.

But all is not working, if you start testing with the embedded ejb3 conatiner.  
The embedded ejb container does neither have the appropriate MBeans nor are 
there system properties.

The only solution might be to set a special system property. Disadvantage of 
that solution: You have to make sure it will be set in all possible run 
configurations (testng plugin, testng ant call, jboss start with eclipse 
plugin, jboss start with command line).

Is there a better solution?
 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4028322#4028322

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4028322
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How to get Container properties

2007-03-15 Thread knuwu
Ok, perhaps I have to be more precise. The configuration properties I'm talking 
about do not belong to the seam configuration of components. I'm talking about 
application specific parameters controlling for examples the behaviour of 
business logic.

Example: A booking application stores all canceled booking requests in an 
archive. Requests older than a given number of days will be delete. So you want 
to configure the amout of days different for your development, test and 
production enviroment. And of cause the system administrator should be able to 
change the value while the system is running.

So it's not a good idea to store this kind of information to a configuration 
file inside your container. Otherwise you have to redeploy the application just 
for changing a value. On the other hand, this parameter is not changed often 
enough to justify storage in database with admin gui. 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4028351#4028351

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4028351
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Testing Authentication with TestNG

2007-03-13 Thread knuwu
Great! Upgrading to Release 1.2 fixed the problem!
Thank's

Answering my own question: 
Using seam-gen update-project does only copy the new libraries to lib 
directory. To integrate possible changes in configuration files you have to 
compare configuration files from a new generated project with the updated one 
for changes.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4027576#4027576

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4027576
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Testing Authentication with TestNG

2007-03-12 Thread knuwu
I'm trying to test the authentication with TestNG inside Eclipse with the 
TestNG -Plugin.

The test class looks like that:


  | package test.seam.services.security.test;
  | 
  | import org.jboss.seam.mock.SeamTest;
  | import org.testng.annotations.Test;
  | 
  | public class UserSearchTest extends SeamTest {
  | 
  |   @Test
  |   public void testSearch() throws Exception {
  | new FacesRequest() {
  | 
  |   @Override
  |   protected void updateModelValues() throws Exception {
  | setValue(#{identity.username}, tsggora1);
  | setValue(#{identity.password}, test);
  |   }
  | 
  |   @Override
  |   protected void invokeApplication() {
  | assert invokeMethod(#{identity.login}).equals(success);
  |   }
  | 
  | }.run();
  |   }
  | 
  | }
  | 

All worked fine, the embedded ejb container is started up, hsqldb database is 
initialised, schema is imported, import script is done

until it comes to execute the FacesRequest. I get this error message:


  | 16:32:21,600 INFO  [SchemaExport] Running hbm2ddl schema export
  | 16:32:21,600 INFO  [SchemaExport] exporting generated schema to database
  | 16:32:21,616 INFO  [SchemaExport] Executing import script: /import.sql
  | 16:32:21,616 INFO  [SchemaExport] schema export complete
  | 16:32:21,632 INFO  [NamingHelper] JNDI InitialContext 
properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory,
 java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
  | 16:32:21,850 INFO  [MCKernelAbstraction] installing bean: 
jboss.j2ee:jar=test-build,name=UserSearchBean,service=EJB3 with dependencies:
  | 16:32:21,850 INFO  [MCKernelAbstraction][EMAIL 
PROTECTED]:jar=test-build.jar,unitName=aldebaran}
  | 16:32:22,132 INFO  [EJBContainer] STARTED EJB: 
test.seam.modules.base.security.UserSearchBean ejbName: UserSearchBean
  | 16:32:22,163 INFO  [MCKernelAbstraction] installing bean: 
jboss.j2ee:jar=jboss-seam,name=Dispatcher,service=EJB3 with dependencies:
  | 16:32:22,178 INFO  [EJBContainer] STARTED EJB: 
org.jboss.seam.core.Dispatcher ejbName: Dispatcher
  | 16:32:22,194 INFO  [MCKernelAbstraction] installing bean: 
jboss.j2ee:jar=jboss-seam,name=TransactionListener,service=EJB3 with 
dependencies:
  | 16:32:22,210 INFO  [EJBContainer] STARTED EJB: 
org.jboss.seam.core.TransactionListener ejbName: TransactionListener
  | 16:32:22,210 INFO  [Lifecycle] starting up: org.jboss.seam.multipartConfig
  | 16:32:22,225 INFO  [Initialization] done initializing Seam
  | 16:32:22,272 INFO  [Pages] reading pages.xml
  | 16:32:23,350 INFO  [Ejb] stopping the embedded EJB container
  | 16:32:23,350 INFO  [SessionFactoryImpl] closing
  | 16:32:23,350 INFO  [SchemaExport] Running hbm2ddl schema export
  | 16:32:23,350 INFO  [SchemaExport] exporting generated schema to database
  | 16:32:23,350 INFO  [SchemaExport] schema export complete
  | FAILED: testSearch
  | java.lang.NullPointerException
  | at org.jboss.seam.core.Selector.getCookieValue(Selector.java:59)
  | at 
org.jboss.seam.security.Identity.initCredentialsFromCookie(Identity.java:91)
  | at org.jboss.seam.security.Identity.create(Identity.java:85)
  | at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  | at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
  | at org.jboss.seam.Component.callComponentMethod(Component.java:1835)
  | at org.jboss.seam.Component.callCreateMethod(Component.java:1783)
  | at org.jboss.seam.Component.newInstance(Component.java:1772)
  | at org.jboss.seam.Component.getInstance(Component.java:1669)
  | at org.jboss.seam.Component.getInstance(Component.java:1636)
  | at org.jboss.seam.Namespace.get(Namespace.java:42)
  | at javax.el.MapELResolver.getValue(MapELResolver.java:157)
  | at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:135)
  | at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
  | at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
  | at 
org.jboss.seam.util.UnifiedELValueBinding.getValue(UnifiedELValueBinding.java:34)
  | at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:53)
  | at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1710)
  | at org.jboss.seam.Component.getInstance(Component.java:1659)
  | at org.jboss.seam.Component.getInstance(Component.java:1636)
  | at org.jboss.seam.Component.getInstance(Component.java:1630)
  | at org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
  | at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:135)
  | at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
  | at com.sun.el.parser.AstValue.getTarget(AstValue.java:62)
  | at com.sun.el.parser.AstValue.setValue(AstValue.java:132)
  | at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:255)
  | at 

[jboss-user] [JBoss Seam] - Re: Testing Authentication with TestNG

2007-03-12 Thread knuwu
This is version 1.1.6

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4027227#4027227

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4027227
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Testing Authentication with TestNG

2007-03-12 Thread knuwu
By the way...what is the best way to update a 1.1.6 release to 1.2? To upgrade 
from 1.1.5 to 1.1.6 I generated an empty example project with seam -gen, 
transfered all jar-Files, and compared configuration files for differences.

Is there an easier way? Thank's for help! 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4027233#4027233

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4027233
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user