Re: [Quickstart 1.5.0] Why is my generated pom for new quickstart-project referencing 1.5-RC7?

2011-09-08 Thread Peter Miklosko
Guess they didn't had time to update it yet, or it slipped from TODO list ;)

On 8 September 2011 09:22, Mike Mander wicket-m...@gmx.de wrote:

 If i generate a quickstart project with 1.5.0 the generated pom references
 1.5-RC7.
 Is this correct or maybe an effect on my machine?

 command
 mvn archetype:generate -DarchetypeGroupId=org.apache.**wicket
 -DarchetypeArtifactId=wicket-**archetype-quickstart
 -DarchetypeVersion=1.5.0 -DgroupId=poc -DartifactId=theproject
 -DarchetypeRepository=https://**repository.apache.org/https://repository.apache.org/-DinteractiveMode=false

 generates
 project 
 xmlns=http://maven.apache.**org/POM/4.0.0http://maven.apache.org/POM/4.0.0
 xmlns:xsi=http://www.w3.org/**2001/XMLSchema-instancehttp://www.w3.org/2001/XMLSchema-instance
 

 xsi:schemaLocation=http://**maven.apache.org/POM/4.0.0http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-**v4_0_0.xsdhttp://maven.apache.org/maven-v4_0_0.xsd
 
 modelVersion4.0.0/**modelVersion
 groupIdpoc/groupId
 artifactIdtheproject/**artifactId
 packagingwar/packaging
 version0.0.1-SNAPSHOT/**version
 !-- TODO project name  --
 namequickstart/name
 description/description
 !--
TODO organization namecompany name/name urlcompany url/url
 /organization
--
 licenses
 license
 nameThe Apache Software License, Version 2.0/name
 urlhttp://www.apache.org/**licenses/LICENSE-2.0.txthttp://www.apache.org/licenses/LICENSE-2.0.txt
 /url
 distributionrepo/**distribution
 /license
 /licenses
 properties
 wicket.version1.5-RC7/**wicket.version
 jetty.version7.3.0.**v20110203/jetty.version
 /properties
 dependencies
 !--  WICKET DEPENDENCIES --
 dependency
 groupIdorg.apache.wicket/**groupId
 artifactIdwicket-core/**artifactId
 version${wicket.version}/**version
 /dependency
 !-- OPTIONAL DEPENDENCY
 dependency
 groupIdorg.apache.wicket/**groupId
 artifactIdwicket-extensions**/artifactId
 version${wicket.version}/**version
 /dependency
--

 !-- LOGGING DEPENDENCIES - LOG4J --
 dependency
 groupIdorg.slf4j/groupId
 artifactIdslf4j-log4j12/**artifactId
 version1.6.1/version
 /dependency
 dependency
 groupIdlog4j/groupId
 artifactIdlog4j/artifactId
 version1.2.16/version
 /dependency

 !--  JUNIT DEPENDENCY FOR TESTING --
 dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version4.8.1/version
 scopetest/scope
 /dependency

 !--  JETTY DEPENDENCIES FOR TESTING  --
 dependency
 groupIdorg.eclipse.jetty.**aggregate/groupId
 artifactIdjetty-all-server/**artifactId
 version${jetty.version}/**version
 scopeprovided/scope
 /dependency
 /dependencies
 build
 resources
 resource
 filteringfalse/filtering
 directorysrc/main/resources**/directory
 /resource
 resource
 filteringfalse/filtering
 directorysrc/main/java/**directory
 includes
 include**/include
 /includes
 excludes
 exclude**/*.java/exclude
 /excludes
 /resource
 /resources
 testResources
 testResource
 filteringfalse/filtering
 directorysrc/test/java/**directory
 includes
 include**/include
 /includes
 excludes
 exclude**/*.java/exclude
 /excludes
 /testResource
 /testResources
 plugins
 plugin
 inheritedtrue/inherited
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-compiler-**plugin/artifactId
 version2.3.2/version
 configuration
 source1.5/source
 target1.5/target
 optimizetrue/optimize
 debugtrue/debug
 /configuration
 /plugin
 plugin
 groupIdorg.mortbay.jetty/**groupId
 artifactIdjetty-maven-**plugin/artifactId
 version${jetty.version}/**version
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-eclipse-**plugin/artifactId
 version2.8/version
 configuration
 downloadSourcestrue/**downloadSources
 /configuration
 /plugin
 /plugins
 /build

 repositories
 repository
 idApache Nexus/id
 urlhttps://repository.**apache.org/content/**repositories/snapshots/https://repository.apache.org/content/repositories/snapshots/
 /url
 releases
 enabledfalse/enabled
 /releases
 snapshots
 enabledtrue/enabled
 /snapshots
 /repository
 /repositories

 /project

 Try to solve by
 eclipse restarted.
 mvn console command used.

 All the same results.

 Thanks
 Mike

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




Re: Safari hangs on ajax form submit

2011-08-03 Thread Peter Miklosko
Where did you see 1.4.18?
I do not see it on SVN https://svn.apache.org/repos/asf/wicket/branches/

Peter

On 2 August 2011 21:55, trodi t_roy...@hotmail.com wrote:


 Dan Retzlaff wrote:
 
  Are you encountering this?
  https://issues.apache.org/jira/browse/WICKET-3820
 
  I also recently submitted this so failures like this aren't so
  catastrophic.
  https://issues.apache.org/jira/browse/WICKET-3937
 

 Yes, this was the problem I was encountering. Your submitted fix solves my
 problem, thanks. It looks like Wicket 1.4.18 will have this fixed as well,
 according to the bug's commentary.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Safari-hangs-on-ajax-form-submit-tp3713539p3713726.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: Safari hangs on ajax form submit

2011-08-03 Thread Peter Miklosko
Well that is sort of obvious based on current versions pattern ;)
Is there any expected date for release?

On 3 August 2011 17:05, Martin Grigorov mgrigo...@apache.org wrote:

 1.4.18 will be the next release in 1.4 series

 On Wed, Aug 3, 2011 at 6:55 PM, Peter Miklosko peter.b...@gmail.com
 wrote:
  Where did you see 1.4.18?
  I do not see it on SVN https://svn.apache.org/repos/asf/wicket/branches/
 
  Peter
 
  On 2 August 2011 21:55, trodi t_roy...@hotmail.com wrote:
 
 
  Dan Retzlaff wrote:
  
   Are you encountering this?
   https://issues.apache.org/jira/browse/WICKET-3820
  
   I also recently submitted this so failures like this aren't so
   catastrophic.
   https://issues.apache.org/jira/browse/WICKET-3937
  
 
  Yes, this was the problem I was encountering. Your submitted fix solves
 my
  problem, thanks. It looks like Wicket 1.4.18 will have this fixed as
 well,
  according to the bug's commentary.
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Safari-hangs-on-ajax-form-submit-tp3713539p3713726.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: PageParameters and setResponsePage()

2011-05-05 Thread Peter Miklosko
Thank you for the tip Martin.
Sorry to ask silly question, but where can I find API for 1.5-M3? I found
this
http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/index.html
but
it is missing some classes like for example PageParameters. Or it is best to
download source and build it from it?

Peter

On 5 May 2011 07:03, Martin Grigorov mgrigo...@apache.org wrote:

 I can only suggest you to use Wicket 1.5.
 In current trunk MountedMapper supports all of this - named, indexed
 and optional parameters.
 See
 http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup
 for examples




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: PageParameters and setResponsePage()

2011-05-05 Thread Peter Miklosko
I downloaded RC3, but even after building API from source (mvn
javadoc:javadoc) when I open documentation in wicket-core/target/site/apidoc
there is no
package parameters inside org.apache.wicket.request.mapper and because of
that no PageParameters class documentation.
Any suggestions?

Peter

On 5 May 2011 10:37, Martin Grigorov mgrigo...@apache.org wrote:

 Download the jar from Maven repos.
 Latest version is RC3, not M3.

 On Thu, May 5, 2011 at 11:17 AM, Peter Miklosko peter.b...@gmail.com
 wrote:
  Thank you for the tip Martin.
  Sorry to ask silly question, but where can I find API for 1.5-M3? I found
  this
 
 http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/index.html
  but
  it is missing some classes like for example PageParameters. Or it is best
 to
  download source and build it from it?
 
  Peter
 
  On 5 May 2011 07:03, Martin Grigorov mgrigo...@apache.org wrote:
 
  I can only suggest you to use Wicket 1.5.
  In current trunk MountedMapper supports all of this - named, indexed
  and optional parameters.
  See
 
 http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup
  for examples
 
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: PageParameters and setResponsePage()

2011-05-05 Thread Peter Miklosko
God damn it so complicated... ;)
Thank you for all your help Martin!

Peter

On 5 May 2011 12:51, Martin Grigorov mgrigo...@apache.org wrote:

 it is in wicket-request.jar

 On Thu, May 5, 2011 at 1:47 PM, Peter Miklosko peter.b...@gmail.com
 wrote:
  I downloaded RC3, but even after building API from source (mvn
  javadoc:javadoc) when I open documentation in
 wicket-core/target/site/apidoc
  there is no
  package parameters inside org.apache.wicket.request.mapper and because of
  that no PageParameters class documentation.
  Any suggestions?
 
  Peter
 
  On 5 May 2011 10:37, Martin Grigorov mgrigo...@apache.org wrote:
 
  Download the jar from Maven repos.
  Latest version is RC3, not M3.
 
  On Thu, May 5, 2011 at 11:17 AM, Peter Miklosko peter.b...@gmail.com
  wrote:
   Thank you for the tip Martin.
   Sorry to ask silly question, but where can I find API for 1.5-M3? I
 found
   this
  
 
 http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/index.html
   but
   it is missing some classes like for example PageParameters. Or it is
 best
  to
   download source and build it from it?
  
   Peter
  
   On 5 May 2011 07:03, Martin Grigorov mgrigo...@apache.org wrote:
  
   I can only suggest you to use Wicket 1.5.
   In current trunk MountedMapper supports all of this - named, indexed
   and optional parameters.
   See
  
 
 http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup
   for examples
  
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




PageParameters and setResponsePage()

2011-05-04 Thread Peter Miklosko
We are using MixedParamUrlCodingStrategy to create user/SEO friendly URLs
for booking website. The booking can have two different types as fixed or
flexible that do share some parameters, but not stuff like time periods.
From what I read in API it is my understanding that if some of the
parameters are not specified these will get empty string as value.
However when we tried this we can see that setResponsePage gets correct set
PageParameters, however on the page side the values are associated with keys
that should have been empty strings.

Example

MixedParamUrlCodingStrategy search = new MixedParamUrlCodingStrategy(
MyHttpParams.SEARCH,
SearchDestinationPage.class,
new String[]{
MyHttpParams.SEARCH_TYPE,
/**
 * Search params
 */
MyHttpParams.DEPARTURE_AIRPORT,
MyHttpParams.RETURN_AIRPORT,
/**
 * Fix dates search params
 */
MyHttpParams.DEPARTURE_DATE,
MyHttpParams.RETURN_DATE,
MyHttpParams.BUDGET,
/**
 * Flex dates search params
 */
MyHttpParams.FROM_DAY,
MyHttpParams.TO_DAY,
MyHttpParams.WEEKS,
MyHttpParams.MONTHS,
/**
 * Secondary params
 */
MyHttpParams.ADULTS,
MyHttpParams.CHILDREN,
MyHttpParams.INFANT,
MyHttpParams.DEPARTURE_TIME,
MyHttpParams.RETURN_TIME,
MyHttpParams.CLASS_TYPE,
MyHttpParams.DESTINATION_ID
}
);
mount(search);

Model to PageParameters
public PageParameters toPageParameters() {
PageParameters params = new PageParameters();
params.put(MyHttpParams.DEPARTURE_AIRPORT,
getDepartureAirportIATA());
params.put(MyHttpParams.RETURN_AIRPORT, getArrivalAirportIATA());
params.put(MyHttpParams.DEPARTURE_DATE, format(getDepartureDate(),
new SimpleDateFormat(ddMM)));
params.put(MyHttpParams.RETURN_DATE, format(getArrivalDate(), new
SimpleDateFormat(ddMM)));
params.put(MyHttpParams.BUDGET, getBudget());
params.put(MyHttpParams.ADULTS, getAdults());
params.put(MyHttpParams.CHILDREN, getChildren());
params.put(MyHttpParams.INFANT, getInfants());
params.put(MyHttpParams.DEPARTURE_TIME, getDepartureTime());
params.put(MyHttpParams.RETURN_TIME, getArrivalTime());
params.put(MyHttpParams.CLASS_TYPE, getFlightClass());
return params;
}


