jeudi 30 avril 2015

display a value of an object that exists in the session into jsp page

Hi every one i have an object in my session and i wanna select an input type radio according to the attribut of my object i tried the if tag of struts 2 taglib and it doesn't work. here is a part of my code

  <div class="form-group">
            <label class="col-sm-2 control-label">Admin </label> <label
                class="radio-inline">
                <div class="choice">
                    <s:if test="%{#session.curentprofil.isAdmin == N}">
                        <span><input type="radio" name="isAdmin" id="isAdmin"
                            class="styled" value="O" /></span>
                    </s:if>
                </div> O
            </label> <label class="radio-inline"> <span><input
                    type="radio" name="isAdmin" id="isAdmin" checked="checked"
                    class="styled" value="N" /></span> N
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">Admin </label> <label
                class="radio-inline">
                <div class="choice">
                    <s:if test="%{#session.curentprofil.isAdmin == O}">
                        <span><input type="radio" name="isAdmin" id="isAdmin"
                            class="styled" value="O" checked="checked" /></span>
                    </s:if>
                </div> O
            </label> <label class="radio-inline"> <span><input
                    type="radio" name="isAdmin" id="isAdmin" class="styled" value="N" /></span>
                N
            </label>
        </div>

Aucun commentaire:

Enregistrer un commentaire