Hi, Everyone!
First of all, I would like to thank everyone who responded to this earlier
post of mine through Nabble: Am I up the creek without a
paddle?<http://www.nabble.com/forum/ViewPost.jtp?post=23411770&framed=y>.
Special thanks to Darrel Lipman's prompt and funny, yet thoroughly detailed
response about the PHP RPC! It is working well now and I have started to
understand it much better.
Now, onto another big question.
I am trying to develop a qooxdoo-based plugin for an existing PHP
application, namely XRMS CRM. XRMS is an extensive PHP application (over
90MB of code) which is, at present, inconcievable to port to qooxdoo as a
whole. However, I figured a qooxdoo plugin should not be too hard, right?
Well, not so easy either, it seems... I think the problem boils down to the
fact that qooxdoo is an application framework while what I seem to want to
use it as is a widget library.
The overal idea was to have the PHP code of XRMS execute as usual and then,
in various places of the PHP-generated HTML of XRMS, provide links of the
type of %a onClick="javascript:someQooxdooWidgetLauncher(some_id)"% (I have
replaced the HTML delimiters with %). Clicking on such a link would launch
a particular qooxdoo widget that would overlay the HTML UI of XRMS. The
widget then should be able to use the some_id parameter passed to it and, by
utilizing the PHP RPC, call up PHP methods to supply it with additional data
about the id'ed object which the widget can then display, manipulate, etc.
and communicate back to the PHP methods its results to be stored back in the
database.
It sounded quite good until I tried to run qooxdoo code from the
PHP-generated pages of XRMS. I started small, trying to simply launch the
Inline Window (
http://demo.qooxdoo.org/current/demobrowser/#root~Inline_Window.html) demo
application without worrying about the links yet (I figured qooxdoo has to
run as Inline, right?). I built the application in a subdirectory of XRMS,
included the custom.js loader in the header of the PHP-generated XRMS pages
and provided an "isle" div anchor. So far so good. Load up the XRMS page.
XRMS loads as usual but there is no sign of the "Add Window" buttons. Upon
inspecting the page with Firebug I can see that the custom.js loader has
loaded a bunch of qooxdoo .js files but I saw no trace of Application.js
being loaded.
Unless I do not understand when the DOM is created, I am guessing that
qooxdoo cannot execute out of a PHP-generated page because the DOM is not
yet created when the Javascript is being sent to the browser. Additionally,
I noticed that the document type may be an issue as well. The doc type
generated by XRMS is:
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd" />
I can probably figure out how to modify the document type after the fact by
tweaking the DOM with Javascript (I hope that won't break anything else).
However, finally, I realized that I also do not need qooxdoo to run (unless
it is absolutely necessary for some launcher class to persist) until the
user clicks on a link which would launch the qooxdoo widget. However, I
have no idea how to even launch a widget from the HTML page. I could, of
course do it with a small JS script which would call the necessary methods
but I even do not have an idea how I would reference those. In essence, I
need to be able to launch widgets at will from HTML links, whether I use
some additional JS or not...
So, I hope I have been clear enough in expressing the muddle that is in my
head but I needed to ask whether what I am envisioning is at all possible
and, if it is, how would I go about it? The qooxdoo documentaiton is
extensive (big kudos for that, by the way!) and I was hoping I can narrow
down to the areas that are of particular interest to this project.
Thank you all for any and all pointers and have a wonderful weekend!
Cheers,
Ivaylo
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel