Login Register

widgets

Proper way to communicate with widgets contained in a custom widget template?

So, I've been using dojo since v0.3. Currently, I'm using v1.2. One thing that has always bugged me is how to communicate with widgets contained in a custom widget's template. For example, say I have this widget:

dojo.provide("custom.CustomWidget");
...
dojo.declare("custom.CustomWidget", [dijit._Widget, dijit._Templated], {
    templatePath: dojo.moduleUrl("custom", "templates/CustomWidget.html"),
    widgetsInTemplate: true
    _doSomething: function(event) {
        alert("do something");
    }
});

And in my CustomWidget.html template:

...

Cross-domain XHR (and work-arounds) in an OpenSocial Gadget

Hiya all,

My latest work project requires me to make some cross-domain requests, with the caveat that the code will eventually be running as a gadget in an OpenSocial container.

OpenSocial containers provide a proxy for remote resources; this is accessible via the gadgets.io.* methods.

For my gadgets, I would like to avoid using the gadgets.io.* methods if at all possible, as some OpenSocial containers (like the client-side happyhour, or a bare-bones implementation) are unable to make cross-domain requests.

[Q] example of Accordion Pane with static Widgets and Forms inside

Hi,
I am new to the javascript/dojo.
My gui programming from programming GUI in wxWindows

Trying to learn by examples, and could not find a working
example of having
Widgets/forms within AccordionPane

In my simplistic attempt, I just listed the forms I wanted
within accordion pane.
However, running it on both IE and Opera did not work:
both panes became completely opened, and the first pane
was resized to minimal height to show the edit box and search button

Dojo vs. ExtJs

I have a dilemma. I am tasked to make a final decision for my company, between Dojo, and EXTjs, as our framework for all our clients. Our developers are split right down the middle, between those who like Dojo's orthodoxy and stability, vs those who see it being brushed aside by EXTjs, with its many widgets that save so much time, and provide so much UI sizzle. It just overpowers most arguments the Dojo proponents are making. They also point to what they see as a noticable slowdown in Dojo projects, community, and general enthusiasm.

How to reference nodes in a widget declaratively

Hi guys,

I have a widget with an html template similar to this:

<div dojoAttachPoint='div1'></div>
<div dojoType='myCustomWidget' dojoAttachPoint='widget1'></div>

I need to reference div1 from widget1 declaratively. I know that programmatically i can do this in my widget:
this.widget1.setTargetDiv(this.div1);

TabContainer - nested components/widgets behavior inconsistent

Hi,

So - here we go again. A tab container (created programmatically) with 3 content panes, Tab 1, Tab 2, Tab 3. Attach an AccordionContainer (also created programmatically), with two accordion panes to Tab 1. All is well - the accordion panes move up and down and their content is rendered accurately. Now take the same accoridion pane and attach it to Tab 2. The behavior is different. The panes are bound to each other and will not open.

Get content before rendering

I have a template that takes:

<div title="The standard Lorem Ipsum passage, used since the 1500s">
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</div>

and

Widget template with javascript

How to make the javascript fuction/call embeded in the widget template. For example in my widget template I have:

<div>
   <script>alert("hello")</script>
   <h3>popup hello</h3>
</div>

But when render the widget I don't get alert box.

Thanks for any help!
schen

FATAL: Could not load 'dojo.widget.Dialog'; last tried '__package__.js'

[editor: moving to the appropriate forum…]

I keep getting the following fatal errors when trying run a dojo.require("dojo.widget.TabContainer"); or a dojo.require to load any other type of dojo widget (Dialog, etc.).

Here is the code I have on a jsp page which I call head.jsp which does all the common head type work for all my jsp pages on my website:

Please advise on how to avoid displaying these FATAL error messages and allow to load these widgets correctly. Thanks.

/script type="text/javascript" src="/js/dojo/dojo.js" />

Need advice - 0.4 or 1.0?

Hi,

I maintain a web app that currently uses 0.4 for several different widgets, including a few custom widgets (extended from the default versions). It doesn't seem like it would require very much effort to upgrade to 1.0, but I don't think it would be trivial either since I use Dojo in so many places and I'd have to convert and test the custom widgets.

My boss has asked me to start working on a new project that would involve a sortable table and possibly a tabbed layout. I read somewhere that the grid is a long way out, which would likely force me to stay with 0.4.

Syndicate content