Results 1 to 3 of 3

Thread: View only the logged user info in the jspx...

  1. #1
    Join Date
    Aug 2011
    Location
    Seville (Spain)
    Posts
    22

    Default View only the logged user info in the jspx...

    I want to list only my user "admin" info, not all the info of all users.
    This is my list.jspx

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <div
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlnsage="urn:jsptagdir:/WEB-INF/tags/form"
    xmlns:table="urn:jsptagdir:/WEB-INF/tags/form/fields"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:spring="http://www.springframework.org/tags"
    xmlns:security="http://www.springframework.org/security/tags"
    version="2.0">

    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <jsp:output omit-xml-declaration="yes"/>

    <h1>Example</h1>
    username: <security:authentication property="principal.username" /><br/>
    password: <security:authentication property="principal.password" /><br/>

    <br/>
    principal.id: ${principal.id}<br/>
    principal.username: ${principal.username}<br/>
    cuentases[0].nombre: ${cuentases[0].nombre}<br/>
    <br/>

    <page:list id="pl_com_andalux_model_Cuentas" items="${cuentases}">
    <table:table data="${cuentases}" id="l_com_andalux_model_Cuentas" path="/cuentases">
    <table:column id="c_com_andalux_model_Cuentas_nombre" property="nombre"/>
    <table:column id="c_com_andalux_model_Cuentas_descripcion" property="descripcion"/>
    <table:column date="true" dateTimePattern="${cuentas_fecha_creacion_date_for mat}"
    id="c_com_andalux_model_Cuentas_fecha_creacion" property="fecha_creacion"/>
    <table:column id="c_com_andalux_model_Cuentas_usuarios" property="usuarios"/>
    </table:table>
    </page:list>

    </div>

  2. #2
    Join Date
    Aug 2011
    Location
    Seville (Spain)
    Posts
    22

    Default

    With this I can see only the user's accounts:

    <c:forEach var="accounts" items="${accountses}" >
    <c:if test="${accounts.users.username == var_username}">
    <c:out value="${accounts.id}"/><br/>
    <c:out value="${accounts.users.username}"/><br/>
    <c:out value="${accounts.name}"/><br/>
    </c:if>
    </c:forEach>

  3. #3
    Join Date
    Aug 2011
    Location
    Seville (Spain)
    Posts
    22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •