Login Register

input

dojo.data.ItemFileReadStore and dijit.Form

I have to design a form layout. Whenever the HTML is loaded, the form has to show up and the values of the form should be values from a data store (ItemFileReadStore). I have struggled for two days and could not find any way out. Any solutions?

System info

Simple question, but stuck: dijit input field properties do not hold when in a loop.

Hi,

In the following code, my input field in my form repeats as I would like, however the input dojoType and it's properties do not hold after the first iteration. So for example if I have a input dojoType = dijit.form.NumberTextBox; that outputs 10 times in a loop. only the first form will hold certain properties like constraints and trim and the other 9 will appear/function as just normal input text fields. Anybody have any clue why this is??? Any help would be much appreciated.

<?php
$i=1;
while($i<10){

Textfields where property name contains an apostrophe

It seems that dojo has a hard time attaching a dijit to a textfield whose name property contains an apostrophe...

As I am using Struts2 (that relies on OGNL), a property backed by a Map might look like this:

<input type="text" name="countryName['en']" id="countryInEnglish" />

If I try to attach a dijit.form.ValidationTextBox to that node, dojo turns the name property into: ""

Is there a way of preserving the name of the property as I intend it?

(I tried escaping the apostrophe, to no avail.)

Componenet similar to invalid message in date input box

Hi,

Is there any way to use the "!" feature on any other input boxes? or even any component? I find this "invalid messqage" very useful that could appear as a help component.

Thanks.

Is it possible to have a narrow TextBox?

The design of one of our applications requires that a certain text box be only wide enough to display a few digits at a time (30px).

There's no problem actually setting the width to 30px but when a user types in the text box, they can only ever see one digit at a time. It seems the rest of the digits are being bumped out of view.

Disabling and enabling html input tag

Situation: The form submit button is at first disabled. Later, it needs to be enabled.

Problem: setAttribute doesn't work as intended.

Additional clarification: In theory, these two lines should work same:

document.addPage.akcija.disabled=false;
dojo.byId("akcija").setAttribute("disabled", false);

In practice, the first one works, the other doesn't. Here are console printouts:

document.addPage.akcija.disabled=false;

dijit.layout.ContentPane crops input

As you see on the linked picture (http://dev.swissunihockey.ch/dojo.png), dojo crops the value of the input "E-Mail". In the first second the page is loaded, everything is displayed - but after less than a second, it crops...

I use dojo 1.0.2.

Any ideas?

Simon

EDIT: this problem affects only FF (Mac & Win) and Safari (Mac, Win not tested). IE 7 works fine...

Drag & Drop - update the value of input elements

Hi,

i have some problems with dojo.dnd. I want to implement the Drag & Drop Funtion with JavaScript, so that the dnd items will be generated dynamicly and i can change the positions of them in the container. And now the problem:

when i include some input elements into the items, change the values and move the items, they wont be updated at the avatar. Why? Can someone help me?

Thanks

The Code

index.html

First Widget
 

Syndicate content