Re: Possible bug with AjaxLazyLoadPanel

2013-05-16 Thread Michael Zhavzharov
Hm, I just tried to do what you are talking about and it works for me.
I have an ALLP:
add(new AjaxLazyLoadPanel(lazy) {
@Override
public Component getLazyLoadComponent(*String id*) {
return new ContentPanel(*id*);
}
});

and AjaxLink:
add(new AjaxLink(thumbLink) {
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
   
System.out.println(this.getPage().get(lazy).get(*content*));
}
});

And in debug I can see, that get(content) returns me component that I
need.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Possible-bug-with-AjaxLazyLoadPanel-tp4658793p4658838.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: Wicketstuff release cycle

2013-05-16 Thread Martin Grigorov
Hi Maxim,


On Thu, May 16, 2013 at 7:26 AM, Maxim Solodovnik solomax...@gmail.comwrote:

 Thanks for the quick reply :)

 According to the maven no all components are released
 is there any whitelist or something to determine which components should
 be release and which are not?


The whitelist is the Maven modules definitions in the pom.xml files.
Not all modules are upgraded to Wicket 6 and that's why they are not
released.

I guess you are interested in UrlFragment module - it is part of jdk-1.6
module so it will be released.




 On Thu, May 16, 2013 at 11:21 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

  Normally Martin Grigorov will release a new version within a couple of
 days
  (sometimes just a matter of hours) after each wicket release...
 
 
  On Thu, May 16, 2013 at 8:16 AM, Maxim Solodovnik solomax...@gmail.com
  wrote:
 
   Hello,
  
   I would like to ask a question regarding wicketstuff releases.
   According to Wicketstaff WIKI [1] last stable was made July 3, 2012,
   according
   to maven some modules were released 18-Apr-2013 and has version 6.7.0
  [2].
  
   Is there option to ask for release of the components [3] with the
 wicket
   6.8.0 or maybe earlier
  
   Why I'm asking is because we are using apache ivy in our build and it
 is
   not very easy to get spapshot builds (it is necessary to specify
 version
   as 6.0-20130515.164331-3 and it tend to change after each build)
  
   Thanks in advance
  
   [1] https://github.com/wicketstuff/core/wiki
   [2]
  
 http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-yui-calendar/
   [3]
  
  
 
 https://oss.sonatype.org/content/repositories/snapshots/org/wicketstuff/wicketstuff-urlfragment/
  
   
 http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-yui-calendar/
   --
   WBR
   Maxim aka solomax
  
 
 
 
  --
  Regards - Ernesto Reinaldo Barreiro
 



 --
 WBR
 Maxim aka solomax




-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


Re: Wicketstuff release cycle

2013-05-16 Thread Maxim Solodovnik
Hello Martin,

Thanks! :)


On Thu, May 16, 2013 at 1:45 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi Maxim,


 On Thu, May 16, 2013 at 7:26 AM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  Thanks for the quick reply :)
 
  According to the maven no all components are released
  is there any whitelist or something to determine which components
 should
  be release and which are not?
 

 The whitelist is the Maven modules definitions in the pom.xml files.
 Not all modules are upgraded to Wicket 6 and that's why they are not
 released.

 I guess you are interested in UrlFragment module - it is part of jdk-1.6
 module so it will be released.


 
 
  On Thu, May 16, 2013 at 11:21 AM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
   Normally Martin Grigorov will release a new version within a couple of
  days
   (sometimes just a matter of hours) after each wicket release...
  
  
   On Thu, May 16, 2013 at 8:16 AM, Maxim Solodovnik 
 solomax...@gmail.com
   wrote:
  
Hello,
   
I would like to ask a question regarding wicketstuff releases.
According to Wicketstaff WIKI [1] last stable was made July 3, 2012,
according
to maven some modules were released 18-Apr-2013 and has version 6.7.0
   [2].
   
Is there option to ask for release of the components [3] with the
  wicket
6.8.0 or maybe earlier
   
Why I'm asking is because we are using apache ivy in our build and it
  is
not very easy to get spapshot builds (it is necessary to specify
  version
as 6.0-20130515.164331-3 and it tend to change after each build)
   
Thanks in advance
   
[1] https://github.com/wicketstuff/core/wiki
[2]
   
  http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-yui-calendar/
[3]
   
   
  
 
 https://oss.sonatype.org/content/repositories/snapshots/org/wicketstuff/wicketstuff-urlfragment/
   

  http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-yui-calendar/
--
WBR
Maxim aka solomax
   
  
  
  
   --
   Regards - Ernesto Reinaldo Barreiro
  
 
 
 
  --
  WBR
  Maxim aka solomax
 



 --
 Martin Grigorov
 Wicket Training  Consulting
 http://jWeekend.com http://jweekend.com/




