[Dojo-interest] it works every other time
Jay Onda
jay.onda at gmail.com
Wed Apr 26 00:26:50 MDT 2006
Thats slick. Thanks Cameron!
I'll have to try that out when i have time.
For the project im working on in particular, i cannot render a page with
only javascript.
One of the (many) reasons is that there are ACL tags that wrap sensitive
information. These are server side ACL tags which needs to sit on the jsp
itself.
Another issue i needed a quick workaround for is to get bean:message keys.
These resource bundled pieces of text sit on the jsp, im sure i can extract
these keys, stuff them into an array and pass it to a js function, but for
my case, its not a reasonable method.
ok, back to the grind...
-Jay
On 4/25/06, Cameron Braid <cameron at braid.com.au> wrote:
>
> Sounds to me like people are wanting to use simple html files like
> widgets.
>
> The drawback of this approach is that these files become dojo specific,
> however I can't see why this isn't acceptable.
>
> When the content pane setUrl is called the following can happen :
>
> * load the html from the URL using dojo.io.bind
> * do a similiar thing as the proposed Part Widget does : Treat this HTML
> as a widget template, but also parse its contents for embeded widgets
> * associate widget functions in the HTML file to the contentPane instance
> that contains them. (Either functions in the global namespace, or a dojo
> defined namespace like the previousally suggsted 'execScope')
>
> An example may illustrate this better.
>
> Clicking on "load foo" will load the foo.htm widget into the content
> pane.. THen if you click "do something" it will call the doSomething method
> of the content pane, which is the function provided from foo.htm.
>
> Clicking on "load bar" will load bar.htm widget into the content pane,
> replacing the doSomething method with the one defined in bar.htm
>
> I've introduced a new dojo widget "anchor" that, when within a document
> body, changes the location.href, when within a contentPane, uses setUrl.
>
> This allows foo.htm to provide a link to load the bar.htm widget in its
> place.
>
> ==== main.html ====
>
> <div id='content' dojoType='contentPane'></div>
>
> <a href="javascript:dojo.byId('content').setUrl('foo.htm')">load foo</a>
> <a href="javascript:dojo.byId('content').setUrl('bar.htm')">load bar</a>
> <a href="javascript:dojo.byId('content').doSomething()">do something</a>
>
> ==== foo.htm ====
>
> <script>
> function doSomething() {
> alert('foo');
> }
>
> </script>
> <div>
> <h4>Foo</h4>
> <a dojoType='anchor' href='bar.htm'>bar</a>
> </div>
>
> ==== bar.htm ====
>
> <script>
> function doSomething() {
> alert('bar');
> }
> </script>
> <div>
> <h4>Bar</h4>
> </div>
>
> Cameron.
>
>
>
> On Wed, 2006-04-26 at 14:43 +0900, Bill Keese wrote:
>
> Jay Onda wrote:> > I have a tab pane which loads 2 jsp pages via href. (in simple terms)> In each jsp, I have 3 containers,> foo.jsp> <div id="containerOne">, <div id="containerTwo">, <div > id="containerThreeForFoo">> > bar.jsp> <div id="containerOne">, <div id="containerTwo">, <div > id="containerThreeForBar">
> Hi Jay. If you have non-unique id's then I'm not surprised things are breaking. We've been talking about how to support this kind of thing (ContentPane namespaces), but for now, it's not allowed.
> Bill_______________________________________________Dojo FAQ: http://dojo.jot.com/FAQDojo-interest@dojotoolkit.orghttp://dojotoolkit.org/mailman/listinfo/dojo-interest
>
> ------------------------------
> Cameron Braid
> PGP Public Key http://braid.com.au/cameron.pgp
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
>
> iD8DBQBETw7Kbbjq9wHLQrIRAkgtAJ4oNrfsa36l7MywBiDm8sHCP6qQRACcC9OE
> BabBxy3WxZUIfQxZc4FXkt4=
> =MJWn
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20060426/5f457ae8/attachment.html
More information about the Dojo-interest
mailing list