Announcement Announcement Module
Collapse
No announcement yet.
Display sub property in table Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Display sub property in table

    How to display sub property in table? Tried from other post but didn't work.

  • #2
    I am stuck with similar issue and followed the above suggestion but nothing worked for me. Now I am getting below exceptions. Here is what I am doing - appuser and approles are many-2-many related entities with "mappedBy" users on roles.

    @ManyToMany(cascade = CascadeType.ALL, mappedBy="users" , fetch=FetchType.EAGER)
    private Set<AppRole> roles = new HashSet<AppRole>();

    In generated roles list, the users column display all user information including password which I want to limit with email id only. I made changes to list.jspx and used users.email as property.

    Code:

    <page:list id="pl_com_gt_suv_telena_domain_AppRole" items="${approles}" z="user-managed"> <table:table data="${approles}" id="l_com_gt_suv_telena_domain_AppRole" path="/approles" z="user- managed"> <table:column id="c_com_gt_suv_telena_domain_AppRole_name" property="name" z="user-managed"/> <table:column id="c_com_gt_suv_telena_domain_AppRole_description " property="description" z="user-managed"/> <table:column id="c_com_gt_suv_telena_domain_AppRole_users" property="users.email" z="user- managed"/> </table:table> </page:list>



    DEBUG qtp30586803-25 org.springframework.web.servlet.DispatcherServlet - Could not complete request
    org.apache.tiles.impl.CannotRenderException: JSPException including path '/WEB-INF/views/approles/list.jspx'.
    at org.apache.tiles.impl.BasicTilesContainer.render(B asicTilesContainer.java:692)
    at org.apache.tiles.impl.BasicTilesContainer.render(B asicTilesContainer.java:644)
    at org.apache.tiles.impl.BasicTilesContainer.render(B asicTilesContainer.java:627)
    at org.apache.tiles.impl.BasicTilesContainer.render(B asicTilesContainer.java:321)
    at org.springframework.web.servlet.view.tiles2.TilesV iew.renderMergedOutputModel(TilesView.java:124)
    at org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:262)

    Caused by: java.lang.NumberFormatException: For input string: "users"
    at java.lang.NumberFormatException.forInputString(Num berFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:492)
    at java.lang.Integer.parseInt(Integer.java:527)
    at javax.el.ListELResolver.toInteger(ListELResolver.j ava:407)
    at javax.el.ListELResolver.getValue(ListELResolver.ja va:199)
    at javax.el.CompositeELResolver.getValue(CompositeELR esolver.java:175)
    at com.sun.el.parser.AstValue.getValue(AstValue.java: 116)
    at com.sun.el.parser.AstValue.getValue(AstValue.java: 163)


    Help me, I am stuck on it

    Thanx in advance


    Last edited by tome; Oct 31st, 2013, 08:29 AM.



    Comment

    Working...
    X