-- 
WBR
Maxim aka solomax


Re: Session creates multiple times

2013-05-16 Thread Martin Grigorov
Hi,

If Session.get() is called then a new Wicket Session is created. Unless
Session#bind() is called this session is temporary, i.e. it will be
discarded at the end of the request cycle.
If #bind() is called then a Http Session is created too and the Wicket
Session is stored in it as an attribute, and it will be reused in the
following requests.

To see why several Wicket sessions are created just put a breakpoint in
YourApp#newSession() and see the stacktrace.
The Wicket Session is exposed as ThreadLocal once created/looked up, so
Wicket won't call App#newSession() more than once per request. More
probably a request to resource (.css, .js, ...) creates a Session too.


On Thu, May 16, 2013 at 8:53 AM, Michael Zhavzharov mzhavzha...@alee.ruwrote:

 Hello!
 I have a webApp, that have a webSession witch creates a connector and many
 managers. When I starts an app, session creates 2 times. When the page is
 starting to render it creates another 2 times and every user, when
 connecting to this app, creates another 2 sessions.
 I just realized that if I starts an app with path
 http://localhost:8080/QuickStart/home (home is mounted as a home page),
 the session creates ones, but if I push
 http://localhost:8080/QuickStart/home?0 or
 http://localhost:8080/QuickStart
 it creates 2 times.
 Is it normal? And can I do something with this problem to make session
 creates only ones?

 Thank you!



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Session-creates-multiple-times-tp4658837.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
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


Re: Wicketstuff release cycle

2013-05-16 Thread Martin Grigorov
Wicket 6.8.0 will be cut tomorrow. If everything is OK during the vote it
will be released next Tuesday/Wednesday.
WicketStuff will be released soon after Wicket.

We will be grateful if you (Wicket users) test your apps with
6.8.0-SNAPSHOT or with the Maven staged repository once it is ready. The
sooner you report a problem/regression the sooner Wicket(Stuff) will be
released.


On Thu, May 16, 2013 at 9:47 AM, Maxim Solodovnik solomax...@gmail.comwrote:

 Hello Martin,

 Thanks! :)


 On Thu, May 16, 2013 at 1:45 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi Maxim,
 
 
  On Thu, May 16, 2013 at 7:26 AM, Maxim Solodovnik solomax...@gmail.com
  wrote:
 
   Thanks for the quick reply :)
  
   According to the maven no all components are released
   is there any whitelist or something to determine which components
  should
   be release and which are not?
  
 
  The whitelist is the Maven modules definitions in the pom.xml files.
  Not all modules are upgraded to Wicket 6 and that's why they are not
  released.
 
  I guess you are interested in UrlFragment module - it is part of jdk-1.6
  module so it will be released.
 
 
  
  
   On Thu, May 16, 2013 at 11:21 AM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
Normally Martin Grigorov will release a new version within a couple
 of
   days
(sometimes just a matter of hours) after each wicket release...
   
   
On Thu, May 16, 2013 at 8:16 AM, Maxim Solodovnik 
  solomax...@gmail.com
wrote:
   
 Hello,

 I would like to ask a question regarding wicketstuff releases.
 According to Wicketstaff WIKI [1] last stable was made July 3,
 2012,
 according
 to maven some modules were released 18-Apr-2013 and has version
 6.7.0
[2].

 Is there option to ask for release of the components [3] with the
   wicket
 6.8.0 or maybe earlier

 Why I'm asking is because we are using apache ivy in our build and
 it
   is
 not very easy to get spapshot builds (it is necessary to specify
   version
 as 6.0-20130515.164331-3 and it tend to change after each build)

 Thanks in advance

 [1] https://github.com/wicketstuff/core/wiki
 [2]

  
 http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-yui-calendar/
 [3]


   
  
 
 https://oss.sonatype.org/content/repositories/snapshots/org/wicketstuff/wicketstuff-urlfragment/

 
  
 http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-yui-calendar/
 --
 WBR
 Maxim aka solomax

   
   
   
--
Regards - Ernesto Reinaldo Barreiro
   
  
  
  
   --
   WBR
   Maxim aka solomax
  
 
 
 
  --
  Martin Grigorov
  Wicket Training  Consulting
  http://jWeekend.com http://jweekend.com/
 



 --
 WBR
 Maxim aka solomax




-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


Empty Form Validation

2013-05-16 Thread Christoph.Manig
Hello,

I have a form which I want to validate. If this form is empty there should be 
shown a message in the feedbackpanel. How can I do this? Is there a way to 
validate an empty form with its compoundpropertymodel?

