Login Register

widgets

dijit_.Contianer adding html and widgets ?

Hello Everyone,

I am trying to add widgets and html to a Container widget and I am not sure what the API is.

<div dojoAttachPoint="addwid"
     dojoType="dijit._Container">
  Hello World
   // some widgets will be added dynamically
</div>

I know that when Dojo creates a widget, it removes the DOM element used to define it.
So what I need is a way to get all the nested HTML text (that is "Hello World") in my javascript.

I also want to know the API to add widgets to the Container
because when I do this.addwid.addChild(/*widget*/)

How widgets talk when they are wired to each other?

Hi,

I have created a custom widgets in JavaScript with dojo toolkit and without dojo. I would to make the widgets talk when they are connected, but I can't understand how widgets talk to each other when they are wired together. If any one can please explain that to me that will be great. Please help!!!

Thank you,

Prabhat

Custom widget accessing nested html

Hello Everyone,

I am trying to create a templated widget and fortunately my in my html file I have HTML that is statically defined within a widget element.
what I mean is, in my html I have

<div id="leftColumn" dojoType="test.filter">
   <div id="someId">Hello World</div>
  </div>

I know that when Dojo creates a widget, it removes the DOM element used to define it.
So what I need is a way to get all the nested HTML DOM elements in either the constructor or the preamble function, before Dojo removes them.

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

Syndicate content