Hi all,

I want to override some style of modal window, so I created a css file and I
added it on the modal window constructor :

public class ModalWindowE4N extends ModalWindow {

    public ModalWindowE4N(String id, String titre) {
        super(id);
        add(CSSPackageResource.getHeaderContribution("modalE4N.css"));
        this.setTitle(titre);
        this.setUseInitialHeight(false);
        this.setHeightUnit("px");
        this.setWidthUnit("px");
        this.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        this.setMaskType(ModalWindow.MaskType.SEMI_TRANSPARENT);
    }

    private static final long serialVersionUID = 5439940276271822354L;

}

But then, when I click on the AjaxLink which must show the modal window, I
have this error :

ERROR - azyInitializationException - failed to lazily initialize a
collection of role:
fr.statlife.protoE4N.data.entites.Questionnaire.listeQuestions, *no session
or session was closed*
org.hibernate.LazyInitializationException: failed to lazily initialize a
collection of role:
fr.statlife.protoE4N.data.entites.Questionnaire.listeQuestions, no session
or session was closed
    at
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:383)
    at
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:375)
    at
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:368)
    at
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:111)
    at
org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272)
    at
fr.statlife.protoE4N.pages.membre.QuestionnaireContentPanel.initialiserQuestionnaire(QuestionnaireContentPanel.java:181)
    at
fr.statlife.protoE4N.pages.membre.QuestionnairesPage$BoutonRemplirQuestionnaire$1.onClick(QuestionnairesPage.java:116)
    [...]

obviously, my session is closed by adding the CSSPackageResource (because
when I comment this line, everything works well), and I don't understand
why.
What am I doing wrong?

Thanks
M.

-- 
*Mathilde Pellerin*
Ingénieur en développement de logiciel

STATLIFE
tel : 01.42.11.64.88
mail : [email protected]

Reply via email to