Re: Wicket wicket-contrib-tinymce populate Styles drop-down

2010-07-09 Thread Peter Miklosko
I'm sort of dubious about your suggestion as I don't see any direct connection 
between this DropDownChoice and TinyMCE editor from wicket-contrib-tinymce.
Would you care to explain little more about integration?

Peter






From: Pedro Santos pedros...@gmail.com
To: users@wicket.apache.org
Sent: Thu, July 8, 2010 5:09:08 PM
Subject: Re: Wicket wicket-contrib-tinymce populate Styles drop-down

Hi, you can use an  DropDownChoice  to present the available styles for your
app, and allow user to select one.
Example:

public class StyleSelect extends DropDownChoice {
public StyleSelect(String id, List options) {
super(id, options);
setModel(new IModel() {
public Object getObject() {
return getSession().getStyle();
}

public void setObject(Object object) {
getSession().setStyle(object == null ? null : object.toString());
}

public void detach() {}
});
}
@Override
protected boolean wantOnSelectionChangedNotifications() {
return true;
}
}

On Thu, Jul 8, 2010 at 11:53 AM, Peter Miklosko peter_b...@yahoo.comwrote:

 Can somebody please help me populate drop down menu for Styles?
 Customer  decided to use this option and I have difficulties to figure out
 how
 to  do it.
 Even in the wicket-contrib-tinymce examples this is not active.

 Peter








-- 
Pedro Henrique Oliveira dos Santos



  

SV: Wicket wicket-contrib-tinymce populate Styles drop-down

2010-07-09 Thread Wilhelmsen Tor Iver
 I'm sort of dubious about your suggestion as I don't see any direct
 connection
 between this DropDownChoice and TinyMCE editor from wicket-contrib-
 tinymce.

I think Pedro misunderstood you and therefore posted code for changing the 
Wicket style which is something else.

- Tor Iver

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket wicket-contrib-tinymce populate Styles drop-down

2010-07-09 Thread Pedro Santos
Hi, I misunderstood your question. I was think you are asking about session
style.

On Fri, Jul 9, 2010 at 5:30 AM, Peter Miklosko peter_b...@yahoo.com wrote:

 I'm sort of dubious about your suggestion as I don't see any direct
 connection
 between this DropDownChoice and TinyMCE editor from wicket-contrib-tinymce.
 Would you care to explain little more about integration?

 Peter





 
 From: Pedro Santos pedros...@gmail.com
 To: users@wicket.apache.org
 Sent: Thu, July 8, 2010 5:09:08 PM
 Subject: Re: Wicket wicket-contrib-tinymce populate Styles drop-down

 Hi, you can use an  DropDownChoice  to present the available styles for
 your
 app, and allow user to select one.
 Example:

 public class StyleSelect extends DropDownChoice {
public StyleSelect(String id, List options) {
super(id, options);
setModel(new IModel() {
public Object getObject() {
return getSession().getStyle();
}

public void setObject(Object object) {
getSession().setStyle(object == null ? null : object.toString());
}

public void detach() {}
});
}
@Override
protected boolean wantOnSelectionChangedNotifications() {
return true;
}
 }

 On Thu, Jul 8, 2010 at 11:53 AM, Peter Miklosko peter_b...@yahoo.com
 wrote:

  Can somebody please help me populate drop down menu for Styles?
  Customer  decided to use this option and I have difficulties to figure
 out
  how
  to  do it.
  Even in the wicket-contrib-tinymce examples this is not active.
 
  Peter
 
 
 
 




 --
 Pedro Henrique Oliveira dos Santos








-- 
Pedro Henrique Oliveira dos Santos


Re: Wicket wicket-contrib-tinymce populate Styles drop-down

2010-07-09 Thread sander v F
I think you could do that like this:

