Re: Re: Re: Re: Basic JUnit Test

2012-08-28 Thread JCoder
What exactly do you mean by 'quickstart' ?

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



Re: Re: Re: Re: Basic JUnit Test

2012-08-28 Thread Martin Grigorov
A mini application that reproduces the problem. See
http://wicket.apache.org/start/quickstart.html

On Tue, Aug 28, 2012 at 8:21 AM, JCoder i...@jcoder.de wrote:
 What exactly do you mean by 'quickstart' ?

 -
 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: Re: Re: Re: Re: Basic JUnit Test

2012-08-28 Thread JCoder
What exactly do you mean by 'quickstart' ?


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



Re: page version and forms

2012-08-28 Thread Alex Shubert
Nope, 1.5

Well, I am not quite sure that my statement is correct.  while tree
project has some kind of examples, there are no real documentation.
Let's consieder
http://www.mysticcoders.com/blog/autocomplete-with-an-object/  - my
opinion is that sometimes one may want to make an impression quickly
looking through a short how-to instead of downloading code, trying to
assemble it (btw, your instruction doesn't work) and digging through
the code. It works most of the time if time is not a question.

On 22 August 2012 11:24, Sven Meier s...@meiers.net wrote:
 Are you using wicket-tree or the new components in Wicket 6?

 Please be more specific what information you're looking for. I'll gladly 
 provide more info in javadoc or in the wiki.

 Sven

 Alex Shubert alex.shub...@gmail.com schrieb:

Sven while you are here:
why no documentation for Tree? Nothing at all? Right now I face a
problem - tree do not persist it's state (Bookmarcable links, copied
from example) and I have no clue where to see.


On 21 August 2012 21:38, Sven Meier s...@meiers.net wrote:
 And the winner is ... Martin!

 On AppEngine I still have Wicket 1.4.x running.

 Sven


 On 08/21/2012 02:59 PM, Martin Grigorov wrote:

 The Google Code repo contains 1.5 but the deployed app is using pre-1.5
 version.
 I can bet on this.

 On Tue, Aug 21, 2012 at 3:37 PM, Alex Shubert alex.shub...@gmail.com
 wrote:

 Martin,

 http://wicket-tree.googlecode.com/svn/repo/wicket-tree/wicket-tree-parent/0.5.0/wicket-tree-parent-0.5.0.pom
 Again, no 1.4 at all. Not in one place. Moreover,
 '?wicket:interface=:0:1:::'  doesn't means 1.4 is in action. Just take

 Is there a reason why you don't trust me ? :-)
 wicket:interface is no more used in 1.5+, unless the application adds
 it explicitly. Wicket (the framework) doesn't use it anymore.

 a look at event listener implementation.

 About the problem: the page I gave link for is really stateless but it
 is not meant to be, it just happened. If user choose any other tree
 renders version number eager to appear.
 The most Wicket problem right now is it's occult state. Wiki is
 hopelessly outdated, most of the examples refer to 1.2.-1.3 version...

 Most of them are actually still valid.
 There are new pages labeled with wicket15 and wicket6 which refer
 to the new features in 1.5 and 6.0 respect.


 If someone wonder how to determine why his page is stateful here is
 the solution:

 There is StatelessChecker in wicket-devutils for this task.

 if (!isPageStateless()) {
  visitChildren(Component.class, new IVisitorComponent,
 Component() {
  @Override
  public void component(Component component,
 IVisitComponent iVisit) {
  if (!component.isStateless()) {
  LOGGER.info(Stateful component found [ 
  + component.getClass().getName() +  : 
  + component.getMarkupId() +  ]);

  // iVisit.stop(component);
  }
  }
  });
  }

 If in need of test detection, extract visitor to separate class and
 instantiate pages with WicketTester.


 On 21 August 2012 15:47, Martin Grigorov mgrigo...@apache.org wrote:

 Sorry for being stubborn but having '?wicket:interface=:0:1:::' in the
 url means that this is Wicket pre-1.5 ;-)

 I guess Sven will join this conversation later today and explain in
 more details.

 On Tue, Aug 21, 2012 at 2:16 PM, Alex Shubert alex.shub...@gmail.com
 wrote:

 Martin
 with all my respect but their build script uses

  dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket-core/artifactId
  version${wicket.version}/version
  /dependency

 ${wicket.version} derived from parent pom where
 wicket.version1.5.0/wicket.version

 So,
 1. no stateless form
 2. it is 1.5
 3. it's pretty easy to ensure yourself just by looking into code
 http://code.google.com/p/wicket-tree/wiki/RunningExamples It even
 can't be compiled under 1.4

 Anyway: what does your answer has to do with my question? One more
 time: how that example manage not to increase page version shown in
 url on every tree node selection?
 thanks


 On 21 August 2012 14:39, Martin Grigorov mgrigo...@apache.org wrote:

 The deployed examples use Wicket 1.4.

 http://wicket-tree.appspot.com/?wicket:interface=:0:1:::

 On Tue, Aug 21, 2012 at 1:35 PM, Alex Shubert alex.shub...@gmail.com
 wrote:

 They are using
 FormVoid form = new FormVoid(form);

 and still no version in url on round-trips. Also, FilterForm from
 Wicket API doesn't extends StatelessForm while your answer states
 that
 must be the case.


 On 21 August 2012 14:20, Martin Grigorov mgrigo...@apache.org
 wrote:

 Use StatelessForm instead.

 On Tue, Aug 21, 2012 at 1:06 PM, Alex Shubert
 alex.shub...@gmail.com wrote:

 Hello

 Recently I found 

