vendredi 23 octobre 2015

how to create jsf custom tag from hidden body?

I want to create a security tag, depending on the amount received it will decide show or not, a body contents. I got it in jsp, but I'm not getting in jsf. In jsp I create this code:

if (SessionControl.getUser().contaisPermission(role)){
    return EVAL_BODY_INCLUDE;
}
else {
    return SKIP_BODY;
} 

But in jsf i don't know how to make hidden body, i tried to use SKIP_BODY, but doesn't work in jsf custom tag, because it uses encodeBegin() method and this method returns void, different from doStartTag() in jsp that returns int.




Aucun commentaire:

Enregistrer un commentaire