TinyMCESettings settings = new TinyMCESettings();
settings.register(new Plugin(style_formats)
{
@Override
protected void definePluginSettings(StringBuffer buffer)
{
define(buffer, style_formats, [
+ {title : 'Bold text', inline : 'b'},
+ {title : 'Red text', inline : 'span', styles : {color : '#ff'}},
+ {title : 'Red header', block : 'h1', styles : {color : '#ff'}},
+ {title : 'Example 1', inline : 'span', classes : 'example1'},
+ {title : 'Example 2', inline : 'span', classes : 'example2'},
+ {title : 'Table styles'},
+ {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
+ ]);
}
});

Also see:
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/style_formats
http://tinymce.moxiecode.com/examples/example_24.php


2010/7/9 Pedro Santos pedros...@gmail.com

 Hi, I misunderstood your question. I was think you are asking about session
 style.

 On Fri, Jul 9, 2010 at 5:30 AM, Peter Miklosko peter_b...@yahoo.com
 wrote:

  I'm sort of dubious about your suggestion as I don't see any direct
  connection
  between this DropDownChoice and TinyMCE editor from
 wicket-contrib-tinymce.
  Would you care to explain little more about integration?
 
  Peter
 
 
 
 
 
  
  From: Pedro Santos pedros...@gmail.com
  To: users@wicket.apache.org
  Sent: Thu, July 8, 2010 5:09:08 PM
  Subject: Re: Wicket wicket-contrib-tinymce populate Styles drop-down
 
  Hi, you can use an  DropDownChoice  to present the available styles for
  your
  app, and allow user to select one.
  Example:
 
  public class StyleSelect extends DropDownChoice {
 public StyleSelect(String id, List options) {
 super(id, options);
 setModel(new IModel() {
 public Object getObject() {
 return getSession().getStyle();
 }
 
 public void setObject(Object object) {
 getSession().setStyle(object == null ? null : object.toString());
 }
 
 public void detach() {}
 });
 }
 @Override
 protected boolean wantOnSelectionChangedNotifications() {
 return true;
 }
  }
 
  On Thu, Jul 8, 2010 at 11:53 AM, Peter Miklosko peter_b...@yahoo.com
  wrote:
 
   Can somebody please help me populate drop down menu for Styles?
   Customer  decided to use this option and I have difficulties to figure
  out
   how
   to  do it.
   Even in the wicket-contrib-tinymce examples this is not active.
  
   Peter
  
  
  
  
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 
 
 
 
 



 --
 Pedro Henrique Oliveira dos Santos



Re: Wicket wicket-contrib-tinymce populate Styles drop-down

2010-07-09 Thread Peter Miklosko
I got following error from it

ERROR - Objects- Error serializing object class 
com.admin.item.EditItemPage [object=[Page class = com.admin.item.EditItemPage, 
id = 4, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
Unable to serialize class: com.util.TinymceUtil
Field hierarchy is:
  4 [class=com.admin.item.EditItemPage, path=4]
private java.lang.Object org.apache.wicket.MarkupContainer.children 
[class=[Ljava.lang.Object;]
  java.lang.Object org.apache.wicket.Component.data[9] 
[class=com.admin.item.panel.EditPanel, path=4:editPanel]
private java.lang.Object org.apache.wicket.MarkupContainer.children 
[class=[Ljava.lang.Object;]
  private java.lang.Object 
org.apache.wicket.markup.html.form.FormComponent.validators[2] 
[class=org.apache.wicket.markup.html.form.TextArea, 
path=4:editPanel:item_editor]
java.lang.Object org.apache.wicket.Component.data 
[class=[Ljava.lang.Object;]
  java.lang.Object org.apache.wicket.Component.data[0][1] 
[class=wicket.contrib.tinymce.TinyMceBehavior]
private wicket.contrib.tinymce.settings.TinyMCESettings 
wicket.contrib.tinymce.TinyMceBehavior.settings 
[class=wicket.contrib.tinymce.settings.TinyMCESettings]
  private java.util.Set 
wicket.contrib.tinymce.settings.TinyMCESettings.plugins 
[class=org.apache.commons.collections.set.ListOrderedSet]
protected final java.util.List 
org.apache.commons.collections.set.ListOrderedSet.setOrder 
[class=java.util.ArrayList]
  private java.lang.String 
wicket.contrib.tinymce.settings.Plugin.pluginPath[write:2][write:3] 
[class=com.util.TinymceUtil$1]
final com.util.TinymceUtil 
com.util.TinymceUtil$1.this$0 
[class=com.util.TinymceUtil] - field that is not serializable





From: sander v F sandervanfaas...@gmail.com
To: users@wicket.apache.org
Sent: Fri, July 9, 2010 12:39:29 PM
Subject: Re: Wicket wicket-contrib-tinymce populate Styles drop-down

I think you could do that like this:

TinyMCESettings settings = new TinyMCESettings();
settings.register(new Plugin(style_formats)
{
@Override
protected void definePluginSettings(StringBuffer buffer)
{
define(buffer, style_formats, [
+ {title : 'Bold text', inline : 'b'},
+ {title : 'Red text', inline : 'span', styles : {color : '#ff'}},
+ {title : 'Red header', block : 'h1', styles : {color : '#ff'}},
+ {title : 'Example 1', inline : 'span', classes : 'example1'},
+ {title : 'Example 2', inline : 'span', classes : 'example2'},
+ {title : 'Table styles'},
+ {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
+ ]);
}
});

Also see:
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/style_formats
http://tinymce.moxiecode.com/examples/example_24.php


2010/7/9 Pedro Santos pedros...@gmail.com

 Hi, I misunderstood your question. I was think you are asking about session
 style.

 On Fri, Jul 9, 2010 at 5:30 AM, Peter Miklosko peter_b...@yahoo.com
 wrote:

  I'm sort of dubious about your suggestion as I don't see any direct
  connection
  between this DropDownChoice and TinyMCE editor from
 wicket-contrib-tinymce.
  Would you care to explain little more about integration?
 
  Peter
 
 
 
 
 
  
  From: Pedro Santos pedros...@gmail.com
  To: users@wicket.apache.org
  Sent: Thu, July 8, 2010 5:09:08 PM
  Subject: Re: Wicket wicket-contrib-tinymce populate Styles drop-down
 
  Hi, you can use an  DropDownChoice  to present the available styles for
  your
  app, and allow user to select one.
  Example:
 
  public class StyleSelect extends DropDownChoice {
 public StyleSelect(String id, List options) {
 super(id, options);
 setModel(new IModel() {
 public Object getObject() {
 return getSession().getStyle();
 }
 
 public void setObject(Object object) {
 getSession().setStyle(object == null ? null : object.toString());
 }
 
 public void detach() {}
 });
 }
 @Override
 protected boolean wantOnSelectionChangedNotifications() {
 return true;
 }
  }
 
  On Thu, Jul 8, 2010 at 11:53 AM, Peter Miklosko peter_b...@yahoo.com
  wrote:
 
   Can somebody please help me populate drop down menu for Styles?
   Customer  decided to use this option and I have difficulties to figure
  out
   how
   to  do it.
   Even in the wicket-contrib-tinymce examples this is not active.
  
   Peter
  
  
  
  
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 
 
 
 
 



 --
 Pedro Henrique Oliveira dos Santos




  

Wicket wicket-contrib-tinymce populate Styles drop-down

2010-07-08 Thread Peter Miklosko
Can somebody please help me populate drop down menu for Styles?
Customer  decided to use this option and I have difficulties to figure out how 
to  do it.
Even in the wicket-contrib-tinymce examples this is not active.

Peter