Thank you for your help.


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com





Re: Empty Form Validation

2013-05-16 Thread Martin Grigorov
Hi,

See IFormValidator


On Thu, May 16, 2013 at 11:51 AM, christoph.ma...@t-systems.com wrote:

 Hello,

 I have a form which I want to validate. If this form is empty there should
 be shown a message in the feedbackpanel. How can I do this? Is there a way
 to validate an empty form with its compoundpropertymodel?

 Thank you for your help.


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com






-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


AW: Empty Form Validation

2013-05-16 Thread Christoph.Manig
My form looks like this:
FormFilterCreatorFault faultSearchForm = new 
FormFilterCreatorFault(faultSucheForm, new 
CompoundPropertyModelFilterCreatorFault(new FilterCreatorFault()));

I implement this Validator:
public class EmptyFormValidator  implements IFormValidator{

private FormComponent formModel;
private CSSFeedbackPanel feedback;

public EmptyFormValidator (FormComponent formModel, CSSFeedbackPanel 
feedback){
this.formModel = formModel;
this.feedback = feedback;
}

@Override
public FormComponent?[] getDependentFormComponents() {
return new FormComponent?[]{formModel};
}

@Override
public void validate(Form? components) {
FilterCreatorFault fcf = (FilterCreatorFault) 
formModel.getConvertedInput();

if(fcf == null){
feedback.error(Empty);
}
}
}

The CompoundPropertyModel hast he type FilterCreatorFault. This isn't a 
FormComponent. So this isn't working. How can I validate with the 
CompoundPropertyModel?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org] 
Gesendet: Donnerstag, 16. Mai 2013 10:55
An: users@wicket.apache.org
Betreff: Re: Empty Form Validation

Hi,

See IFormValidator


On Thu, May 16, 2013 at 11:51 AM, christoph.ma...@t-systems.com wrote:

 Hello,

 I have a form which I want to validate. If this form is empty there 
 should be shown a message in the feedbackpanel. How can I do this? Is 
 there a way to validate an empty form with its compoundpropertymodel?

 Thank you for your help.


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com






--
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


Re: Possible bug with AjaxLazyLoadPanel

2013-05-16 Thread Raul
Michael Zhavzharov the way you've indicated, it works correctly.
Thank you.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Possible-bug-with-AjaxLazyLoadPanel-tp4658793p4658846.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: Session creates multiple times

2013-05-16 Thread Michael Zhavzharov
Thank you, Martin!

I have such stackTrace for all of the newSession() calls:
1)com.alee.urait.web.Urait.newSession(Urait.java:89)

2)org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1557)
3)org.apache.wicket.Session.get(Session.java:168)

4)org.apache.wicket.request.handler.render.PageRenderer.getSessionId(PageRenderer.java:101)
5)org.apache.wicket.request.handler.render.WebPageRenderer.getAndRemoveBufferedResponse(WebPageRenderer.java:79)

6)org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:168)
7)org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)

8)org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)

9)org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)

10)org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)

11)org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)

12)org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)

13)org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)

14)org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)

15)org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)

16)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)

17)org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)

18)org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)

19)org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)

20)org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
21)com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
22)com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)

23)org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)

24)org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)

25)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)

26)com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)

27)com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
28)com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
29)com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)

30)com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)

31)com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)

32)com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)

33)com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)

34)com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)

35)com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)

36)com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
37)com.sun.grizzly.ContextTask.run(ContextTask.java:69)

38)com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)

39)com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
40)java.lang.Thread.run(Thread.java:662)

After second and last session creating,  bind() method is calling 3 times.

But actually, I think I found what causes such problems. I have mounted my
HomePage with mountPage(home//#{id}, HomePage.class), I need this mount
because of parameters, that I need to process. Can I do something with this?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Session-creates-multiple-times-tp4658837p4658848.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: Session creates multiple times

2013-05-16 Thread Sven Meier

com.alee.urait.web.Urait.newSession(Urait.java:89)
org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1557)
org.apache.wicket.Session.get(Session.java:168)
org.apache.wicket.request.handler.render.PageRenderer.*getSessionId*(PageRenderer.java:101)
org.apache.wicket.request.handler.render.WebPageRenderer.getAndRemoveBufferedResponse(WebPageRenderer.java:79)



We have a few places in Wicket where a (temporary) Session is created 
unnecessarily.


PageRenderer#getSessionId() should check for existence of a Session, 
please create a Jira issue.


Sven

On 05/16/2013 01:14 PM, Michael Zhavzharov wrote:

Thank you, Martin!

I have such stackTrace for all of the newSession() calls:
 1)com.alee.urait.web.Urait.newSession(Urait.java:89)

