Problem with window name generated using AjaxNewWindowNotifyingBehavior in wicket 6.5.0

2013-05-10 Thread iamrakesh
Hi,

I've a WicketPage implementation to which I've added
AjaxNewWindowNotifyingBehavior, as shown below

public class MyPage extends WicketPage {
public MyPage() {
   add(new AjaxNewWindowNotifyingBehavior() {
 protected void onNewWindow(AjaxRequestTarget target) {
 setResponsePage(NotSupportedPage.class);
 }
});
}
   .
}

but onNewWindow() never gets called when I open a link in a new Tab/Window,
I checked the generated value for 'window.name' it is same for both
tabs/windows.

Is there anything else I need to do?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-window-name-generated-using-AjaxNewWindowNotifyingBehavior-in-wicket-6-5-0-tp4658703.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: Problem with window name generated using AjaxNewWindowNotifyingBehavior in wicket 6.5.0

2013-05-10 Thread Martin Grigorov
Hi,

The behavior fires the Ajax call only when the same page instance is loaded
in two tabs/windows.
That is both tabs should have the same pageId in the url query string, e.g.
?3another=parameter, here '3' is the page id.


On Fri, May 10, 2013 at 11:03 AM, iamrakesh iamrakes...@rediffmail.comwrote:

 Hi,

 I've a WicketPage implementation to which I've added
 AjaxNewWindowNotifyingBehavior, as shown below

 public class MyPage extends WicketPage {
 public MyPage() {
add(new AjaxNewWindowNotifyingBehavior() {
  protected void onNewWindow(AjaxRequestTarget target) {
  setResponsePage(NotSupportedPage.class);
  }
 });
 }
.
 }

 but onNewWindow() never gets called when I open a link in a new Tab/Window,
 I checked the generated value for 'window.name' it is same for both
 tabs/windows.

 Is there anything else I need to do?

 Regards,
 Rakesh.A



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Problem-with-window-name-generated-using-AjaxNewWindowNotifyingBehavior-in-wicket-6-5-0-tp4658703.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: Problem with window name generated using AjaxNewWindowNotifyingBehavior in wicket 6.5.0

2013-05-10 Thread iamrakesh
Hi,

