Thanks for the kick response! I'm using FCKeditor 2.6.4 with fckeditor-java-core-2.4.1.jar! And, yes! I want to make a customized implementation! I want to be able to read files from a JCR repository, depending on the request parameter!
Anwsering your questions:
1) Yes, I want to pass another parameter! But thinking again, current folder could work just fine for me! just need to dinamically change it and to pass it to the servlet (the folder=currentFolder I want to look for). But don't know how I can change it!
2) Default config is sort of working... when checking it again and after deleting some properties, I'm seeing that the connector is not taking in care connector.userActionImpl (i delete it) property as he does not give an error message (as explained in documentation), but still, he enters my servlet and returns me the XML response!
3)I'm doing it a step by step but still the same problem! I'm gonna try to override the properties in the init method of the servlet!
Your goal is probably not achievable with 2.4.1 since it can serve from the current context only! Please checkout 2.5-SNAPSHOT from trunk and build binaries and site. It provides all the features you need to implement your custom Connector. This version will ease your development tremendously.
Make sure, you see appropriate log outputs of interface initializations.
Actually I have the connector, the user action, and the user path builder working! But still cant pass a parameter from jsp to the user path builder or to the connector for the correct construction of the folder path where to look for!
As I read around in other posts... <c:url value="/scripts/fckeditor/editor/filemanager/browser/default/browser.html" var="browserUrl" /> <c:url value="/scripts/fckeditor/editor/filemanager/connectors" var="connectorUrl" /> <fck:editor instanceName="text" > <jsp:attribute name="value"></jsp:attribute> <jsp:body> <fck:config DefaultLanguage="pt" AutoDetectLanguage="false" ImageBrowserURL="${browserUrl}?Type=Image&folderPath=/something&Connector=${connectorUrl}"/> </jsp:body> </fck:editor>
Where the FF URL tab shows: ..../scripts/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&folderPath=/something&Connector=/scripts/fckeditor/editor/filemanager/connectors
Again, request.getParameter("folderPath") at UserPathBuilder keeps giving-me null The only parametes passed are Type, uuid, Command and CurrentFolder! As I told you I could work just fine with CurrentFolder parameter! But dont know were to change it!
Thanks in advance Rico
PS: Is this snapshot ready for production enviornments?
I'm glad you got it almost working. I remember that I have posted a solution for passing additional parameter. Anyway, I will investigate that later this day and will repost. Keep tight!
As far as I am concerned, the code is feature-complete. I tested it on Tomcat, Jetty and GlassFish von Windows XP SP2+3 and Ubuntu 8.04 LTS: Worked without a flaw. The reason it takes me so long to push the first beta, is that I am still working on a reasonable documenation for beginners.
First of all, you can always call ThreadLocalData.getContext().getCurrentFolderStr(). Did you try that?
Beside the above mentioned, I just checked the JS sources, you cannot pass an arbitrary startup CurrentFolder, it will always default to "/". It would be necessary to patch the file browser code. (IIRC, someone else was asking for this too). But you can piggyback other parameters to the connector, which is really wicked. Be aware that this parameter is always as-is as long as the file browser ist open.
Here is me again! Could not pass more then one parameter in the query string! As you said, I would be able to pass more than one parameter, but i'm not achiving it! Again, if not asking to much, could you confirm?
If I had to the end of the URL connector my param... all works great! like
/connectors?MyParam=MyValue
Then if I put one more parameter with
/connectors?MyParam=MyValue&oneMoreParam=true
the new one is not passed as a get parameter (firebug tested)!
Tired of debugging.... getting my parameters from parsing the string assigned with request.getHeader("referer")!
Which works if you want to pass only one param. If you want to pass more than one, you have to escape the url with URLEncoder#encode(String, String) to:
Re: UserPathBuilder and UserAction seems not working.....
provide first the versions you are using.
As far as I understood your problem, you want to provide some custom implementation.
Here are my questions first:
Especially without 2 and 3 it makes really hard to help remotely.
Mike
Re: UserPathBuilder and UserAction seems not working.....
Thanks for the kick response!
I'm using FCKeditor 2.6.4 with fckeditor-java-core-2.4.1.jar!
And, yes! I want to make a customized implementation! I want to be able to read files from a JCR repository, depending on the request parameter!
Anwsering your questions:
1) Yes, I want to pass another parameter! But thinking again, current folder could work just fine for me! just need to dinamically change it and to pass it to the servlet (the folder=currentFolder I want to look for). But don't know how I can change it!
2) Default config is sort of working... when checking it again and after deleting some properties, I'm seeing that the connector is not taking in care connector.userActionImpl (i delete it) property as he does not give an error message (as explained in documentation), but still, he enters my servlet and returns me the XML response!
3)I'm doing it a step by step but still the same problem! I'm gonna try to override the properties in the init method of the servlet!
Any others advices?
Many Thanks
Re: UserPathBuilder and UserAction seems not working.....
Your goal is probably not achievable with 2.4.1 since it can serve from the current context only! Please checkout 2.5-SNAPSHOT from trunk and build binaries and site. It provides all the features you need to implement your custom Connector. This version will ease your development tremendously.
Make sure, you see appropriate log outputs of interface initializations.
Mike
Re: UserPathBuilder and UserAction seems not working.....
For sure I will give it a try!
Reply you back soon!
Again, many thanks,
Rico
Re: UserPathBuilder and UserAction seems not working.....
Actually I have the connector, the user action, and the user path builder working!
But still cant pass a parameter from jsp to the user path builder or to the connector for the correct construction of the folder path where to look for!
As I read around in other posts...
<c:url value="/scripts/fckeditor/editor/filemanager/browser/default/browser.html" var="browserUrl" />
<c:url value="/scripts/fckeditor/editor/filemanager/connectors" var="connectorUrl" />
<fck:editor instanceName="text" >
<jsp:attribute name="value"></jsp:attribute>
<jsp:body>
<fck:config DefaultLanguage="pt" AutoDetectLanguage="false"
ImageBrowserURL="${browserUrl}?Type=Image&folderPath=/something&Connector=${connectorUrl}"/>
</jsp:body>
</fck:editor>
Where the FF URL tab shows:
..../scripts/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&folderPath=/something&Connector=/scripts/fckeditor/editor/filemanager/connectors
Again, request.getParameter("folderPath") at UserPathBuilder keeps giving-me null
The only parametes passed are Type, uuid, Command and CurrentFolder!
As I told you I could work just fine with CurrentFolder parameter! But dont know were to change it!
Thanks in advance
Rico
PS: Is this snapshot ready for production enviornments?
Re: UserPathBuilder and UserAction seems not working.....
I'm glad you got it almost working. I remember that I have posted a solution for passing additional parameter. Anyway, I will investigate that later this day and will repost. Keep tight!
As far as I am concerned, the code is feature-complete. I tested it on Tomcat, Jetty and GlassFish von Windows XP SP2+3 and Ubuntu 8.04 LTS: Worked without a flaw. The reason it takes me so long to push the first beta, is that I am still working on a reasonable documenation for beginners.
Re: UserPathBuilder and UserAction seems not working.....
Re: UserPathBuilder and UserAction seems not working.....
...ImageBrowserURL="${browserUrl}?Type=Image&CurrentFolder=/something&Connector=${connectorUrl}"/>
Re: UserPathBuilder and UserAction seems not working.....
Beside the above mentioned, I just checked the JS sources, you cannot pass an arbitrary startup CurrentFolder, it will always default to "/". It would be necessary to patch the file browser code. (IIRC, someone else was asking for this too).
But you can piggyback other parameters to the connector, which is really wicked. Be aware that this parameter is always as-is as long as the file browser ist open.
Firebug shows MyParam as a GET param.
Mike
Re: UserPathBuilder and UserAction seems not working.....
http://www.fckeditor.net/forums/viewtopic.php?f=6&t=11290&hilit=+rewrite
Re: UserPathBuilder and UserAction seems not working.....
Here is me again! Could not pass more then one parameter in the query string!
As you said, I would be able to pass more than one parameter, but i'm not achiving it! Again, if not asking to much, could you confirm?
If I had to the end of the URL connector my param... all works great! like
Then if I put one more parameter with the new one is not passed as a get parameter (firebug tested)!
Tired of debugging.... getting my parameters from parsing the string assigned with request.getHeader("referer")!
Thanks!
Re: UserPathBuilder and UserAction seems not working.....
Why the heck are you using the referer header? User request#getParameter!
Re: UserPathBuilder and UserAction seems not working.....
Thanks Mike!
I was tired of unsuccessfull retries of request.getParameter! So for moving on, I'm getting them from the referer header!
Well... manage to fetch my resources from JCR respository and show them properlly in the dialog and also in editor!
Thanks
Re: UserPathBuilder and UserAction seems not working.....
I have finally managed to run it. All params are now passed as expected!
Right now we have passed:
Which works if you want to pass only one param. If you want to pass more than one, you have to escape the url with URLEncoder#encode(String, String) to:
See the subtle difference.
It was a tricky one but took only 20 min to solve. You should really investigate longer. Firebug is your close friend. I did all with it.
Mike
Re: UserPathBuilder and UserAction seems not working.....
Re: UserPathBuilder and UserAction seems not working.....
http://dev.fckeditor.net/changeset/3503
Re: UserPathBuilder and UserAction seems not working.....
Ticket #3521!