Skip to main content link. Accesskey S

XPages Wiki

Submit Search

YouAtNotes XPages Wiki


Page12

By Tag: code

How to create a picklist style dialog

Julian Buss | May 19, 2009 3:43:54 PM | Tags:code, dojo, UI

Found in [[http://dominoextnd.blogspot.com/2009/05/xpages-how-to-create-view-picklist.html | Mark Hughes Blog]]: - Create a custom control with a panel, a view inside the panel and other componets as you like - this control will become the dialog. Set for example "picklistDialogPanel" as name for ...

How to output custom content like print from an agent

Julian Buss | May 14, 2009 9:05:53 PM | Tags:code, javascript, agent

You can use server side javascript in a XPage to write custom content to the browser, just like with agents and "print" statements in classic web development. This tip is taken from Stephan Wissel from [[http://www.wissel.net/blog/d6plinks/SHWL-7MGFBN]]. - create a Xpage - set the "rendered" ...

Special chars and escaping

Julian Buss | June 30, 2009 7:12:04 AM | Tags:code, UI

Non breaking space Using {code:} nbsp; {code} is not allowed, but you can use {code:} 160; {code} instead. Other special chars Use the <number>; notation.

Useful CSS snippets

Julian Buss | April 6, 2009 1:39:28 PM | Tags:code, css

==Round corners== Firefox and other Mozilla browsers and Safari, Konqueror and other Webkit browsers support round edges: {code:} -moz-border-radius: 10px; -webkit-border-radius: 10px; {code} InternetExplorer does not support round edges via CSS, even not in IE 8. See also ...

Useful formulas and code snippets

Julian Buss | April 6, 2009 12:03:33 PM | Tags:code, formula, javascript

Here are some various snippets. ==Get the current username== Use {code:}session.getEffectiveUserName(){code} to the the name of the user who is logged on. Use @Name() to convert it for exampel to a CN name: {code:} @Name("[CN]", session.getEffectiveUserName()) {code} ==Check if a user contains a ...

Work with Client side JavaScript

Julian Buss | April 6, 2009 1:33:07 PM | Tags:code, javascript, client

==Use the result of a server side script in the client== For example, use the result of a @DbName in your client script: {code:} dbname='#{javascript:@DbName()}'; {code} ==Get the runtime id of a control== In the XPage you set a name / id for a control, for example "panelSidebar". But at runtime, ...

Work with datasources

Julian Buss | August 19, 2009 9:48:06 AM | Tags:code, javascript, variables

==Where to define a datasource== You can define a datasource on different levels: * in the XPage properties * in the properties of a custom component * in the properties of a panel Use the folowing rule of thumb: If you need a datasource in your whole XPage and even in custom components which are ...

Work with Dates

Julian Buss | May 22, 2009 10:17:41 PM | Tags:code, UI

==General Tips== While working with dates in server side javascript, I noticed some glichtes in Domino 8.5.0. Here are some rules of thumb: Trying to convert a text to date with @TextToTime() may work, but in my case it mixed day and month values. My solution: parse the string yourself into year, ...

Work with DbColumn and DbLookup

Julian Buss | April 6, 2009 12:48:36 PM | Tags:code, formula, view

@DbColumn and @DbLookup (mind the case!) expect an array of servername and filepath as first parameter. ==Example get a name of all people of the Domino Directory== {code:} db = new Array(@DbName()[0], 'names.nsf'); @DbColumn(db, "(People)", 2) {code} Note: use ($People) instead of (People) as ...

Work with documents and fields on the XPage

Julian Buss | April 6, 2009 1:12:07 PM | Tags:code, javascript

==Get and set a field on the XPage== ===Server JS=== {code:} getComponent("elementName").getValue(); getComponent("elementName").setValue("something"); {code} Note: you cannot access or set fields with visible=false. If you want to work with a field, but don't want to display it, give the field a ...

Page12
Use  searchlotus.com  for news in the Web related to Lotus Notes and Domino,
and to search those sites.
Check  youatnotes.com  for great Lotus Notes, Domino and XPages software.
Did this wiki help you?
Did this saved you time? Express your gratitude by making a donation:
PayPal - The safer, easier way to pay online!