Product Logos BridgeIt Services Banner
Spinner and Fisheye of DojoToolkit  XML
Forum Index -> Components
Author Message
georges.goebel@pch.etat.l


Joined: 23/Jun/2007 00:00:00
Messages: 276
Offline


Hi,

I needed a spinner component in a J2EE application done with Icefaces. Due to the lack of such a component in Icefaces, I tried to integrate the dojotoolkit JS library (www.dojotoolkit.org) in icefaces (only facelet !!).

The spinner works fine (also with partialsubmit) in my application (Icefaces). I also integrated the fisheye component (http://dojotoolkit.org/demos/fisheye-demo) but did not extensivly tested the component.

The JS files and additional resources are downloaded by the client through an additionnal servlet (like icefaces)

You can check the code and report errors or do suggestions. My intention was not to replace exsting icefaces components with the dojo (or dijit) components but extend the icefaces library with additionnal more (spinner) or less (fisheye) usefull (existing) components.

The jar file is for developpment and not (yet) for production use.

Georges Goebel

Feel free to comment.

usage in a sample facelet :
Code:
         <ice:form partialSubmit="true">
 
             <pch:spinner id="mySpinner" value="#{spinBean.spinValue}" begin="1" end="500"/>
 
 
             <br/>
             <ice:outputLabel value="test : #{spinBean.spinValue}"/>
 
             <br/>
             <br/>
             <pch:spinner id="bubuSpinner22" value="#{spinBean.spinValue2}" partialSubmit="false" begin="1" end="500"/>
             <br/>
             <ice:outputLabel value="test : #{spinBean.spinValue2}"/>
 
             
             <pch:fisheye attachEdge="center" conservativeTrigger="false" effectUnits="2" itemHeight="40" itemMaxHeight="150" itemMaxWidth="150" itemPadding="2" itemWidth="40" labelEdge="bottom" orientation="horizontal">
                 <pch:fisheyeitem icon="http://localhost:8080/customIce/icon_browser.png" action="#{fishEyeBean.action}" label="item1"/>
                 <pch:fisheyeitem icon="http://localhost:8080/customIce/678031.jpg" action="#{fishEyeBean.action2}" label="item2"/>
                 <pch:fisheyeitem icon="http://localhost:8080/customIce/icon_email.png" action="#{fishEyeBean.action3}" label="item3"/>
             </pch:fisheye>
         </ice:form>
 


configuration in web.xml :

Code:
     <servlet>
         <servlet-name>Dojo Servlet</servlet-name>
         <servlet-class>lu.etat.pch.icefaces.DojoServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
     </servlet>
 
     <servlet-mapping>
         <servlet-name>Dojo Servlet</servlet-name>
         <url-pattern>/iceDojo/*</url-pattern>
     </servlet-mapping>
 


 Filename iceDojo.jar [Disk] Download
 Description The jar file you must copy to the icefaces jars
 Filesize 3010 Kbytes
 Downloaded:  463 time(s)

 Filename web.xml [Disk] Download
 Description The web.xml config file
 Filesize 4 Kbytes
 Downloaded:  513 time(s)

[Email]
tchoesang

Joined: 21/May/2008 00:00:00
Messages: 10
Offline


Hi George,

I am trying to integrate a java script tree component (http://www.dhtmlx.com/docs/products/dhtmlxTree/) in an iceface project. I found your post the closest tutorial on how to do it.

I downloaded your project from this post and i tried to compile the code in eclipse 3.3 with tomcat 6.0.

The project layout in eclipse looks like this:

-[iceDojo]
+[.metadata]
+[.settings]
+[build]
-[iceDojo]
+[dijit]
+[dojo]
+[dojox]
+[util]
-[src]
-[lu]
-[etat]
-[pch]
-[icefaces]
.....class
.....class
-[WebContent]
+[META-INF]
-[WEB-INF]
[lib]
faces-config.xml
web.xml
index.xhtml

ps: i have attached a screenshot of the layout

I have the following questions to ask:

1. i am not able to insert in faces-config.xml the managed beans like fishEyeBean or spinBean. Is it because it doesnt see the source files??

2. I get a HTTP status 404 resource not found? I am using *.xhtml file and it is defined in the web.xml file as default file


Can you throw me any light and tell me where i am making mistakes.

regards,
choesang




[Thumb - icedojo.jpg]
 Filename icedojo.jpg [Disk] Download
 Description
 Filesize 26 Kbytes
 Downloaded:  436 time(s)

georges.goebel@pch.etat.l


Joined: 23/Jun/2007 00:00:00
Messages: 276
Offline


Hi,

If you already use Icefaces and you want to use a Tree component, why don't you just use the Tree component from Icefaces ?
It's very simple and does (IMO) the same thing than the DHX component. Or do you have any special constraint why you don't use the icefaces tree component ?

You can try and checkout the code example of the Icefaces Tree component from the component-showcase

http://component-showcase.icefaces.org/component-showcase/showcase.iface

Georges Goebel
[Email]
tchoesang

Joined: 21/May/2008 00:00:00
Messages: 10
Offline


Hi,

I know that Iceface provides the tree component but we have already implemented a set of functions with dhtmlxtree. Now we would like to have more flexibility in the future and would like to migrate on to Icefaces.

To check the feasibility of the migration on to Icefaces, i wanted to see how to make a custom component of the dhtmlxtree and to make a prototype using such a custom component.

thanks,
choesang
georges.goebel@pch.etat.l


Joined: 23/Jun/2007 00:00:00
Messages: 276
Offline


Hi,

The iceDojo.jar is infact the binary distribution and does not include the sources. You find some sources (only spinner) at the jira http://jira.icefaces.org/browse/ICE-1786

If you give me your email I can send you all the sources.

Georges
[Email]
tchoesang

Joined: 21/May/2008 00:00:00
Messages: 10
Offline


Hi;

here is my email add: tchoesang@gmail.com

thanks,
choesang
mdangelo

Joined: 10/Aug/2009 00:00:00
Messages: 1
Offline


Hi Georges,

I've been trying to run your example in order to test fisheye, but I'm new to icefaces and I get an error when I try to run it:

Code:
This page contains the following errors:
 
 error on line 24 at column 300: Namespace prefix pch on spinner is not defined
 error on line 32 at column 386: Namespace prefix pch on spinner is not defined
 error on line 37 at column 554: Namespace prefix pch on fisheye is not defined
 error on line 38 at column 648: EntityRef: expecting ';'


I'm assuming this may be because I have not defined the tag for it? As I said, I'm knew to icefaces and jsf so I'm not quite certain how to define this particular tag. Any help would be appreciated!

Thanks,

Mariana D'Angelo
michelle2

Joined: 14/Nov/2007 00:00:00
Messages: 449
Offline


Just a suggestion, I have started including the source in a src directory in the jar files I publish, it works rather well.

I expect to do a lot more custom components and like you we have started building them into seperate jars.

keeping the source with the jar is much more convinient than storing it somewhere else.

[Email]
grimholtz

Joined: 04/May/2009 00:00:00
Messages: 10
Offline


Anyone have the source for DojoServlet or know where I can get it?
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team