Re: Filtered feedback message cleanup

2013-11-19 Thread Francois Meillet
Form form = new Form(form);
form.setOutputMarkupId(true);
add(form);

RequiredTextFieldString username = new
RequiredTextFieldString(username, new ModelString());
form.add(username);

final PasswordTextField password = new 
PasswordTextField(password, new
ModelString());
password.add(new ValidationMessageBehavior());
form.add(password);

LinkString localeLinkDE = new LinkString(localeLinkDE) {
@Override
public void onClick() {
Locale localeDE = new Locale(de, DE);
setLocale(localeDE);
password.getFeedbackMessages().clear();
}
};
add(localeLinkDE);



-
François Meillet
Formation Wicket - Développement Wicket
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Filtered-feedback-message-cleanup-tp4662503p4662523.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: CSS reference order

2013-11-19 Thread mac
I have created my own reference and added this inside getDependencies method:

ListHeaderItem dependencies = new ArrayList();
dependencies.add( CssHeaderItem.forReference(
BootstrapCssReference.instance() ) );
return dependencies;

and it works.

Thanks for advice.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-reference-order-tp4662495p4662524.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



Refreshing DataTable with AjaxButton

2013-11-19 Thread Sandor Feher
Hi,

Perharps this could be a common scenario and I dig the archive a lot but
can't solve it on my own :(.

My basic concept is the following. I have two entities DdcPObjects and
DdcPDeps.
List objects in DdcPDeps then with a search field list all items from
DdcPObjects not listed in DdcPDeps.
The selected items can be added to DdcPDeps with a submit link. So it looks
simple.

http://apache-wicket.1842946.n4.nabble.com/file/n4662525/ddc.png 


