[jboss-user] [JBoss Seam] - Re: @Unwrap question

2007-10-16 Thread mnrz
Hi all
I have a question about @Unwrap.  
I tried @Unwrap in a test application and as I understood, the whole bean will 
play on behalf of the wrapped context variable. 
for instance if I have method


  | @name("bean")
  | class MyBean {
  | 
  |  @Unwrap
  |  public User getUser(){
  | 
  |  }
  | }
  | 

the "bean" is referring to an instance of type User, isn't it?

but the thing I want to know is if the values inside a page is changed by the  
user and press submit button, Are these new changes visible at the server side? 
for example, the user changes his address which is a property of class User, 
will this change being applied at context variable inside the MyBean?

thanks


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

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


[jboss-user] [JBoss Seam] - Re: @Unwrap question

2007-10-15 Thread marius.oancea
As I know, @Unwrap annotate methoid is called everytime you access customerList 
variable. @Factory annotated method gets called only one time (if variable is 
not yet initialised)

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

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


[jboss-user] [JBoss Seam] - Re: @Unwrap question

2007-07-08 Thread enzhao
Thanks to you all! :-)


Regards,
Ellen

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

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


[jboss-user] [JBoss Seam] - Re: @Unwrap question

2007-07-08 Thread [EMAIL PROTECTED]
@Factory is useful to populate a context variable that is unchanging, or the 
change originates within your context. within it's scope (for example a list of 
hotels available to book).  @Unwrap is useful if the variable can change 
outside your control (e.g. from another users conversation)

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

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


[jboss-user] [JBoss Seam] - Re: @Unwrap question

2007-07-07 Thread wschwendt
"enzhao" wrote : Hi folks,
  | 
  | 1. What's the difference between @Factory and @Unwrap in the following two 
code fragments? (from reference section 3.8)
  | 


the Factory method gets only called if the referenced context variable, the 
factory method is defined for, is not yet bound to a value.  In your case the 
context variable is "customerList".   Once this context variable is set to a 
value, the factory won't be called anymore, when "customerList" gets referenced 
additional times.

In contrast, the method annotated with @unwrap gets called EVERY time the 
manager component with the name "customerList" is referenced.  



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

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


[jboss-user] [JBoss Seam] - Re: @Unwrap question

2007-07-07 Thread rlhr
As far as I know, one difference is the way you are going to access your object.

If you use @Factory, you'll have to access it through the bean: 
#{myBeanName.myMethodName} (any first reference to myBeanName will trigger a 
call to the factory method)

Using unwrap, you directly use the bean name:  #{myBeanName} (the bean and any 
other methods remain hidden, only the result of the unwrap method is exposed).

There might be other differences, but I'm not aware of them...

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

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