grouping views

A place for users and developers of the Xataface to discuss and receive support.

Postby shiraz » Sun Jan 21, 2007 1:19 am

Hiya,

I've noticed that grouping, as set in fields.ini, only applies to the edit tab and not the view tab. Is there a way to get it to work with the view tab? Either that or can the default action when clicking on a record be set to edit, rather than view?

Thanks,

Shiraz
shiraz
 
Posts: 55
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Jan 22, 2007 1:17 pm

The view tab view is pretty plain jane and could definitely use a makeover. At the very least automatic grouping via the grouping attribute would be a good thing to add - but at present it does not. In most applications that I make, I end up overriding the view tab content for my more important tables to show what I want how I want. It is so often the case when I want to show information about related records or add some buttons/functionality to the view tab.

Overriding the view tab can be done via the
block__view_tab_contents() method in the delegate class.

Alternatives to this include overriding the Dataface_View_Record.html template (located in the Dataface/templates directory). E.g. copy that file to your application's templates directory, and make the modifications.

As far as your hopes for #2 goes (making the edit tab default), I haven't tried this feature out in a long time (so hope it still works), but you should be able to set the
default_browse_action
attribute in the conf.ini file.

e.g., to change it to the edit tab you would add the following to the very beginning of your conf.ini file:
Code: Select all
default_browse_action = edit


Hope this helps

Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby shiraz » Tue Jan 23, 2007 2:08 pm

Yup, that conf.ini entry works fine! This serves my purpose perfectly. But also thanks for the thoughts on overriding the view tab via delegate class. I hadn't even thought of that, and now suddenly the potential seems huge!

Cheers,

Shiraz
shiraz
 
Posts: 55
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved