XPages: can I apply dojotypes to an editbox?

I quite like the dojo NumberSpinner field; can I apply this or any other dojoType to edit boxes etc.? I can apply the necessary dojo resource to my XPage, but there’s no property in the editBox control, at least none I can see.

So I plainly tried to add dojoType and constraints attributes to my xp:inputText control, but of course designer doesn’t like that:

unknown property dojoType…

etc.

I’m considering using a theme for that purpose, but isn’t there any way to directly apply dojoTypes and other attributes to XPage controls?

Thanks,

-Lothar

Subject: A simple fix (surprisingly)

A colleague of mine stumbled onto this one - almost infuriating when I saw it, after spending a lot of time playing with custom CSS to reformat.

In the oneUI theme document in the db, change the opening line to tell oneUI to extend the webstandard theme:

Cleans up the date pickers quite nicely.

Subject: Thanks Sam

Wow, what a simple fix! Will definitely be giving that a try.

Subject: Gr8 work around in theme

It works beautifully. Thanks for contribution.

Subject: Dojo Spinner Wiki example

Hi Lothar,

I was just looking at this yesterday. There’s a Wiki article that has an example of attaching a dojo spinner to an editbox control (among other examples). Here’s the link:

http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Client_Side_JavaScript_Libraries_in_XPages.htm

-John

Subject: Spinner…

argh! And I’ve been studying this very wiki doc yesterday, but the spinner part somehow escaped me!

Thanks again and a million times :slight_smile:

-Lothar

Subject: Problem with oneui.theme and dijit-components

Just a warning:I tried the spinner example as well as other dijit-components like a dialog etc. in an application I more or less built after Declan Lynch’s tutorial which uses that theme.

In a fresh db however everythings works finest!

Subject: What about some built-in controls?

I am using the oneui theme based on Declan Lynch’s tutorial. If I add a Date Time Picker Core Control for a date field it has no css (basically just the text and the rest of the control transparent on the page).

I tried adding manually a Calendar Control using dijit to an oneui based XPage and it had the same problem. But there I was able to set the styleClass to “Tundra” and it worked fine.

I haven’t found a way to do the same to the built in Date Time Picker Core Control.

Any ideas?

Subject: DateTime Picker

Yep, I had the same (transparent background etc.) with the standard control. Thanks to Firebug I found that the Date Picker is rendered with a style class “dijitPopup”. So I simply added some “local” css as in

.dijitPopup {

background-color:#ffffff;

border:1px #000000 solid;

}

That did it.

I’ll try adding tundra as style class for the dojo controls, thanks for the hint!

Subject: Lothar comes through again. Thanks!!!