我尝试切换帐户时无法与用户切换帐户,即获得相同的帐户

时间:2018-12-14 12:34:31

标签: java jsp

此jsp用于切换帐户,但不能切换,而是获得默认帐户。

<logic:present name="accountDetails" >
<div class="switchAccounts">
<h2><img src='<bean:message key="con.left.nav.switch.accounts.image" />' alt='<bean:message key="con.left.nav.switch.accounts.alt.text"/>' title='<bean:message key="con.left.nav.switch.accounts.alt.text"/>' /> </h2>
<label for="switchAccounts" class="hidden"><bean:message key="con.left.nav.switch.accounts.text"/></label>
<form action="#" method="post">

<bean:define name="accountDetails" property="accountId" id="currentAccountId" toScope="page"/>

<select name="acKey" id="switchAccounts" disabled="true">
<logic:present name="listAccount" >
    <logic:notEmpty name="listAccount" >
    <logic:present name="accountDetails" >
    <logic:notEmpty name="accountDetails" >
        <logic:iterate name="listAccount" id="account" >
        <c:set var="totalAccountId" value="${account.accountId}"/>
            <option value="<bean:write name="account" property="accountKey"/>" <c:if test="${totalAccountId eq currentAccountId}">selected="true"</c:if>>
                <bean:write name="account"  property="accountName"/>
            </option>
        </logic:iterate>
    </logic:notEmpty>
</logic:present>
</logic:notEmpty>
</logic:present>

0 个答案:

没有答案