why are you saying that vars are unavailable for LOAD ?
On Thursday, April 24, 2014 3:05:20 PM UTC+2, Greg Vaughan wrote:
Hi everyone...
I am using a LOAD function for a notes field in the sidebar of my app. I
am able to load the notes for a specific business by hardcoding the id of
the
Hi Niphlod...
{{=response.vars}} shows nothing... nor does {{response.toolbar()}}...
db stats shows notes.business = 1 when I hardcode it as above...
I took a screenshot here http://screencast.com/t/mmRPGOHUAjt
I assume that the filter will have to be sorted in the controller as the
LOAD
how are you using LOAD to load the component ?
On Thursday, April 24, 2014 5:23:21 PM UTC+2, Greg Vaughan wrote:
Hi Niphlod...
{{=response.vars}} shows nothing... nor does {{response.toolbar()}}...
db stats shows notes.business = 1 when I hardcode it as above...
I took a screenshot here
Sorry I should have given you all the data...
The db table is a simple one
# HISTORY
db.define_table('notes',
Field('business', 'reference calls',
writable=False
),
Field('note', 'text',
label='Add Note'
),
auth.signature,
put it in the session...
On Thursday, April 24, 2014 9:49:28 AM UTC-7, Greg Vaughan wrote:
Sorry I should have given you all the data...
The db table is a simple one
# HISTORY
db.define_table('notes',
Field('business', 'reference calls',
writable=False
),
{{extend 'layout.html'}}
{{=form}}
{{pass}}
{{block right_sidebar}}
{{=LOAD('default','note.load',ajax=True)}}
{{end}}
Just do:
{{=LOAD('default', 'note.load', vars=dict(id=request.vars.id), ajax=True)}}
And in the note() function:
def note():
notes = db(db.notes.business ==
session.lead_id=request.vars.id
in the 'leads' function. Then the note...
current = session.lead_id
= is assignment
== is comparison
On Thursday, April 24, 2014 10:11:29 AM UTC-7, Derek wrote:
put it in the session...
On Thursday, April 24, 2014 9:49:28 AM UTC-7, Greg Vaughan wrote:
Sorry
Cheers Anthony
Worked a treat...
Thanks everyone for the help...
On Friday, 25 April 2014 03:12:00 UTC+10, Anthony wrote:
{{extend 'layout.html'}}
{{=form}}
{{pass}}
{{block right_sidebar}}
{{=LOAD('default','note.load',ajax=True)}}
{{end}}
Just do:
{{=LOAD('default', 'note.load',
8 matches
Mail list logo