Archive for XPages

If alignment of a row in a view requires an upgrade of your server… (XPages Documentation Wiki)

I reported a defect on the XPages Documentation wiki. As you can see in the screen shot the alignment of information in the view is broken:

Here it is in an instance on an IBM address:

 

I was surprised I got contacted shortly after that by IBM (mostly they don’t seem to respond on reported defects on IBM projects on OpenNTF)

Here the conversation:

Michael Stewart
8:07 PM (15 hours ago)

to me, Jennifer
Hi,

Your server level may be the cause of some or all of the problems you’re
seeing. The 2.8.2 template requires IBM Domino 9.0 Social Edition. My
apologies for not making that clear on OpenNTF or in the 2.8.2 template
documentation. Jennifer Heins has added text to that effect in both places.

If you are able to upgrade, you can get the beta here:

http://www-10.lotus.com/ldd/ndsebetaforum.nsf/topicThread.xsp?action=openDocument&documentId=2F8AD78A70015CC485257AD3004AF0EE

and I would appreciate it if you could let us know at that point whether
you still see the problems you have reported.

Again, sorry for the inconvenience–but I’m also glad that you made the
initial attempt, since it exposed the need for this clarification.

Mike

From:   Patrick Kwinten
To:     Michael Stewart
Cc:     Jennifer Heins
Date:   01/24/2013 01:17 PM
Subject:        Re: Re view alignment defect

Hi Mike,

no I did not make any modifications to the views or styling.

As theme have I set idctheme, since our server is on 8.5.2. it extends
oneui2.1

KR Patrick

On Thu, Jan 24, 2013 at 6:52 PM, Michael Stewart wrote:
Hi,

Regarding this defect:

http://www.openntf.org/internal/home.nsf/defect.xsp?action=openDocument&documentId=226AFB4BE255565486257AFD003A0914

I don’t recognize the styling in the top image. It isn’t just the view
entry alignment that is off, but also the highlighting of the navigation
entries in the lefthand column. Have you made any modifications to the
styles in this wiki?

Thanks,

Mike

Well excuse me? Do I need to upgrade my server so a broken line for a row are fixed? FAIL!

Comments (5)

SNTT – Usemap & XPages

Introduction

I thought I write this one down. A developer asked me how to make a form more user-friendly. Basically a user reports via the form a problem somewhere in the building to the central desk and they send a mechanic. To have a more precise allocation of the problem, a room number is required to fill in.

I suggested to use an image map. There are sites around that help you define the correct coordinates.

XPages

In DDE add an image as a resource. Drag that same image into your XPage. In the Properties panel find under All Properties \ Basics the usemap property. Include here the name of your image map. This is the one you have set on your map object.

imagemap

In the map object you can include in the HREF attribute an URL or JavaScript. With Dojo you can establish some nice interaction with input fields on your XPage.

<?xml version=”1.0″ encoding=”UTF-8″?>
<xp:view xmlns:xp=”http://www.ibm.com/xsp/core&#8221; dojoParseOnLoad=”true”
>
<xp:image url=”/bambi.jpg” id=”image1″ usemap=”imap_bambi”></xp:image>

<map id=”imap_bambi” name=”imap_bambi”>
<area shape=”rect” coords=”11,1,160,132″ alt=”daddy”
title=”daddy” href=”http://www.father.com&#8221; />
<area shape=”rect” coords=”171,20,279,108″ alt=”mommy”
title=”mommy” href=”http://www.mommy.com&#8221; />
<area shape=”rect” coords=”131,145,239,233″ alt=”bambi”
title=”bambi” href=”javascript:alert(‘hi there’)” />
<area shape=”rect” coords=”279,12,387,100″ alt=”butterfly”
title=”butterfly”
href=”javascript:dojo.byId(‘#{id:inputText1}’).value = ‘found it’” />
</map>
<xp:inputText id=”inputText1″></xp:inputText>
</xp:view>

result

ismap property

What I do not understand is what the ismap property is capable of. Documentation is hard to find. Maybe you know an example?

ismap

Comments (4)

New project on OpenNTF – Timeglider

Today I posted a new project on OpenNTF:

Timeglider JS is a zooming, panning data-driven timeline widget written in Javascript.

This project delivers an XPages application to manage the documents in a Notes DB so you can distribute corporate timelined information with Notes security (ACL).

More details you can read on OpenNTF.

Comments (2)

New release of Bildr

I have submitted a new release of my Bildr project on OpenNTF.

In case you are unaware of this project, the application allows you to quickly upload and share images within your network. Images are scaled and you can group them in albums.

The idea behind this app was to have a real case scenario to learn XPages, and frankly the learning experience has gone beyond expectations. I also have to thank Mark Leusink for his contributions.

This release fixes the problems I had with Google Maps. Although the solution is not ideal ( I would like to group markers) due to lack of time I am now satisfied with it.

I also used DDE and it’s search capabilities to remove redundant design elements.

Below you can see some screenshots of the application:

 

 

 

Leave a Comment

??? Can even be customized by providing an inherited renderer

Slide 49 from  Show110 - Using the XPages Extension Library for the Real World (Lotusphere 2012) says:

Application Layout Control

- Can even be customized by providing an inherited renderer

Has anyone an idea what is meant here?

Comments (3)

New release of Bildr released =)

