How to simplyfy the collection table

zdeno
2012-11-22
2012-11-30
  • zdeno

    zdeno - 2012-11-22

    Hi, is it possible to somehow simplify the collection tables in the view of some entity?

    For specific collections in specific entities I would like to display a simple and plain table - no actions in the table head, no filters, possibly even no pager (as there is less then 10 items in the collection). I made the collection @EditOnly so I got rid of the "Delete selected rows" button, but that is not enough for me.

    I have not found the solution for this problem in the docs - anyone any idea?

     
  • Javier Paniza

    Javier Paniza - 2012-11-26

    Hi ZDeno,

    no actions in the table head

    Annotate the collection with @ReadOnly

    no filters, possibly even no pager

    There is not an official way to do that. Fortunately, the calculated collections have no filters and pagins, so write:

    public Collection<MyElementType> getMyCalculatedCollection() {
      return getMyCollection(); // The one annotated with @OneToMany
    }
    

    And use myCalculatedCollection in your @View


    Help others in this forum as I help you.
    Before posting a question search this forum for the answer,
    and read the OpenXava documentation in openxava.org.

     
  • zdeno

    zdeno - 2012-11-26

    well even if the collection is anotated @ReadOnly or @EditOnly I can still see the "Create PDF" and "Create Excel" button in the table head - how can I hide these also?

     
  • zdeno

    zdeno - 2012-11-27

    Whoa - I got it!

    I just had to add this into my controllers.xml file:

    <controller name="DefaultListActionsForCollections">
    </controller>

    however it would be great to have some simple annotations to switch off the Print controller and pagination and filtering only for some collections.

     
    • Javier Paniza

      Javier Paniza - 2012-11-30

      Hi ZDeno,

      exactly, it explained in the Default list and row action section of wiki.

      it would be great to have some simple annotations to switch off the Print controller
      You'll are right

      pagination and filtering only for some collections
      Well, we can create a editor for collections with no pagination and filtering and define it in the collection using @Editor. Are you willing to create this editor.


      Help others in this forum as I help you.
      Before posting a question search this forum for the answer,
      and read the OpenXava documentation in openxava.org.


      De: zdeno zdenekhrib@users.sf.net
      Para: [openxava:discussion] 419690@discussion.openxava.p.re.sf.net
      Enviado: Martes 27 de noviembre de 2012 15:50
      Asunto: [openxava:discussion] How to simplyfy the collection table

      Whoa - I got it!
      I just had to add this into my controllers.xml file:

      however it would be great to have some simple annotations to switch off the Print controller and pagination and filtering only for some collections.


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/openxava/discussion/419690/
      To unsubscribe from further messages, please visit https://sourceforge.net/auth/prefs/

       
  • Javier Paniza

    Javier Paniza - 2012-11-30

    Hi ZDeno,

    exactly, it explained in the Default list and row action section of wiki.

    it would be great to have some simple annotations to switch off the Print controller

    You'll are right

    pagination and filtering only for some collections

    Well, we can create a editor for collections with no pagination and filtering and define it in the collection using @Editor. Are you willing to create this editor.


    Help others in this forum as I help you.
    Before posting a question search this forum for the answer,
    and read the OpenXava documentation in openxava.org.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks