I have read the following post which was very helpful Migrating from JSF 1.2 to JSF 2.0
but I am having a problem with the migration as I have a custom view handler which extends from FaceletViewHandler - this is not part of faclets 2.
I am migrating on JBoss 4.2.2 the following: - JSF 1.2 to JSF 2.0
I also want to migrate the faclets - which i have a problem described above.
In my application, I am also using Tomahawk - is there any problem with this migration?
Thanks in advance.
Elico.
Right, you need to replace FaceletViewHandler
by ViewHandlerWrapper
.
So the following basic FaceletViewHandler
implementation:
import javax.faces.application.ViewHandler;
import com.sun.facelets.FaceletViewHandler;
public class MyViewHandler extends FaceletViewHandler {
public MyViewHandler(ViewHandler parent) {
super(parent);
}
// ...
}
needs to be updated as follows:
import javax.faces.application.ViewHandler;
import javax.faces.application.ViewHandlerWrapper;
public class MyViewHandler extends ViewHandlerWrapper {
private ViewHandler wrapped;
public MyViewHandler(ViewHandler wrapped) {
this.wrapped = wrapped;
}
@Override
public ViewHandler getWrapped() {
return wrapped;
}
// ...
}
I've updated my answer on the migration question accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With