[jboss-user] [JBoss Seam] - Re: Structure of Seam project for multi client distribution

2007-12-17 Thread jcruise
If your persistence.xml is not in the same archive as your entity classes you 
might need to explicitly include class elements for the mapped classes e.g.


  | ...stuff...
  | 
  | com.myco.model.Role
  | com.myco.model.User
  | 
  | ...stuff...
  | 

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113334#4113334

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113334
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: generating forms programatically

2007-11-30 Thread jcruise
The renderers are just the metadata-driven generic form templates. I chose to 
use facelets to generate the forms rather than building custom jsf controls 
because it has such great composition functionality. I considered writing a jsf 
control for a custom grid or panel that was driven by my metadata model 
components. However, that seemed like hard, error prone work and it would be 
difficult to keep up with the state of the art in JSF gui's. In essence I 
didn't want to be building yet another JSF GUI lib. So I use facelets to 
dynamically build the higher level UI abstractions on top of the component set 
du jour.

The form templates (renderers) basically just loop over metadata using 
c:forEach to insert fields components into the page. I use facelets source tags 
for the "master" field component (to make the parameter passing nice), and 
within that I use ui:include with an expression for the src attribute to 
dynamically include correct jsf tags for the particular field type.

The essence of this approach is that the c: tags are processed before the rest 
of the jsf lifecycle processing, so they effectively act as a component tree 
generator.

Hope this helps.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109191#4109191

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109191
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: generating forms programatically

2007-11-29 Thread jcruise
The general strategy that I used was:

1. Build some framework classes that know how to extract basic field level 
metadata from ejb/hibernate config info at runtime. Automatically extracted 
metadata includes types, lengths, relationships etc. I also provide attributes 
in these framework classes to add additional decorations (editable status, pick 
list options, custom templates types etc.)

2. Provide an XML based config that allows me to specify the data 
configurations that should appear on each form in my system, and the facelets 
template to be used to draw that form (e.g. a panel renderer, a grid renderer 
etc) and the view id for that form.

3. Provide a custom facelets resolver that selects the correct rendering 
template for each form defined in my config when the user navigates to a 
particular URL. In this way I don't have to have actual facelets pages on disk 
for each form.

4. Build some generic renderers that use the metadata provider classes in 
conjunction with the c: tags.

I can support 10s or 100s of entity types in my system supported by only a 
couple of generic renderers.

I don't know if this is all a great idea, but it works for me!

Cheers
J



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108969#4108969

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108969
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Getting JBPM to use the seam managed persistence context

2007-11-29 Thread jcruise
Ok. 


  |public static Object getInstance(Class clazz, ScopeType scope, 
boolean create)
  |{
  |   return getInstance( getComponentName(clazz), scope, create );
  |}
  | 


I can see that the static instance() call does ultimately result in retrieving 
the component by name.

Consider me educated now :)

Cheers
J


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108903#4108903

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108903
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Getting JBPM to use the seam managed persistence context

2007-11-29 Thread jcruise
OK. I assumed, perhaps erroneously, that the component overriding rules would 
only work if you looked up the component by name. I believed that this code 
would always return an instance of ManagedJbpmContext. 


  |public static JbpmContext instance()
  |{
  |   if ( !Contexts.isEventContextActive() )
  |   {
  |  throw new IllegalStateException("no active event context");
  |   }
  |   return (JbpmContext) Component.getInstance(ManagedJbpmContext.class, 
ScopeType.EVENT);
  |}
  | 


Are you saying that I can install my own replacement for ManagedJbpmContext and 
that the ManagedJBpmContext.instance() call shown above would return my 
component?

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108817#4108817

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108817
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: generating forms programatically

2007-11-28 Thread jcruise
I dynamically construct forms using the c: tags. These allow you to manipulate 
the JSF component tree and dyanically select uicomponents to include based on 
your application metadata. You can't do this using tags like ui:repeat which 
don't change the component tree. The downside of using the c: tags is that the 
interactions between them and the rest of the page can get really confusing, 
and you end up working fairly close to the JSF lifecycle machinery during 
debugging.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108581#4108581

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108581
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Getting JBPM to use the seam managed persistence context

2007-11-16 Thread jcruise
Ok. Do you have any interest in a patch to allow us to do something like this 
in components.xml:


  | 
  | 
  | 
  | 

