voyent
Help with icefaces and FCKeditor  XML
Forum Index -> General Help
Author Message
balavenky


Joined: 04/Apr/2008 00:00:00
Messages: 37
Offline


Hi,
I am developing a JSF UI app with Icefaces and I would like to use FCKeditor as a text editor. Basically, my requirement goes like this:

(i) User can open multiple tabs(one for each business item) and each tab should have a rich text editor.
(ii) User can switch between tabs and enter different text in those editors (rich text).
(iii) I have to store these text to that corresponding bean in that tab.

I created a small javascript config.js :

FCKConfig.ToolbarSets['myapp'] = [['Bold','Italic','Underline','Subscript','Superscript'], ['FontName', 'FontSize']];
FCKConfig.FontNames = 'Arial;Helvetica;Courier;Times';
FCKConfig.EnterMode = 'br' ;
FCKConfig.FontSizes = '4;5;6;7;8;9;10;11;12;13;14;16;18;20;22;24;26;32;48;72' ;
FCKConfig.DefaultFontLabel = 'Arial' ;
FCKConfig.DefaultFontSizeLabel = '8' ;


there is no 'Save' button in that above script, I need 'Save' button outside this editor, because those business items contain other attributes like rules, format etc.



My jspx page has:

....
<ice:inputRichText toolbar="myapp" name="#{_bean.node.uniqueTag}" customConfigPath="js/config.js" value="#{_bean.node.data}" partialSubmit="true" height="400" width="500" valueChangeListener="#_bean.node.effectChangeListener}" style="width:500px;height:400px;overflow: auto;" />
....



When I use different tabs, all the tabs are showing the same text as the last tab, Is that because I am sharing same 'myapp' toolbar???. How do I create different one for different pages? and How do I read that content and set that in the page bean when 'Save' button in that tab is clicked???

I tried to create different editor inside the page like:

var fckEditor = new FCKeditor('#{_bean.node.uniqueTag}') ;
fckEditor.BasePath = "./fckeditor/" ;
fckEditor.CheckBrowser = true ;
fckEditor.DisplayErrors = false ;
fckEditor.Width = "500" ;
fckEditor.Height = "400" ;
fckEditor.ToolbarSet = "myapp" ;
fckEditor.Config["CustomConfigurationsPath"] = 'js/config.js' ;



But that did not help either (I do not know how to tell the icefaces to use this editor)

and.. do you guys know anything about
[Parameters] Parameters: Invalid chunk ignored ????


Thanks for your help.
georges.goebel@pch.etat.l


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


Hi,

Do you use the tag : inputRichText

Code:
  <ice:inputRichText id="iceInpRchTxt"
                            height="275"
                            width="600"
                            toolbar="#{inputRichTextBean.toolbarMode}"
                            value="#{inputRichTextBean.value}"
                            language="en"
                            skin="silver"
                            />
 


Or do you try to embed the 'FCKEditor' yourself ?

Georges
[Email]
balavenky


Joined: 04/Apr/2008 00:00:00
Messages: 37
Offline


yes.. I used <ice:inputRichText> tag. Please look at my first message in this list. I also have a separate config.js file to configure the look/feel of the rich text editor (like fonts, bold, italic styles).
georges.goebel@pch.etat.l


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


Hi,

Previously, I did not read carfully you post.

In deed there is a problem when you use more fck editors in didderent panes or even on the same page.
I had a small test app which I modified as small example which illustrates the problem.

There are 3 tabs :
- tab 1 and tab 3 store the value in the attribute fck1 of a managed bean
- tab 2 stores the value in attribute fck2 of the same bean.

Now you modifiy the text in tab1 and store it. Everything works fine. The outputtext at the bottom of the page is even updated.
Now you click on the tab 3 and you see the correct value which is the one stored in tab 1.
In tab 3 i modify the value and save it. The output text does not render and when clicking back to tab 1, the correct value is not shown !!!

When you go to tab 2 and try to modify the data, nothing happens!

So there must be some bugs in that component.

Georges

PS: I attach the demo application.
 Filename iceTest.war [Disk] Download
 Description tested with jboss 4.2
 Filesize 3358 Kbytes
 Downloaded:  173 time(s)

[Email]
balavenky


Joined: 04/Apr/2008 00:00:00
Messages: 37
Offline


georges.goebel@pch.etat.l wrote:
Hi,

Do you use the tag : inputRichText

Code:
  <ice:inputRichText id="iceInpRchTxt"
                            height="275"
                            width="600"
                            toolbar="#{inputRichTextBean.toolbarMode}"
                            value="#{inputRichTextBean.value}"
                            language="en"
                            skin="silver"
                            />
 


Or do you try to embed the 'FCKEditor' yourself ?

Georges 



How do you embed FCKEditor?? (diff editor for diff tabs)

adnan.durrani


Joined: 19/Jan/2006 00:00:00
Messages: 437
Offline


Hi,

More than one instance of inputRichText on the same page is not currently supported.

http://www.icefaces.org/JForum/posts/list/9713.page

Thanks,

-- Adnan Durrani --
[Email]
georges.goebel@pch.etat.l


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


To bad :-(

Hopefully in a future version

Georges
[Email]
man910

Joined: 11/May/2007 00:00:00
Messages: 31
Offline


Does this apply to Ajax apps where I really only have one screen? E.g., I have an email application where on the left side there is a list of emails. When I click on it, the Rich Text Editor is displayed with its contents. Then I click on another item, the Rich Text Editor is displayed with that email's contents. So, it's a new "page" but there is no refresh of the entire screen. Each email is a separate bean.

Anyway, I'm having this issue. The funny thing though is if I don't click on the Save button, the contents change correctly. As soon as I click on the Save button and go to another item, the previous contents gets displayed. For debugging purposes, I output the bean's contents with <ice:outputText> and it shows the correct contents. So there's definitely a problem with the FCKeditor not picking up the bean's value after the Save button is clicked. Or is this not supported?

adnan.durrani wrote:
Hi,

More than one instance of inputRichText on the same page is not currently supported.

http://www.icefaces.org/JForum/posts/list/9713.page

Thanks, 
man910

Joined: 11/May/2007 00:00:00
Messages: 31
Offline


I upgraded from 1.7.1 to 1.7.2-SP1 and that problem has been resolved. The one thing I noticed is that when I initially go to a screen with the FCKeditor, the entire page refreshes. Is this by design?
Griet

Joined: 17/Jun/2009 00:00:00
Messages: 2
Offline


Hi,

i have a problem with panelTabSet and FCKEditor : I add the editor to one of my tabs (tab1), the other tabs (tab2 & tab3) are empty. So i only use one instance of the editor.

The first time the editor shows like it should, then i switch to tab2 and go back to tab1 and the editor doesn't render properly anymore. All i see is a white textarea. I have to hit F5 to get it back to normal.

This sounds like a rendering problem, has anyone had the same issue before?

Greetz,

Griet
express

Joined: 18/Feb/2009 00:00:00
Messages: 31
Offline


I have practical the same problem.

I'm also using a few panelTabSets, in one of this tabsets i have the editor.

When I go to this tab for the first time, everything goes well, I go to another tab, still no problems. The problem starts when I go back to the tab with the editor, only the textarea appears and the editor buttons are gone.

Is there anyone who has had similar problems and have solved these?

Greetz,
Kevin
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team