Re: Selectively display a table column in the search view

100 views
Skip to first unread message

Paolo Predonzani

unread,
Feb 14, 2013, 12:01:53 PM2/14/13
to manydesign...@googlegroups.com
Hi Carlo,
The easies way would be to invoke (for forms):
formBuilder.configFields("fieldName1", "fieldName3", "fieldName3");

and for tables:
tableFormBuilder.configFields("fieldName1", "fieldName3", "fieldName3");

This way you specify the fields explicitly.

I'll double check tomorrow and give you some example code.
Regards


Paolo


On Thu, Feb 14, 2013 at 9:40 AM, Carlo Bonamico <carlo.b...@gmail.com> wrote:
Hi, 
 I have succesfully managed to enable/disable specific CRUD fields in the form by overriding the setupForm method. I would need now to programmatically hide/show a column in the search view according to the user profile. 
Is there a comparable way of enabling/disabling a column in the table?
Thanks
Carlo

--
You received this message because you are subscribed to the Google Groups "manydesigns-portofino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manydesigns-port...@googlegroups.com.
To post to this group, send email to manydesign...@googlegroups.com.
Visit this group at http://groups.google.com/group/manydesigns-portofino?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


Alessio Stalla

unread,
Feb 15, 2013, 3:25:41 AM2/15/13
to manydesign...@googlegroups.com
Hi Carlo,

Let me add that, as you found out, with the current version of
Portofino you need to override the setupForm and setupTableForm
methods (respectively for the detail form and the search results form)
in order to perform this kind of customizations. This requires copying
(and maintaining!) several lines of code from Portofino. With the next
version, we are going to address this issue by refactoring both
methods and exposing appropriate hooks for users to customize the
setup of the forms.

Please note, also, that if you programmatically remove the primary key
from the table form, you'll have to manually setup the link to the
detail view on one of the other columns, because the code as it is now
does not recognize that situation and will not include the link
automatically.

Cheers,
Alessio
Reply all
Reply to author
Forward
0 new messages