Hi Antony! This made too many things clear to me.
I got the point about represent function, but i guess the
DIV(db...represent(...)) must be at a view file... and what about appadmin?
Trying to get the fields value through appadmin, I got the error *sequence
item 0: expected string, long found*
check again: there's no way mine and Anthony's last snippets generates a
single A holding two addresses
On Thursday, April 18, 2013 4:04:26 AM UTC+2, 黄祥 wrote:
thank you so much for your hints niphlod and anthony, i've tried both of
your hints, but the result is not what i'm expected (no
yes, you are right, my mistake, the problem is on the data itself, because
i input it via populate.
thank you so much for your hints and suggestions
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and stop
thank you so much for your hint, anthony both of it is work well.
{{extend 'layout.html'}}
{{for i, row in enumerate(rows):}}
{{=DIV(', '.join(row.test))}}
{{=DIV(db.test.test.represent(row.test))}}
{{pass}}
On Wednesday, April 17, 2013 10:33:13 AM UTC+7, Anthony wrote:
In the database, the
it seems can not make it work for the link, i've tried both, but same result
{{=SPAN(T('Email : '), A(', '.join(row.email), _title=T('Send Email'),
_target='_blank', _href='mailto:%s' % row.email), _id='email_%s' % i)}}
{{=SPAN(T('Email : '), A(db.branch.email.represent(row.email),
then you want to have 2 separate A, one for each email!
On Wednesday, April 17, 2013 9:41:02 AM UTC+2, 黄祥 wrote:
it seems can not make it work for the link, i've tried both, but same
result
{{=SPAN(T('Email : '), A(', '.join(row.email), _title=T('Send Email'),
_target='_blank',
You have to make a comma-separated list of A()'s instead of inserting all
the email addresses in a single mailto:
', '.join([A(email, _title=T('Send Email'), _target='_blank',
_href='mailto:%s' % email) for email in row.email])
Anthony
On Wednesday, April 17, 2013 3:41:02 AM
thank you so much for your hint anthony, it seems must be string type, when
i try to use your hints it return an error
*not work*
{{=SPAN(T('Email : '), ', '.join([A(email, _title=T('Send Email'),
_target='_blank',
_href='mailto:%s' % email) for email in row.email]),
yep, html helpers aren't properly strings, so they can't be joined with a
simple ','.join()
However, you can do it with the CAT (from conCAT)
try
SPAN(T('Email'), CAT([A(email) for a in emails]))
On Wednesday, April 17, 2013 11:12:26 PM UTC+2, 黄祥 wrote:
thank you so much for your hint
Sorry, wasn't thinking -- you could do:
{{=SPAN(T('Email : '), XML(', '.join([A(email, _title=T('Send Email'),_target
='_blank',
_href='mailto:%s' % email).xml() for email in row.email])), _id=
'email_%s' % i)}}
Anthony
On Wednesday, April 17, 2013 5:12:26 PM UTC-4, 黄祥 wrote:
thank you
thank you so much for your hints niphlod and anthony, i've tried both of
your hints, but the result is not what i'm expected (no error occured)
{{=SPAN(T('Email : '), XML(', '.join([A(email, _title=T('Send Email'),
_target='_blank',
_href='mailto:%s' % email).xml() for email in
In the database, the value is stored as a string with the individual values
separated by pipe characters (i.e., |a|b|). However, when you select from
the DB using the DAL, the value gets converted to a list. list:string
fields get a default represent attribute that displays the values as a
12 matches
Mail list logo