Login Register

template

one widget object with multiple template string

Hello,

I would like to have a widget that gets moved to a couple content panes. And with in each content view, I would like it to look different. I dont mean just css difference, but actual html to be different. So is it possible to have multiple template strings that can I can choose which one to parse in a certain content pane.

thanks,
Ahmet

JSON in an HTML template

Hello,

I would like to achieve something like this:
var Membre = some object;
and in the body of my HTML file:
Hello, Mr ${Membre.FirstName} ${Membre.LastName}

Basically, I'm fetching my data using an ajax call without any problem, but then, I don't know how to display them. I looked at widgets but this doesn't seem like the right solution... If somebody can help me on this...

Thank you.

Parent / Child relationship with Widget's templates.

Hi,

I've tried to understand how to include a child template into a parent template (perhaps it can't be possible). I will try to explain my problem.

I have a Widget A called WidA

file : mywidget/WidA.js

dojo.provide("mywidget.WidA");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");

dojo.declare("mywidget.WidA", [dijit._Widget,dijit._Templated], {

    templateString: "",
    templatePath: dojo.moduleUrl("mywidget.","templates/WidA.html"),

    constructor: function() {
    },

    postCreate: function() {
    }
});

Feedback on widget template bindings à la Coherent library?

I bumped into this interesting article Properties and Bindings on Coherent js library pages. The magic in it has a certain appeal on it, so I thought that it'd be nice to take advantage of the technique in Dijit-widgets as well. The idea here is that setting a new value for a widget property is automatically reflected on the UI. The target template nodes are marked with textKeyPath-attribute, and the attribute value is the name of the widget property we want to listen to.

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

img tag breaking widget templates

I just came across a strange thing when creating a custom Dijit; I put an img tag first in the template, and when I instantiate the Dijit, the image does show, but nothing else does.

I get nothing else at all in the body tag, except the img. An no errors from firebug.
When I commented out the img tag (which was correct and I tried to /> close it and use close just for kicks. No deal), the rest of the template showed up.

Has anyone seen that before? I'm using freshly baked 1.1.0.

Cheers,
PS

Extend dijit.Dialog with template content using arguments

OK, so far I am 0/3 for responses by anybody else but myself for any of my questions posted on this forum (to be fair, I answered - and replied to - one of my questions before anybody else had a chance to respond, but still...!) but I am stuck once again, so maybe somebody out there might be able to help me?

I am trying to do something that seems like it should be exceedingly simple - extend the dijit.Dialog widget with some additional variables and load those variables, programmatically defined, in the popup using a template.

Here is my template:

Is there any way to create a dijjit which uses existing dijits in the HTML template?

Well, the title says it all, I guess. I've been searching for this for a couple of days now, and the most probably answer is 'no', from what I've gleaned reading the source to various dijits.

I would very much like to abstract out a number of things, which I would like to collect under 'one roof' as a compund dijit. I have a fairly complex shopping cart with trees, a music player (yes!), a myriad checkout options, et.c. It would be so neat to be able to just have one div on the page, to hide everything else.

Syndicate content