You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Werner Punz <we...@gmx.at> on 2006/02/07 01:12:54 UTC

MyFaces DOJO foundation now in place

Hi everyone, good news...

The basic DOJO component foundation now is in place (more to follow), I 
added a tools class for importing the dojo stuff within the component
code and a helper dojoInitializer component to the sandbox. With these 
constructs you now can import the dojo codebase in a sane controlled 
manner to the pages (the dojoinitializer should help for programming)

the usage for the initializer is:

<s:dojoInitializer require="dojo.fx.*"/>

for a dojo style import

<s:dojoInitializer debug="true"/>

for adding debugging etc... the rest of the flags is more or less a 
mirror of the djconfig datastructure from dojo and can be found within 
the tld descriptors.

so if anyone wants to start to hack and try out dojo, you now can start 
within a jsf context.

(a sample with mixed dojo, html jsf code can be found in the dojo subdir 
of the sandbox examples (ripped and altered straight from the dojo 
examples))

Just if anyone is interesting in hacking with DOJO...


Re: MyFaces DOJO foundation now in place

Posted by Werner Punz <we...@gmx.at>.
M Litherland schrieb:
> Nice work, Werner.  I guess this makes the tags I was working on for the 
> Dojo Editor kind of useless.  I will warn you that the Editor widget has 
> some flaws with rendering which are particularly evident on a page with 
> TabbedPanes.  On Firefox you cannot edit the document and on IE the 
> button bar doesn't show up, though the controls work.  For this reason 
> I've switched to TinyMCE in my own projects (though I was still working 
> on Dojo for the Tomahawk tags).  The Dojo folks are aware of the issues 
> with the Editor widget, but I'm not sure their timeline for addressing 
> it.  I will say that even with these limitations the Dojo editor beats 
> the Kupu implementation, and personally I think the documentation should 
> be updated to encourage folks to use this trick instead of the inputHtml 
> tag.
> 
Yes, the editor is awesome, as for the bugs, one of the reasons why I am 
doing this is that we do not have to take care about the javascript 
bugfixing ourselves anymore (which is a huge pain given the state of 
javascript on cross browser implementations itself).

As for TinyMCE I would love to integrate it but the license prohibits it.

Anyway feel free to use the Dojo stuff, the base only will change 
slightly anymore (some minor adjustments and enhancements, and fixes, I 
probably did some stuff wrong given my non experience with it)
the next step then will be the integration of it in actual jsf 
components, not over the styleClass way.


Thanks for the warning though ;-)

> Another word of warning for the Dojo code - their tab implementation has 
> issues when nesting multiple tab panels.  That being said, it is spiffy 
> looking and works well with simple pages.
> 
Well there for sure are many issues in that lib, but overall it beats 
anything else out there so far, and has lots of momentum (the huge 
developer base is one of the most important criterion for me, also that 
there seems to be industry support gathering behind it, and the last 
aspect was that it tries to be non intrusive and very extensive).


Re: MyFaces DOJO foundation now in place

Posted by M Litherland <mi...@thot.us>.
Nice work, Werner.  I guess this makes the tags I was working on for the 
Dojo Editor kind of useless.  I will warn you that the Editor widget has 
some flaws with rendering which are particularly evident on a page with 
TabbedPanes.  On Firefox you cannot edit the document and on IE the 
button bar doesn't show up, though the controls work.  For this reason 
I've switched to TinyMCE in my own projects (though I was still working 
on Dojo for the Tomahawk tags).  The Dojo folks are aware of the issues 
with the Editor widget, but I'm not sure their timeline for addressing 
it.  I will say that even with these limitations the Dojo editor beats 
the Kupu implementation, and personally I think the documentation should 
be updated to encourage folks to use this trick instead of the inputHtml 
tag.

Another word of warning for the Dojo code - their tab implementation has 
issues when nesting multiple tab panels.  That being said, it is spiffy 
looking and works well with simple pages.

Thanks,
Mike

Werner Punz wrote:

>Just to give you guys an example of the power of this lib:
>Following code enables a full blown rich text edit control:
>
><s:dojoInitializer require="dojo.widget.Editor"/>	
><h:form>
>	<h:inputTextarea id="editarea" styleClass="dojo-Editor" value="hello
>world"/>					
>	<h:commandLink action="submitted" id="submitted" value="[Submit]"/>
></h:form>
>(the example can already be found in the sandbox examples under the dojo
>dir)
>
>
>The initializer api will not be changed too much the only things I can
>think of is to move the generated require code from the head to the body
>and to add additional properties (for component building there is an
>outject namespace mechanism as well which yet has to be integrated)
>
>Werner
>  
>

Re: MyFaces DOJO foundation now in place

Posted by Werner Punz <we...@gmx.at>.
Just to give you guys an example of the power of this lib:
Following code enables a full blown rich text edit control:

<s:dojoInitializer require="dojo.widget.Editor"/>	
<h:form>
	<h:inputTextarea id="editarea" styleClass="dojo-Editor" value="hello
world"/>					
	<h:commandLink action="submitted" id="submitted" value="[Submit]"/>
</h:form>
(the example can already be found in the sandbox examples under the dojo
dir)


The initializer api will not be changed too much the only things I can
think of is to move the generated require code from the head to the body
and to add additional properties (for component building there is an
outject namespace mechanism as well which yet has to be integrated)

Werner


Werner Punz schrieb:
> Hi everyone, good news...
> 
> The basic DOJO component foundation now is in place (more to follow), I
> added a tools class for importing the dojo stuff within the component
> code and a helper dojoInitializer component to the sandbox. With these
> constructs you now can import the dojo codebase in a sane controlled
> manner to the pages (the dojoinitializer should help for programming)
> 
> the usage for the initializer is:
> 
> <s:dojoInitializer require="dojo.fx.*"/>
> 
> for a dojo style import
> 
> <s:dojoInitializer debug="true"/>
> 
> for adding debugging etc... the rest of the flags is more or less a
> mirror of the djconfig datastructure from dojo and can be found within
> the tld descriptors.
> 
> so if anyone wants to start to hack and try out dojo, you now can start
> within a jsf context.
> 
> (a sample with mixed dojo, html jsf code can be found in the dojo subdir
> of the sandbox examples (ripped and altered straight from the dojo
> examples))
> 
> Just if anyone is interesting in hacking with DOJO...
> 
>