Not displaying all text

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

Not displaying all text

Postby ngms27 » Fri Jan 04, 2013 7:42 am

As per the attached file I have a table called Projects which has a one to many relationship with Notes.

If I add a Note it only displays a certain amount of the Note despite all the data being present in the database.

Can this be changed?
Capture.JPG
Capture.JPG (29.78 KiB) Viewed 7191 times
ngms27
 
Posts: 30
Joined: Mon Nov 12, 2012 8:18 am

Re: Not displaying all text

Postby shannah » Fri Jan 04, 2013 10:01 am

List view by default truncates all fields to 255 chars (i think it's 255). This prevents accidentally loading entire sets of records complete with longblob data and longtext data. One workaround is to provide the "struct" directive for the specific field in the fields.ini file. This is intended to inform Xataface that the field contained structured data that cannot be truncated.

e.g.
Code: Select all
[myfield]
struct=1


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

Re: Not displaying all text

Postby ngms27 » Fri Jan 04, 2013 10:32 am

That doesn't work.

I've found that none of these constructs seem to work if the field is from a relationship.

i.e. I have table Projects and table Notes with a 1 to many
If I put the struct=1 under the relevant field in Myapplication\Notes\fields.ini it does nothing as does using the widget:type=hidden directive!
ngms27
 
Posts: 30
Joined: Mon Nov 12, 2012 8:18 am

Re: Not displaying all text

Postby shannah » Sun Jan 06, 2013 12:37 pm

OK. I have fixed this in SVN and the 2.0.x branch (rev 4281) so that it will respect these directives in relationships. While I was in there I noticed a workaround that you can use in the mean time, though. You can implement the renderCell() method for the field as this will override the default field truncation.
renderCell is described on this page
http://xataface.com/documentation/how-to/list_tab

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

Re: Not displaying all text

Postby ngms27 » Tue Jan 08, 2013 8:24 am

Yes that worked thanks.
ngms27
 
Posts: 30
Joined: Mon Nov 12, 2012 8:18 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 30 guests

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