Skip to main content

Widget documentation

3 replies [Last post]
peppertech
Offline
Joined: 2006-05-12

What is the best place to look for info on what can be placed in the various arguments for each widget and with what syntax?

Specifcally, I am looking a the dojo Accordian and want to know how to add more then one item in each panel. Or if I can enter HTML tags in that panel as well.

Would the dojotoolkit.org site be the best place to start?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31

Widget documentation is built into most of the widgets in a file called widget.json. Right now this file is loaded by netbeans when you context click on the widget and the documentation for each argument the widget can take and overall documentation is provided.

We understand not everyone will use Netbeans so we plan to have a tool/script read the files and create HTML documentation.

https://ajax.dev.java.net/issues/show_bug.cgi?id=72

The Dojo Accordion does have documentation in a widget.json file but the documentation on each attribute is not there. Use the value of the accordion to specify the content using the 'content' property or 'url' to point to a file containing the content.

value="{'rows':[
{'label':'Books','content':'Book'},
{'label':'Magazines','content':'Magazines here'}]}"/>

The Accordion with one row pointing to a url for the contents.

value="{'rows':[
{'label':'Books','content':'Book'},
{'label':'Magazines','url':'row2.jsp'}]}"/>

Where row2.jsp is located in the same directory as the targ declaration.

I plan to update the API to allow you to specify URLs containing widgets as the panels. Right now it only supports basic HTML or static content. I plan to change this for the next weekly update.

peppertech
Offline
Joined: 2006-05-12

Thanks,

I appreciate the info. The one thing I can't seem to figure out though, is how to add more then one item under "content".

No matter what syntax I try, the widget just fails to render without any errors.

I'm specifically looking for something that would help with 'second item' and 'third item' below....

value="{'rows':[
{'label':'Scripting','content':'PHP','second item', 'third item'},
{'label':'Other Stuff','content':'blah'}]}

peppertech
Offline
Joined: 2006-05-12

ok, I believe I have this figured out now.

The content:'string' part is just one long HTML input string.

Sorry for the stupid questions. I should have just taken longer to beat on it. ;-)