users@jsf-extensions.java.net

Re: Dojo 0.9.0 and JSF

From: Scott <jackett_dad_at_yahoo.com>
Date: Thu, 11 Oct 2007 17:22:49 -0700 (PDT)

Noah, That is exactly the problem. It's working great now. Thanks! Scott ----- Original Message ---- From: noah <iamnoah@gmail.com> To: users@jsf-extensions.dev.java.net Sent: Thursday, October 11, 2007 8:18:40 PM Subject: Re: Dojo 0.9.0 and JSF Add <f:view contentType="text/html"> around your template. Firefox ignores the non-standard attributes dojo uses when it gets served xhtml, which is the default for Facelets. On 10/11/07, Scott <jackett_dad@yahoo.com> wrote: > > All, > > I am trying to get a tree control to display on a page. I am using > Facelets, along with JSF 1.2, so my extension is .xhtml. > > The same exact page, that I will show below, if viewed as HTML, loads and > displays a tree. I view it as xhtml (thus having it processed by JSF and > the facelets view handler), the control will not render. I just get a blank > screen. > > I'm hoping someone here on this list has tried to do something similar and > can tell me what I need to do. Here is the page: > > > <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> > <head> > <title>Sample Tree Control</title> > <link rel="stylesheet" > href="/js/dojo-0.9.0/dijit/themes/tundra/tundra.css" > type="text/css"/> > <link rel="stylesheet" href="/js/dojo-0.9.0/dojo/resources/dojo.css" > type="text/css"/> > <script type="text/javascript" src="/js/dojo-0.9.0/dojo/dojo.js" > djConfig="parseOnLoad: true, isDebug: true"> > </script> > <script type="text/javascript"> > dojo.require( "dojo.data.ItemFileWriteStore" ); > dojo.require( "dijit.Tree" ); > </script> > </head> > <body class="tundra"> > <div dojoType="dojo.data.ItemFileWriteStore" jsId="mailStore" > url="mail/mail.json"></div> > <div dojoType="dijit.Tree" id="mailTree" store="mailStore" labelAttr="label" > childrenAttr="folders" query="{type:'folder'}"> > </div> > </body> > </html> > > > And here is the json data found in mail.json (which I know is being found > and loaded). > > { > identifier: 'id', > label: 'label', > items: [ > // Hierarchy of folders > { type: 'folder', id: 'mailbox', label:'Mail Folders', folders: [ > { type: 'folder', id: 'inbox', label:'Inbox', icon:'mailIconFolderInbox' > }, > { type: 'folder', id: 'deleted', label:'Trash Can', > icon:'mailIconTrashcanFull' }, > { type: 'folder', id: 'save', label:'Save', folders:[ > { id: 'work', label:'stuff for work'}, > { id: 'fun', label:'stuff for fun'} > ]} > ]} > ] > } > > Again, the same page not preprocessed by JSF and facelets displays a tree. > What is going on? > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@jsf-extensions.dev.java.net For additional commands, e-mail: users-help@jsf-extensions.dev.java.net