where jbpmConfiguration would a reference to either config1 or config2

Note that the current managed JbpmContext has a hard dependency on the default 
jbpm implementation because of code like this: 


  | jbpmContext = Jbpm.instance().getJbpmConfiguration().createJbpmContext();
  | 

You can't just set the session context manually after getting the 
ManagedJbpmContext, nor can you replace the default implementation of 
ManagedJbpmContext without patching Seam because of code like this:


  | ProcessInstance process = 
ManagedJbpmContext.instance().newProcessInstanceForUpdate(processDefinitionName);
  | 

in the classes in org.jboss.seam.bpm.

Thoughts appreciated.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105382#4105382

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105382
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Getting JBPM to use the seam managed persistence context

2007-11-14 Thread jcruise
Is there any way of elimnating the hibernate.cfg.xml for jbpm? I am trying to 
implement a multi-tenant application, with separate database connections per 
customer. I can easily select the entityManagerFactory dynamically for the main 
application, but this doesn't change the process db. Which is not good.

I did manage to patch the main jbpm component in seam to allow switching of 
configs at runtime, but this seems like a bit of a hack.

It would be much easier if we could use a single persistence.xml file for 
process an other application data.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104858#4104858

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104858
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: jbpm timer transaction issues

2007-11-14 Thread jcruise
http://jira.jboss.org/jira/browse/JBSEAM-2251

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104857#4104857

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104857
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: jbpm timer transaction issues

2007-11-14 Thread jcruise
Are you running on tomcat or Jboss AS? 

I get this error whenever I have the jbpm scheduler service even configured. It 
appears whenever I try to close a process instance. So, I've been working 
around it by just disabling the scheduler service. 

I'll file a JIRA issue for my problem.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104849#4104849

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104849
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Problems understanding Seam's jBPM support

2007-11-14 Thread jcruise
Just use injection to get the context:


  | @In private JbpmContext jbpmContext;
  | 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104498#4104498

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104498
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Data separation in a multi-tenant application

2007-09-28 Thread jcruise
I am trying to implement multiple db support from a single web app. This 
bascially involves allowing the users to select their db on login. I have an ok 
strategy for switching the main app db. I simply define multiple 
entityManagerFactories and then use an expression for the entityManager 
component's entityManagerFactory attribute. 

However, I also need to switch the Jbpm database.

My current best idea for how to do this involves changing the seam 
org.jboss.seam.bpm.jbpm component to allow it to select a specific jbpm 
configuration at runtime, depending on the value of an expression.

The underlying JbpmConfiguration class does support multiple configuration 
instances (e.g. JbpmConfiguration.getInstance("myjbpm.cfg.xml")) but the Seam 
component is application scoped and caches a single configuration instance for 
it's lifetime. 

Unfortunately I can't replace this component with one of my own because it's 
referenced directly by the org.jboss.seam.bpm.jbpmContext class. I can't just 
replace this as well because it is referenced directly by just about every 
other Seam bpm component. Sigh.

I think that my best bet is to patch the Seam Jbpm component to support 
multiple configs. 

Would this patch likely be accepted into the main codebase?

Does anyone have a better solution?

Cheers
J



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089616#4089616

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089616
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: Where to route obsolete parent token in token multiplica

2007-08-08 Thread jcruise
Hi Mark,

I am trying to solve a similar problem, but am a bit of a custom node newbie 
... do you have any code that you can share for your custom fork node?

Optimistically,
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072329#4072329

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072329
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: authenticator.sessionContext CVS

2007-08-07 Thread jcruise
I think this stuff has changed a bit in 2.0. I can't see a component id for the 
sessionContext anymore, so I use:


  | Context sessionContext = Contexts.getSessionContext();
  | 

Hope this helps.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071684#4071684

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071684
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Exception Handling Error -> redirect URL is wrong

2007-08-03 Thread jcruise
I'll put something together and post it on Monday.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070645#4070645

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070645
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: opensymphony clickstream

2007-08-03 Thread jcruise
It's not built in to seam, but I got it integrated in about 30mins.  Just 
required migrating the jsp example to facelets. 

I actually removed it from my production app because I became paranoid that it 
might interact badly with the other filters in the stack ... but I had no 
evidence for that :) 