IN   OUT
from=PRGsearch_type=PRG
to=BTSfrom=BTS
from_date=05052011to=05052011
to_date=12052011from_date=12052011
budget=500.0to_date=500.0
adults=1budget=1
children=0from_day=0
infant=0to_day=0
departure_time=00:00-23:59weeks=00:00-23:59
return_time=00:00-23:59months=00:00-23:59
class_type=ECONOMYadults=ECONOMY
destination_id=44281children=44281

I hope that my question makes sense.

Peter


Re: PageParameters and setResponsePage()

2011-05-04 Thread Peter Miklosko
Isn't my question clear or just nobody wants to get into mud of long
explanation?

Peter

On 4 May 2011 16:04, Peter Miklosko peter.b...@gmail.com wrote:

 We are using MixedParamUrlCodingStrategy to create user/SEO friendly URLs
 for booking website. The booking can have two different types as fixed or
 flexible that do share some parameters, but not stuff like time periods.
 From what I read in API it is my understanding that if some of the
 parameters are not specified these will get empty string as value.
 However when we tried this we can see that setResponsePage gets correct set
 PageParameters, however on the page side the values are associated with keys
 that should have been empty strings.

 Example

 MixedParamUrlCodingStrategy search = new MixedParamUrlCodingStrategy(
 MyHttpParams.SEARCH,
 SearchDestinationPage.class,
 new String[]{
 MyHttpParams.SEARCH_TYPE,
 /**
  * Search params
  */
 MyHttpParams.DEPARTURE_AIRPORT,
 MyHttpParams.RETURN_AIRPORT,
 /**
  * Fix dates search params
  */
 MyHttpParams.DEPARTURE_DATE,
 MyHttpParams.RETURN_DATE,
 MyHttpParams.BUDGET,
 /**
  * Flex dates search params
  */
 MyHttpParams.FROM_DAY,
 MyHttpParams.TO_DAY,
 MyHttpParams.WEEKS,
 MyHttpParams.MONTHS,
 /**
  * Secondary params
  */
 MyHttpParams.ADULTS,
 MyHttpParams.CHILDREN,
 MyHttpParams.INFANT,
 MyHttpParams.DEPARTURE_TIME,
 MyHttpParams.RETURN_TIME,
 MyHttpParams.CLASS_TYPE,
 MyHttpParams.DESTINATION_ID
 }
 );
 mount(search);

 Model to PageParameters
 public PageParameters toPageParameters() {
 PageParameters params = new PageParameters();
 params.put(MyHttpParams.DEPARTURE_AIRPORT,
 getDepartureAirportIATA());
 params.put(MyHttpParams.RETURN_AIRPORT, getArrivalAirportIATA());
 params.put(MyHttpParams.DEPARTURE_DATE, format(getDepartureDate(),
 new SimpleDateFormat(ddMM)));
 params.put(MyHttpParams.RETURN_DATE, format(getArrivalDate(), new
 SimpleDateFormat(ddMM)));
 params.put(MyHttpParams.BUDGET, getBudget());
 params.put(MyHttpParams.ADULTS, getAdults());
 params.put(MyHttpParams.CHILDREN, getChildren());
 params.put(MyHttpParams.INFANT, getInfants());
 params.put(MyHttpParams.DEPARTURE_TIME, getDepartureTime());
 params.put(MyHttpParams.RETURN_TIME, getArrivalTime());
 params.put(MyHttpParams.CLASS_TYPE, getFlightClass());
 return params;
 }


 IN   OUT
 from=PRGsearch_type=PRG
 to=BTSfrom=BTS
 from_date=05052011to=05052011
 to_date=12052011from_date=12052011
 budget=500.0to_date=500.0
 adults=1budget=1
 children=0from_day=0
 infant=0to_day=0
 departure_time=00:00-23:59weeks=00:00-23:59
 return_time=00:00-23:59months=00:00-23:59
 class_type=ECONOMYadults=ECONOMY
 destination_id=44281children=44281

 I hope that my question makes sense.

 Peter