Re: Wicket 6.0.0 + Netbeans + Atmosphere

2012-08-28 Thread Mats
That is correct...

I now tried to add some stuff in my web.xml and include the atmosphere.xml
from the example files... but I'm probaly still doing something wrong
--- SEVERE: failed to initialize atmosphere framework

And probably I should try to include the same jars as in the example
project...

So I think i vill give this up for the moment

This is my web.xml

?xml version=1.0 encoding=UTF-8?
web-app version=3.0 xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd;
filter
filter-nameWicketApplication/filter-name
   
filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name
param-valueasterix.webui.WebUI/param-value
/init-param
init-param
param-nameconfiguration/param-name
param-valuedeployment/param-value
/init-param
/filter
filter-mapping
filter-nameWicketApplication/filter-name
url-pattern/wicket/*/url-pattern
/filter-mapping
session-config
session-timeout
30
/session-timeout
/session-config
welcome-file-list
welcome-file/
/welcome-file-list
servlet
servlet-nameAtmosphereApplication/servlet-name
servlet-classorg.atmosphere.cpr.AtmosphereServlet/servlet-class
init-param
param-nameapplicationClassName/param-name
param-valueasterix.webui.WebUI/param-value
/init-param
init-param
param-nameorg.atmosphere.useWebSocket/param-name
param-valuetrue/param-value
/init-param
init-param
param-nameorg.atmosphere.useNative/param-name
param-valuetrue/param-value
/init-param
init-param
   
param-nameorg.atmosphere.cpr.CometSupport.maxInactiveActivity/param-name
param-value3/param-value
/init-param
init-param
param-namefilterMappingUrlPattern/param-name
param-value/atmosphere/*/param-value
/init-param
init-param
   
param-nameorg.atmosphere.websocket.WebSocketProtocol/param-name
   
