You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by Thomas Kernstock <t....@e-technologies.at> on 2016/08/09 16:58:18 UTC
Codi -> Deltaspike
Hello everybody,
I'm new to this group so I hope it is OK to ask a question here:
Until now I used JEE6 and CODI which worked fine. Now I migrated to JEE7 and Deltaspike which went fine so far. I only have one problem that I couldn't find in docs and examples in the internet regarding ViewConfigs.
1) In Codi I had multiple Controller classes for one view:
@Page
@PageBean.List({
@PageBean(Bean1Page.class),
@PageBean(Bean2Page.class),
@PageBean(Bean3Page.class)
})
public final class PageXY implements Page1 {}
I couldn't find a way to define that with Deltaspike because @ViewControllerRef is not repeatable. And @ViewRef in the controller class is non repeatable too.
@View
@ViewControllerRef(BeanPage1.class)
// @ViewControllerRef(BeanPage2.class)
// @ViewControllerRef(BeanPage3.class)
public final class PageXY implements Page1 {}
Is there a way to to that in Deltaspike?
2) In my project I use Viewconfigs like this:
@View(navigation = NavigationMode.REDIRECT)
@ViewControllerRef(ApplicationPage.class)
public class Application implements ViewConfig {}
________________________
@Named
@ViewAccessScoped
public class ApplicationPage implements Serializable{
@PreRenderView
public void initView(){
DoSomething();
}
}
When I use it that way, initView() is never called. When I annotate the Controller with @ViewRef(config=Application.class) and remove the @ViewControllerRef from the ViewConfig everything works as planned.
Is this a bug or am I doing something wrong?
3) my environment:
* Payara Server 4.1.1.161
* Deltaspike 1.6.0
* MyFaces ExtVal 2.0.8
* Primefaces 6.0
* Bootsfaces 0.8.6
* Eclipse Mars
best regards
Thomas
Re: Codi -> Deltaspike
Posted by Gerhard Petracek <ge...@gmail.com>.
hi thomas,
@#1: was dropped intentionally
@#2: please try e.g. [1] with your environment - esp. [2] and [3] (there is
a maven-profile for glassfish)
regards,
gerhard
[1] https://github.com/CDIatWork/IdeaForkLite_Beta
[2]
https://github.com/CDIatWork/IdeaForkLite_Beta/blob/master/ideafork_ee6/src/main/java/at/irian/cdiatwork/ideafork/ee/frontend/jsf/view/config/Pages.java#L47
[3]
https://github.com/CDIatWork/IdeaForkLite_Beta/blob/master/ideafork_ee6/src/main/java/at/irian/cdiatwork/ideafork/ee/frontend/jsf/view/controller/idea/IdeaListViewCtrl.java#L23
http://www.irian.at
Your JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German
Professional Support for Apache
MyFaces, DeltaSpike and OpenWebBeans
2016-08-09 18:58 GMT+02:00 Thomas Kernstock <t....@e-technologies.at>:
> Hello everybody,
>
> I'm new to this group so I hope it is OK to ask a question here:
>
> Until now I used JEE6 and CODI which worked fine. Now I migrated to JEE7
> and Deltaspike which went fine so far. I only have one problem that I
> couldn't find in docs and examples in the internet regarding ViewConfigs.
>
> 1) In Codi I had multiple Controller classes for one view:
>
> @Page
> @PageBean.List({
> @PageBean(Bean1Page.class),
> @PageBean(Bean2Page.class),
> @PageBean(Bean3Page.class)
> })
> public final class PageXY implements Page1 {}
>
> I couldn't find a way to define that with Deltaspike because
> @ViewControllerRef is not repeatable. And @ViewRef in the controller class
> is non repeatable too.
> @View
> @ViewControllerRef(BeanPage1.class)
> // @ViewControllerRef(BeanPage2.class)
> // @ViewControllerRef(BeanPage3.class)
> public final class PageXY implements Page1 {}
> Is there a way to to that in Deltaspike?
> 2) In my project I use Viewconfigs like this:
> @View(navigation = NavigationMode.REDIRECT)
> @ViewControllerRef(ApplicationPage.class)
> public class Application implements ViewConfig {}
> ________________________
> @Named
> @ViewAccessScoped
> public class ApplicationPage implements Serializable{
> @PreRenderView
> public void initView(){
> DoSomething();
> }
> }
>
> When I use it that way, initView() is never called. When I annotate the
> Controller with @ViewRef(config=Application.class) and remove the
> @ViewControllerRef from the ViewConfig everything works as planned.
>
> Is this a bug or am I doing something wrong?
> 3) my environment:
>
> * Payara Server 4.1.1.161
>
> * Deltaspike 1.6.0
>
> * MyFaces ExtVal 2.0.8
>
> * Primefaces 6.0
>
> * Bootsfaces 0.8.6
>
> * Eclipse Mars
> best regards
> Thomas
>