There is some fix, where you preload(use a headercontributer) the
tinymce script on the page where the ajaxtabbedPanel are.. Last time I
did this where for 1.3...

2009/3/25 Daniel Ferreira Castro <[email protected]>:
> I solved the problem.
> The problem was due a incompatibility of TinyMCE with AjaxTabbedPanel.
> After I change it to TabbedPanel it worked.
>
>
> On Tue, Mar 24, 2009 at 6:19 PM, Daniel Ferreira Castro
> <[email protected]>wrote:
>
>> I am still trying to make tinymce work on my project.  But I only get a
>> simple text area.
>> So I start to look for dependencies that could be missing.
>>
>> I downloaded the TinyMCE from here - http://tinymce.moxiecode.com/
>> Unzipped and imported every artificat to my project.
>>
>> Added all the resources, javascripts and css, present on the examples on my
>> Panel
>>
>>
>> add(JavascriptPackageResource.getHeaderContribution(CadastroNewsletterPanel.class,
>>         "./javascript/tiny_mce.js"));
>>
>> add(JavascriptPackageResource.getHeaderContribution(CadastroNewsletterPanel.class,
>>         "./javascript/lists/template_list.js"));
>>
>> add(JavascriptPackageResource.getHeaderContribution(CadastroNewsletterPanel.class,
>>         "./javascript/lists/link_list.js"));
>>
>> add(JavascriptPackageResource.getHeaderContribution(CadastroNewsletterPanel.class,
>>         "./javascript/lists/image_list.js"));
>>
>> add(JavascriptPackageResource.getHeaderContribution(CadastroNewsletterPanel.class,
>>         "./javascript/lists/media_list.js"));
>>
>> add(CSSPackageResource.getHeaderContribution(CadastroNewsletterPanel.class,
>>         "./css/content.css"));
>>
>> Cleaned the project
>> Built the Project
>> Restarted the jetty and launched the application.
>>
>> Nothing happened.
>> Please, could anyone help me?
>>
>>
>> On Fri, Mar 13, 2009 at 7:32 PM, Daniel Ferreira Castro <
>> [email protected]> wrote:
>>
>>> Great :) Thanks :)
>>> The Exception stopped from ocurring, but I still have the problem of only
>>> showing a TextArea without the look of an WYSWYG edit text area.
>>> I looked inside
>>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/tinymce-parent/tinymce-examples/src/main/java/wicket/contrib/examples/tinymce/and
>>>  subdirs but did not find any war file that I could look inside for how
>>> the markup html is written.  I did as the example showed, but did not have
>>> success.
>>>
>>>
>>> If anyone can help me...
>>>
>>> This is my implementation
>>>
>>> -----------------------------------------------
>>> NewsletterForm.java
>>> -----------------------------------------------
>>>
>>> package com.jasp.ecommfwk.pages.newsleter.forms;
>>>
>>> import org.apache.wicket.ajax.AjaxRequestTarget;
>>> import org.apache.wicket.ajax.markup.html.form.AjaxButton;
>>> import org.apache.wicket.markup.html.basic.Label;
>>> import org.apache.wicket.markup.html.form.Form;
>>> import org.apache.wicket.markup.html.form.TextArea;
>>> import org.apache.wicket.markup.html.panel.FeedbackPanel;
>>> import org.apache.wicket.model.Model;
>>> import org.apache.wicket.model.StringResourceModel;
>>>
>>> import wicket.contrib.tinymce.TinyMceBehavior;
>>> import wicket.contrib.tinymce.settings.ContextMenuPlugin;
>>> import wicket.contrib.tinymce.settings.DateTimePlugin;
>>> import wicket.contrib.tinymce.settings.DirectionalityPlugin;
>>> import wicket.contrib.tinymce.settings.EmotionsPlugin;
>>> import wicket.contrib.tinymce.settings.FullScreenPlugin;
>>> import wicket.contrib.tinymce.settings.IESpellPlugin;
>>> import wicket.contrib.tinymce.settings.MediaPlugin;
>>> import wicket.contrib.tinymce.settings.PastePlugin;
>>> import wicket.contrib.tinymce.settings.PreviewPlugin;
>>> import wicket.contrib.tinymce.settings.PrintPlugin;
>>> import wicket.contrib.tinymce.settings.SavePlugin;
>>> import wicket.contrib.tinymce.settings.SearchReplacePlugin;
>>> import wicket.contrib.tinymce.settings.SpellCheckPlugin;
>>> import wicket.contrib.tinymce.settings.TablePlugin;
>>> import wicket.contrib.tinymce.settings.TinyMCESettings;
>>>
>>> import com.jasp.ecommfwk.pages.forms.BaseForm;
>>> import com.jasp.persistence.admin.Newsletter;
>>>
>>> public class NewsletterForm extends BaseForm {
>>>     private static final String TEXT = "<p><img src=\"logo.jpg\" alt=\" \"
>>> hspace=\"5\" vspace=\"5\" width=\"250\" height=\"48\" align=\"right\" />"
>>>         + "TinyMCE is a platform independent web based Javascript HTML
>>> <strong>WYSIWYG</strong> editor control released as Open Source under LGPL
>>> by Moxiecode Systems AB. "
>>>         + "It has the ability to convert HTML TEXTAREA fields or other
>>> HTML elements to editor instances. TinyMCE is very easy to integrate into
>>> other Content Management Systems.</p>"
>>>         + "<p>We recommend <a href=\"http://www.getfirefox.com\";
>>> target=\"_blank\">Firefox</a> and <a href=\"http://www.google.com\";
>>> target=\"_blank\">Google</a> <br /></p>";
>>>
>>>     private static final long serialVersionUID = 2335975457449309765L;
>>>     private final StringResourceModel labelNewsletterValue = new
>>> StringResourceModel(
>>>             "news.newsletter", this, null, new Object[] { getLocale() });
>>>
>>>     private Label labelNews;
>>>
>>>     private TextArea <String>newsLetterContent;
>>>     private AjaxButton cadastrar;
>>>     private FeedbackPanel feedbackPanel;
>>>     private Newsletter newsletter = new Newsletter();
>>>     private TinyMCESettings settings;
>>>
>>>     private ContextMenuPlugin contextMenuPlugin;
>>>     public NewsletterForm(String id) {
>>>         super(id);
>>>         inicializaComponentesForm();
>>>         AddComponentToForm();
>>>         // TODO Auto-generated constructor stub
>>>     }
>>>
>>>     @Override
>>>     protected void AddComponentToForm() {
>>>         this.add(labelNews);
>>>         this.add(cadastrar);
>>>         this.add(newsLetterContent);
>>>         this.add(feedbackPanel);
>>>     }
>>>
>>>     @Override
>>>     protected void inicializaComponentesForm() {
>>>         labelNews = new Label("labelNews", labelNewsletterValue);
>>>
>>>         settings = new TinyMCESettings(TinyMCESettings.Theme.advanced);
>>>         contextMenuPlugin = new ContextMenuPlugin();
>>>         settings.register(contextMenuPlugin);
>>>
>>>         // first toolbar
>>>         SavePlugin savePlugin = new SavePlugin();
>>>         settings.add(savePlugin.getSaveButton(),
>>> TinyMCESettings.Toolbar.first, TinyMCESettings.Position.before);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.newdocument,
>>> TinyMCESettings.Toolbar.first, TinyMCESettings.Position.before);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.separator,
>>> TinyMCESettings.Toolbar.first, TinyMCESettings.Position.before);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.fontselect,
>>> TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);
>>>
>>> settings.add(wicket.contrib.tinymce.settings.Button.fontsizeselect,
>>> TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after);
>>>
>>>         // second toolbar
>>>         PastePlugin pastePlugin = new PastePlugin();
>>>         SearchReplacePlugin searchReplacePlugin = new
>>> SearchReplacePlugin();
>>>         DateTimePlugin dateTimePlugin = new DateTimePlugin();
>>>         dateTimePlugin.setDateFormat("Date: %m-%d-%Y");
>>>         dateTimePlugin.setTimeFormat("Time: %H:%M");
>>>         PreviewPlugin previewPlugin = new PreviewPlugin();
>>>         settings.add(wicket.contrib.tinymce.settings.Button.cut,
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.copy,
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
>>>         settings.add(pastePlugin.getPasteButton(),
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
>>>         settings.add(pastePlugin.getPasteTextButton(),
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
>>>         settings.add(pastePlugin.getPasteWordButton(),
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.separator,
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
>>>         settings.add(searchReplacePlugin.getSearchButton(),
>>> TinyMCESettings.Toolbar.second,
>>>                 TinyMCESettings.Position.before);
>>>         settings.add(searchReplacePlugin.getReplaceButton(),
>>> TinyMCESettings.Toolbar.second,
>>>                 TinyMCESettings.Position.before);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.separator,
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.before);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.separator,
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
>>>         settings.add(dateTimePlugin.getDateButton(),
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
>>>         settings.add(dateTimePlugin.getTimeButton(),
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.separator,
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
>>>         settings.add(previewPlugin.getPreviewButton(),
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.separator,
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.forecolor,
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.backcolor,
>>> TinyMCESettings.Toolbar.second, TinyMCESettings.Position.after);
>>>
>>>         // third toolbar
>>>         TablePlugin tablePlugin = new TablePlugin();
>>>         EmotionsPlugin emotionsPlugin = new EmotionsPlugin();
>>>         IESpellPlugin iespellPlugin = new IESpellPlugin();
>>>         MediaPlugin mediaPlugin = new MediaPlugin();
>>>         PrintPlugin printPlugin = new PrintPlugin();
>>>         FullScreenPlugin fullScreenPlugin = new FullScreenPlugin();
>>>         DirectionalityPlugin directionalityPlugin = new
>>> DirectionalityPlugin();
>>>         settings.add(tablePlugin.getTableControls(),
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.before);
>>>         settings.add(emotionsPlugin.getEmotionsButton(),
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
>>>         settings.add(iespellPlugin.getIespellButton(),
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
>>>         settings.add(mediaPlugin.getMediaButton(),
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.separator,
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
>>>         settings.add(printPlugin.getPrintButton(),
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.separator,
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
>>>         settings.add(directionalityPlugin.getLtrButton(),
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
>>>         settings.add(directionalityPlugin.getRtlButton(),
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
>>>         settings.add(wicket.contrib.tinymce.settings.Button.separator,
>>> TinyMCESettings.Toolbar.third, TinyMCESettings.Position.after);
>>>         settings.add(fullScreenPlugin.getFullscreenButton(),
>>> TinyMCESettings.Toolbar.third,
>>>                 TinyMCESettings.Position.after);
>>>
>>>         // fourth toolbar
>>>         SpellCheckPlugin spellCheckPlugin = new SpellCheckPlugin();
>>>         settings.add(spellCheckPlugin.getSpellCheckButton(),
>>> TinyMCESettings.Toolbar.fourth,TinyMCESettings.Position.after);
>>>
>>>         // other settings
>>>         settings.setToolbarAlign(TinyMCESettings.Align.left);
>>>         settings.setToolbarLocation(TinyMCESettings.Location.top);
>>>         settings.setStatusbarLocation(TinyMCESettings.Location.bottom);
>>>         settings.setResizing(false);
>>>
>>>         newsLetterContent = new TextArea<String>("ta",new Model(TEXT));
>>>         newsLetterContent.add(new TinyMceBehavior(settings));
>>>         feedbackPanel = criaFeedbackPanel();
>>>         cadastrar = new AjaxButton("cadastrar", this) {
>>>             private static final long serialVersionUID =
>>> 6045168066074475539L;
>>>
>>>             @Override
>>>             protected void onError(AjaxRequestTarget target, Form<?> form)
>>> {
>>>                 // repaint the feedback panel so errors are shown
>>>                 target.addComponent(feedbackPanel);
>>>             }
>>>
>>>             @Override
>>>             protected void onSubmit(AjaxRequestTarget target, Form<?>
>>> form) {
>>>                 getHibernateTransaction();
>>>                 newsletter.setNewsletter(newsLetterContent.getValue());
>>>                 hibernateSession.persist(newsletter);
>>>                 hibernateTransaction.commit();
>>>                 closeTransaction();
>>>                 String mensageSucesso = "Newsletter cadastradada com
>>> sucesso!";
>>>                 info(mensageSucesso);
>>>                 target.addComponent(feedbackPanel);
>>>             }
>>>         };
>>>
>>>     }
>>>
>>>     private FeedbackPanel criaFeedbackPanel() {
>>>         FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");
>>>         feedbackPanel.setOutputMarkupId(true);
>>>         return feedbackPanel;
>>>     }
>>>
>>> }
>>> -----------------------------------------------
>>> And this is my markup
>>> CadastroNewsletterPanel.html
>>> -----------------------------------------------
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <html xmlns="http://www.w3.org/1999/xhtml";>
>>> <wicket:head>
>>>     <title wicket:id="pageTitle">[Titulo]</title>
>>> </wicket:head>
>>> <wicket:panel>
>>>     <div class="cssbox_head">
>>>     <h2><label wicket:id="cabecalho">[cabecalho]</label></h2>
>>>     </div>
>>>     <form wicket:id="newsForm" name="newsForm">
>>>         <label wicket:id="labelNews" class="labelForms">[name
>>> label]</label><br/>
>>>         <textarea wicket:id="ta" id="ta" name="ta" rows="30" style="width:
>>> 80%">test texarea</textarea><br />
>>>         <input wicket:id="cadastrar" name="Cadastrar" type="submit"
>>> value="Cadastrar" class="buttons" /><br />
>>>         <div wicket:id="feedback" class="feedback"></div>
>>>     </form>
>>> </wicket:panel>
>>> </html>
>>>
>>> -----------------------------------------------
>>> CadastroNewsletterPanel.java
>>> -----------------------------------------------
>>>
>>> package com.jasp.ecommfwk.pages.newsleter;
>>>
>>> import org.apache.wicket.markup.html.basic.Label;
>>> import org.apache.wicket.markup.html.panel.Panel;
>>> import org.apache.wicket.model.StringResourceModel;
>>>
>>> import com.jasp.ecommfwk.pages.newsleter.forms.NewsletterForm;
>>>
>>> public class CadastroNewsletterPanel extends Panel {
>>>     private static final long serialVersionUID = 4682446014181156016L;
>>>     private final StringResourceModel labelTitle = new
>>> StringResourceModel(
>>>             "panel.title", this, null, new Object[] { getLocale() });
>>>     private final StringResourceModel labelHeader = new
>>> StringResourceModel(
>>>             "panel.header", this, null, new Object[] { getLocale() });
>>>
>>>     @SuppressWarnings("deprecation")
>>>     protected void addHeaders() {
>>>         add(new Label("pageTitle", labelTitle));
>>>         add(new Label("cabecalho", labelHeader));
>>>     }
>>>
>>>     public CadastroNewsletterPanel(String id) {
>>>         super(id);
>>>         addHeaders();
>>>         final NewsletterForm categoriaForm = new
>>> NewsletterForm("newsForm");
>>>         add(categoriaForm);
>>>
>>>     }
>>> }
>>>
>>>
>>> On Fri, Mar 6, 2009 at 8:30 AM, rolandpeng <[email protected]> wrote:
>>>
>>>>
>>>> I use wicket 1.4-rc2 and meet the same problem.
>>>>
>>>> you can download jazzy.jar here to solve the exception.
>>>> http://sourceforge.net/projects/jazzy/
>>>>
>>>> then all the program works.
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/WYSIWYG-component-tp22214000p22369491.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>
>>>
>>> --
>>> "Two rules to succeed in life:
>>> 1 - don´t tell people everything you know."
>>> --------
>>> We shall go on to the end.
>>> We shall fight in France
>>> We shall fightover the seas and oceans.
>>> We shall fight with growing confidence and growing strength in the air.
>>> We shall defend our island whatever the cost may be
>>> We shall fight on beaches, we shall fight on the landing grounds,
>>> We shall fight in the fields and in the streets,
>>> We shall fight on the hills.
>>> We shall never surrender.
>>> Winston Churchill
>>>
>>
>>
>>
>> --
>> "Two rules to succeed in life:
>> 1 - don´t tell people everything you know."
>> --------
>> We shall go on to the end.
>> We shall fight in France
>> We shall fightover the seas and oceans.
>> We shall fight with growing confidence and growing strength in the air.
>> We shall defend our island whatever the cost may be
>> We shall fight on beaches, we shall fight on the landing grounds,
>> We shall fight in the fields and in the streets,
>> We shall fight on the hills.
>> We shall never surrender.
>> Winston Churchill
>>
>
>
>
> --
> "Two rules to succeed in life:
> 1 - don´t tell people everything you know."
> --------
> We shall go on to the end.
> We shall fight in France
> We shall fightover the seas and oceans.
> We shall fight with growing confidence and growing strength in the air.
> We shall defend our island whatever the cost may be
> We shall fight on beaches, we shall fight on the landing grounds,
> We shall fight in the fields and in the streets,
> We shall fight on the hills.
> We shall never surrender.
> Winston Churchill
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to