-
1. Re: Jsf form without entity component
delphi'sghost Jul 7, 2007 12:29 AM (in response to luuzz)It is possible.
Maybe you haven't defined the getters and setters on the interface for the session bean. If you post any error messages or results you get along with any code, that might help.
Any properties on the session bean are read and written to just like any other property is handled in JSF. -
2. Re: Jsf form without entity component
luuzz Jul 7, 2007 9:07 AM (in response to luuzz)I'm gonna try this, indeed i didn't put the getters on the interface.
Yhanks a lot. -
3. Re: Jsf form without entity component
luuzz Jul 7, 2007 11:29 AM (in response to luuzz)It's working great but i don't understand why i have to expose the setters and getters in the bean interface...
Thanks -
4. Re: Jsf form without entity component
wschwendt Jul 7, 2007 11:52 AM (in response to luuzz)"luuzz" wrote:
It's working great but i don't understand why i have to expose the setters and getters in the bean interface...
Thanks
if my understanding is correct, you have to the declare getters and setters in the so-called "business interface" of your EJBs because with the EJB(3) architecture you're never accessing EJB bean instances directly. Technically, when a EJBean is called, a container-generated proxy/stub object is called which in turn delegates to the EJB instance. These container-generated proxy/stub objects implement the same methods as declared in the business interface of your EJB, that's why you need to define a business interface. -
5. Re: Jsf form without entity component
wschwendt Jul 7, 2007 11:59 AM (in response to luuzz)correction, it should read:
if my understanding is correct, you have to declare the getters and setters in the so-called "business interface" of your EJBs because with the EJB(3) architecture you're never accessing EJB bean instances directly. Technically, when an EJBean is called, ... -
6. Re: Jsf form without entity component
luuzz Jul 7, 2007 2:42 PM (in response to luuzz)Ok I understand now.
Do you think it's a good idea to do it like this ?
Isn't it better to do the form mapping through a pojo component and use bijection in the session bean ?
Another question, using stateful session beans, should we still expose the getters and setters in the interface ? -
7. Re: Jsf form without entity component
matt.drees Jul 7, 2007 3:27 PM (in response to luuzz)Why wouldn't you want to expose getters/setters in the interface?
-
8. Re: Jsf form without entity component
luuzz Jul 7, 2007 3:43 PM (in response to luuzz)usually sesion beans only imlement business methods ....
-
9. Re: Jsf form without entity component
azalea Jul 7, 2007 4:33 PM (in response to luuzz)Now session beans can be backing beans in Seam application,
and usually backing beans have getters/setters.