"More stupid WOBuilder tricks"
Yes WOBuilder is dead to Apple but some of us in the WOCommunity still
like to use it. Along the lines of Gary Teter's excellent WOBuilder trick
for the WireHose framework, we offer some tricks for the WOnder framework
:-)
Ever wish your favorite AJAX widgets would show their bindings in
WOBuilder? Ever wish your AjaxUpdateContainers displayed like a
WOGenericContainer so that if you give them an "elementName = tr" binding
they are actually visible in a table? Now you can have all this and more
if you follow the steps outlined here.
There are two files that you must edit inside the contents of
WOBuilder.app You need to right-click (control-click) on the WOBuilder
application icon in the Finder (not in the dock). This will allow you to
"show package contents". At that point you'll want to navigate into
"Contents/Resources" and switch the finder view to the detail view. Group
the results by "kind" and scroll down to the bottom. These two files are
important for WOBuilder hacking:
1) WebObjectToWBWebObject.plist - allows you to map any component to one
of roughly eight canned layout widgets for WOBuilder.
2) WebObjectDefinitions.xml - allows you to setup bindings and validation
information for any random component.
To make an "AjaxUpdateContainer" behave like a WOGenericContainer, open up
#1 above and towards the bottom add the following line:
"AjaxUpdateContainer" = "WBGenericWebObject";
"WB" must stand for "WO Builder". If you look at this file, you'll see
there are a handful of these WB objects that you can use to give special
visual functionality to any object you choose. Right now, we just wanted
to make the AjaxUpdateContainer behave like a WOGenericContainer so that
it will render properly. If you didn't know, the AjaxUpdateContainer
always renders as a "div" unless you specify an "elementName". Once you
specify an element name, you can use AjaxUpdateContainer objects to
replace virtually any HTML element on the page.
To recap, if you ever wished your wiz bang component could look and feel
like a "WOPopUpButton" for example, all you would need to do is map it to
a "WBWOPopUpButton" object in this plist file.
Now, to give bindings to the AjaxUpdateContainer, open up the #2 xml file
and towards the bottom, cut and paste the following:
<wo class="AjaxUpdateContainer">
<binding name="elementName" passthrough="NO" required="YES"/>
<binding name="id" passthrough="NO" required="YES"/>
<binding name="onRefreshComplete" passthrough="NO"/>
<binding name="action" passthrough="NO"/>
<binding name="insertion" passthrough="NO"/>
<binding name="insertionDuration" passthrough="NO"/>
<binding name="beforeInsertionDuration" passthrough="NO"/>
<binding name="afterInsertionDuration" passthrough="NO"/>
<binding name="observeFieldID" passthrough="NO"/>
<binding name="frequency" passthrough="NO"/>
<binding name="decay" passthrough="NO"/>
<binding name="onLoading" passthrough="NO"/>
<binding name="onComplete" passthrough="NO"/>
<binding name="onSuccess" passthrough="NO"/>
<binding name="onFailure" passthrough="NO"/>
<binding name="onException" passthrough="NO"/>
<binding name="evalScripts" passthrough="NO" defaults="YES/NO"/>
<binding name="asynchronous" passthrough="NO" defaults="YES/NO"/>
<validation message="'elementName' must be bound">
<unbound name="elementName"/>
</validation>
<validation message="'id' must be bound">
<unbound name="id"/>
</validation>
</wo>
Here's another snippet for AjaxObserveField:
<wo class="AjaxObserveField">
<binding name="observeFieldID" passthrough="NO" required="YES"/>
<binding name="updateContainerID" passthrough="NO" required="YES"/>
<binding name="action" passthrough="NO"/>
<binding name="fullSubmit" passthrough="NO" defaults="YES/NO"/>
<binding name="onLoading" passthrough="NO"/>
<binding name="onComplete" passthrough="NO"/>
<binding name="onSuccess" passthrough="NO"/>
<binding name="onFailure" passthrough="NO"/>
<binding name="onException" passthrough="NO"/>
<binding name="evalScripts" passthrough="NO" defaults="YES/NO"/>
<binding name="asynchronous" passthrough="NO" defaults="YES/NO"/>
<binding name="observeFieldFrequency" passthrough="NO"/>
<validation message="'observeFieldID' must be bound">
<unbound name="observeFieldID"/>
</validation>
<validation message="'updateContainerID' must be bound">
<unbound name="updateContainerID"/>
</validation>
</wo>
Of course, you should probably make a zipped archive of your WOBuilder app
before playing with anything. When you do make edits, don't forget to save
and then restart WOBuilder for the changes to take effect.
One final word of advice. The AjaxUpdateContainer modifications we
outlined here work *almost* the way we want but there are two issues. 1)
When you first put a new AjaxUpdateContainer on the page, you'll need to
define an "elementName" and then toggle from "Source" to "Layout" view to
wake up WOBuilder. 2) We couldn't figure out a way for "div" to be shown
as a default.
Happy WO Builder tinkering!
-- Aaron

Hi Denis,
Sorry for the delay in replying.
I am not, AFAIK, overriding the property anywhere. During startup it
shows up as true. I did a "Project Find" in Xcode and it only turns
up in the config file setting where it is false.
On Dec 1, 2007, at 1:47 AM, Denis Frolov wrote:
> Are you overriding the property in application's Properties file?
> If not and you do that in a framework Properties, your property can
> be overridden with one from ERJavaMail's Properties if it is loaded
> after your framework.
>
> The list of all the used Properties files is shown during startup -
> you should check if any of these files have wrong setting.
>
> Denis.
Frank Schima
Foraker Design
<http://www.foraker.com&gt;
303-449-0202

Community

Help

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

CountryState

JavaScript is required for this form.

I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT services and products. I understand that I can withdraw my consent at any time. Please refer to our Privacy Policy or Contact Us for more details