Re: [web2py] Re: grid reloading the page on grid actions (and keeping the page's arguments)

2020-04-24 Thread Jim S
Wow, way better than what I've been doing. I'm going to have to take a look at that. Thanks! -Jim On Friday, April 24, 2020 at 12:28:56 PM UTC-5, Vlad wrote: > > I see. Thank you. > > I also did some Googling and found what I think should be documented more > explicitly and perhaps more clea

Re: [web2py] Re: grid reloading the page on grid actions (and keeping the page's arguments)

2020-04-24 Thread Eliezer (Vlad) Tseytkin
I see. Thank you. I also did some Googling and found what I think should be documented more explicitly and perhaps more clearly in web2py docs (it's there, but unless you know what to look for, you're guaranteed to miss it): when creating grid, the following args=request.args[:1] tells the gri

Re: [web2py] Re: grid reloading the page on grid actions (and keeping the page's arguments)

2020-04-24 Thread Jim S
So, you have to manage that yourself. I do it kind of like this. Yes, I know it's ugly but it pretty much works. # if the variable is passed in, get the value search_text = request.get_vars.search_text if request.wsgi.environ['QUERY_STRING'] != '': # we get here if no vars were passed on

Re: [web2py] Re: grid reloading the page on grid actions (and keeping the page's arguments)

2020-04-24 Thread Eliezer (Vlad) Tseytkin
Yes, there are arguments on the page already. I don't want the grid to get rid of them when reloading for those actions. On Fri, Apr 24, 2020, 12:39 PM Jim S wrote: > I thought it did keep track of paging. > > Are you looking for it to keep arguments that you supplied? > > -Jim > > On Friday, Ap

Re: [web2py] Re: grid reloading the page and outdated flash msgs? (strange behavior...)

2018-12-27 Thread Eliezer (Vlad) Tseytkin
I got it, finally, It was purely mystical for me, but now it makes sense... Grid is quite a sophisticated beast and does some magic behind the stage... Thank you very much! On Thu, Dec 27, 2018 at 11:08 PM Anthony wrote: > This simply displays an old fashioned grid. Nothing fancy. But now >>

Re: [web2py] Re: grid reloading the page and outdated flash msgs? (strange behavior...)

2018-12-27 Thread Anthony
> > This simply displays an old fashioned grid. Nothing fancy. But now > consider just exactly same code, with 2 extra lines (if (id==0): > redirect(home) : > > def test(): > id = 0 > try: > id = request.args(0, cast=int) > except: > id = 0 > pass > if (

Re: [web2py] Re: grid reloading the page and outdated flash msgs? (strange behavior...)

2018-12-27 Thread Eliezer (Vlad) Tseytkin
Antony, thank you very much, I got the 1st and the 3rd ones. But about the 2nd one it's tricky. Without going into details of why I need it, could you please just glance at the following code that works 100%: def test(): id = 0 try: id = request.args(0, cast=int) except:

Re: [web2py] Re: grid and field_id

2015-05-05 Thread Niphlod
On Tuesday, May 5, 2015 at 9:47:10 PM UTC+2, Massimiliano wrote: > > > I understand but get things screwed as you as saying is a programming > error. > There are things that are not "foreseen" by developers and web2py generally doesn't do lots of typechecking (under the consensum that who appr

Re: [web2py] Re: grid and field_id

2015-05-05 Thread Massimiliano
I understand but get things screwed as you as saying is a programming error. It also always worked that way and no one complain about it. :-) Was useful, flexible and cheaper. :-D On Tue, May 5, 2015 at 8:48 PM, Niphlod wrote: > as you're explaining it, you were using it wrongly. > field_id

Re: [web2py] Re: grid and field_id

2015-05-05 Thread Niphlod
as you're explaining it, you were using it wrongly. field_id needs to be a field that comes from either the table you're passing OR a field from a table that gets included when you pass a set, or everything gets screwed: details, selectable, view, edit, etc use the field_id to identify the reco

Re: [web2py] Re: grid and field_id

2015-05-05 Thread Massimiliano
Sorry my english is very poor and probably I described the problem in a bad manner. In my database I have a table and a view of that table. Lets call them: mytable view_mytable view_mytable is a db view. Defined as: CREATE OR REPLACE VIEW view_mytable AS SELECT mytable.* 'myvalues' as ot

Re: [web2py] Re: grid: deletion row callback

2014-07-08 Thread Manuele Pesenti
Il 08/07/14 07:54, Manuele Pesenti ha scritto: > Il 07/07/14 23:49, Anthony ha scritto: >> I'm not sure how easy that would be in the browser without hacking >> web2py.js, but on the server, you can check for when a deletion >> happens and then send back some JS to be executed. Not tested, but >> m

Re: [web2py] Re: grid: deletion row callback

2014-07-07 Thread Manuele Pesenti
Il 07/07/14 23:49, Anthony ha scritto: > I'm not sure how easy that would be in the browser without hacking > web2py.js, but on the server, you can check for when a deletion > happens and then send back some JS to be executed. Not tested, but > maybe something like: > > | > defmygrid(): > ifreq

Re: [web2py] Re: grid: deletion row callback

2014-07-07 Thread Manuele Pesenti
Il 07/07/14 22:43, 黄祥 ha scritto: > pardon me, i'm not sure what do you mean with _javascript_ trigger. > please explain more about it. btw, web2py have ondelete (executed on > HTML Form Side) and before_delete callback (executed on DAL side). Thank you 黄祥 :) I mean that I need to refresh some part

Re: [web2py] Re: grid with dictionary

2013-12-06 Thread Diego Tostes
Hi Massimo, I want to use the same graphics of a SQLform grid using my own dictionary. I don't want to create a html grid using and . I am seeking for a solution to have a good graphical grid with search engine to show data that i will send to the view using a dictionary. Rgds, Diego -- Reso

Re: [web2py] Re: grid layout problem

2013-11-15 Thread Mirko
Hi Stefaan, just find the answer and posted it here : https://groups.google.com/d/msg/web2py/LhuZvOAv_K4/Y11Ap1QCEYwJ Hope it helps, Mirko On Friday, November 15, 2013 10:01:24 AM UTC+1, stefaan wrote: > > Hi Mirko, > > short answer: I have no idea really, it just came out like that, but > here'

Re: [web2py] Re: grid layout problem

2013-11-15 Thread Stefaan Himpe
Hi Mirko, short answer: I have no idea really, it just came out like that, but here's what I did that might influence the result: 1. I think these are the relevant options I passed to my grid: ui='web2py', ... buttons_placem

Re: [web2py] Re: grid in component only works in Firefox

2013-10-22 Thread Jim Steil
...the nested form, that is... On Tue, Oct 22, 2013 at 7:58 AM, Jim Steil wrote: > Excellent guess!! That was it. Thanks a bunch for your help! > > > On Tue, Oct 22, 2013 at 7:21 AM, Ricardo Pedroso wrote: > >> >> On Mon, Oct 21, 2013 at 9:35 PM, Jim S wrote: >> >>> >>> Found a little more.

Re: [web2py] Re: grid in component only works in Firefox

2013-10-22 Thread Jim Steil
Excellent guess!! That was it. Thanks a bunch for your help! On Tue, Oct 22, 2013 at 7:21 AM, Ricardo Pedroso wrote: > > On Mon, Oct 21, 2013 at 9:35 PM, Jim S wrote: > >> >> Found a little more. Look at the two attachments. One is the generated >> html from Opera and the other from Firefox

Re: [web2py] Re: grid in component only works in Firefox

2013-10-22 Thread Jim Steil
Yes, Opera is showing the form tag. On Mon, Oct 21, 2013 at 4:31 PM, Niphlod wrote: > this means that in Opera the product_addon.load shows the tag ? > > > On Monday, October 21, 2013 11:26:36 PM UTC+2, Jim S wrote: > >> It works fine. Also, the data input elements are all displayed >> approp

Re: [web2py] Re: grid in component only works in Firefox

2013-10-22 Thread Ricardo Pedroso
On Mon, Oct 21, 2013 at 9:35 PM, Jim S wrote: > > Found a little more. Look at the two attachments. One is the generated > html from Opera and the other from Firefox. The opera one is missing the > Form element. > Just guessing... Maybe nested forms? Ricardo -- Resources: - http://web2py.c

Re: [web2py] Re: grid in component only works in Firefox

2013-10-21 Thread Niphlod
this means that in Opera the product_addon.load shows the tag ? On Monday, October 21, 2013 11:26:36 PM UTC+2, Jim S wrote: > > It works fine. Also, the data input elements are all displayed > appropriately, just doesn't work when I click on submit to try to add > something. But, works fine i

Re: [web2py] Re: grid in component only works in Firefox

2013-10-21 Thread Jim S
Should also mention that I updated to the latest web2py this morning, running 2.7.4-stable+timestamp.2013.10.21.14.31.25. -Jim On Monday, October 21, 2013 4:26:36 PM UTC-5, Jim S wrote: > > It works fine. Also, the data input elements are all displayed > appropriately, just doesn't work when I

Re: [web2py] Re: grid in component only works in Firefox

2013-10-21 Thread Jim Steil
It works fine. Also, the data input elements are all displayed appropriately, just doesn't work when I click on submit to try to add something. But, works fine in Firefox. On Mon, Oct 21, 2013 at 4:07 PM, Niphlod wrote: > how can opera chunk out part of html ? > if you point opera to > > /inf

Re: [web2py] Re: grid: readable for columns and backgroundcolors for rows

2013-10-21 Thread Martin Weissenboeck
Good idea, thank you! 2013/10/21 Cliff Kachinske > For question #1, parse the request.args. I use the following with > smartgrid, but grid should work similar: > > def index(): > fields = None # Shows all fields > if len (request.args) > 2 and request.args = ['sometable', 'new', > 'some

Re: [web2py] Re: grid, smartgrid and ignore_default_filters

2013-10-19 Thread Martin Weissenboeck
Excuse me for the delay. Yes, I have tested the new parameter - works fine. But there is another problem: In appadmin not all queries use ignore_common_filters=True I have opened issue 1732 on this topic. By the way it should be mentioned in the book that the result of a common_filter functi

Re: [web2py] Re: Grid and mouseover/tooltips

2013-09-24 Thread Warren Block
Nice--that works great! On Tue, 24 Sep 2013, Niphlod wrote: alter the represent of the fields in the controller running the grid: it's the right tool for the job e.g. db.table.field.represent = lambda value, row : DIV("%s ..." % value[10], _title=value) On Tuesday, September 24, 2013 10:

Re: [web2py] Re: Grid title

2013-09-24 Thread Warren Block
Okay, that makes sense. I do intend to make custom views, even more so now. For now, default/index.html is just: {{extend 'layout.html'}} {{=grid}} Thanks! On Tue, 24 Sep 2013, Anthony wrote: Oops, sorry -- the default/index.html view that comes with the scaffolding app includes {{=BE

Re: [web2py] Re: Grid title

2013-09-24 Thread Anthony
Oops, sorry -- the default/index.html view that comes with the scaffolding app includes {{=BEAUTIFY(response._vars)}} when there is no "message" or "content" variable returned, which is the same thing the generic.html view does when more than one variable is returned. Keep in mind that if you w

Re: [web2py] Re: Grid title

2013-09-24 Thread Warren Block
The default/index.html view exists (the default "simple app" one), so it's not clear to me why it is using generic.html. The index() function does not explicitly define any other variables, but the "grid:" is displayed even if the index() function returns dict(grid=grid). On Tue, 24 Sep 2013

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-09 Thread Johann Spies
On 9 September 2013 14:43, Niphlod wrote: > if you don't need the grid to search through the table, the moment you > turn off the search widget you won't get the "performance penalty" of > creating the dropbox for the IS_IN_DB requirement you have in your models. > Of cause yes. Thanks. I forg

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-09 Thread Anthony
On Monday, September 9, 2013 4:24:48 AM UTC-4, Johann Spies wrote: > Thanks Anthony. That explains some of the delays when I am using the > grid. As a result of this experience I will try to avoid using it for > queries involving large tables and look at alternatives like Solidtable. > I thin

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-09 Thread Niphlod
if you don't need the grid to search through the table, the moment you turn off the search widget you won't get the "performance penalty" of creating the dropbox for the IS_IN_DB requirement you have in your models. On Monday, September 9, 2013 10:24:48 AM UTC+2, Johann Spies wrote: > > Thanks A

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-09 Thread Johann Spies
Thanks Anthony. That explains some of the delays when I am using the grid. As a result of this experience I will try to avoid using it for queries involving large tables and look at alternatives like Solidtable. Fortunately with the possibility (probably (co)created by you) to get a result of db

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-05 Thread Anthony
> SELECT rresearch.nu, rresearch.ny, rresearch.nc, rresearch.id > > FROM rresearch > WHERE (rresearch.id IS NOT NULL) > ORDER BY rresearch.nu, rresearch.ny, rresearch.nc, rresearch.id; > > 2920.90ms > > The above query is not used for the grid. Rather, it is used to generate a dropdown list

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-05 Thread villas
Hi Johann I think this is related: https://groups.google.com/forum/?fromgroups=#!topic/web2py-developers/2SjrZ3AHR1c Using recursive queries which fetch the whole row (especially with very wide rows) is a huge DB hit. My conclusion is that, ideally, web2py should use joins where necessary.

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-05 Thread Johann Spies
On 4 September 2013 15:34, Massimo Di Pierro wrote: > Please check with the response.toolbar to see if there is are hidden > recursive queries. > > Thanks! I did not use the 'db stats' function before when debugging and it seems a useful tool! Interestingly the difference is the following: Whe

Re: [web2py] Re: grid not ordering lambda-generated column values correctly

2013-05-01 Thread Richard Vézina
This is faster I guest then making a lambda db query each record each request... I post an other thread about SQLFORM.grid() and search if you want to comment... Thanks Richard On Wed, May 1, 2013 at 3:35 PM, Niphlod wrote: > yep. you would have to fetch those fields for searching through th

Re: [web2py] Re: grid not ordering lambda-generated column values correctly

2013-05-01 Thread Niphlod
yep. you would have to fetch those fields for searching through them anyway. On Wednesday, May 1, 2013 4:54:28 PM UTC+2, Richard wrote: > > So, if I do understand correctly the Niphold explanation if I want to > search for instance the first_name of the auth_user table that is > referenced from

Re: [web2py] Re: grid not ordering lambda-generated column values correctly

2013-05-01 Thread Richard Vézina
So, if I do understand correctly the Niphold explanation if I want to search for instance the first_name of the auth_user table that is referenced from my table I can't just pass the to SQLFORM.grid my_table, I better pass it a join query where all the represent are replaced with the really field o

Re: [web2py] Re: grid/smartgrid searching foreign key tables

2013-03-12 Thread Cliff Kachinske
No, I'm the one who was missing bits :( The search widget has come a lng way since the last time I experimented with grid. Thanks to all who have worked on it. On Tuesday, March 12, 2013 4:26:05 AM UTC-4, Niphlod wrote: > > I'm starting to miss some bits ok for autocomplete, select

Re: [web2py] Re: grid/smartgrid searching foreign key tables

2013-03-12 Thread Niphlod
no probl. maybe we can embed some "help page" directly too. let me know when it'll be ready. On Tuesday, March 12, 2013 12:06:35 PM UTC+1, Philip Kilner wrote: > > Hi Niphlod, > > On 12/03/13 08:26, Niphlod wrote: > > PS: I remember that some user wanted to put up a nice doc for users (not > >

Re: [web2py] Re: grid/smartgrid searching foreign key tables

2013-03-12 Thread Philip Kilner
Hi Niphlod, On 12/03/13 08:26, Niphlod wrote: PS: I remember that some user wanted to put up a nice doc for users (not developers) facing the grid/smartgrid never heard of him back :( That was me! :-) I've done some simple notes with screen shots for my client, but need to ask people

Re: [web2py] Re: grid/smartgrid searching foreign key tables

2013-03-12 Thread Niphlod
I'm starting to miss some bits ok for autocomplete, select boxes, filter based on one column only but I think the basic functionality of the search widget seems "ok": if users are in a hurry they put something in and all text-ty fields gets searched, if they need an advanced search the

Re: [web2py] Re: grid/smartgrid searching foreign key tables

2013-03-11 Thread Jim Steil
I agree with Cliff. It takes longer to code the search/filter than it does the controller with .grid and .smartgrid. But, I think it is worth the time so I do it. -Jim On Mon, Mar 11, 2013 at 8:18 PM, Cliff Kachinske wrote: > Just so I'm clear, full text is when you just type the search ter

Re: [web2py] Re: Grid with multiple left joins

2013-01-30 Thread Felipe Meirelles
Thanks Massimo, all working (: On Wed, Jan 30, 2013 at 2:38 PM, Mark wrote: > Yes, it works. Thanks! > > > On Wednesday, January 30, 2013 10:28:23 AM UTC-5, Massimo Di Pierro wrote: >> >> This is in trunk. Can you please check it. >> >> On Wednesday, 23 January 2013 10:02:03 UTC-6, Mark wrote:

Re: [web2py] Re: grid export button

2012-10-27 Thread Santiago Avendaño
Maybe original_export_menu is None. You have to verify this before call .elements('a') if w2p_grid_tbl: original_export_menu = grid.element('div.w2p_export_menu') if original_export_menu : export_menu_links = original_export_menu.elements('a') But, if original_export_menu is None, this i

Re: [web2py] Re: grid create,editable, deletable are not displayed

2012-10-23 Thread Omi Chiba
Ah! That's why. Thanks Niphlod! On Tue, Oct 23, 2012 at 9:08 AM, Niphlod wrote: > you have to be logged-in . By default web2py doesn't allow random users to > modify your "precious" data. > > you can turn off this safe behaviour with user_signature=False > > """ > By default all the URL generat

Re: [web2py] Re: grid - hiding reconds found count

2012-09-03 Thread Mandar Vaze / मंदार वझे
Yes. Works !! This is great - much cleaner solution. Thanks Anthony -Mandar On Mon, Sep 3, 2012 at 2:05 PM, Anthony wrote: > Actually, to make the code more clear and to avoid issues with changing > subscripts, it's generally best to use the .elements() and .element() > methods rather than sub

Re: [web2py] Re: grid not ordering lambda-generated column values correctly

2012-08-06 Thread Bruno Rocha
Basically you have to keep in mind that 'orderby" and "limitby" will be done by the database engine, the db does not know anything about your "lambda' logic. --

Re: [web2py] Re: grid without delete botton

2012-04-02 Thread Manuele Pesenti
Il 02/04/2012 12:41, Martín Mulone ha scritto: use the parameter deletable=False SQLFORM.grid(...deletable=False ... ) ok I solved at the moment using deletable = 'edit' in request.args SQLFORM.grid(...deletable=deletable ... ) thanks Manuele

Re: [web2py] Re: grid without delete botton

2012-04-02 Thread Manuele Pesenti
Il 02/04/2012 12:41, Martín Mulone ha scritto: use the parameter deletable=False SQLFORM.grid(...deletable=False ... ) but in this way I cannot delete record at all from the grid, neither from the update form that it generates. The fact is that I need to setup some ondelete function for every r

Re: [web2py] Re: grid without delete botton

2012-04-02 Thread Martín Mulone
use the parameter deletable=False SQLFORM.grid(...deletable=False ... ) 2012/4/2 Manuele Pesenti > excuse me I forgot to complete the object... > > Il 02/04/2012 10:46, Manuele Pesenti ha scritto: > >> Hi, >> is there an easy way to use grid and smartgrid without the delete botton? >> I mean I

Re: [web2py] Re: Grid examples

2012-02-28 Thread Bruce Wade
Need to see some code before anyone can help On Tue, Feb 28, 2012 at 12:47 PM, greenpoise wrote: > Thanks for the lead. Why do I get duplicate grid in my view I am > trying to build a simple grid and I get a duplicate grid one on top of > the other. > > > > > > On Feb 28, 12:42 pm, Bruce Wade

Re: [web2py] Re: Grid: Pull field, but not display it, so it can be used by links

2012-02-23 Thread naveed
Thank you, Johann, I'll try this.

Re: [web2py] Re: Grid: Pull field, but not display it, so it can be used by links

2012-02-23 Thread Johann Spies
On 23 February 2012 00:30, naveed wrote: > A slightly related question: In the grid, how can I show values from > referenced tables? > > I have the table: > db.define_table('table1', > Field('field1'), > Field('usr', db.auth_user)) > > How can I show the user's first and last names in the gri

Re: [web2py] Re: Grid/Smartgrid: how to use the 'selectable' option?

2012-02-10 Thread Fabiano Faver
I had this same doubt and this thread have helped as there is no explanation on online book. But I want to make the rows selectable to allow user to update all them toguether. I have no clue how to edit the submit button that shows at the end of the table when selectable is active. Any tips?

Re: [web2py] Re: grid doesn't like requires?

2012-01-18 Thread Martin Weissenboeck
Thank you very much - that is the solution! I have spent some hours... Therefore I think, this is a very important hint - is it in the book? 2012/1/18 Massimo Di Pierro > A field has two attributes, requires and represent. If web2py finds a > 'reference auth_user" but no requires, it assumes > >

Re: [web2py] Re: grid custom button icons

2011-10-19 Thread Bruno Rocha
Here https://github.com/michenriksen/css3buttons you can find a list of all suported classes for standard style, for the ui-icon option take a look at jquery-ui theme roller page

Re: [web2py] Re: grid custom button icons

2011-10-19 Thread Martín Mulone
ui = dict(widget='ui-widget', header='ui-widget-header', content='ui-widget-content', default='ui-state-default', cornerall='ui-corner-all', cornertop='ui-corner-top',

Re: [web2py] Re: Grid/Smartgrid: how to use the 'selectable' option?

2011-10-18 Thread Johann Spies
Thanks! Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Grid/smartgrid: overriding the search_options

2011-10-18 Thread Johann Spies
Thanks Massimo. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Grid and links

2011-10-10 Thread Massimiliano
Thank you Massimo, I'm aware of that. I was just looking for a way to show all "buttons" but "detail" only in the detail view (the one generated from the grid) and not in the table view. -- Massimiliano On Mon, Oct 10, 2011 at 3:58 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > de

Re: [web2py] Re: grid

2010-12-15 Thread Bruno Rocha
Format missing in models, now its ok. I added the Theme Roller switcher http://powertable.blouweb.com/products 2010/12/15 JmiXIII > I'm just discovering it ... > Just a remark : here => http://powertable.blouweb.com/products , > shouldn't category field render a represent (category.name) instea