Also, ultimtately it didn't really seem to add much value and so i am moving to 
an app specific usage tracking model.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070425#4070425

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070425
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Exception Handling Error -> redirect URL is wrong

2007-08-03 Thread jcruise
I also posted about this a while back. It seems like the URL's became relative. 
In my case it's worse - I have to use the external name, e.g. .jsf rather than 
.xhtml. I guess I need an update ... or a drink.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070423#4070423

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070423
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - problem with exception handler in CVS HEAD

2007-07-25 Thread jcruise
Exception handling seems to have changed / broken in the latest CVS HEAD.

The view-id parameter now seems to assume a relative url, with a jsf extension.

This happens even when I am using seam in debug mode. I am getting the 
following error on an exception:


  | HTTP Status 404 - /MyApp/myFolder/anotherFolder/page.jsf/debug.xhtml
  | 

Any ideas?

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067359#4067359

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067359
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: jboss-el limitations for lvals?

2007-07-16 Thread jcruise
If I understand your quetion correctly, it wasn't used to directly set the 
value on a ValueHolder, it was setting a parameter on a facelet source tag:

e.g. not 

  | 
  | 
but more like:

  | 
  | 


  | 
  |  
  | 
  | 

if that helps :) - I don't have the original code to hand any more.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064506#4064506

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064506
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam 2 B1 - Ending a process instance fails.

2007-07-10 Thread jcruise
built latest seam and jbpm-jpdl from cvs. Same problem.

Workaround is to disable the db scheduler service in jbpm.cfg.xml.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062770#4062770

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062770
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Seam 2 B1 - Ending a process instance fails.

2007-07-10 Thread jcruise
Tomcat 6
Seam 2 B1
Jboss Embedded Beta 2

Signalling the last task on a process causes the following exception:


  | Caused by: org.jbpm.JbpmException: couldn't delete jobs for '[EMAIL 
PROTECTED]'
  | at 
org.jbpm.db.JobSession.deleteJobsForProcessInstance(JobSession.java:211)
  | at 
org.jbpm.scheduler.db.DbSchedulerService.deleteTimersByProcessInstance(DbSchedulerService.java:54)
  | at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:329)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
  | at 
org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$b594bd1c.end()
  | at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:331)
  | at org.jbpm.graph.exe.Token.end(Token.java:303)
  | at org.jbpm.graph.exe.Token.end(Token.java:253)
  | at org.jbpm.graph.node.EndState.execute(EndState.java:59)
  | at org.jbpm.graph.def.Node.enter(Node.java:318)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
  | at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$1483760f.enter()
  | at org.jbpm.graph.def.Transition.take(Transition.java:151)
  | at org.jbpm.graph.def.Node.leave(Node.java:393)
  | at org.jbpm.graph.def.Node.leave(Node.java:357)
  | at org.jbpm.graph.def.Node.execute(Node.java:349)
  | at org.jbpm.graph.def.Node.enter(Node.java:318)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
  | at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$1483760f.enter()
  | at org.jbpm.graph.def.Transition.take(Transition.java:151)
  | at org.jbpm.graph.def.Node.leave(Node.java:393)
  | at org.jbpm.graph.node.StartState.leave(StartState.java:70)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
  | at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$1483760f.leave()
  | at org.jbpm.graph.exe.Token.signal(Token.java:194)
  | at org.jbpm.graph.exe.Token.signal(Token.java:139)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
  | at 
org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$43dce38b.signal()
  | at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:476)
  | at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:390)
  | at org.jboss.seam.bpm.BusinessProcess.endTask(BusinessProcess.java:195)
  | at com.volantice.zone.action.TaskBean.endTask(TaskBean.java:77)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
  | at 
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  | at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
  | at 
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
  | at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | at 
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
  | at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | at 
org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:54)
  | at 
org.jboss.seam.i