I dont have page id in the URL [probably because of
'RenderStrategy.ONE_PASS_RENDER' I've used]!, In this case - is page id
different for pages in two tabs/windows?
If yes, how can I listen to such event?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-window-name-generated-using-AjaxNewWindowNotifyingBehavior-in-wicket-6-5-0-tp4658703p4658706.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: Problem with window name generated using AjaxNewWindowNotifyingBehavior in wicket 6.5.0

2013-05-10 Thread Martin Grigorov
Put a breakpoint at the line with:  add(new AjaxNewWindowNotifyingBehavior()
{
and another one at
: org.apache.wicket.ajax.AjaxNewWindowNotifyingBehavior#respond()
and see what happens


On Fri, May 10, 2013 at 12:50 PM, iamrakesh iamrakes...@rediffmail.comwrote:

 Hi,

 I dont have page id in the URL [probably because of
 'RenderStrategy.ONE_PASS_RENDER' I've used]!, In this case - is page id
 different for pages in two tabs/windows?
 If yes, how can I listen to such event?

 Regards,
 Rakesh.A



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Problem-with-window-name-generated-using-AjaxNewWindowNotifyingBehavior-in-wicket-6-5-0-tp4658703p4658706.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: Problem with window name generated using AjaxNewWindowNotifyingBehavior in wicket 6.5.0

2013-05-10 Thread iamrakesh
Hi,

I did, when the AjaxNewWindowNotifyingBehavior's contructor is called, a new
value for 'window.name' is generated, but when I see the page source, the
value written to the markup is same as the first tab, and the respond method
also gets the same value as the first tab.

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-window-name-generated-using-AjaxNewWindowNotifyingBehavior-in-wicket-6-5-0-tp4658703p4658708.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: Textbox in a listView, retrieve the value and set the property model

2013-05-10 Thread Bruno Moura
Maxin, thanks a lot again!

I'll verify and if this approach works for me and then I'll share the code
here!

Regards!

Bruno Moura


2013/5/10 Maxim Solodovnik solomax...@gmail.com

 ChoiceRenderer accepts 2 parameters (one of its constructor) one parameter
 for the name being displayed, other for id (hidden)
 I never had problems with dropDown but I always specified both.

 If this doesn't help you can try to debug and see what is the reason, i.e.
 what value is being casted ...



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

  Thanks Maxin, yes the code is in scala I didn't understand your
  suggestion
  I want to display the property name in the DDC no the property or field
 id,
  sorry
  if I did mistake in the code of my previous message.
 
  Bruno Moura
 
 
  2013/5/10 Maxim Solodovnik solomax...@gmail.com
 
   I would try to change your code as follows:
  
   new DropDownChoice*[Customer]*(customerSelection, new
   PropertyModel[Customer](customer, name), listCustomer, new
   ChoiceRenderer[Customer](name, *id*))
  
   your code seems to not in JAVA
  
  
  
   On Fri, May 10, 2013 at 9:13 AM, Bruno Moura brunormo...@gmail.com
   wrote:
  
Errata:
   
the original message and code is:
   
WicketMessage: Method onSelectionChanged of interface
org.apache.wicket.markup.html.form.IOnChangeListener targeted at
   component
[MarkupContainer [Component id = customerSelection]] threw an
 exception
   
Root cause:
   
java.lang.ClassCastException: java.lang.String cannot be cast to
com.prog.entities.Customer
   
The code that I have implemented is showed bellow
   
item.add(new DropDownChoice(customerSelection, new
PropertyModel[Customer](customer, name), listCustomer, new
ChoiceRenderer[Customer](name)) {
protected override def wantOnSelectionChangedNotifications:
   Boolean
= true
   
protected override def onSelectionChanged(newSelection:
   Customer) {
  super.onSelectionChanged(newSelection)
  }
})
   
Thanks
   
Bruno Moura
   
   
2013/5/9 Bruno Moura brunormo...@gmail.com
   

 I implemented a dropbox in a ListView, now when I choose a value
 the
   erro
 bellow always happen:

 WicketMessage: Method onSelectionChanged of interface
 org.apache.wicket.markup.html.form.IOnChangeListener targeted at
component
 [MarkupContainer [Component id = customerSelection]] threw an
  exception

 Root cause:

 java.lang.ClassCastException: java.lang.String cannot be cast to
 com.prog.entities.Cliente
 The code that I have implemented is showed bellow:

 item.add(new DropDownChoice(clienteSelection, new
 PropertyModel[Customer](customer, name), listCustomer, new
 ChoiceRenderer[Customer](name)) {
 protected override def wantOnSelectionChangedNotifications:
 Boolean = true

 protected override def onSelectionChanged(newSelection:
Customer) {
   super.onSelectionChanged(newSelection)
   }
 })

 I'll appreciate your help.

 Bera

   
  
  
  
   --
   WBR
   Maxim aka solomax
  
 



 --
 WBR
 Maxim aka solomax



Modal window extending panel do not expand

2013-05-10 Thread seyaw
Hi all,
I have couple of modal windows.
Modals that extend Page can grow/Shrink with the mouse button along side the
parent page. Those extending Panel do not't expand (while the parent window
can)

Thanks for the hint




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-window-extending-panel-do-not-expand-tp4658710.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



Wicket 6.8.0 schedule release

2013-05-10 Thread Paul Bors
Do you guys know when is the next minor release for Wicket 6.8.0 scheduled
to come out?

I'm wondering what I should do about WICKET-5147
https://issues.apache.org/jira/browse/WICKET-5147  WicketTester
MockHttpRequest.getCookies very slow / OutOfMemory since it slowed down our
unit tests from 50mins to about 6 hrs J

 

~ Thank you,

Paul Bors

 

 



[wicket 6] Create/Register Spring Bean in wicket ?

2013-05-10 Thread smallufo
Hi , I wonder if it possible to programmatically create / register a spring
bean in wicket?
maybe in Application.init() ...

Most documents about spring are making use of existent beans , and inject
to WebPage or Panel via @SpringBean , and it indeed works well.

But my interface implementations are depend on wicket-component ,
such as getting absolute URL of a page or a DynamicImageResource

So these beans should be initialized and register to Spring in init()
(correct me if I am wrong)

Any way to achieve this ?

Thanks.

(I am using wicket 6.7 )


Re: [wicket 6] Create/Register Spring Bean in wicket ?

2013-05-10 Thread Richard W. Adams
Not sure exactly what the issue is. You can create beans any time you 
want. All you need to do is get an application context object based on a 
Spring config file. You can do that in init() or wherever is appropriate 
for your app.




From:   smallufo small...@gmail.com
To: users@wicket.apache.org
Date:   05/10/2013 02:34 PM
Subject:[wicket 6] Create/Register Spring Bean in wicket ?



Hi , I wonder if it possible to programmatically create / register a 
spring
bean in wicket?
maybe in Application.init() ...

Most documents about spring are making use of existent beans , and 
inject
to WebPage or Panel via @SpringBean , and it indeed works well.

But my interface implementations are depend on wicket-component ,
such as getting absolute URL of a page or a DynamicImageResource

So these beans should be initialized and register to Spring in init()
(correct me if I am wrong)

Any way to achieve this ?

Thanks.

(I am using wicket 6.7 )



**

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: [wicket 6] Create/Register Spring Bean in wicket ?

2013-05-10 Thread Igor Vaynberg
see spring's FactoryBean, its an indirect way to create beans.

-igor

On Fri, May 10, 2013 at 12:33 PM, smallufo small...@gmail.com wrote:
 Hi , I wonder if it possible to programmatically create / register a spring
 bean in wicket?
 maybe in Application.init() ...

 Most documents about spring are making use of existent beans , and inject
 to WebPage or Panel via @SpringBean , and it indeed works well.

 But my interface implementations are depend on wicket-component ,
 such as getting absolute URL of a page or a DynamicImageResource

 So these beans should be initialized and register to Spring in init()
 (correct me if I am wrong)

 Any way to achieve this ?

 Thanks.

 (I am using wicket 6.7 )

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



Re: Modal window extending panel do not expand

2013-05-10 Thread Taro Fukunaga
Why don't you try using ModalWindow? This class also has a method to
enable/disable resizing of the window. See 
http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html
http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html
  
. But it sounds like you have a styling issue, not a Wicket issue.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-window-extending-panel-do-not-expand-tp4658710p4658715.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



Call me page wicket from iframe in page.jsp

2013-05-10 Thread Alis
Hello! Help me , how call me a page in wicket from iframe of page .jsp.

Example:

*page.jsp*

 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Call-me-page-wicket-from-iframe-in-page-jsp-tp4658716.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: Retrieve a value of textField and set the property of the Model

2013-05-10 Thread Paul Bors
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



DataTable update components on Page Change

2013-05-10 Thread David Beer

Hi All

I have an Ajax DataTable that extends DataTable and when I click the 
navigation panel to change page in the table I would like to make sure 
that the necessary components are disable or enabled. What is the best 
way of doing this?


So on onPageChanged I would like to enable or disable my form submit 
buttons. The buttons are Ajax enabled.


Thanks

David

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



Re: [wicket 6] Create/Register Spring Bean in wicket ?

2013-05-10 Thread smallufo
Hi
Is there any code example to create beans and register to spring ?
I can get ApplicationContext
by 
WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
but there is no setter or register or createBean methods within...

Or use of factory bean ?
I searched FactoryBean , got the idea behind it . But I still don't know
how to do it in wicket ?

Thanks.


2013/5/11 Igor Vaynberg igor.vaynb...@gmail.com

 see spring's FactoryBean, its an indirect way to create beans.

 -igor

 On Fri, May 10, 2013 at 12:33 PM, smallufo small...@gmail.com wrote:
  Hi , I wonder if it possible to programmatically create / register a
 spring
  bean in wicket?
  maybe in Application.init() ...
 
  Most documents about spring are making use of existent beans , and
 inject
  to WebPage or Panel via @SpringBean , and it indeed works well.
 
  But my interface implementations are depend on wicket-component ,
  such as getting absolute URL of a page or a DynamicImageResource
 
  So these beans should be initialized and register to Spring in init()
  (correct me if I am wrong)
 
  Any way to achieve this ?
 
  Thanks.
 
  (I am using wicket 6.7 )

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




Re: [wicket 6] Create/Register Spring Bean in wicket ?

2013-05-10 Thread smallufo
I try to do this in init() :

ctx.getAutowireCapableBeanFactory().configureBean(obj, myobj);
or
ctx.getAutowireCapableBeanFactory().applyBeanPostProcessorsAfterInitialization(obj,
myobj);
or
ctx.getAutowireCapableBeanFactory().applyBeanPostProcessorsBeforeInitialization(obj,
myobj);

But in a WebPage with a @SpringBean(name=myobj) private IMyObj myobj;
I still get NoSuchBeanDefinitionException error ...



2013/5/11 smallufo small...@gmail.com

 Hi
 Is there any code example to create beans and register to spring ?
 I can get ApplicationContext
 by 
 WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
 but there is no setter or register or createBean methods within...

 Or use of factory bean ?
 I searched FactoryBean , got the idea behind it . But I still don't know
 how to do it in wicket ?

 Thanks.


 2013/5/11 Igor Vaynberg igor.vaynb...@gmail.com

 see spring's FactoryBean, its an indirect way to create beans.

 -igor

 On Fri, May 10, 2013 at 12:33 PM, smallufo small...@gmail.com wrote:
  Hi , I wonder if it possible to programmatically create / register a
 spring
  bean in wicket?
  maybe in Application.init() ...
 
  Most documents about spring are making use of existent beans , and
 inject
  to WebPage or Panel via @SpringBean , and it indeed works well.
 
  But my interface implementations are depend on wicket-component ,
  such as getting absolute URL of a page or a DynamicImageResource
 
  So these beans should be initialized and register to Spring in init()
  (correct me if I am wrong)
 
  Any way to achieve this ?
 
  Thanks.
 
  (I am using wicket 6.7 )

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