[jboss-user] [JBoss Seam] - Re: Bijection clarification

2007-07-25 Thread smithbstl
Ok got it working.  It turns out Seam Bijection was not the culprit.  I was 
trying to use an Embedded class in more than one entity, which I found out is a 
bad thing.  I have not been able to find any documentation that says you can't 
do this but I'll leave that for a post on the Hibernate boards.  Thanks again.

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

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


[jboss-user] [JBoss Seam] - Re: Bijection clarification

2007-07-24 Thread smithbstl
Ok, I am still having problems with Address getting injected into my second sfsb

Here is what is going on

A form is submitted to sfsb "addressLocator" via an actionListener on the 
a4j:commandButton


  | 
  | //Form inputs here bound to address fields  

  | 
  | 
  | 
  | ...searchResults here
  | 
  | 
  | 
  |   
  | 
  |  

Here is the my first sfsb "AddressLocator"
@Stateful
  | @Name("addressLocator")
  | @Scope(ScopeType.CONVERSATION)
  | @SuppressWarnings("unchecked")
  | public class AddressLocatorAction implements AddressLocator {
  |  
  | @In
  | private EntityManager entityManager;  
  | 
  | @In(required=false)
  | @Out(scope=ScopeType.CONVERSATION, required=false)
  | private Address address;  
  | 
  | 
  | public AddressLocatorAction() {
  | }
  | 
  | public void findAddressByAddress(ActionEvent event) {
  | //Uses address for query, address has value here
  | }

after a dataTable "searchResults" is reRendered, the commandLink is pressed 
which calls requestManager.createRequestFromAddress()

@Stateful
  | @Name("requestManager")
  | @Scope(ScopeType.CONVERSATION)
  | public class RequestManagerAction implements 
com.stlouiscity.csb.ejb.action.RequestManager {
  | 
  | @In
  | private EntityManager entityManager; 
  | 
  | @In
  | private Address address;
  | 
  | 
  | public RequestManagerAction() {
  | }
  | 
  | public void createRequestFromAddress() {
  | serviceRequest = new ServiceRequest();
  | 
  | //This is a different address instance than was outjected 
  | //   by addressLocatorAction, fields are null
  | serviceRequest.setAddress(address);
  | }

The address component that is outjected from addressLocator is not the same 
instance that is injected into requestManager.  I can see the orginal address 
component on the seam debug page but a different instance belongs to 
serviceRequest on the debug page.  This is taking place in the scope of a long 
running conversation being managed by a jpdl pageflow.

Thanks again.

Thanks again.

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

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


[jboss-user] [JBoss Seam] - Re: Bijection clarification

2007-07-24 Thread monkeyden
This is still a gray area for me.  I have not seen a clear and complete 
description of the implied scopes.  Does it default to:

The scope of the bijected component, if any?  
The bean which is injecting it?  
Conversation unless specified otherwise?  
Find in any scope?

Thus far, I have always specified a scope for @Out, to be clear, but outside of 
that personal style, it's trial and error.

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

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


[jboss-user] [JBoss Seam] - Re: Bijection clarification

2007-07-24 Thread smithbstl
Ok, this is weird.  I had Address declared like this


  | //sfsb A
  | 
  | @In(required=false)
  | @Out(required=false)
  | private Address address
  | 
  | 

and Address kept nulling or falling out of scope more likley

when I changed it to this


  | //sfsb A
  | 
  | @In(required=false)
  | @Out(scope=ScopeType.CONVERSATION, required=false)
  | private Address address
  | 
  | 

it all works.

I thought that components shared the same state as the sfsb which was 
Conversation by default.

I am using Seam 1.3 Alpha


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

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


[jboss-user] [JBoss Seam] - Re: Bijection clarification

2007-07-24 Thread smithbstl
Ok, what I am struggling with is I have a component, Address, that is just a 
POJO, not an entity.  It is submitted via a form.  It's inject into sfsb A 
which then outjects it.  By the time sfsb B comes along, the Address component 
is null.  Both A and B exist in a long running conversation.  Address never 
even shows up on the seam debug page.

Thanks for your help.

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

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


[jboss-user] [JBoss Seam] - Re: Bijection clarification

2007-07-24 Thread monkeyden
BTW, to answer your question, passing from sfsb to sfsb works the same way.  
There is some context in between which has the value you're injecting, making 
it available to any Seam component who is interested in it.

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

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


[jboss-user] [JBoss Seam] - Re: Bijection clarification

2007-07-24 Thread monkeyden
The most basic description is that @In and @Out just replaces the glue code you 
have to write to get things out of some context (Session, Request, Application 
and, in Seam, Conversation scopes).  Rather than having:

String param = request.getSession().get("param");

you have:

@In(scope=ScopeType.SESSION)
String param;

Be careful though.  I realized (sort of late) that bijection apparently happens 
for value-binding method calls too, so if you're injection a lot, you will pay 
a price in RENDER_RESPONSE.  In our case, we had a huge form with many 
validation error messages from the resource bundle.

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

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