Hi,
I think I solved this one. The findings show that FCK editor java integration library could do little bit more descriptive errors... The SimleFckEditorConnector you supplied is a bit invalid. The method public List<Map<String, Object>> getFiles(ResourceType rt, String currentFolder) throws InvalidCurrentFolderException, ReadException returns list of map<String, Object>. where the String is net.fckeditor.connector.Connector.KEY_NAME or net.fckeditor.connector.Connector.KEY_SIZE and the Object is either the file name or file size. It should be like this: Map map = new HashMap(); map.put(Connector.KEY_NAME, "hct.log"); map.put(Connector.KEY_SIZE, new Integer(64)); List list = new ArrayList<Map<String, Object>>(); list.add(map); return list; I hope that this gets you going :) You can test the default implementation by NOT binging your connector, then easyfck will fall back to the default. Then allow all in SimpleFckEditorUserRightServiceImpl and you can upload and view images etc. - Ville Ps. Take a look at FCK editor default implementation for details if you whish to implement your own connector: http://dev.fckeditor.net/browser/FCKeditor.Java/tags/2.6/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java Tomek-28 wrote: > > easyfck ver. 1.0.4 > tapestry ver. 5.1.0.5 > > I also noticed that only when I add configuration to my textarea that uses > easyfckeditor, searvices like FckEditorUserRightService > FckEditorPathService > are initialized. > > This is my config for fckeditor > FCKConfig.ContextMenu = []; > FCKConfig.ToolbarSets["Default"] = [ > ['Image'] > ]; > > and tml > > <textarea t:type="easyfck/fckeditor" value="val" > configuration="customConf" > /> > <t:submit value="Submit" /> > > and Java class > @Persist > @Property > private String val; > > @Property > @Inject > @Path("context:fckeditor/fck.js") > private Asset2 customConf; > > I will send You my project shortly. > > Tomek > > > > > 2010/3/29 Ville Virtanen <ville.virta...@cerion.fi> > >> >> Hi, >> >> and sorry for spamming this many messages :) What is the tapestry 5 >> version? >> Only 5.1.0.5 is supported. Later I plan to continue to support 5.1 and >> 5.2 >> branches if there are some changes that require heavy changes, otherwise >> both are supported out of the box. >> >> So, I have not tested with the 5.0.x versions. >> >> - Ville >> >> >> Tomek-28 wrote: >> > >> > Hi, >> > >> > I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and >> Linux >> > >> > this is my implementation of FckEditorUserRightService >> > >> > public class SimpleFckEditorUserRightServiceImpl implements >> > FckEditorUserRightService { >> > >> > private final Logger logger; >> > >> > public SimpleFckEditorUserRightServiceImpl(Logger logger) { >> > this.logger = logger; >> > } >> > >> > @Override >> > public boolean canCreateFolders() { >> > logger.info("Allowed folder creation"); >> > return false; >> > >> > } >> > >> > @Override >> > public boolean canBrowseFiles() { >> > logger.info("Allowed file browsing"); >> > return true; >> > } >> > >> > @Override >> > public boolean canUploadFiles() { >> > logger.info("Allowed file upload"); >> > return false; >> > >> > } >> > } >> > >> > FckEditorPathService interface >> > >> > public class SimpleFckEditorPathServiceImpl implements >> > FckEditorPathService >> > { >> > >> > @Override >> > public String getServerPathForFiles() { >> > return "/wwwfiles"; >> > } >> > >> > @Override >> > public String getClientURLStartForFiles() { >> > return "C:\\logs\\wwwfiles\\"; >> > >> > } >> > >> > } >> > >> > pom.xml >> > >> > <!-- Run the application using "mvn jetty:run" --> >> > <plugin> >> > <groupId>org.mortbay.jetty</groupId> >> > <artifactId>maven-jetty-plugin</artifactId> >> > <version>6.1.9</version> >> > <configuration> >> > <!-- Log to the console. --> >> > <requestLog >> > implementation="org.mortbay.jetty.NCSARequestLog"> >> > <!-- This doesn't do anything for Jetty, but is >> a >> > workaround for a Maven bug >> > that prevents the requestLog >> from >> > being set. --> >> > <append>true</append> >> > </requestLog> >> > <contextHandlers> >> > <contextHandler >> > implementation="org.mortbay.jetty.handler.ContextHandler"> >> > <contextPath>/wwwfiles</contextPath> >> > >> <resourceBase>C:\logs\wwwfiles</resourceBase> >> > <handler >> > implementation="org.mortbay.jetty.handler.ResourceHandler"></handler> >> > </contextHandler> >> > </contextHandlers> >> > </configuration> >> > </plugin> >> > >> > and AppModule.java >> > >> > public static void bind(ServiceBinder binder) { >> > binder.bind(FckEditorUserRightService.class, >> > SimpleFckEditorUserRightServiceImpl.class); >> > binder.bind(FckEditorPathService.class, >> > SimpleFckEditorPathServiceImpl.class); >> > binder.bind(FckEditorConnector.class, >> > SimleFckEditorConnector.class); >> > } >> > >> > As You see I just copied the tutorial. >> > >> > >> > [INFO] Started Jetty Server >> > [INFO] connector.Dispatcher Connector initialized to >> > com.orientimport.easyfck.connector.FckEditorConnectorBridge >> > [DEBUG] AppModule.FckEditorConnector Creating service >> > 'FckEditorConnector'. >> > [WARN] TapestryModule.HttpServletRequestHandler Unable to add >> > 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as >> that >> > forms a dependency cycle ('StoreIntoGlobals' depends on itself via >> > 'FckEditorInterceptFilter'). The dependency has been ignored. >> > ..... >> > >> > >> > >> > [INFO] AppModule.TimingFilter Request time: 16 ms >> > 127.0.0.1 - - [29/mar/2010:08:03:44 +0000] "GET >> > >> /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default >> > HTTP/1.1" 304 0 "http://localhost:8080/paruszynska/pagecms" >> "Mozilla/5.0 >> > (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 >> Firefox/3.6.2 >> > (.NET CLR 3.5.30729)" >> > 127.0.0.1 - - [29/mar/2010:08:03:45 +0000] "GET >> > /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1" 200 >> > 1051 >> > " >> > >> http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditor&Toolbar=Default >> " >> > "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) >> Gecko/20100316 >> > Firefox/3.6.2 (.NET CLR 3.5.30729)" >> > [INFO] handlers.RequestCycleHandler UserAction initialized to >> > com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver >> > [INFO] handlers.RequestCycleHandler UserPathBuilder initialized to >> > com.orientimport.easyfck.resolvers.FckEditorPathResolver >> > [DEBUG] AppModule.FckEditorUserRightService Creating service >> > 'FckEditorUserRightService'. >> > [DEBUG] AppModule.FckEditorUserRightService Invoking constructor >> > >> pl.syso.paruszynska.services.SimpleFckEditorUserRightServiceImpl(Logger) >> > (at >> > SimpleFckEditorUserRightServiceImpl.java:18) via >> > pl.syso.paruszynska.services.AppModule.bind(Servi >> > ceBinder) (at AppModule.java:35). >> > [INFO] AppModule.FckEditorUserRightService Allowed file browsing >> > [DEBUG] AppModule.FckEditorPathService Creating service >> > 'FckEditorPathService'. >> > [DEBUG] AppModule.FckEditorPathService Invoking constructor >> > pl.syso.paruszynska. >> > services.SimpleFckEditorPathServiceImpl() (at >> > SimpleFckEditorPathServiceImpl.java:14) via >> > pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at >> > AppModule.java:35). >> > [DEBUG] AppModule.FckEditorConnector Invoking constructor >> > pl.syso.paruszynska.services.SimleFckEditorConnector() (at >> > SimleFckEditorConnector.java:27) via >> > pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at >> > AppModule.java:35). >> > CONSTRUCTOR SimleFckEditorConnector >> > >> > Current folder: / >> > 2010-03-29 10:05:08.975::WARN: >> > >> /paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/fckeditor >> > java.lang.RuntimeException: java.lang.NullPointerException >> > at >> > >> net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.service(Tapestry5InterceptFckActivityFilter.java:78) >> > at >> > >> $HttpServletRequestHandler_127a8f1ac51.service($HttpServletRequestHandler_127a8f1ac51.java) >> > at >> > >> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) >> > at >> > >> $HttpServletRequestHandler_127a8f1ac51.service($HttpServletRequestHandler_127a8f1ac51.java) >> > at >> > >> $HttpServletRequestHandler_127a8f1ac4a.service($HttpServletRequestHandler_127a8f1ac4a.java) >> > at >> > org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) >> > >> > at >> > >> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) >> > at >> > >> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) >> > at >> > >> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> > at >> > >> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) >> > at >> > >> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) >> > at >> > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) >> > >> > at >> > >> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) >> > at >> > >> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) >> > at >> > >> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> > at org.mortbay.jetty.Server.handle(Server.java:324) >> > at >> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) >> > at >> > >> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828) >> > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) >> > at >> > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) >> > at >> > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) >> > at >> > >> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) >> > at >> > >> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) >> > Caused by: java.lang.NullPointerException >> > at >> > net.fckeditor.response.GetResponse.setFiles(GetResponse.java:236) >> > at >> > >> net.fckeditor.connector.Dispatcher.getFoldersAndOrFiles(Dispatcher.java:216) >> > at >> net.fckeditor.connector.Dispatcher.doGet(Dispatcher.java:166) >> > at >> > >> net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.service(Tapestry5InterceptFckActivityFilter.java:76) >> > ... 22 more >> > 127.0.0.1 - - [29/mar/2010:08:05:08 +0000] "GET >> > >> /paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/fckeditor?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F&uuid=1269849907986 >> > HTTP/1.1" 500 6094 " >> > >> http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=fckeditor >> " >> > "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) >> Gecko/20100316 >> > Firefox/3.6.2 (.NET CLR 3.5.30729)" >> > >> > >> > >> > When i press 'Browse Server' in 'Image Properties window i get this >> > message: >> > The server didn't reply with a proper XML data. Please check your >> > configuration. >> > >> > I think the problem is that i always get Current Folder as a / (ROOT >> > folder). I found in source code of easyfckeditor that i can put >> > configuration.add(FckEditorConstants.APPLICATION_CONTEXT, "/wwwfiles"); >> > to change it but it does nothing good to my app. >> > >> > >> > >> > Tomek >> > >> > >> > >> > >> > >> > 2010/3/28 Ville Virtanen <ville.virta...@cerion.fi> >> > >> >> >> >> Hi, >> >> >> >> can you attach the stack trace for further analysis? Also what servlet >> >> container are you using to run software? >> >> >> >> -Ville >> >> >> >> Tomek-28 wrote: >> >> > >> >> > Hi, >> >> > >> >> > i need to integrate a WYSIWYG editor to my website. I found only 2 >> >> > projects >> >> > that integrate fckeditor with tapestry 5 - ChenilleKit and >> >> easyfckeditor. >> >> > I >> >> > found that easyfckeditor support file uploads while ChenilleKit >> >> doesn't. >> >> I >> >> > went through author's tutorial: >> >> > http://t5-easy-fckeditor.kenai.com/FileUploads.html >> >> > but after implementing and binding FckEditorUserRightService class: >> >> > >> >> > binder.bind(FckEditorUserRightService.class, >> >> > SimpleFckEditorUserRightServiceImpl.class); >> >> > >> >> > I can't browse any files. I got a message: >> >> > "*Invalid current folder specified*" >> >> > >> >> > Implementing and binding FckEditorPathService.class: >> >> > >> >> > binder.bind(FckEditorPathService.class, >> >> > SimpleFckEditorPathServiceImpl.class); >> >> > >> >> > does nothing - the same message. I even tried to make my own >> connector >> >> but >> >> > I >> >> > get NullPointerException all the time. >> >> > Has anyone used easyfckeditor? Or maybe there is another way to have >> >> > WYSIWYG >> >> > editor and file upload support? >> >> > >> >> > >> >> > Tomek >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> >> http://old.nabble.com/easyfckeditor-and-file-upload-tp28055044p28058075.html >> >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://old.nabble.com/easyfckeditor-and-file-upload-tp28055044p28067556.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > -- View this message in context: http://old.nabble.com/easyfckeditor-and-file-upload-tp28055044p28068877.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org