XPages Developer
Interests: Developing web and mobile apps
Skills: JavaScript, HTML, CSS, Java, Dojo, jQuery, IBM Lotus Notes and Domino, iWidgets, OpenSocial, Activity Streams
Location: Everywhere
Hobbies: Writing great code that helps people and businesses get stuff done. Love pizza, good music, good friends and beach combing.
Subscribe via FeedJulian Buss, Jul 22, 2009 6:13:44 AM
I just came across the issue that I had a combobox with values taken from a "formula item".
But: the values didn't refresh on a partial refresh. I found that in the script editor for "values -> formula item" there is no choice between "compute dynamically" and "compute on page load". So I guess it's hard-wired to "compute on page load", which explains why the values don't compute again on a partial refresh.
Luckily, we have the source view of the XPage. And what you perhaps didn't know yet (but what I'm going to tell you right now) is: when you see a piece of server side javascript in the source view of a XPage, there is a leading "$" or "#". These prefixes define if that javascript is computed dynamically (#) or computed on page load ($).
So, brave as I am I just tried to change the $ prefix of the combobox values' javascript to a # and ét voilá, the values are computed on a partial refresh.
Remember two things:
(1) the prefix "#" means "compute dynamically, "$" means "compute on page load"
(2) the source view is your friend if you miss some switch or property in some editor
1 responses to Combobox, Formula Item for Values and Partial Refresh and What # and $ are for
Maciej Zalewski, August 16, 2010 12:05 PM
You are my HERO!
If any of you out there will ever want to create a comboboxes on the repeater, with choices dependent on the repeater variable, this is what you are looking for!