[jboss-user] [JBoss Seam] - Re: Dropping clean MC support was a Bad Thing :(

2007-07-09 Thread jcruise
Przemek. 

Thanks for the ref. That shaved off about 10secs. Which is good.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062003#4062003

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062003
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Dropping clean MC support was a Bad Thing :(

2007-07-09 Thread jcruise
+1

Not to mention that I now have 50sec start times instead of 17sec start times 
since the move to embedded from mc.

FYI the upgrade for me involved:

upgrading to tomcat 6.
upgrading to jboss embedded.
downgrading to Java 1.5 (for bug in Jboss embedded)
upgrading to eclipse 3.3 (for tomcat 6 support)
upgrading from Exadel Studio Pro to Jboss  Tools (for eclipse 3.3 support).
applying the documented migration changes
working out the rest of the neccessary changes.

All in all a fairly nervewracking 4 days. And not really happy with the move to 
Jboss embedded.

The JPA/Seam/Tomcat config that I had in 1.2.1GA was a sweet spot that I am 
disappointed to find unavailable right now. 

As an aside, I would really like to see some momentum building around more 
supportive documentation. What we have right now is really good for those 
people who are prepared to immerse themselves deep into the Seam culture. You 
can currently get by with Seam if you arm yourself with the source, the 
examples, the forum and the docs, and keep on top of all of those things on a 
regular basis. This is kind of OK, when the product is really, really new. 

But as we head into V2 it would be good to see some nice  comprehensive 
tutorials that reveal the Seam-magic in an easily digestible way. I think that 
the Seam story is great, but it is currently told in a very terse and difficult 
to absorb way and leaves a lot of "discovery learning" for the developer.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061973#4061973

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061973
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Seam2 Beta s:formattedText bug?

2007-07-04 Thread jcruise
if the value property is null then you get an NPE from the renderer e.g.


  | java.lang.NullPointerException
  | at java.io.PrintWriter.write(PrintWriter.java:401)
  | at 
com.sun.faces.renderkit.html_basic.HtmlResponseWriter.write(HtmlResponseWriter.java:495)
  | at 
org.jboss.seam.ui.renderkit.FormattedTextRendererBase.doEncodeBegin(FormattedTextRendererBase.java:24)
  | at 
org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
  | at 
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:785)
  | at 
org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:280)
  | at 
org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
  | at 
org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
  | at 
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
  | at 
org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
  | at 
org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
  | at 
org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:272)
  | at 
org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:267)
  | 

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060308#4060308

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060308
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - jboss-el limitations for lvals?

2007-07-01 Thread jcruise
In Seam 1.2.1GA I was not using jboss-el, and I had a value expression passed 
to a facelet source tag that looked something like this:


  | value="#{not empty f.expression ? f.expressionValue : f.componentProperty ? 
value[f.component][f.property] : value[f.name]}"
  | 

Now with Seam 2.0B1 (and the new Jboss-el) this gives me an error:

  | Illegal Syntax for Set Operation
  | 

when the form is submitted.

Should I factor this out into mutliple separate simpler expression and put the 
conditional logic elsewhere? Or is this a limitation that we expect to be 
lifted at some point?

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059470#4059470

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059470
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools (users)] - Re: Couldn't install eclipse plug-ins

2007-06-29 Thread jcruise
Huh? Not sure why we are getting our wires crossed here. My ignorance I'm sure 
:)

To recap:
- I install the Jboss tools beta as per instructions. All is good.
- I go to add other plugins that I need to get my work done. Apparently there 
are errors in the jboss tools beta config that I just downloaded. Not good. My 
shiny new eclipse environment is basically bricked.
- I fix the errors manually. All is well.

Where doe the Jboss IDE update site come into this?

Cheers
J




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059113#4059113

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059113
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools (users)] - Re: Couldn't install eclipse plug-ins

2007-06-29 Thread jcruise
OK I fixed this by editing a couple of feature.xml files.

D:\Development\Seam2\eclipse\features\org.jboss.ide.eclipse.as.feature_1.0.0.200706241629-nightly:


  | 
  | 
  |
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |   
  |
  | 

note the changes of match="equivalent" to match="compatible"

also removed the org.eclipse.jem import element from 
D:\Development\Seam2\eclipse\features\org.jboss.ide.eclipse.feature_2.0.0.200706241629-nightly

Don't know if my environment will now disappear in a puff of smoke when I do 
any serious work. But at least I can checkout my code from subversion now :)

Cheers
J


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059084#4059084

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059084
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools (users)] - Re: Couldn't install eclipse plug-ins

2007-06-29 Thread jcruise
I also get the message

