掲示板
how to pass an object from controller to Impl phase?
9年前 に Jobin Mathew によって更新されました。
how to pass an object from controller to Impl phase?
Junior Member 投稿: 77 参加年月日: 14/07/04 最新の投稿
Hello,
i tried the following.
created one class mySampleBean.java in new package ie, com.org.projectname.domain
in the FinderImpl.java class inside the com.org.service.persistance i created one method and used the mySampleBean method as one parameter.
i build the service, but the following error occurs
com.org.projectname.domain cannot be resolved to a type
please help
i tried the following.
created one class mySampleBean.java in new package ie, com.org.projectname.domain
in the FinderImpl.java class inside the com.org.service.persistance i created one method and used the mySampleBean method as one parameter.
i build the service, but the following error occurs
com.org.projectname.domain cannot be resolved to a type
please help
9年前 に Krzysztof Gołębiowski によって更新されました。
RE: how to pass an object from controller to Impl phase? (回答)
Liferay Master 投稿: 549 参加年月日: 11/06/25 最新の投稿
Hello Jobin,
When using service builder to manage you entities, you cannot use any other beans than those created by SB. It means you have to specify your MySampleBean entity within service.xml and then rerun SB to be able to use it in your application. You cannot create it manually! SB (apart from creating the bean) does a lot of other important things and some classloader magic to make this entity available to your plugins.
Regards,
KG
When using service builder to manage you entities, you cannot use any other beans than those created by SB. It means you have to specify your MySampleBean entity within service.xml and then rerun SB to be able to use it in your application. You cannot create it manually! SB (apart from creating the bean) does a lot of other important things and some classloader magic to make this entity available to your plugins.
Regards,
KG
9年前 に Jobin Mathew によって更新されました。
RE: how to pass an object from controller to Impl phase?
Junior Member 投稿: 77 参加年月日: 14/07/04 最新の投稿
Thanks a lot Krzysztof for the clear answer..
hop i can do it by creating one bean MySampleBean in service.xml and build.
then how can i instantiate the bean
like this?
MySampleBeanPersistence mySampleBeanPersistence;
MySampleBean mySampleBean = mySampleBean.create(id);
Thanks again.
hop i can do it by creating one bean MySampleBean in service.xml and build.
then how can i instantiate the bean
like this?
MySampleBeanPersistence mySampleBeanPersistence;
MySampleBean mySampleBean = mySampleBean.create(id);
Thanks again.
9年前 に Krzysztof Gołębiowski によって更新されました。
RE: how to pass an object from controller to Impl phase?
Liferay Master 投稿: 549 参加年月日: 11/06/25 最新の投稿
Hello Jobin,
ServiceBuilder is quite a specific tool and there is a lot of things you should know before you start working with it. You should read Generating Your Service Layer section from Liferay's documentation, where all the basics are explained.
Then if you have any doubts, go back to forums and we will try to answer your questions
Regards,
KG
ServiceBuilder is quite a specific tool and there is a lot of things you should know before you start working with it. You should read Generating Your Service Layer section from Liferay's documentation, where all the basics are explained.
Then if you have any doubts, go back to forums and we will try to answer your questions
Regards,
KG
9年前 に Jobin Mathew によって更新されました。
RE: how to pass an object from controller to Impl phase?
Junior Member 投稿: 77 参加年月日: 14/07/04 最新の投稿
Thanks