The tricky part is how to refresh first datatable if the forms (it's parent)
were submitted ?
Now it works partialy. Sometimes show the recent state sometimes the last
two rows get replaced with the new items. It might be some caching problem
but I was not able to find it out :(.


DdcPDepsEditForm

http://pastebin.com/ZjCZ0eKP

DependeciesPanel

http://pastebin.com/fyfum0hp


DdcPObjectsDataProvider

http://pastebin.com/CQPATH2z

DdcPDepsDataProvider

http://pastebin.com/zicKKRd2


TIA, Sandor




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Refreshing-DataTable-with-AjaxButton-tp4662525.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: Advice for upgrading from an old version of Wicket

2013-11-19 Thread Scott Carpenter
Thank you, Martin. I'll do that.


On Mon, Nov 18, 2013 at 2:00 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 I'd advice you to read the migration guides 1.4-1.5 and 1.5-6.0.
 Then start migrating the app and ask here if you have specific problems.


 On Sun, Nov 17, 2013 at 11:33 PM, Scott Carpenter scarpen...@gmail.com
 wrote:

  Hi -- I've inherited a wicket site that was first developed four years
 ago.
  It is running on version 1.4 and I've been asked to estimate an upgrade
 to
  a more current version, and I was hoping to get some advice from this
 list
  about gotchas and so on.
 
  I've been working on the site for several months but consider myself a
  newcomer to Wicket. That is, I haven't done a deep dive into learning the
  framework yet. I've been updating things based on what I find in the
  existing code base. So please forgive me my newbieness and let me know
 what
  details would be helpful.
 
  Furthermore, I'm a newcomer to Java web frameworks in general. There is
  Spring and Hibernate involved with this thing, which I've also been able
 to
  update based on the existing state of affairs. The backend is an Oracle
  database.
 
  Your thoughts and advice would be greatly appreciated.
 
  Thank you!
 
  Scott
 



Re: Filtered feedback message cleanup

2013-11-19 Thread meduolis
Thanks Francois, it works.

I am changing locale in BasePage, so I had to add postprocessLocaleChange()
and override it on it's subclasses to get it working.
So it would be great if we could clear messages using something like
FeedbackCollector.clearAll() without any knowledge about what components
contains what messages.

Thanks again



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Filtered-feedback-message-cleanup-tp4662503p4662527.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: searching for a Rich text editor

2013-11-19 Thread Andrea Del Bene
Hi,

Have you already considered the WicketStuff integration module for tynimce?

You can find a brief introduction to this module in the guide:
http://wicket.apache.org/guide/guide/chapter24.html
 Hi,

 I'm searching for Rich text editor to integrate in my page, but at the
 moment nothing seems to work.
 Found
 Tynimce
 Wicket-jQuery (Kendo)
 Visural Wicket
 and examples, but they dont work with wicket 6.12 maybe.
 Have you maybe any hint for me??

 Thanks in advance
 Cheers
 Dirk


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



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



Re: searching for a Rich text editor

2013-11-19 Thread Dirk Wichmann
Hi Sebastien,

where can I find the kendo-ui-6.12.1-SNAPSHOT ?? in the Apache Nexus I
only find 6.2.0??
Have you switched the repository??

Thanks in advanced
Dirk

Am 18.11.2013 22:30, schrieb Sebastien:
 Hi Dirk,

 For the Kendo one, this is because Kendo has released a new version
 (kendoui.web.2013.2.716), whereas wicket-kendo-ui-12.0.0 is still based on
 the previous.
 you can try out wicket-kendo-ui-6.12.1-SNAPSHOT.

 Remember to clean your browser's cache.
 https://github.com/sebfz1/wicket-jquery-ui/issues/75

 Best regards,
 Sebastien.



 On Mon, Nov 18, 2013 at 10:13 PM, Dirk Wichmann 
 dir...@team-wichmann.dewrote:

 Hi,

 I'm searching for Rich text editor to integrate in my page, but at the
 moment nothing seems to work.
 Found
 Tynimce
 Wicket-jQuery (Kendo)
 Visural Wicket
 and examples, but they dont work with wicket 6.12 maybe.
 Have you maybe any hint for me??

 Thanks in advance
 Cheers
 Dirk


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





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



Re: searching for a Rich text editor

2013-11-19 Thread Sebastien
Hi Dirk,

snapshot releases are not in maven central, you have to add this repository:

repositories
repository
idsonatype-snapshots/id
nameSonatype Snapshots Repository/name
urlhttp://oss.sonatype.org/content/repositories/snapshots//url
snapshots
enabledtrue/enabled
/snapshots
/repository/repositories


If you don't not wish to use the snapshot release, you can add the kendo
library you downloaded using IKendoUILibrarySettings
https://github.com/sebfz1/wicket-jquery-ui/wiki/%5Bhowto%5D-change-resources-references

Hope this helps,
Sebastien.



On Tue, Nov 19, 2013 at 9:21 PM, Dirk Wichmann dir...@team-wichmann.dewrote:

 Hi Sebastien,

 where can I find the kendo-ui-6.12.1-SNAPSHOT ?? in the Apache Nexus I
 only find 6.2.0??
 Have you switched the repository??

 Thanks in advanced
 Dirk

 Am 18.11.2013 22:30, schrieb Sebastien:
  Hi Dirk,
 
  For the Kendo one, this is because Kendo has released a new version
  (kendoui.web.2013.2.716), whereas wicket-kendo-ui-12.0.0 is still based
 on
  the previous.
  you can try out wicket-kendo-ui-6.12.1-SNAPSHOT.
 
  Remember to clean your browser's cache.
  https://github.com/sebfz1/wicket-jquery-ui/issues/75
 
  Best regards,
  Sebastien.
 
 
 
  On Mon, Nov 18, 2013 at 10:13 PM, Dirk Wichmann dir...@team-wichmann.de
 wrote:
 
  Hi,
 
  I'm searching for Rich text editor to integrate in my page, but at the
  moment nothing seems to work.
  Found
  Tynimce
  Wicket-jQuery (Kendo)
  Visural Wicket
  and examples, but they dont work with wicket 6.12 maybe.
  Have you maybe any hint for me??
 
  Thanks in advance
  Cheers
  Dirk
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



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




Re: Generated drop down list of countries in Wicket - any better way?

2013-11-19 Thread Marcin Zajączkowski
On 2013-11-19 08:44, Martin Grigorov wrote:
 Hi,
 
 I think you can use IModelString for the dropdown. This will be the
 country code.
 The transformation from id to name and back (if needed) can be moved to a
 custom IChoiceRenderer. There you have access to the current locale for
 each rendering.
 CountryChoiceRenderer can delegate the actual work to
 CountryDatabase/CountryProvider/...

Thanks Martin for your reply!

Using your suggestions I was able to simplify the Wicket code to two
classes: a custom DropDownChoice and a renderer. As a drawback I had to
optimize/cache query in my service returning country name by ID/code.

One thing is not clear for me. How can I get a current locale in
CountryChoiceRenderer (without pass it from my DropDownChoice component)?

Marcin



 On Tue, Nov 19, 2013 at 12:51 AM, Marcin Zajączkowski msz...@wp.pl wrote:
 
 Hi,

 Working on Wicket frontend for AppFuse I had to implement a drop down
 choice of countries. I did it, but don't like the solution and I wonder
 if it could be done easier/prettier?

 Issues:
 1. In domain model there is a country represented as a String field (a
 country code) in an address class. In my Wicket component I wanted to
 use a Country class with a code and name. It forced me to create
 CountryDropDownChoice component which embed String model into Country
 model(with EmbeddedCountryModel):

 public class CountryDropDownChoice extends DropDownChoiceCountry {
 public CountryDropDownChoice(String id, PropertyModelString
 country, Locale locale) {
 super(id, new EmbeddedCountryModel(country, locale), new
 CountriesModel(locale), new ChoiceRenderer(name, locale));
 }
 }

 with a call in my panel/fragment:
 add(new CountryDropDownChoice(country, new
 PropertyModelString(getDefaultModel(), country), getLocale()));

 2. I would like to have country names depending on current user locales.
 I don't have access to Session in a model and there for I needed to pass
 current locale to both models (they call CountryService implemented as
 String bean using given locale). Could it be simplified?

 My files:

 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countrydropdownchoice-java
 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countriesmodel-java

 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-embeddedcountrymodel-java
 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-country-java

 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-usereditpanel-java-L19

 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-javalocalecountryservice-java

 Thanks in advance
 Marcin

-- 
http://blog.solidsoft.info/ - Working code is not enough



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



Wicket Sessions and Akamai Caching

2013-11-19 Thread Scott Carpenter
I have a client Wicket web site and they are using Akamai for caching. They
wanted to cache more aggressively but it seems there's an issue with
expired sessions. When a user hits a cached version of a page with a form
and tries to submit it, a 500 error is raised. (I'm relaying this from at
least two sources removed, so by now I might have the details thoroughly
obfuscated.)

I was hoping from this list I could get some pointers on best taking
advantage of Akamai, and how I might work around issues like this. Please
let me know if and what further information would be useful in answering.

Thank you!

Scott


Re: Wicket Sessions and Akamai Caching

2013-11-19 Thread Jeremy Thomerson
Pages that are session-specific should not be cached in a way that allows
the cached response to be given to multiple users. Stateful forms are
session-specific.


On Tue, Nov 19, 2013 at 6:59 PM, Scott Carpenter scarpen...@gmail.comwrote:

 I have a client Wicket web site and they are using Akamai for caching. They
 wanted to cache more aggressively but it seems there's an issue with
 expired sessions. When a user hits a cached version of a page with a form
 and tries to submit it, a 500 error is raised. (I'm relaying this from at
 least two sources removed, so by now I might have the details thoroughly
 obfuscated.)

 I was hoping from this list I could get some pointers on best taking
 advantage of Akamai, and how I might work around issues like this. Please
 let me know if and what further information would be useful in answering.

 Thank you!

 Scott




-- 
Jeremy Thomerson
http://wickettraining.com