param-valueorg.atmosphere.websocket.protocol.EchoProtocol/param-value
/init-param
load-on-startup1/load-on-startup
/servlet
servlet-mapping
servlet-nameAtmosphereApplication/servlet-name
url-pattern/atmosphere/*/url-pattern
/servlet-mapping
/web-app

This is the atmosphere.xml

atmosphere-handlers
atmosphere-handler context-root=/*
class-name=org.atmosphere.handler.ReflectorServletProcessor
property name=filterClassName
value=org.apache.wicket.protocol.http.WicketFilter /
/atmosphere-handler
/atmosphere-handlers 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-0-0-Netbeans-Atmosphere-tp4651521p4651527.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: page version and forms

2012-08-28 Thread Martin Grigorov
Alex,

On Tue, Aug 28, 2012 at 10:31 AM, Alex Shubert alex.shub...@gmail.com wrote:
 Nope, 1.5

 Well, I am not quite sure that my statement is correct.  while tree
 project has some kind of examples, there are no real documentation.
 Let's consieder
 http://www.mysticcoders.com/blog/autocomplete-with-an-object/  - my
 opinion is that sometimes one may want to make an impression quickly
 looking through a short how-to instead of downloading code, trying to

This article is provided by a Wicket user.
Be a good user and write an article about something that you understand.

 assemble it (btw, your instruction doesn't work) and digging through
 the code. It works most of the time if time is not a question.

Don't hesitate to send us patches for the javadoc. Or a whole article
that we can put at http://wicket.apache.org/learn/projects/.


 On 22 August 2012 11:24, Sven Meier s...@meiers.net wrote:
 Are you using wicket-tree or the new components in Wicket 6?

 Please be more specific what information you're looking for. I'll gladly 
 provide more info in javadoc or in the wiki.

 Sven

 Alex Shubert alex.shub...@gmail.com schrieb:

Sven while you are here:
why no documentation for Tree? Nothing at all? Right now I face a
problem - tree do not persist it's state (Bookmarcable links, copied
from example) and I have no clue where to see.


On 21 August 2012 21:38, Sven Meier s...@meiers.net wrote:
 And the winner is ... Martin!

 On AppEngine I still have Wicket 1.4.x running.

 Sven


 On 08/21/2012 02:59 PM, Martin Grigorov wrote:

 The Google Code repo contains 1.5 but the deployed app is using pre-1.5
 version.
 I can bet on this.

 On Tue, Aug 21, 2012 at 3:37 PM, Alex Shubert alex.shub...@gmail.com
 wrote:

 Martin,

 http://wicket-tree.googlecode.com/svn/repo/wicket-tree/wicket-tree-parent/0.5.0/wicket-tree-parent-0.5.0.pom
 Again, no 1.4 at all. Not in one place. Moreover,
 '?wicket:interface=:0:1:::'  doesn't means 1.4 is in action. Just take

 Is there a reason why you don't trust me ? :-)
 wicket:interface is no more used in 1.5+, unless the application adds
 it explicitly. Wicket (the framework) doesn't use it anymore.

 a look at event listener implementation.

 About the problem: the page I gave link for is really stateless but it
 is not meant to be, it just happened. If user choose any other tree
 renders version number eager to appear.
 The most Wicket problem right now is it's occult state. Wiki is
 hopelessly outdated, most of the examples refer to 1.2.-1.3 version...

 Most of them are actually still valid.
 There are new pages labeled with wicket15 and wicket6 which refer
 to the new features in 1.5 and 6.0 respect.


 If someone wonder how to determine why his page is stateful here is
 the solution:

 There is StatelessChecker in wicket-devutils for this task.

 if (!isPageStateless()) {
  visitChildren(Component.class, new IVisitorComponent,
 Component() {
  @Override
  public void component(Component component,
 IVisitComponent iVisit) {
  if (!component.isStateless()) {
  LOGGER.info(Stateful component found [ 
  + component.getClass().getName() +  : 
  + component.getMarkupId() +  ]);

  // iVisit.stop(component);
  }
  }
  });
  }

 If in need of test detection, extract visitor to separate class and
 instantiate pages with WicketTester.


 On 21 August 2012 15:47, Martin Grigorov mgrigo...@apache.org wrote:

 Sorry for being stubborn but having '?wicket:interface=:0:1:::' in the
 url means that this is Wicket pre-1.5 ;-)

 I guess Sven will join this conversation later today and explain in
 more details.

 On Tue, Aug 21, 2012 at 2:16 PM, Alex Shubert alex.shub...@gmail.com
 wrote:

 Martin
 with all my respect but their build script uses

  dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket-core/artifactId
  version${wicket.version}/version
  /dependency

 ${wicket.version} derived from parent pom where
 wicket.version1.5.0/wicket.version

 So,
 1. no stateless form
 2. it is 1.5
 3. it's pretty easy to ensure yourself just by looking into code
 http://code.google.com/p/wicket-tree/wiki/RunningExamples It even
 can't be compiled under 1.4

 Anyway: what does your answer has to do with my question? One more
 time: how that example manage not to increase page version shown in
 url on every tree node selection?
 thanks


 On 21 August 2012 14:39, Martin Grigorov mgrigo...@apache.org wrote:

 The deployed examples use Wicket 1.4.

 http://wicket-tree.appspot.com/?wicket:interface=:0:1:::

 On Tue, Aug 21, 2012 at 1:35 PM, Alex Shubert alex.shub...@gmail.com
 wrote:

 They are using
 FormVoid form = new FormVoid(form);

 and still no version in 

Re: Mounting URLs with locale prefix

2012-08-28 Thread asfernandes
I succedded to make it work without mess with autoLinking seeting, but it's
just for my case. I believe this is a Wicket bug, but I have no idea on a
better fix.

I installed a new RequestCycleProvider to override the UrlRenderer. I
recreated UrlRenderer#renderContextRelativeUrl replacing:

for (int i = 0; i  getBaseUrl().getSegments().size() - 1; ++i)

by:

for (int i = 1; i  getBaseUrl().getSegments().size() - 1; ++i)

So now it doesn't strip the ${locale} part of the URL to relativize
resources paths.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-URLs-with-locale-prefix-tp4651528p4651560.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: Mounting URLs with locale prefix

2012-08-28 Thread Martin Grigorov
The segment with the locale should be removed by the IRequestMapper as
LocaleFirstMapper does.
But in your case you have the locale hardcoded in the .css file, or at
least this is what I understood, and Wicket should not remove anything
that is not added by it.

There could be a bug in UrlRenderer. If you can add failing unit
test(s) for UrlRendererTest then please attach it to a ticket in Jira
and we will fix it.

On Tue, Aug 28, 2012 at 1:34 PM, asfernandes adrian...@gmail.com wrote:
 I succedded to make it work without mess with autoLinking seeting, but it's
 just for my case. I believe this is a Wicket bug, but I have no idea on a
 better fix.

 I installed a new RequestCycleProvider to override the UrlRenderer. I
 recreated UrlRenderer#renderContextRelativeUrl replacing:

 for (int i = 0; i  getBaseUrl().getSegments().size() - 1; ++i)

 by:

 for (int i = 1; i  getBaseUrl().getSegments().size() - 1; ++i)

 So now it doesn't strip the ${locale} part of the URL to relativize
 resources paths.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Mounting-URLs-with-locale-prefix-tp4651528p4651560.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: Mounting URLs with locale prefix

2012-08-28 Thread asfernandes

Martin Grigorov-4 wrote
 
 The segment with the locale should be removed by the IRequestMapper as
 LocaleFirstMapper does.
 

But on UrlRenderer#renderContextRelativeUrl, getBaseUrl() shows pt-br/home
when I'm accessing http://localhost:8990/Site/pt-br/home

This caused my tags to be rewritten from:
link rel=stylesheet type=text/css href=styles/cssreset-min.css /
to:
link rel=stylesheet type=text/css 
href=../styles/cssreset-min.css /

The first is the one I want, since the resources is also mounted with
LocaleFirstMapper, and I want it there.

So maybe some setBaseUrl call is missing, to adjust the URL on the
UrlRenderer.


Martin Grigorov-4 wrote
 
 But in your case you have the locale hardcoded in the .css file, or at
 least this is what I understood, and Wicket should not remove anything
 that is not added by it.
 

It's not hardcoded. It's relative and I want Wicket to preserve the locale
on the URL, but it's stripping it.

My resources are not localized, but looks better for me to mount them under
the locale prefix, since Wicket could not rewrite embedded or inline CSS,
and I want to use relative paths there too.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-URLs-with-locale-prefix-tp4651528p4651562.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: BreadCrumb and page parameters

2012-08-28 Thread Sandor Feher
Had a workaround to store calling parameters in session in a HashMap. This is
good enough for me right now.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/BreadCrumb-and-page-parameters-tp4651412p4651564.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



Nested form submit problem

2012-08-28 Thread Sandor Feher
Hi,

I have the following use case. I have some questionnaires and a couple of
questions belong to every questionnaire.
I created a nested form component contains two forms. First does nothing
just has some buttons (save,delete,cancel,reset) and contains as many child
forms as the number of questions.
So it's fine and almost everything work. My problem is when I want to delete
the items and click delete button then the inner form's onSubmit event also
fires although I set the delete.setDefaultFormProcessing(false) behaviour on
delete button. Same is with reset and cancel button. Both of them fires
inner form's onSubmit event.


http://pastebin.com/zErvmG5J

tia, Sandor



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651565.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: Nested form submit problem

2012-08-28 Thread Paul Bors
Sounds complicated, why not just setVisible(false) when you want to delete
or hide one of those questions (aka form fields)?
Also, I don't think you need to use nested forms here, unless you wrap each
question in a panel and within in a form.

Refer to this wiki page for nested forms and their behavior:
https://cwiki.apache.org/WICKET/nested-forms.html

Is hard to follow the code example you gave but if I understand your
use-case right and if you want to add different questions within a form I
suggest you use a DataTable and a dynamic DataProvider that would be
populated with a list of Panels that hold on to each of the labels and form
fields with the questions you want to show (no need for an inner form unless
you want the question to be answered by itself). When you want to hide one
of them simply call setVisible(false) and use Ajax to refresh the DataTable.
If you want to change the questions, simply change the list of Panels and
make sure each form field has its own model (or use CompoundModel if you
want).

Hope that helps :)

~ Thank you,
  Paul Bors

-Original Message-
From: Sandor Feher [mailto:sfe...@bluesystem.hu] 
Sent: Tuesday, August 28, 2012 11:28 AM
To: users@wicket.apache.org
Subject: Nested form submit problem

Hi,

I have the following use case. I have some questionnaires and a couple of
questions belong to every questionnaire.
I created a nested form component contains two forms. First does nothing
just has some buttons (save,delete,cancel,reset) and contains as many child
forms as the number of questions.
So it's fine and almost everything work. My problem is when I want to delete
the items and click delete button then the inner form's onSubmit event also
fires although I set the delete.setDefaultFormProcessing(false) behaviour on
delete button. Same is with reset and cancel button. Both of them fires
inner form's onSubmit event.


http://pastebin.com/zErvmG5J

tia, Sandor



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651
565.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



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



Re: Built with Wicket: new entries

2012-08-28 Thread Ernesto Reinaldo Barreiro
Hi Martijn,

On Tue, Aug 28, 2012 at 3:47 PM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 Built with Wicket is Apache Wicket's portfolio blog showcasing what
 our community has created with your favorite web framework.

 We have recently added several new Wicket built entries to the portfolio:


- Lioher.com
 http://builtwithwicket.tumblr.com/post/30314339150/lioher-enterprise-is-as-far-as-i-can-see-a
 


Yes, your description of the application is correct! Thanks for taking care
of adding it!

-- 
Regards - Ernesto Reinaldo Barreiro


Re: Nested form submit problem

2012-08-28 Thread Andrea Del Bene
I'm not 100% sure, but I think your inner form is submitted by the 
AjaxFormValidatingBehavior attached to textfield ertek. Try to remove it 
to see if the form is still submitted.

Hi,

I have the following use case. I have some questionnaires and a couple of
questions belong to every questionnaire.
I created a nested form component contains two forms. First does nothing
just has some buttons (save,delete,cancel,reset) and contains as many child
forms as the number of questions.
So it's fine and almost everything work. My problem is when I want to delete
the items and click delete button then the inner form's onSubmit event also
fires although I set the delete.setDefaultFormProcessing(false) behaviour on
delete button. Same is with reset and cancel button. Both of them fires
inner form's onSubmit event.


http://pastebin.com/zErvmG5J

tia, Sandor



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651565.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




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



RE: Nested form submit problem

2012-08-28 Thread Sandor Feher
Hi Paul,

The problem related to AjaxFormSubmitBehavior  behaviour. This fires eform's
onSubmit event.
My original goal was to create field level validation with Ajax nothing
more.
The code above looks for a description belongs to the entered value and
displays it.
If the entered value validation failed then warns the user immediately. 
BTW if I turn of afvb setDefaultFormProcessing to false then the field level
validation does not work.


---
  AjaxFormSubmitBehavior afvb=
new AjaxFormSubmitBehavior(eform, onchange) {
 
 
@Override
protected void onSubmit(AjaxRequestTarget art) {
HrpBbheertk ertk = (HrpBbheertk)
eform.getModelObject();
String k = ertek.getValue();
customBo.getDaoSession().beginTransaction();
HrpBbhepar5PK pk = new HrpBbhepar5PK();
pk.setCompany(ertk.getHrpBbheertkPK().getCompany());
   
pk.setAkodszam(ertk.getHrpBbheertkPK().getAlaptipus());
   
pk.setDkodszam(ertk.getHrpBbheertkPK().getDimenzio());
   
pk.setDekodszam(ertk.getHrpBbheertkPK().getDimenzioelem());
if (!k.isEmpty()) {
pk.setDertek(Short.valueOf(k));
HrpBbhepar5 hepar5 =
customBo.find(HrpBbhepar5.class, pk);
if (hepar5 != null) {
   
dimenev.setDefaultModelObject(hepar5.getDertekmegnev());
} else {
dimenev.setDefaultModelObject();
}

}
if
(customBo.getDaoSession().getTransaction().isActive()) {
   
customBo.getDaoSession().getTransaction().commit();
}

art.add(dimenev);
art.add(fb);
}

@Override
protected void onError(AjaxRequestTarget art) { 
art.add(fb);
}

};



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651565p4651568.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



[WARN]Falling back to Redirect_To_Buffer render

2012-08-28 Thread sudeivas
Hello,
   Though I am using 'ONE_PASS_RENDER' strategy, I am still getting the
below warning, 

WARN http-8000-2 [org.apache.wicket.request.handler.render.WebPageRenderer]
- Falling back to Redirect_To_Buffer render strategy because none of the
conditions matched. 

I am using wicket 1.5.6 in a clustered setup.

Am I missing something?

-Suresh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WARN-Falling-back-to-Redirect-To-Buffer-render-tp4651567.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: Nested form submit problem

2012-08-28 Thread Paul Bors
Why not use onchange and validate the field when the user changes the
input?

All you would have to do is add your validators as you would normally do,
then create Ajax*** form components and in their callback method for
onError(target) refresh your feedback panel.

A text field with this design applied to it will validate the user input for
each character typed, use a different JS event for other behavior.

For code examples see:
http://www.wicket-library.com/wicket-examples/ajax/form

~ Thank you,
  Paul Bors

-Original Message-
From: Sandor Feher [mailto:sfe...@bluesystem.hu] 
Sent: Tuesday, August 28, 2012 3:37 PM
To: users@wicket.apache.org
Subject: RE: Nested form submit problem

Hi Paul,

The problem related to AjaxFormSubmitBehavior  behaviour. This fires eform's
onSubmit event.
My original goal was to create field level validation with Ajax nothing
more.
The code above looks for a description belongs to the entered value and
displays it.
If the entered value validation failed then warns the user immediately. 
BTW if I turn of afvb setDefaultFormProcessing to false then the field level
validation does not work.


---
  AjaxFormSubmitBehavior afvb=
new AjaxFormSubmitBehavior(eform, onchange) {
 
 
@Override
protected void onSubmit(AjaxRequestTarget art) {
HrpBbheertk ertk = (HrpBbheertk)
eform.getModelObject();
String k = ertek.getValue();
customBo.getDaoSession().beginTransaction();
HrpBbhepar5PK pk = new HrpBbhepar5PK();
pk.setCompany(ertk.getHrpBbheertkPK().getCompany());
   
pk.setAkodszam(ertk.getHrpBbheertkPK().getAlaptipus());
   
pk.setDkodszam(ertk.getHrpBbheertkPK().getDimenzio());
   
pk.setDekodszam(ertk.getHrpBbheertkPK().getDimenzioelem());
if (!k.isEmpty()) {
pk.setDertek(Short.valueOf(k));
HrpBbhepar5 hepar5 =
customBo.find(HrpBbhepar5.class, pk);
if (hepar5 != null) {
   
dimenev.setDefaultModelObject(hepar5.getDertekmegnev());
} else {
dimenev.setDefaultModelObject();
}

}
if
(customBo.getDaoSession().getTransaction().isActive()) {
   
customBo.getDaoSession().getTransaction().commit();
}

art.add(dimenev);
art.add(fb);
}

@Override
protected void onError(AjaxRequestTarget art) { 
art.add(fb);
}

};



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651
565p4651568.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



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



Re: [WARN]Falling back to Redirect_To_Buffer render

2012-08-28 Thread Martin Grigorov
Hi,

In some cases ONE_PASS_RENDER cannot be used.
Maybe we should make this a DEBUG log statement to not make you worry about it.

On Tue, Aug 28, 2012 at 7:13 PM, sudeivas sureshkumar@gmail.com wrote:
 Hello,
Though I am using 'ONE_PASS_RENDER' strategy, I am still getting the
 below warning,

 WARN http-8000-2 [org.apache.wicket.request.handler.render.WebPageRenderer]
 - Falling back to Redirect_To_Buffer render strategy because none of the
 conditions matched.

 I am using wicket 1.5.6 in a clustered setup.

 Am I missing something?

 -Suresh



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/WARN-Falling-back-to-Redirect-To-Buffer-render-tp4651567.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



[Announce] WicketStuff 1.5.8 is released

2012-08-28 Thread Martin Grigorov
Hello,

WicketStuff Core projects version 1.5.8 have been released and shortly
will be available at Maven Central repository.
They are built against Apache Wicket 1.5.8.

The changelog is short this time:

Martin Tzvetanov Grigorov (4):
  Merge some changes from core-1.5.7 - they are needed to be able
to build with JDK 1.5
  [portlets] Use JDK 1.5. Fix a bug? with a position in array
  [tinymce] Use a version of json.jar that is built with JDK 1.5
  Set versions to 1.5.8

Peter Pastrnak (1):
  mend

The projects can be retrieved from Maven like this:

dependency
  groupIdorg.wicketstuff/groupId
  artifactIdwicketstuff-progressbar/artifactId
  version1.5.8/version
/dependency

The release tag is here:
https://github.com/wicketstuff/core/tree/wicketstuff-core-1.5.8

Issues can be reported here: https://github.com/wicketstuff/core/issues

The Project Wiki is available here: https://github.com/wicketstuff/core/wiki

The WicketStuff team!

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



Re: Nested form submit problem

2012-08-28 Thread Sandor Feher
Be sure :). This is the root of all evil :). Checked.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651565p4651575.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: Nested form submit problem

2012-08-28 Thread Sandor Feher
This works until I submit the parent form because it fires nested form's
onSubmit event. Does not matter if I click on save or cancel or whatever
button. 
Anyway. Is it possible to catch the button name clicked in the nested form
onSubmit ? If so I could separate the code depending on the button clicked.

   



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651565p4651576.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



Pre-Select DropDownChoice Selection, but No Model yet

2012-08-28 Thread eugenebalt
I am in the form-construction part of my code (the Model has not been created
yet, because Submit hasn't been pressed yet).

I have a DropDownChoice, and I need to pre-select a certain item. How do I
do it? The DropDownChoice has already been constructed.

I can't do setModelObject(..) because the model is still null at this point,
I get an error. Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pre-Select-DropDownChoice-Selection-but-No-Model-yet-tp4651578.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: Pre-Select DropDownChoice Selection, but No Model yet

2012-08-28 Thread eugenebalt
(Note: In my form, I am using a CompoundPropertyModel. So my DropDownChoice
is automatically tied to the field in my bean.)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pre-Select-DropDownChoice-Selection-but-No-Model-yet-tp4651578p4651579.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: Pre-Select DropDownChoice Selection, but No Model yet

2012-08-28 Thread Paul Bors
Drop downs are some of the difficult ones to get at first, but once you
understand one of them you're good to go!

See:
http://wicket.apache.org/learn/examples/dropdownchoice.html (the Selecting
a default choice)
https://cwiki.apache.org/WICKET/dropdownchoice-examples.html

Or see the FormInput live example:
http://www.wicket-library.com/wicket-examples/forminput

~ Thank you,
  Paul Bors

-Original Message-
From: eugenebalt [mailto:eugeneb...@yahoo.com] 
Sent: Tuesday, August 28, 2012 6:33 PM
To: users@wicket.apache.org
Subject: Re: Pre-Select DropDownChoice Selection, but No Model yet

(Note: In my form, I am using a CompoundPropertyModel. So my DropDownChoice
is automatically tied to the field in my bean.)



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Pre-Select-DropDownChoice-Selecti
on-but-No-Model-yet-tp4651578p4651579.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



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



RE: Nested form submit problem

2012-08-28 Thread Paul Bors
Must you really have a nested form here?
Can't you just get away with having each form field in a panel and not
surround it with a second form html tag?

And if you must really do so... can't you toggle that html form tag between
a Wicket Form and WebMarkupContainer or EmptyPanel (hide it when used as a
WebMarkupContainer or EmptyPanel so your wicket component tree is preserved
but it won't render on your page). You would have to keep state for each of
those inner panel forms of yours.

Those are just couple of ideas to get you started with.

Also, take a look at the Wizard as that component uses different panels to
add form field on different Steps of the Wizard.
See it in action at:
http://www.wicket-library.com/wicket-examples/wizard

~ Thank you,
  Paul Bors

-Original Message-
From: Sandor Feher [mailto:sfe...@bluesystem.hu] 
Sent: Tuesday, August 28, 2012 5:54 PM
To: users@wicket.apache.org
Subject: RE: Nested form submit problem

This works until I submit the parent form because it fires nested form's
onSubmit event. Does not matter if I click on save or cancel or whatever
button. 
Anyway. Is it possible to catch the button name clicked in the nested form
onSubmit ? If so I could separate the code depending on the button clicked.

   



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651
565p4651576.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



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



Unable to get response page from PageRequestHandlerTracker

2012-08-28 Thread James Eliyezar
Hi,

We recently migrated our application to wicket-1.5.8.

We have an audit aspect based on Spring AOP that shall log the actions
performed in the current page.
In wicket 1.4 we use to get that like
RequestCycle.get().getResponsePage().

This has changed and I know that wicket 1.5 doesn't support this anymore.

The suggested method as per the wiki is to use a custom
RequestCycleListenerhttps://cwiki.apache.org/WICKET/requestcycle-in-wicket-15.html
.

Fortunately, as highlighted in the mailing list, there is a new class in
wicket 1.5.8 named
PageRequestHandlerTrackerhttp://apache-wicket.1842946.n4.nabble.com/Interpolate-response-with-IResponseFilter-td4651476.htmlto
meet this common requirement.

However, when we use
PageRequestHandlerTracker.getLastHandler(RequestCycle.get()),
and then attempt to call #getPage(), a null pointer exception is thrown.

Am I doing something wrong here? Please give your suggestions.

-- 
Thanks  regards
James Selvakumar
mcruncher.com


Re: Unable to get response page from PageRequestHandlerTracker

2012-08-28 Thread Paul BorČ™
Might help if you provide a stack trace for the NPE :)

Have a great day,
Paul BorČ™

On Aug 29, 2012, at 0:37, James Eliyezar ja...@mcruncher.com wrote:

 Hi,
 
 We recently migrated our application to wicket-1.5.8.
 
 We have an audit aspect based on Spring AOP that shall log the actions
 performed in the current page.
 In wicket 1.4 we use to get that like
 RequestCycle.get().getResponsePage().
 
 This has changed and I know that wicket 1.5 doesn't support this anymore.
 
 The suggested method as per the wiki is to use a custom
 RequestCycleListenerhttps://cwiki.apache.org/WICKET/requestcycle-in-wicket-15.html
 .
 
 Fortunately, as highlighted in the mailing list, there is a new class in
 wicket 1.5.8 named
 PageRequestHandlerTrackerhttp://apache-wicket.1842946.n4.nabble.com/Interpolate-response-with-IResponseFilter-td4651476.htmlto
 meet this common requirement.
 
 However, when we use
 PageRequestHandlerTracker.getLastHandler(RequestCycle.get()),
 and then attempt to call #getPage(), a null pointer exception is thrown.
 
 Am I doing something wrong here? Please give your suggestions.
 
 -- 
 Thanks  regards
 James Selvakumar
 mcruncher.com

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



ObjectAutoCompleteBuilder in wicket 1.5.7 get is not a valid Serializable error.

2012-08-28 Thread Vignesh Palanisamy
Hello everyone,

We had used ObjectAutoCompleteBuilder for a text field in a form in wicket
1.4 here its work fine,
but right now we are migrating from wicket 1.4 to wicket 1.5.7 as well as
wicketstuff 1.5.7.
here on submit form, we get : *is not a valid Serializable* error.

why it comes? is we want to change any other things.



Thanks in advance.
Vignesh Palanisamy


Re: ObjectAutoCompleteBuilder in wicket 1.5.7 get is not a valid Serializable error.

2012-08-28 Thread Martin Grigorov
Hi,

SerializableChecker logs a detailed message pointing to the
non-serializable field.
Please paste the exception.

On Wed, Aug 29, 2012 at 7:37 AM, Vignesh Palanisamy
vign...@mcruncher.com wrote:
 Hello everyone,

 We had used ObjectAutoCompleteBuilder for a text field in a form in wicket
 1.4 here its work fine,
 but right now we are migrating from wicket 1.4 to wicket 1.5.7 as well as
 wicketstuff 1.5.7.
 here on submit form, we get : *is not a valid Serializable* error.

 why it comes? is we want to change any other things.



 Thanks in advance.
 Vignesh Palanisamy



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