Today I released a new version of my xpages playground aka Bildr (4.01 so never mind the bugs) on OpenNTF (link).

Beside the following ‘small media campaign’:

 

and this blog-post we’ll see how people pick up this new release.

What’s new?

Extension Library

Personally I have been working quite a while now with the extension library, and now I have implemented this more in the application:

  • Application Layout control
  • Data view control
  • Widget control
  • Outline control
  • Mobile controls

 

Mobile interface

This is not the first Notes application I have mobilized. Maybe the ‘modular’ approach makes the mobile interface of interest for other developers.

The applications contains a subset of reusable custom controls to setup quickly a mobile interface for ANY Notes database.

I assume that mostly you want to display View information in a mobile app, so custom controls for a flat and a categorized view enable you to quickly mobile multiple Notes views.

Also the mobile interface contains custom controls to define splashscreen, bookmark icon and more stuff like that to build a more complete mobile Notes app.

Less design elements

Less is more we assume. Especially if you have an application that was built over more than one version of Notes (8.0x, 8.51, 8.53) and where more one developer has contributed, your design tend to become a bit inefficient. Introducing the Extension Library also made it possible to reduce the number of design elements by using ‘out of the box’ controls e.g. tag cloud control and  layout control.

OneUI v2.1

OneUI is dead, long live the new oneUI! (probably we will shout this out loud soon again).

 

Upgrade or start from scratch?

If you are a current user of Bildr I would not dare to simple upgrade the application design. You can try, I haven’t (due to lack of time).

Start with a new DB from scratch will work fine =)

Which enhancements to expect?

In the next release I would like to add some missing functionality e.g. rating, geolocation with Google maps v3. If possible I would like to further eliminate the number of design elements, remove old code.

Ideas can be posted here:

http://openntf.org/ideajam/ideajam.nsf/ProductByAreaMostRecent?openview&restricttocategory=Bildr

For now I will relax the next couple of evenings and work on my real-world social life =)

Leave a Comment

demo code XPages & SAP

I am working on an demo app that is going to read data from SAP. I noticed some helpful code in AD404 Presentation - Extend your Social Business by integrating SAP Solutions

Java Code for Integration Bean:

package com.ibm.chi;
import org.odata4j.consumer.ODataConsumer;
import org.odata4j.consumer.behaviors.BasicAuthenticationBehavior;
import org.odata4j.core.OEntity;
import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
public class GWWorkflow {
private ArrayList<OEntity> WorkflowSet = null;
public ArrayList<OEntity> getWorkflows() {
ODataConsumer c =
ODataConsumer.create(“http://9.153.165.205:8000/sap/opu/sdata/sap/WFDECISIONTASKPRO
CESSING/”,new BasicAuthenticationBehavior(“super”,”password”));
this.WorkflowSet = new ArrayList<OEntity>();
for(OEntity workflow : c.getEntities(“WorkflowTaskCollection/?$format=xml”).execute()){
this.WorkflowSet.add(workflow);
}
return this.WorkflowSet;
}
}

Java Bean needs to be added to “faces-config.xml” in NSF file

 

On the Xpage a DataTable with following settings is added:

 

Which then allows access to the bean with the following JavaScript Statement:

Leave a Comment

Data Source Events

I am currently working on transforming an existing Domino app into an Xpages app. Therefor I took another close look on the Data Source Events as described in the Mastering XPages book. Here is a summary:

A data source on an XPage has many similar events as the traditional Domino document.

Event Trigger
computeDocument
  • Create new document
  • Submit document
  • Reloade XPage
  • Open document
queryNewDocument
  • Create document
  • Reload XPage
postNewDocument
  • Create document
  • Reload XPage
queryOpenDocument
  • Open document
postOpenDocument
  • Open document
querySaveDocument
  • Submit document
postSaveDocument
  • Submit document

The following table gives an overview which trigger executes which Event(s)  (in the order as listed):

Trigger Executed Events
Create document
  1. queryNewDocument
  2. postNewDocument
  3. computeDocument
Submit document
  1. querySaveDocument
  2. postSaveDocument
  3. computeDocument
Cancel document No Event(s)
Reload XPage
  1. queryNewDocument
  2. postNewDocument
  3. computeDocument
Open document
  1. queryOpenDocument
  2. postOpenDocument
  3. computeDocument
Switch document mode No Event(s)

An example you can find described on the Domino forum.

Leave a Comment

XPage Events – onClientLoad

Did you know that:

The onClientLoad event is the only event that executes both client and server-side code.

and

If the CSJS in the onClientLoad event returns “false,” the SSJS is never executed.

Comments (1)

« Newer Posts · Older Posts »
Follow

Get every new post delivered to your Inbox.

Join 143 other followers