Keep data in ListView of Form while adding or removing rows

2011-03-22 Thread Peter Miklosko
In my project I have requirement for dynamic type of form where user can add
or remove a project row info.
To keep form data for new entries that hasn't been added to database while
adding another new row I used following article
http://www.oktech.hu/kb/adding-and-removing-rows-wicket-listview-via-ajax
This does work fine for adding new row into form. However it doesn't work
for removing rows.

Considering following scenario: in ListView I have already two projects A
and B. Press add row will add new entry into list, project C, where user
have to fill in data. After this I would like to remove B. One I hit link
project B is removed from ListView, project C is there with some values as
null, however the browser view is showing project A and B. It would be easy
to replace links with checkboxes and handle delete on whole submit, but I
would like to achieve dynamic approach as described above.

Can somebody advise?

Thank you

Peter


Re: howto track translations

2010-12-03 Thread Peter Miklosko
Not sure how other IDEs but in IntelliJ once you have at least one
translation beside default and you open any of them there at the bottom of
the freame are two tabs to switch between Text and Resource bundle. In
Resource bundle view it will highlight in red any property that is not
available in some translations. This is default functionality of IDE.

Peter

On 3 December 2010 09:40, Frank van Lankvelt f.vanlankv...@onehippo.comwrote:

 in the process of expanding the number of languages my wicket
 application is available in, I'm running into the question of tracking
 properties files.
 In particular, I want to be able to get some kind of feedback about
 missing translations; mismatches between property files would be
 sufficient.

 How do you do this?  Is there a maven plugin that I've missed, or
 perhaps a standalone tool?

 cheers, Frank

 --
 Hippo Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31
 (0)20 522 4466
 USA  • San Francisco 755 Baywood Drive, Second Floor •  Petaluma, CA.
 94954 •  +1 877 414 4776 (toll free)
 Canada•   Montréal  5369 Boulevard St-Laurent #430 •  Montréal QC
 H2T 1S5  •  +1 (514) 316 8966
 www.onehippo.com  •  www.onehippo.org  •  i...@onehippo.com
 
 This e-mail may be privileged and/or confidential, and the sender does
 not waive any related rights and obligations. Any distribution, use or
 copying of this e-mail or the information it contains by other than an
 intended recipient is unauthorized. If you received this e-mail in
 error, please advise me (by return e-mail or otherwise) immediately.

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