2)org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1557)
3)org.apache.wicket.Session.get(Session.java:168)

4)org.apache.wicket.request.handler.render.PageRenderer.getSessionId(PageRenderer.java:101)
5)org.apache.wicket.request.handler.render.WebPageRenderer.getAndRemoveBufferedResponse(WebPageRenderer.java:79)

6)org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:168)
7)org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)

8)org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)

9)org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)

10)org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)

11)org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)

12)org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)

13)org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)

14)org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)

15)org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)

16)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)

17)org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)

18)org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)

19)org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)

20)org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
21)com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
22)com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)

23)org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)

24)org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)

25)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)

26)com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)

27)com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
28)com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
29)com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)

30)com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)

31)com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)

32)com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)

33)com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)

34)com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)

35)com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)

36)com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
37)com.sun.grizzly.ContextTask.run(ContextTask.java:69)

38)com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)

39)com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
40)java.lang.Thread.run(Thread.java:662)

After second and last session creating,  bind() method is calling 3 times.

But actually, I think I found what causes such problems. I have mounted my
HomePage with mountPage(home//#{id}, HomePage.class), I need this mount
because of parameters, that I need to process. Can I do something with this?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Session-creates-multiple-times-tp4658837p4658848.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: Session creates multiple times

2013-05-16 Thread Michael Zhavzharov
Thank you, Sven!

I have created an issue, but I don't know it it right in it's description.
https://issues.apache.org/jira/browse/WICKET-5191

But can I do any hack now to get rid of this problem?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Session-creates-multiple-times-tp4658837p4658851.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: Session creates multiple times

2013-05-16 Thread Sven Meier

A quickstart would help to identify the issue.

Sven

On 05/16/2013 01:59 PM, Michael Zhavzharov wrote:

Thank you, Sven!

I have created an issue, but I don't know it it right in it's description.
https://issues.apache.org/jira/browse/WICKET-5191

But can I do any hack now to get rid of this problem?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Session-creates-multiple-times-tp4658837p4658851.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: Session creates multiple times

2013-05-16 Thread Martin Grigorov
It is attached to the ticket now.


On Thu, May 16, 2013 at 3:54 PM, Sven Meier s...@meiers.net wrote:

 A quickstart would help to identify the issue.

 Sven


 On 05/16/2013 01:59 PM, Michael Zhavzharov wrote:

 Thank you, Sven!

 I have created an issue, but I don't know it it right in it's description.
 https://issues.apache.org/**jira/browse/WICKET-5191https://issues.apache.org/jira/browse/WICKET-5191

 But can I do any hack now to get rid of this problem?



 --
 View this message in context: http://apache-wicket.1842946.**
 n4.nabble.com/Session-creates-**multiple-times-**tp4658837p4658851.htmlhttp://apache-wicket.1842946.n4.nabble.com/Session-creates-multiple-times-tp4658837p4658851.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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




-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


IE7 Submit button stops working

2013-05-16 Thread Entropy
Okay, I've got a riddle wrapped in an enigma wrapped in bacon for you.

My page works perfectly in IE8.  When I use the developer tools to go to IE7
compatability for testing, the submit button on my page stops working (I'll
describe exact symptoms below).  It works in IE8.  Works in Firefox.  

Other buttons that appear pretty identical elsewhere in the app work in IE7
compatility mode.  Ajax buttons and events on the page working fine in IE7
mode.  But not that button nor the cancel button (which also submits with a
javascript confirmation alert).  I've experimented with everything I notice
being different between this button and other submit buttons in the
application that work to no avail.

The not working is that it basically just reloads the current page.  All
selections are maintained.  No validation messages are shown, so it's not
failing my validation, and a breakpoint tells me it's not running them
either.  Breakpoints also tell me it never gets to the onSubmit.  I tried
defining a onSubmit on the form instead but it also never gets there.

My button in java:
form.add(new Button(nextBtn) {
private static final long serialVersionUID = 1L;
public void onSubmit() {
onNextButton();
}
});

My buttons in html:
input type=submit id=cancelBtn class=submit clr
wicket:id=cancelBtn onclick=return confirm('Are you sure you want to
cancel?'); value=Cancel
input type=submit class=submit btnsubmit wicket:id=nextBtn
value=eNote Criteria gt;




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IE7-Submit-button-stops-working-tp4658857.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: IE7 Submit button stops working

2013-05-16 Thread Ernesto Reinaldo Barreiro
Does it hit the

public void onError()
{

}

?

and thanks for the bacon;-)


On Thu, May 16, 2013 at 5:21 PM, Entropy blmulholl...@gmail.com wrote:

 Okay, I've got a riddle wrapped in an enigma wrapped in bacon for you.

 My page works perfectly in IE8.  When I use the developer tools to go to
 IE7
 compatability for testing, the submit button on my page stops working (I'll
 describe exact symptoms below).  It works in IE8.  Works in Firefox.

 Other buttons that appear pretty identical elsewhere in the app work in IE7
 compatility mode.  Ajax buttons and events on the page working fine in IE7
 mode.  But not that button nor the cancel button (which also submits with a
 javascript confirmation alert).  I've experimented with everything I notice
 being different between this button and other submit buttons in the
 application that work to no avail.

 The not working is that it basically just reloads the current page.  All
 selections are maintained.  No validation messages are shown, so it's not
 failing my validation, and a breakpoint tells me it's not running them
 either.  Breakpoints also tell me it never gets to the onSubmit.  I tried
 defining a onSubmit on the form instead but it also never gets there.

 My button in java:
 form.add(new Button(nextBtn) {
 private static final long serialVersionUID = 1L;
 public void onSubmit() {
 onNextButton();
 }
 });

 My buttons in html:
 input type=submit id=cancelBtn class=submit clr
 wicket:id=cancelBtn onclick=return confirm('Are you sure you want to
 cancel?'); value=Cancel
 input type=submit class=submit btnsubmit wicket:id=nextBtn
 value=eNote Criteria gt;




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/IE7-Submit-button-stops-working-tp4658857.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




-- 
Regards - Ernesto Reinaldo Barreiro


Wicket in other application

2013-05-16 Thread Alis
Hello! Currently, I have two applications: one wicket and one in struts jsp.

Both need to interact. I keep the same HttpServletRequest and HttpSession in
both apliacaiones.

The solution I thought is to unify the wicket application in another
application.

How do I?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-in-other-application-tp4658859.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: Wicket in other application

2013-05-16 Thread Richard W. Adams
What do you mean by unify? Do you want to merge them into a single 
application with only one code base? Or do you mean something else?

If you intend to keep them as two separate applications, there are number 
of techniques for inter-process communication.




From:   Alis ajcalve...@yahoo.es
To: users@wicket.apache.org
Date:   05/16/2013 08:55 AM
Subject:Wicket in other application



Hello! Currently, I have two applications: one wicket and one in struts 
jsp.

Both need to interact. I keep the same HttpServletRequest and HttpSession 
in
both apliacaiones.

The solution I thought is to unify the wicket application in another
application.

How do I?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-in-other-application-tp4658859.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




**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: Browser Back Button Question

2013-05-16 Thread dhongyt
After two or three back button on the browser an error message displays
session closed.
The error returned is a bit confusing:


I'm wondering if its because of hibernate? Its trying to get the query of
the page to display but the query has been closed? It also talks about
errors with wicket to so I'm not sure, but the top error is hibernate.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4658863.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: Wicket in other application

2013-05-16 Thread Jan Riehn

Hello Alis,

the Wicket programming model is based on the typical web application 
request scenario - one thread typically processes one HTTP request using 
the org.apache.wicket.protocol.http.WicketFilter. This filter sets the 
application context using a thread-local, many wicket internals and also 
analogous many wicket applications use this thread-local over a static 
method by Application.get().


For the case that code for different application instances or even 
outside of the WicketFilter contexts request must be executed, you can 
use the following template. It works similar to the WicketFilter.



public ApplicationContextTemplate(Application application) {
final ThreadContext previousThreadContext = ThreadContext.detach();
try {
ThreadContext.setApplication(application);
execute();
} finally {
ThreadContext.restore(previousThreadContext);
}
}

protected abstract void execute();


Best regards,

Jan


On 05/16/2013 04:04 PM, Richard W. Adams wrote:

What do you mean by unify? Do you want to merge them into a single
application with only one code base? Or do you mean something else?

If you intend to keep them as two separate applications, there are number
of techniques for inter-process communication.




From:   Alis ajcalve...@yahoo.es
To: users@wicket.apache.org
Date:   05/16/2013 08:55 AM
Subject:Wicket in other application



Hello! Currently, I have two applications: one wicket and one in struts
jsp.

Both need to interact. I keep the same HttpServletRequest and HttpSession
in
both apliacaiones.

The solution I thought is to unify the wicket application in another
application.

How do I?



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Wicket-in-other-application-tp4658859.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




**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**




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



Re: IE7 Submit button stops working

2013-05-16 Thread Entropy
Presuming you meant on the form, no it does not.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IE7-Submit-button-stops-working-tp4658857p4658866.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: Wicket in other application

2013-05-16 Thread Alis
Yes, i want to merge them into a single application with only one code base.

I'm bringing in other wicket application.


I began by:

web.xml

?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC quot;-//Sun Microsystems, Inc.//DTD Web
Application 2.3//ENquot;
quot;http://java.sun.com/dtd/web-app_2_3.dtdquot;

web-app id=WebApp_1087847902953

filter id=Filter_1
filter-nameFilterAll/filter-name
   
filter-classcom.consisint.acsele.management.filter.URLFilter/filter-class
init-param id=inicio_100
param-nameinicio/param-name
param-valueindex-alt.jsp/param-value
/init-param
/filter
filter id=Filter_10001
filter-nameUserInfoSetFilter/filter-name
   
filter-classcom.consisint.acsele.management.filter.UserInfoSetFilter/filter-class
/filter
filter id=Filter_10002
filter-nameUserInfoSetFilterFrontEnd/filter-name
   
filter-classcom.consisint.frontend.config.UserInfoSetFilter/filter-class
init-param
param-namefilterName/param-name

param-valueWicketApplication/param-value
/init-param
/filter
   * filter id=Filter_10003*
filter-nameWicketApplication/filter-name

  * 
filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class*
init-param
param-nameapplicationClassName/param-name
   
param-valuecom.consisint.frontend.modules.main.Application/param-value
/init-param
  *  /filter*


filter-mapping id=FilterMapping_10001
filter-nameFilterAll/filter-name
url-pattern*.jsp/url-pattern
/filter-mapping
filter-mapping id=FilterMapping_10002
filter-nameFilterAll/filter-name
url-pattern/servlet//url-pattern
/filter-mapping
filter-mapping id=FilterMapping_10003
filter-nameFilterAll/filter-name
url-pattern//url-pattern
/filter-mapping
filter-mapping id=FilterMapping_1115322486156
filter-nameFilterAll/filter-name
servlet-nameServletGenericFormulaTool/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486157
filter-nameFilterAll/filter-name
servlet-nameaction/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486158
filter-nameFilterAll/filter-name
servlet-nameServletFundTool/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486159
filter-nameFilterAll/filter-name
servlet-nameServletProductTool/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486160
filter-nameFilterAll/filter-name
servlet-nameServletEntryTool/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486161
filter-nameFilterAll/filter-name
servlet-nameStartOperation/servlet-name
/filter-mapping
  filter-mapping id=FilterMapping_1115322486158mob
 filter-nameFilterAll/filter-name
 servlet-nameMobileServices/servlet-name
  /filter-mapping
filter-mapping id=FilterMapping_1115322486162
filter-nameFilterAll/filter-name
servlet-nameAppCoordinator/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486163
filter-nameFilterAll/filter-name
servlet-nameServletUAA/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486164
filter-nameFilterAll/filter-name
servlet-nameServletCashierStand/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486165
filter-nameFilterAll/filter-name
servlet-nameServletFormulaTool/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486166
filter-nameFilterAll/filter-name
servlet-nameServletClaimTool/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486168
filter-nameFilterAll/filter-name
servlet-nameWorkflowController/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486169
filter-nameFilterAll/filter-name
servlet-nameServletReport/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486170
filter-nameFilterAll/filter-name
servlet-nameServletPolicy/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486171
filter-nameFilterAll/filter-name
servlet-nameServletWorkflowTool/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486172
filter-nameFilterAll/filter-name
servlet-nameServletTemplateTool/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486173
filter-nameFilterAll/filter-name
servlet-nameServletClaim/servlet-name
/filter-mapping
filter-mapping id=FilterMapping_1115322486174
filter-nameFilterAll/filter-name
servlet-nameServletTemplate/servlet-name
/filter-mapping

Re: IE7 Submit button stops working

2013-05-16 Thread Entropy
New info:  It works in IE8 from my localhost (using IBM RAD) but does NOT
work in IE8 from a standalone server (WebSphere).  However, it DOES still
work in Firefox on the standalone server.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IE7-Submit-button-stops-working-tp4658857p4658868.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: Call me page wicket from iframe in page.jsp

2013-05-16 Thread Alis
Thank you! How do I keep the same session even if aplicaiones different?


To be placed in each web.xml, help me



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Call-me-page-wicket-from-iframe-in-page-jsp-tp4658716p4658869.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: IE7 Submit button stops working

2013-05-16 Thread Entropy
More Info:

So I was able, through experimentation and heavy commenting in/out to narrow
it down.  It's an ajax behavior earlier in the page that is causing the
button to misbehave.  

UserMultiSelect recipients = (UserMultiSelect)
form.get(recipients_section);
if(!model.isSingleRecipientMode()) {
//  recipients.setEnabled(true);
recipients.clear();
}
target.addComponent(recipients);
target.addComponent(appsDropdown);

I comment in that setEnabled and it fails.  I leave it out, and the event
works.  UserMultiSelect is a complex hybrid component that is used in a few
spots in the app, though i am the only one who has to disable and then
enable it based on user input.  It consists of a jQuery tab, a multiselect
box, a handful of combo boxes, a text field and a couple more multiselect
boxes.

Why would enabling this panel cause the submit button to fail later on?  By
the way, I tried it without performing any events on the panel after it was
enabled and it still has the issue, so it's not like this enabling just made
some later event that was the real cause possible.

Does this help?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IE7-Submit-button-stops-working-tp4658857p4658870.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



Example for advanced grid for wicket with timer/date picker controls

2013-05-16 Thread Bruno Moura
Someone could give an example of code of an app built with an advanced grid
with date picker component in it cells?

Thanks

Bera


Re: Retrieve a value of textField and set the property of the Model

2013-05-16 Thread Bruno Moura
Thanks Martin again

I coded as you told me but unfortunately the code doesn't work
because the description property of the model/object descriptionModel
didn't receive the value inserted in the text field.

after inspected the descriptionModel in debug time I saw that description
hasn't any value assigned.



Bruno Moura


2013/5/15 Martin Grigorov mgrigo...@apache.org

 Hi,


 On Wed, May 15, 2013 at 6:18 AM, Bruno Moura brunormo...@gmail.com
 wrote:

  Hi Paul, thanks very much for your help!
 
  I followed your suggestion but this peace of code doesn't compile
  unfortunately:
 
  IModel descriptionModel = new PropertyModel[Meeting](meeting,
  description));
 
  I have tried
 
  val descriptionModel[IModel] = new PropertyModel[Meeting](meeting,
  description)); //wrong systax for scala
 
 
 the easiest is: val descriptionModel = new PropertyModel[Meeting](meeting,
 description)

 the more explicit ones are:

 val descriptionModel : IModel[Meeting] = new
 PropertyModel[Meeting](meeting, description)
 val descriptionModel : PropertyModel[Meeting] = new
 PropertyModel[Meeting](meeting, description)


  and
 
  val descriptionModel = new IModel[Meeting](meeting, description)); //
  IModel can't be instanced
 
  But I'm doing this thing wrong.
 
  I made a great progress with my app but now I'm struggling with this
 issue
  and I spent a lot
  of time to archive this simple task. If I'm  doing this stuff with java
 my
  life could
  be much easier :-D.
 
  I'll appreciate your hep again
 
 
  Thanks very much
 
 
 
 
  Bera
 
 
  2013/5/10 Paul Bors p...@bors.ws
 
   Why the Ajax round-trips for each keyup to extract the model's
 object?
   Have you tried to implement just the Save link/button and then look-up
  the
   model object from inside the onClick() method?
  
   In your case it would come from the PropertyModel you use already:
  
   TextField description = new TextField(description,new
   PropertyModel[Meeting](meeting, description))
  
   change to:
  
   IModel descriptionModel = new
   PropertyModel[Meeting](meeting, description));
   TextField descriptionTextField = new TextField(description,
   descriptionModel );
  
   and your link becomes:
  
   private class LinkSave(id: String, meeting: Meeting) extends
   AjaxLink[String](id) {
  
   @SpringBean
   var meetingMediator: TMeetingMediator = _
 def onClick(target: AjaxRequestTarget) {
   meetingDAO.saveMeeting(descriptionModel.getObject())
 }
   }
  
   Unless you want to also update some other element on the screen with
 each
   user key press I really don't think you need the keyup listener.
  
   ~ Thank you,
  Paul Bors
  
  
   On Thu, May 9, 2013 at 11:03 PM, Bruno Moura brunormo...@gmail.com
   wrote:
  
