Login Register

widget

Good Example of offline widget customization

[editor: moving to the appropriate forum…]

Hi everyone,

I am looking for more information on how to customize the offline widget. I would like to use different icons, text, etc. I have found some articles that briefly cover it however it does not seem to work.

Removing a widget instance

Hi

I have created a widget that contains a dijit.Dialog. I instantiate it programmatically ‘new myWidget( {}, dojo.byId("someDiv");’. The problem is that next time I want to instantiate a new instants of my widget, there is already one instance in the domtree at dojo.byId("someDiv") and it fails. So how do I remove the old instance of myWidget and all it children?

Using template values in 'style' attribute

I have the following template:

<div dojoType="dijit.Declaration" widgetClass="FontDemo" defaults="{value: ''}">
        <div class="font designChoice">
                <span class="font-demo" style="font-family: ${value};">Font: ${value}</span>
        </div>
</div>

And this widget instantiation:

<div dojoType="FontDemo" value="Times New Roman"></div>

Now, I would believe that this would print "Font: Times New Roman", and that the text would be styled in the actual Times New Roman font, right?

Are there facilities to calculate domNode overlaps in dijit?

Hi,

I am wondering if dijit (or dojo.DnD) includes functions to help laying out widgets (or general DOM elements) so it is possible to prevent overlap between 2 giving nodes?
My use case is that when a dialog pops up, it overlaps some content that I want to be visible when the dialog is up. So, I have to manually specify the location to the dialog. But it gets messy very quickly.

Double onclick handler call with Dojo 1.2 and custom widget

I'm posting this only after much Googling and searching of Dojo forums for a solution to my problem. I re-implementing a prototype web application using Dojo. (The prototype uses no JavaScript framework.) I'm a Dojo noob.

This problem surfaced when I upgraded to Dojo 1.2.0 from Dojo 1.1.1.

Problem description: for custom widgets utilizing ondijitclick, I'm getting double onclick handler invocations with Dojo 1.2 only. The key events (keyup and keydown for space and enter, respectively) work correctly in all cases.

Resizing Pager

I would like to place dojox.widget.Pager within a flexible width container.
Seems like it would make sense to add a resize event handler that would
reinitialize the Pager.

However, it's not clear to me how to reinitialize the widget. So far my
attempts have resulted in throwing an error "Tried to register widget with
id==dojoxMenu1-item-1 but that id is already registered!"

How should I be approaching this?

-Jason

Widget multiple inheritance

I have a dijit.form.SimpleTextarea widget which i would like to extend with a behavior of my custom seminar.URLValidation widget (seminar.URLValidation extends dijit.form.TextBox) to create a seminar.seminarNonblankTextarea widget. Is there a way, other than copy pasting all of the code? My idea was this

dojo.provide("seminar.seminarNonblankTextarea");
dojo.require("dijit.form.SimpleTextarea");
dojo.require("seminar.nonblankValidate");

dojo.declare("seminar.seminarNonblankTextarea", dijit.form.SimpleTextarea, seminar.nonblankValidate,{ 
});

Any widget for shape stroke width change?

To be more specific, I'd like something similar to the "Line Width" in this link:
http://www.xdraw.org/xdhTest.html

That is the third icon in the second row. When you click "Line width" icon, a drop down line width(in line images, instead of numbers) will appear.

A dijit.ColorPalette() is already available for changing colors in Dijit. I wonder if similar things for stroke width changes available in Dijit too.

Dynamically generating tooltip widgets

Hello, I am trying to dynamically generate a set of tooltip widgets, and I'm not sure why the tooltip isn't showing up. I know the tooltip won't work in firefox, but I have gotten it to work standalone in ie, safari, and opera. Right now each circle being drawn doesn't show the tooltip, I'm not sure if the variables that I am drawing aren't working or what. Here is a link to the code: http://pastebin.com/f7e8e5ab6

Creating my own widget

Hello all,

I am a new user to dojo (and dijit).

I am trying to make a validation textbox that if needed could validate with the server. I have two questions about it:

1. I want to use the standard error handling so everyting stays multilingual. How do I use the validate.js 's. For example in validation textbox there is a reference to $_unset_$, how does dijit know this is the invalidmessage in validate.js. Also how should I create my own errormessages of this kind.

Syndicate content