GMap2 off center

2010-11-03 Thread Peter Miklosko
In our application we are using Wicket GMap2 in some cases successfully in
other case with problems. The map is being off center, having about 10-15px
grey border on the left and bottom of the map and in case of multiple
markers on the map being zoomed out to 0.0 in Firefox. The map is showing
fine in Chromium and to big surprise in IE6.

I'm trying to determinate what is problem here and bellow is just
short comparison of differences.
Page A with working map does quick search for geographical location to be
presented to user, pin these locations to map and show descriptions
retrieved from DB.
Page B with not working map first runs flash animation while does the search
for flights, once flights found it will redirect results to next page and
pin locations to map plus plus populate table with search results.

Anyone had similar problem? Can you give some pointers to solve this?

If more info need it please just let me know

Peter


Re: GMap2 off center

2010-11-03 Thread Peter Miklosko
Yeap, that is my battle plan for tomorrow.



On 3 November 2010 19:12, Sven Meier s...@meiers.net wrote:

 Hi Peter,

 I have no idea what's going wrong on your page B.
 Try removing features (e.g. the flash animation) to make B more like A,
 repeat until it works then build up again.

 Regards

 Sven


 On 11/03/2010 01:15 PM, Peter Miklosko wrote:

 In our application we are using Wicket GMap2 in some cases successfully in
 other case with problems. The map is being off center, having about
 10-15px
 grey border on the left and bottom of the map and in case of multiple
 markers on the map being zoomed out to 0.0 in Firefox. The map is showing
 fine in Chromium and to big surprise in IE6.

 I'm trying to determinate what is problem here and bellow is just
 short comparison of differences.
 Page A with working map does quick search for geographical location to be
 presented to user, pin these locations to map and show descriptions
 retrieved from DB.
 Page B with not working map first runs flash animation while does the
 search
 for flights, once flights found it will redirect results to next page and
 pin locations to map plus plus populate table with search results.

 Anyone had similar problem? Can you give some pointers to solve this?

 If more info need it please just let me know

 Peter





 -
 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 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



  

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