JBossIDE JBossAS Adapter Feature (1.0.0.200706241629-nightly) requires plug-in 
"org.eclipse.wst.common.project.facet.core (1.1.0)", or equivalent.

when using help->software updates->find and install->search for new features 

and then try and install a new feature e.g. subclipse. 

It's a bit of a show stopper.

Cheers
Jamie

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059074#4059074

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059074
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Testing without EJB

2007-05-25 Thread jcruise
Hi

Does anybody know how to bootstrap the microcontainer in a test class or 
console app? I am using pojo/hibernate/tomcat so I don't want to use the 
embedded ejb-3. I tried simply extending SeamTest, using code a bit like this:


  | public class Administration extends SeamTest {
  | 
  | EntityManager em() {
  | EntityManagerFactory emf = Persistence
  | .createEntityManagerFactory("myDatabase");
  | EntityManager em = emf.createEntityManager();
  | return em;
  | }
  | 
  | public static void main(String[] args) throws Exception {
  | Administration app = new Administration();
  | app.execute();
  | }
  | 
  | private void execute() throws Exception {
  | 
  | EntityManager em = em();
  | 
  | em.getTransaction().begin();
  | 
  | Log log = (Log) getInstance("log");
  | log.info("Starting  Administration Console");
  | 
  | 
  | ... stuff with my components ...
  | 
  | 
  | em.getTransaction().commit();
  | }
  | 

 but I get the following error:


  | 15:55:15,967 ERROR [NamingHelper] Could not obtain initial context
  | javax.naming.NamingException: Local server is not initialized
  | at 
org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:30)
  | at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
  | at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
  | at javax.naming.InitialContext.init(Unknown Source)
  | at javax.naming.InitialContext.(Unknown Source)
  | at 
org.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:28)
  | 

Any ideas?

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048807#4048807

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048807
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: is xhtml a good choice for Facelets templates?

2007-05-24 Thread jcruise
I guess that a lot of us are using facelets as building blocks in componentized 
user interfaces. In my current application, only the top level templates could 
rightly be called xhtml files i.e. they look something like:


  | http://www.w3.org/TR/html4/strict.dtd";>
  | http://www.w3.org/1999/xhtml";
  | xmlns:ui="http://java.sun.com/jsf/facelets";
  | xmlns:h="http://java.sun.com/jsf/html";
  | xmlns:t="http://myfaces.apache.org/tomahawk";
  | xmlns:f="http://java.sun.com/jsf/core";
  | xmlns:s="http://jboss.com/products/seam/taglib";
  | xmlns:a="https://ajax4jsf.dev.java.net/ajax";>
  | 
  | 
  | 
  | ... stuff ...
  | 
  | 
  | 

a lot of my other facelets look something like:


  | http://mycompany.com/myapp"; />
  | 

which is not really xhtml, whatever way you spin it. But I'm a pragmatic sort 
of person and am not that bothered about changing file extensions for the sake 
of it. 

However, the "pondering facelets file extensions" thought process did lead me 
down another road which is sort of related. I got to wondering if I should 
actually move away from xml to specify facelets? 

In particular, my application has a very data driven, modular ui that has a lot 
of dynamic view building and depends heavily on the  tags for the view tree 
building logic. In my xhtml files this is transparently interspersed with the 
uicomponent's themselves and a liberal dose of jsf render-time logic, which is 
bloody confusing to read and maintain. 

Apart from the top level templates there's not a lot of mixed content (which 
xml style markup handles gracefully). 

I am beginning to wonder if a groovy based dsl wouldn't be much more concise 
and expressive for building complex facelets composition component's. 

I want something that stays in the scripting domain, to avoid needing to 
redeploy during UI hacking.

Has anybody done anything like this?

Cheers
J


Oh, to stay on-topic with the original thread, I propose that these files 
should be known as Facelets User Composition Komponents, with an appropriate 
extension.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048576#4048576

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048576
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: ELSupport exception on javasisst-proxies (coerceToType)

2007-05-17 Thread jcruise
Is this similar to the problem to that I posted yesterday?

http://jboss.com/index.html?module=bb&op=viewtopic&t=108741

(the last post being the relevant one) I think this is the situation when you 
have a select list of POJO objects that you want to assign to a target seam 
component. If this isn't the same case, feel free to ignore the rest of this 
message!

