ICE Faces and error in creation of a bean in WindowScoped
Asked Answered
K

1

0

After some questions about WindowScoped and after an answer of BalusC I understand that I would use MyFaces CODI I should before rewrite all my previous code because I can't use Mojarra, so I would use ICEFaces because it have also the "window scope" and some other things that help me later and it is based on mojarra! Ok, now I have a big problem, and I wrote also in ICE forum at this link: http://www.icefaces.org/JForum/posts/list/0/20426.page#72064 , and it is that when I launch the application I have many of this link:



            <h:form>
                <h:commandLink action="#{logicBean.action('/WEB-INF/jsfpage1.xhtml')}" value="Open page1.xhtml"/>
            </h:form>

the LogicBean.java (simplyfied because I would understand if the problem was locate into the others methods) is this:



    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package it.cyborg.logic;

    import java.io.Serializable;

    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.CustomScoped;

    /**
     *
     * @author FilTen
     */

    @ManagedBean(name="logicBean")
    @CustomScoped(value = "#{window}")


    public class LogicBean implements Serializable 
    {
    String pageIncluded;
    String pageIncludedPrev;
    static String crypt="MD5";

    /** Creates a new instance of LogicBean */
        public LogicBean() {
        }
    public String getPageIncluded()
    {
    return this.pageIncluded;
    }
    public  void setPageIncluded(String pageIncluded)
    {
    this.pageIncluded=pageIncluded;
    }

    public String getPageIncludedPrev()
    {
    return this.pageIncludedPrev;
    }
    public  void setPageIncludedPrev(String pageIncludedPrev)
    {
    this.pageIncludedPrev=pageIncludedPrev;
    }

    public String action(String value)
    {
        setPageIncludedPrev(pageIncluded);
            setPageIncluded(value);

            return "include";
    }

    public String getCrypt()
    {
        return crypt;
    }

    }

when I click on one of the links a javascript open a frame that contains this error: class com.sun.faces.mgbean.ManagedBeanCreationException
The previous version had two differnce and it worked well, the first was that it was not the implementation of ice faces core, the second was that the scope was SessionScoped!
whic could the problem be? Thank you for all your help!

[EDIT:] I have a news: I tried to add only the Icefaces core jar into the original project and the error change: class java.lang.NullPointerException what could it be? Someone can tell me how set more verbosity on this message?

Kudos answered 25/1, 2012 at 10:48 Comment(0)
I
0

Hoi Filippo!

The information you received is NOT correct. MyFaces CODI is compatible with JSF 1.2 and 2.x --> you can use it with Mojarra as well as MyFaces Core.

BalusC: Which problems have you seen? I'm using MyFaces CODI with Mojarra since the first version without problems.

Interpreter answered 28/2, 2012 at 0:23 Comment(4)
@dar_whi : do you use also WindowScoped? If I remember well (I change many frameworks and I could wrong) the problem was that WindowScoped used something buggy in Mojarra and my project contains more than 100 class and I can't change all my classes for that...Kudos
Yes also @WindowScoped. Can you provide a simple example which shows the issue? It would be a pleasure to help you!Interpreter
@Dar_whi : thanks for your proposal but after these problem IKudos
I change the framework and I tried others frameworks and now I could not replay the problems that I found...Kudos

© 2022 - 2024 — McMap. All rights reserved.