I'm trying to implement a ListView and in on column of it I added a
listView, for each line,
I want to save the data inserted on it and update the model:
   
I'm implemented the code bellow:
   
val description = new TextField(description,new
PropertyModel[Meeting](meeting, description))
description.add(new AjaxFormComponentUpdatingBehavior(keyup) {
  protected def onUpdate(target: AjaxRequestTarget) {
description.getDefaultModelObjectAsString
  }
})
   
item.add(description)
   
And I added a link for each line of my ListView for save the
  information
   in
database,
each line is a instance of a model meeting as is showed bellow:
   
item.add(new LinkSave(save, meeting))
   
private class LinkSave(id: String, meeting: Meeting) extends
AjaxLink[String](id) {
   
@SpringBean
var meetingMediator: TMeetingMediator = _
   
setVisible(clickavel.asInstanceOf[Boolean])
add(new Label(label, new Model[String]() {
  override def getObject: String = Save
}))
   
def onClick(target: AjaxRequestTarget) {
  meetingDAO.saveMeeting(meeting)
   
}
  }
   
   
But unfortunately the code above doesn't work. It's fail to retrieve
  the
value of the text
field and also to set the attribute description of the Object meeting
   with
the value of the text field, so in the database the column
 description
  is
never filled
   
Someone know where I am doing wrong stuff?
   