Should you be able to assign a POJO directly to a seam component ? It seems 
like it could be done with the cglib proxy implementation but not the javassist 
version (Seam 1.2.1 onwards). I concluded that we would need to update the el 
assignment to use Context.set(string,object) to perform the assignment safely. 

I found a workaround but it makes my code a bit less elegant. I'd appreciate 
advice on the correct strategy.

Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046448#4046448

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046448
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: problem with 1.2.1 / tomcat upgrade

2007-05-16 Thread jcruise
Talking to myself in public is such fun. 

On reflection (and by that I mean the human rather than the virtual form of 
introspection) I can now see that directly assigning the seam component would 
be problematic as the component value must be set in a seam context, and the EL 
RI isn't seam aware.

To workaround this I simply added a zone property to another component and had 
that component outject the new zone value.

so, for all you seamasochists (or is that seamonistas?) who have followed me 
this far and are still awake, my xhtml now looks like :

  | 
  | 
  | 
  | 
  | 


Cheers
J

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046085#4046085

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046085
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: problem with 1.2.1 / tomcat upgrade

2007-05-16 Thread jcruise
So here's the line that's causing the failure in the ELSupport class:


  | if (obj != null && type.isAssignableFrom(obj.getClass())) {
  | return obj;
  | }
  | 

My JSF code looks like this:

  | 
  | 
  | 
  | 

where zones is created using:

  | @SelectItems(value = "_zones", labelMethod = "getLabel", valueStrategy 
= Strategy.OBJECT)
  | public List getZones() {
  | return zones;
  | }
  | 

So basically the values are a bunch of Zone POJOs. 

And therefore I guess that the problem is that a Zone POJO is not assignable to 
a Zone seam component. This worked when seam components were using cglib for 
proxying but I guess Javassist has fixed that mistake ;)

What is the correct strategy here?

Cheers
J



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046051#4046051

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046051
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - problem with 1.2.1 / tomcat upgrade

2007-05-16 Thread jcruise
Hola!

I upgraded my 1.2.0PATCH1 tomcat installation with 1.2.1 GA. I basically 
upgraded the seam libs and any other libs  that were newer in the lib 
directory, including the jsf-facelets and el implementations. 

I initially had a problem with the switch from cglib to javassist in that one 
of my classes derived from HibernateEntityHome had overrided the 
getPersistentContext method in the generic base clase, which gave me a 
duplicate method error. I switched to overriding the non-generic getSession 
method and that problem disappeared. 

Now I am stuck with another tricky problem that might be related to Javassist 
... 

Basically, I have a selectOneMenu on my login page which includes a custom 
converter. The converter gets called correctly but the model does not seem to 
update. It fails with the following error:


  | 08:12:30,895 ERROR [[/XStreamline]] Cannot convert Streamline of type class 
com.volantice.site.model.Zone to class 
com.volantice.site.model.Zone_$$_javassist_1
  | java.lang.IllegalArgumentException: Cannot convert Streamline of type class 
com.volantice.site.model.Zone to class 
com.volantice.site.model.Zone_$$_javassist_1
  | at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:368)
  | at com.sun.el.parser.AstIdentifier.setValue(AstIdentifier.java:109)
  | at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:258)
  | at 
com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
  | at 
com.sun.facelets.el.LegacyValueBinding.setValue(LegacyValueBinding.java:68)
  | at javax.faces.component.UIInput.updateModel(UIInput.java:269)
  | at javax.faces.component.UIInput.processUpdates(UIInput.java:206)
  | at 
javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:645)
  | at javax.faces.component.UIForm.processUpdates(UIForm.java:87)
  | at 
javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:645)
  | at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:157)
  | at 
org.ajax4jsf.framework.ajax.AjaxViewRoot.access$101(AjaxViewRoot.java:53)
  | at 
org.ajax4jsf.framework.ajax.AjaxViewRoot$2.invokeRoot(AjaxViewRoot.java:278)
  | at 
org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:54)
  | at 
org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:176)
  | at 
org.ajax4jsf.framework.ajax.AjaxViewRoot.processUpdates(AjaxViewRoot.java:291)
  | at 
org.apache.myfaces.lifecycle.LifecycleImpl.updateModelValues(LifecycleImpl.java:302)
  | at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:81)
  | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | 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.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | 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.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
  | 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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV