1.1.7.1. gnr.web._gnrbasewebpage

Last page update: November 23, 2011

Classes:

Complete reference:

1.1.7.1.2. _gnrbasewebpage - The complete reference list

class gnr.web._gnrbasewebpage.GnrBaseWebPage

TODO

TODO

Parameters:cookie – TODO
applyChangesToDb(**kwargs)

TODO

checkDb()

TODO

createFileInData(*args)

TODO

createFileInStatic(*args)

TODO

createFolderInData(*args)

TODO

createFolderInStatic(*args)

TODO

decodeDatePeriod(datestr, workdate=None, locale=None)

TODO

Parameters:datestr – a date string. For the string format, please check the :meth:`decodeDatePeriod()

<gnr.core.gnrdate.decodeDatePeriod>` method docstrings :param workdate: the workdate :param locale: the current locale (e.g: en, en_us, it)

deleteDbRow(table, pkey=None, **kwargs)

Method for deleting a single record from a given table

Parameters:
  • table – the database table name on which the query will be executed, in the form packageName.tableName (packageName is the name of the package to which the table belongs to)
  • pkey – the record primary key
Returns:

if it works, returns the primary key and the deleted attribute. Else, return an exception

deleteDbRows(table, pkeys=None, **kwargs)

Method for deleting many records from a given table.

Parameters:
  • table – the database table name on which the query will be executed, in the form packageName.tableName (packageName is the name of the package to which the table belongs to)
  • pkeys – TODO
Returns:

if it works, returns the primary key and the deleted attribute. Else, return an exception

deleteRecordCluster(data, table=None, **kwargs)

TODO

Parameters:
  • data – TODO
  • table – the database table name on which the query will be executed, in the form packageName.tableName (packageName is the name of the package to which the table belongs to)
diskPathToUri(tofile, fromfile=None)

TODO

Parameters:
  • tofile – TODO
  • fromfile – TODO
forbiddenPage(root, **kwargs)

TODO

Parameters:root – the root of the page. For more information, check the main section
formLoader(formId, resultPath, table=None, pkey=None, datapath=None, _fired=None, loadOnStart=False, lock=False, method=None, onLoading=None, onLoaded=None, loadingParameters=None, **kwargs)

TODO

Parameters:
  • formId – the id of the form
  • resultPath – TODO
  • table – the database table name on which the query will be executed, in the form packageName.tableName (packageName is the name of the package to which the table belongs to)
  • pkey – the record primary key
  • datapath – the datapath form
  • _fired – TODO
  • loadOnStart – boolean TODO
  • lock – boolean. TODO
  • method – TODO
  • onLoading – TODO
  • onLoaded – TODO
  • loadingParameters – TODO
formSaver(formId, table=None, method=None, _fired='', datapath=None, resultPath='dummy', changesOnly=True, onSaving=None, onSaved=None, saveAlways=False, **kwargs)

TODO

Parameters:
  • formId – the id of the form
  • table – the database table name on which the query will be executed, in the form packageName.tableName (packageName is the name of the package to which the table belongs to)
  • method – TODO
  • _fired – TODO
  • datapath – the datapath form
  • resultPath – TODO
  • changesOnly – boolean. TODO
  • onSaving – TODO
  • onSaved – TODO
  • saveAlways – boolean. TODO
freezeSelection(selection, name)

TODO

Parameters:
  • selection – TODO
  • name – TODO
getAbsoluteUrl(path, **kwargs)

Get TODO. Return an external link to the page

Parameters:path – the path to the page from the pages folder of a project
getUserSelection(selectionName=None, selectedRowidx=None, filterCb=None, columns=None, sortBy=None, page_id=None, condition=None, table=None, condition_args=None)

TODO

Parameters:
  • selectionName – TODO
  • selectedRowidx – TODO
  • filterCb – TODO
  • columns – it represents the columns to be returned by the “SELECT” clause in the traditional sql query. For more information, check the columns section
  • condition – set a condition for the selection
  • table – the database table name on which the query will be executed, in the form packageName.tableName (packageName is the name of the package to which the table belongs to)
  • condition_args – the arguments of the condition parameter. Their syntax is condition_ followed by the name of the argument

TODO

Parameters:
  • cookieName – TODO
  • cookieType – TODO
  • secret – TODO
  • path – TODO
loadRecordCluster(table=None, pkey=None, recordGetter='app.getRecord', **kwargs)

TODO

Parameters:
  • table – the database table name on which the query will be executed, in the form packageName.tableName (packageName is the name of the package to which the table belongs to)
  • pkey – the record primary key
  • recordGetter – TODO
main(root, **kwargs)

The main method of a webpage. You must override this method unless you’re using an active component. For more information, check the main documentation section

Parameters:root – the root of the page. For more information, check the main section
mainLeftContent(parentBC, **kwargs)

The main left content of the page

Parameters:parentBC – the root parent BorderContainer
mixins()

Implement this method in your page for mixin the page with methods from the public resources folder

Returns:a list of mixin names with the following syntax: moduleName:className
newCookie(name, value, **kw)

TODO

Parameters:
  • name – TODO
  • value – TODO
newMarshalCookie(name, value, secret=None, **kw)

TODO

Parameters:
  • name – TODO
  • value – TODO
  • secret – TODO
package

TODO

pageAuthTags(method=None, **kwargs)

Hook method. Allow to define users authorizations

Parameters:method – TODO
Returns:a string containing the users authorizations
pageController(**kwargs)

TODO

Returns:TODO
pageLocalDocument(docname, page_id=None)

TODO

Parameters:
  • docname – TODO
  • page_id – TODO
pageSource(nodeId=None)

TODO

Parameters:nodeId – the page nodeId. For more information, check the nodeId documentation page.
requestWrite(txt, encoding='utf-8')

TODO

Parameters:
  • txt – TODO
  • encoding – the encoding type
resetApp(**kwargs)

TODO

resolvePath(*args, **kwargs)

TODO

resolvePathAsUrl(*args, **kwargs)

TODO

resolverRecall(resolverPars=None, **auxkwargs)

TODO

Parameters:resolverPars – TODO
responseWrite(txt, encoding='utf-8')

TODO

Parameters:
  • txt – TODO
  • encoding – the encoding type
rootWidget(root, **kwargs)

Return a ContentPane. You can attach to it any webpage element. You can override this method to receive a different layout widget respect to the contentPane

Parameters:root – the root of the page. For more information, check the main section
saveRecordCluster(data, table=None, _nocommit=False, rowcaption=None, _autoreload=False, onSavingHandler=None, onSavedHandler=None, **kwargs)

TODO

Parameters:
  • data – TODO
  • table – the database table name on which the query will be executed, in the form packageName.tableName (packageName is the name of the package to which the table belongs to)
  • rowcaption – TODO
setLoadingParameters(table, **kwargs)

Warning

deprecated since version 0.7. It has been replaced through the TableHandler component. For more information, check the explanation about the handler level in the form - data levels documentation section

Note

old documentation:

Set parameters at the path gnr.tables.TABLE.loadingParameters.PARAMETERNAME, where:

  • TABLE is the value you define for the table parameter
  • PARAMETERNAME is the name you gave to the parameter.
param table:

MANDATORY - string. You can put the following strings:

  • maintable: set a parameter value of a column of the table you define in the maintable webpage variable

    Example: if you have a package called agenda and a table called staff and write in your webpage:

    maintable='staff'
    self.setLoadingParameters(table='maintable',price='10000')
    

    then you will find the value 10000 at the path: gnr.tables.maintable.loadingParameters.price

  • PACKAGENAME.TABLENAME: set a parameter value of a column in the table called TABLENAME of the package PACKAGENAME at the path gnr.tables.PACKAGENAME_TABLENAME.loadingParameters.PARAMETERNAME, where PARAMETERNAME is the name you gave to the parameter.

    Example: if you have a package called agenda and a table called staff and write in your webpage:

    self.setLoadingParameters(table='agenda.staff',price='10000')
    

    then you will find the value 10000 at the path: gnr.tables.agenda_staff.loadingParameters.price

setOnBeforeUnload(root, cb, msg)

TODO

Parameters:
  • root – the root of the page. For more information, check the main documentation section
  • cb – TODO
  • msg – TODO
siteStatusSave()

TODO

tableStatus(**kwargs)

TODO

toJson(obj)

Return the object into Json form

Parameters:obj – the object
unfreezeSelection(dbtable=None, name=None, page_id=None)

TODO

Parameters:
windowTitle()

Return the window title

Table Of Contents

Previous topic

1.1.7. gnr.web – Web support

Next topic

1.1.7.2. gnr.web.batch – Batch

This Page