Thanks a lot!
   
   
Bera
   
  
 



 --
 Martin Grigorov
 Wicket Training  Consulting
 http://jWeekend.com http://jweekend.com/



Re: Ill really apreciate the help to get the selected item of a DropDownChoice using Scala

2013-05-16 Thread Bruno Moura
Hi Martin

But the DDC doesn't have a constructor with PropertyModel[String](this,
custName)
only a property model with the Object/Pojo as I was using.

Sorry, I'm new in the world of wicket and scala, and is difficult to find
good examples around
so I'm using this list a lot because I'm getting suport and feedback and I
don't want to give up
of my project.

thanks

Bera


2013/5/15 Martin Grigorov mgrigo...@apache.org

 Hi,


 On Wed, May 15, 2013 at 6:32 AM, Bruno Moura brunormo...@gmail.com
 wrote:

  Hi
 
  For some weeks I'm trying to implement a simple combobox, DDC, and I'm
  struggling with this. I asked  for some help several times but
  unfortunately I didn't archive my goal because I'm failing sometimes to
  understand  scala with wicket, I have a little background with them at
 the
  moment.
 
  Anyway,  my code is showed bellow:
 
  *// ComboBox in a listView
  item.add(new DropDownChoice(customerSelection, new
  PropertyModel[Customer](customer, name), listCustomer, new
  ChoiceRenderer[Customer](name))*
 
 
 DropDownChoice[Customer]


 
  If I create a variable, for example,* val custName*,  to receive the name
  of the selected customer which functions I need to implement on the
  creation of DDC object and how can I retrieve this value for the
 variable?
 

 The way you already did it will set the selected value in customer's name.
 Check PropertyModel's javadoc to understand how it works.

 If you want to read/write the value in 'custName' then you have to use: new
 PropertyModel[String](this, custName)


  Thanks very much for help me.
 



 --
 Martin Grigorov
 Wicket Training  Consulting
 http://jWeekend.com http://jweekend.com/



Re: Ill really apreciate the help to get the selected item of a DropDownChoice using Scala

2013-05-16 Thread Maxim Solodovnik
You should have objects of same type in DropDownChoice, PropertyModel, List
and ChoiceRenderer



On Fri, May 17, 2013 at 10:12 AM, Bruno Moura brunormo...@gmail.com wrote:

 Hi Martin

 But the DDC doesn't have a constructor with PropertyModel[String](this,
 custName)
 only a property model with the Object/Pojo as I was using.

 Sorry, I'm new in the world of wicket and scala, and is difficult to find
 good examples around
 so I'm using this list a lot because I'm getting suport and feedback and I
 don't want to give up
 of my project.

 thanks

 Bera


 2013/5/15 Martin Grigorov mgrigo...@apache.org

  Hi,
 
 
  On Wed, May 15, 2013 at 6:32 AM, Bruno Moura brunormo...@gmail.com
  wrote:
 
   Hi
  
   For some weeks I'm trying to implement a simple combobox, DDC, and I'm
   struggling with this. I asked  for some help several times but
   unfortunately I didn't archive my goal because I'm failing sometimes to
   understand  scala with wicket, I have a little background with them at
  the
   moment.
  
   Anyway,  my code is showed bellow:
  
   *// ComboBox in a listView
   item.add(new DropDownChoice(customerSelection, new
   PropertyModel[Customer](customer, name), listCustomer, new
   ChoiceRenderer[Customer](name))*
  
  
  DropDownChoice[Customer]
 
 
  
   If I create a variable, for example,* val custName*,  to receive the
 name
   of the selected customer which functions I need to implement on the
   creation of DDC object and how can I retrieve this value for the
  variable?
  
 
  The way you already did it will set the selected value in customer's
 name.
  Check PropertyModel's javadoc to understand how it works.
 
  If you want to read/write the value in 'custName' then you have to use:
 new
  PropertyModel[String](this, custName)
 
 
   Thanks very much for help me.
  
 
 
 
  --
  Martin Grigorov
  Wicket Training  Consulting
  http://jWeekend.com http://jweekend.com/
 




-- 
WBR
Maxim aka solomax