Re: Generic component placeholder

2008-06-19 Thread Matthijs Wensveen
With Panel you know you always have the right markup so that is good. 
The disadvantage is that you'd then have to write panels for everything 
the ComponentFactory should be able to produce.


Maybe you could always return a container that overrides onComponentTag 
and set the tag's name according to the contained component. I don't 
know if this will even work, but you still have the disadvantage that 
you have to know the tagname for everything that could be produced / 
contained and do a lot of instanceof's. For some components this is even 
impossible, for example Link, which works on any html tag (for other 
tags than a it writes an onclick handler).


You can also do things with IMarkupResourceStreamProvider. That way the 
markup could dynamically be produced to be according to what you need.


Anyway, it quickly becomes complex. Igor's suggestion has the advantage 
that it's very clean and comprehensible. So if the ComponentFactory 
produces only a few components, write panels for them and your problem 
is solved.


Matthijs

Igor Vaynberg wrote:

wicket's default components do not mutate markup, so you cannot do
that. a better contract is eg

componentfactor { panel getpanel(string id); } eg ITab in extensions.
that way you know it will always work.

-igor

On Wed, Jun 18, 2008 at 7:39 PM, Dreamage [EMAIL PROTECTED] wrote:
  

Hi,

If for example I have the following panel:

html xmlns:wicket
wicket:panel
div
  span wicket:id=genericComponent/
/div
/wicket:panel
/html

And I want to insert a component at the place of span tag, but the component
is not instanciated by the panel ... it's provided by a factory. Here is the
code :

public class MyPanel extends Panel{
   public MyPanel(String id, ComponentFactory factory) {
   super(id);
   //Create a new generic component using a specific id
   add(factory.getComponent(genericComponent));
   }

}

The problem is that if the factory returns a TextField, the placeholder tag
need to be a input tag instead of a span. Is there a generic wicket tag that
could allow me to indicate where a component goes without binding it to a
specific tag ? If not, can this be done another way ?

Thanks
--
View this message in context: 
http://www.nabble.com/Generic-component-placeholder-tp17996229p17996229.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window question

2008-06-19 Thread Matthijs Wensveen
Hmm, that's a hard one, because you have a requestTarget that does not 
even look at the modal window (I think). A solution (albeit a bit hacky) 
is to set some parameter in the session. Then, add an 
AbstractAjaxTimerBehaviour to the modal window that checks for the 
session parameter in onTimer and when it is set calls 
ModalWindow.this.close(target). Of course the ugliness lies in the 
session state tweaking, so if there's a cleaner solution for that, that 
would be preferable.


Matthijs

mfs wrote:

No i mean a separate browser window, where i display the results of the
form-submission.

Matthijs Wensveen-2 wrote:
  

What do you mean by submitted in a new window? The modal window itself?
Matthijs

mfs wrote:


Guys,

I am posting this question yet again, hoping to get some feedback...

The problem is regarding modal windows, as to how close it, when a form
(within it) is submitted in a new window. Any suggestions


Thanks in advance 
  
  

--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  



--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window question

2008-06-19 Thread Igor Vaynberg
why not just spit out some javascript that opens the results window to
some bookmarkable url?

-igor

On Wed, Jun 18, 2008 at 11:06 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote:
 Hmm, that's a hard one, because you have a requestTarget that does not even
 look at the modal window (I think). A solution (albeit a bit hacky) is to
 set some parameter in the session. Then, add an AbstractAjaxTimerBehaviour
 to the modal window that checks for the session parameter in onTimer and
 when it is set calls ModalWindow.this.close(target). Of course the ugliness
 lies in the session state tweaking, so if there's a cleaner solution for
 that, that would be preferable.

 Matthijs

 mfs wrote:

 No i mean a separate browser window, where i display the results of the
 form-submission.

 Matthijs Wensveen-2 wrote:


 What do you mean by submitted in a new window? The modal window itself?
 Matthijs

 mfs wrote:


 Guys,

 I am posting this question yet again, hoping to get some feedback...

 The problem is regarding modal windows, as to how close it, when a form
 (within it) is submitted in a new window. Any suggestions


 Thanks in advance

 --
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]








 --
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window question

2008-06-19 Thread mfs

well i dont think that will work, the onSubmit is called on the new browser
Window, now if i make my form to be an ajaxForm doing a
model.close(ajaxtarget) wouldnt work, since the control is a seperate window
now...i hope i am making sense...

So basically here is what i will be doing if i make the form submission
ajax-based ...

protected void onSubmit(AjaxRequestTarget arg)
{
  urlToTheExternalPage = http://;;
  getRequestCycle().setRequestTarget(
new RedirectRequestTarget(urlToTheExternalPage ));
  modalWindow.close(arg));
}



Nino.Martinez wrote:
 
 Just provide the modal window to the form and call modalwindow.close in 
 the form..?
 
 mfs wrote:
 Guys,

 I am posting this question yet again, hoping to get some feedback...

 The problem is regarding modal windows, as to how close it, when a form
 (within it) is submitted in a new window. Any suggestions


 Thanks in advance 
   
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-question-tp17989203p17997987.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window question

2008-06-19 Thread mfs

that i did try out and it does work, where i do a
ajaxRequestTarget.appendJavaScript(window.open(externalURL)), but the part
i dont like is in this scenario is that the popup blockers dive in, since
the window.open is not a result of a click, and i dont want that to happen..

I want to work out a scenario where the popup blockers don't interfere..

Farhan.


igor.vaynberg wrote:
 
 why not just spit out some javascript that opens the results window to
 some bookmarkable url?
 
 -igor
 
 On Wed, Jun 18, 2008 at 11:06 PM, Matthijs Wensveen [EMAIL PROTECTED]
 wrote:
 Hmm, that's a hard one, because you have a requestTarget that does not
 even
 look at the modal window (I think). A solution (albeit a bit hacky) is to
 set some parameter in the session. Then, add an
 AbstractAjaxTimerBehaviour
 to the modal window that checks for the session parameter in onTimer and
 when it is set calls ModalWindow.this.close(target). Of course the
 ugliness
 lies in the session state tweaking, so if there's a cleaner solution for
 that, that would be preferable.

 Matthijs

 mfs wrote:

 No i mean a separate browser window, where i display the results of the
 form-submission.

 Matthijs Wensveen-2 wrote:


 What do you mean by submitted in a new window? The modal window
 itself?
 Matthijs

 mfs wrote:


 Guys,

 I am posting this question yet again, hoping to get some feedback...

 The problem is regarding modal windows, as to how close it, when a
 form
 (within it) is submitted in a new window. Any suggestions


 Thanks in advance

 --
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]








 --
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-question-tp17989203p17998037.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window question

2008-06-19 Thread mfs

That is certainly an option, but i dont like the idea of the timer, since
there could be scenarios where the user does the form submission (resulting
in a new window), and lets say i set the timer to 2 seconds, now in case the
user decides to close the new browser window rightaway, and comes back and
while he is trying to click some other button on the modal window (which has
other forms too), the modal window all of sudden vanishes and that would
just be a bit awkward, thats just one example, even if the timer is set to a
shorter time the response itself might take a while (due to load/traffic or
other reasons) and user might see this sudden invisibility of the modal when
he was trying to do somethingthats why i would rather close the modal
window as soon as the new browser window loads up or even before..


Matthijs Wensveen-2 wrote:
 
 Hmm, that's a hard one, because you have a requestTarget that does not 
 even look at the modal window (I think). A solution (albeit a bit hacky) 
 is to set some parameter in the session. Then, add an 
 AbstractAjaxTimerBehaviour to the modal window that checks for the 
 session parameter in onTimer and when it is set calls 
 ModalWindow.this.close(target). Of course the ugliness lies in the 
 session state tweaking, so if there's a cleaner solution for that, that 
 would be preferable.
 
 Matthijs
 
 mfs wrote:
 No i mean a separate browser window, where i display the results of the
 form-submission.

 Matthijs Wensveen-2 wrote:
   
 What do you mean by submitted in a new window? The modal window
 itself?
 Matthijs

 mfs wrote:
 
 Guys,

 I am posting this question yet again, hoping to get some feedback...

 The problem is regarding modal windows, as to how close it, when a form
 (within it) is submitted in a new window. Any suggestions


 Thanks in advance 
   
   
 -- 
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 

   
 
 
 -- 
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-question-tp17989203p17998171.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



StringBufferResourceStream character encoding question

2008-06-19 Thread Dreamltf

Hi all

I found a encoding question in the StringResourceStream, but it works fine
when I use the DynamicWebResource

-StringResourceStream-
@Override
protected void init() {
super.init();
this.getMarkupSettings().setCompressWhitespace(true);
this.getMarkupSettings().setDefaultMarkupEncoding(UTF-8);

this.getRequestCycleSettings().setResponseRequestEncoding(UTF-8);

this.getResourceSettings().setThrowExceptionOnMissingResource(false);
this.mountSharedResource(/Test, new ResourceReference(Test) 
{
private static final long serialVersionUID = 1L;

@Override
protected Resource newResource() {
return new Resource() {
private static final long 
serialVersionUID = 1L;

@Override
public IResourceStream 
getResourceStream() {
return new 
StringResourceStream(這是第一題);
}
};
}
}.getSharedResourceKey());
}


-StringResourceStream-
@Override
protected void init() {
super.init();
this.getMarkupSettings().setCompressWhitespace(true);
this.getMarkupSettings().setDefaultMarkupEncoding(UTF-8);

this.getRequestCycleSettings().setResponseRequestEncoding(UTF-8);

this.getResourceSettings().setThrowExceptionOnMissingResource(false);
this.mountSharedResource(/Test, new ResourceReference(Test) 
{
private static final long serialVersionUID = 1L;

@Override
protected Resource newResource() {
return new DynamicWebResource() {
private static final long 
serialVersionUID = 1L;

@Override
protected ResourceState 
getResourceState() {
ResourceState state = new 
ResourceState() {

@Override
public String 
getContentType() {
return 
text/html;
}

@Override
public byte[] getData() 
{
try {
return 
這是第一題.getBytes(UTF-8);
} catch 
(UnsupportedEncodingException e) {

e.printStackTrace();
}
return null;
}
};
return state;
}
};
}
}.getSharedResourceKey());
}

Thanks!
-- 
View this message in context: 
http://www.nabble.com/StringBufferResourceStream-character-encoding-question-tp17998234p17998234.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window question

2008-06-19 Thread Nino Saturnino Martinez Vazquez Wael

Yes, that were what I was talking about.

But why do you open a new browser window?

mfs wrote:

well i dont think that will work, the onSubmit is called on the new browser
Window, now if i make my form to be an ajaxForm doing a
model.close(ajaxtarget) wouldnt work, since the control is a seperate window
now...i hope i am making sense...

So basically here is what i will be doing if i make the form submission
ajax-based ...

protected void onSubmit(AjaxRequestTarget arg)
{
  urlToTheExternalPage = http://;;
  getRequestCycle().setRequestTarget(
new RedirectRequestTarget(urlToTheExternalPage ));
  modalWindow.close(arg));
}



Nino.Martinez wrote:
  
Just provide the modal window to the form and call modalwindow.close in 
the form..?


mfs wrote:


Guys,

I am posting this question yet again, hoping to get some feedback...

The problem is regarding modal windows, as to how close it, when a form
(within it) is submitted in a new window. Any suggestions


Thanks in advance 
  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Junit Wicket tests in Wasp/Swarm environment

2008-06-19 Thread Andrea Jahn
Hi,
Sorry, if this is a stupid Java question:

But how can I call SwarmWebApplication.init() without calling
MyApplication.init() ?

Thanks
Andrea

public class MyWicketTester extends WicketTester
{
  public MyWicketTester(final ApplicationContextMock appctx)
  {
super(new MyApplication() {
  @Override
  protected void init() {

super.init();  --- MyApplication.init()
  };
});
  }
}


public class MyApplication extends SwarmWebApplication
{
  protected void init() {
super.init();
  }
}





2008/6/18, Maurice Marrink [EMAIL PROTECTED]:

 You need to call super.init(). that will fix your swarm problems. as
 for spring i think you need:

 addComponentInstantiationListener(new SpringComponentInjector(this));
 InjectorHolder.getInjector().inject(this);

 Maurice


 On Wed, Jun 18, 2008 at 10:23 AM, Andrea Jahn
 [EMAIL PROTECTED] wrote:
  Hi,
 
  after the integration of the Wasp/Swarm framework (only basic
 functionality
  at the moment) I have to adapt the wicket JUnit tests.
 
  But I have the following problems:
 
 
  public class LoginTest
  {
   private WicketTester tester;
   private FormTester form;
   private PersonService personServiceMock;
   private final int personId = 200; //same id is used in whole test
 
   @Before
   public void setUp() throws Exception {
 tester = new MyWicketTester();   
 
 personServiceMock = EasyMock.createStrictMock(PersonService.class);
 
 ApplicationContextMock appctx = new ApplicationContextMock();
 appctx.putBean(personService, personServiceMock);
 
 // setup WicketTester and injection for @SpringBean
 tester.getApplication().addComponentInstantiationListener
   (new SpringComponentInjector(tester.getApplication(), appctx));
   }
 
   @Test
   public void testLoginPageRender(){
 tester.startPage(Login.class);
 tester.assertRenderedPage(Login.class);
 
 tester.assertNoErrorMessage();
 
 form = tester.newFormTester(loginForm);
 assertNotNull(form);
 tester.assertComponent(loginForm:userName, TextField.class);
 tester.assertComponent(loginForm:password, TextField.class);
   }
 
  ...
  }
 
 
  public class MyWicketTester extends WicketTester
  {
   public MyWicketTester()
   {
 super(new MyApplication());   
   }
 
   @SuppressWarnings(serial)
   @Override
 
   public WebSession getWicketSession() {
 MySession session =
   new MySession((MyApplication)getApplication(), getWicketRequest()) {
   public boolean isPersonLoggedIn() {
 return true;
   }
 };
 
 session.setPerson(HibernateTestHelper.createTestPerson( new
 Integer(123)
  ));
 return session;
   }
  }
 
 
  public class MyApplication extends SwarmWebApplication
  {
   protected void init() {
 super.init();
 
 addComponentInstantiationListener(new SpringComponentInjector(this));
  ---
   }
 
  ...
  }
 
  java.lang.IllegalStateException: No WebApplicationContext found: no
  ContextLoaderListener registered?
   at
 
 org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
   at
 
 org.apache.wicket.spring.injection.annot.SpringComponentInjector.init(SpringComponentInjector.java:74)
   at xxx.yyy.zzz.front.MyApplication.init(MyApplication.java:37)
   at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:526)
   at
 
 org.apache.wicket.protocol.http.MockWebApplication.init(MockWebApplication.java:151)
   at
 
 org.apache.wicket.util.tester.BaseWicketTester.init(BaseWicketTester.java:205)
   at
 org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:308)
   at
 org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:291)
   at test.front.MyWicketTester.init(MyWicketTester.java:18)
   at test.front.LoginTest.setUp(LoginTest.java:34)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at
  org.junit.internal.runners.MethodRoadie.runBefores(MethodRoadie.java:122)
   at
 
 org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:86)
   at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
   at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
   at
 
 org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
   at
 
 org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
   at
 
 org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
   at
 
 org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
   at
 org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
   at
 
 

Re: Modal Window question

2008-06-19 Thread mfs

Well its just a requirement where the results are to be shown up in a new
browser window, where a wizard (part of external application) is
launched...with that let me add that if need be i can opt for using a
link/ajax-link too, but i think the problem would still persist...

I didnt think its gonna be that difficult.. 

Nino.Martinez wrote:
 
 Yes, that were what I was talking about.
 
 But why do you open a new browser window?
 
 mfs wrote:
 well i dont think that will work, the onSubmit is called on the new
 browser
 Window, now if i make my form to be an ajaxForm doing a
 model.close(ajaxtarget) wouldnt work, since the control is a seperate
 window
 now...i hope i am making sense...

 So basically here is what i will be doing if i make the form submission
 ajax-based ...

 protected void onSubmit(AjaxRequestTarget arg)
 {
   urlToTheExternalPage = http://;;
   getRequestCycle().setRequestTarget(
 new RedirectRequestTarget(urlToTheExternalPage ));
   modalWindow.close(arg));
 }



 Nino.Martinez wrote:
   
 Just provide the modal window to the form and call modalwindow.close in 
 the form..?

 mfs wrote:
 
 Guys,

 I am posting this question yet again, hoping to get some feedback...

 The problem is regarding modal windows, as to how close it, when a form
 (within it) is submitted in a new window. Any suggestions


 Thanks in advance 
   
   
 -- 
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 

   
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-question-tp17989203p17998439.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Regarding Loacale

2008-06-19 Thread Eyal Golan
Hi,
I want to show my team mates the greatness of using wicket localization
feature.
We are working on Microsoft Windows XP.
I put a System.out.println(getLocale()); in one of my components.
I have changed in my computer from EN to FR (for example).
But the print is always en_US.
I know it's not a Wicket question, but how do I change the Locale not
progrmatically?

thanks

-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74


Re: Junit Wicket tests in Wasp/Swarm environment

2008-06-19 Thread Maurice Marrink
In the above code you are showing 2 different codes for MyApplication,
both override the init method. one of them calls super.init the other
does not. your init should look like this:
protected void init() {
   super.init();
   addComponentInstantiationListener(new SpringComponentInjector(this));
   InjectorHolder.getInjector().inject(this);
   // optional other stuff by you
 };
Also you are overriding the wrong place to return a new custom session.
you are overriding WicketTester.getWicketSession() but you should be
overriding MyApplication.newSession(Request, Response)

Hope this helps.

Maurice

On Thu, Jun 19, 2008 at 8:43 AM, Andrea Jahn [EMAIL PROTECTED] wrote:
 Hi,
 Sorry, if this is a stupid Java question:

 But how can I call SwarmWebApplication.init() without calling
 MyApplication.init() ?

 Thanks
 Andrea

 public class MyWicketTester extends WicketTester
 {
  public MyWicketTester(final ApplicationContextMock appctx)
  {
super(new MyApplication() {
  @Override
  protected void init() {

super.init();  --- MyApplication.init()
  };
});
  }
 }


 public class MyApplication extends SwarmWebApplication
 {
  protected void init() {
super.init();
  }
 }





 2008/6/18, Maurice Marrink [EMAIL PROTECTED]:

 You need to call super.init(). that will fix your swarm problems. as
 for spring i think you need:

 addComponentInstantiationListener(new SpringComponentInjector(this));
 InjectorHolder.getInjector().inject(this);

 Maurice


 On Wed, Jun 18, 2008 at 10:23 AM, Andrea Jahn
 [EMAIL PROTECTED] wrote:
  Hi,
 
  after the integration of the Wasp/Swarm framework (only basic
 functionality
  at the moment) I have to adapt the wicket JUnit tests.
 
  But I have the following problems:
 
 
  public class LoginTest
  {
   private WicketTester tester;
   private FormTester form;
   private PersonService personServiceMock;
   private final int personId = 200; //same id is used in whole test
 
   @Before
   public void setUp() throws Exception {
 tester = new MyWicketTester();   
 
 personServiceMock = EasyMock.createStrictMock(PersonService.class);
 
 ApplicationContextMock appctx = new ApplicationContextMock();
 appctx.putBean(personService, personServiceMock);
 
 // setup WicketTester and injection for @SpringBean
 tester.getApplication().addComponentInstantiationListener
   (new SpringComponentInjector(tester.getApplication(), appctx));
   }
 
   @Test
   public void testLoginPageRender(){
 tester.startPage(Login.class);
 tester.assertRenderedPage(Login.class);
 
 tester.assertNoErrorMessage();
 
 form = tester.newFormTester(loginForm);
 assertNotNull(form);
 tester.assertComponent(loginForm:userName, TextField.class);
 tester.assertComponent(loginForm:password, TextField.class);
   }
 
  ...
  }
 
 
  public class MyWicketTester extends WicketTester
  {
   public MyWicketTester()
   {
 super(new MyApplication());   
   }
 
   @SuppressWarnings(serial)
   @Override
 
   public WebSession getWicketSession() {
 MySession session =
   new MySession((MyApplication)getApplication(), getWicketRequest()) {
   public boolean isPersonLoggedIn() {
 return true;
   }
 };
 
 session.setPerson(HibernateTestHelper.createTestPerson( new
 Integer(123)
  ));
 return session;
   }
  }
 
 
  public class MyApplication extends SwarmWebApplication
  {
   protected void init() {
 super.init();
 
 addComponentInstantiationListener(new SpringComponentInjector(this));
  ---
   }
 
  ...
  }
 
  java.lang.IllegalStateException: No WebApplicationContext found: no
  ContextLoaderListener registered?
   at
 
 org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
   at
 
 org.apache.wicket.spring.injection.annot.SpringComponentInjector.init(SpringComponentInjector.java:74)
   at xxx.yyy.zzz.front.MyApplication.init(MyApplication.java:37)
   at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:526)
   at
 
 org.apache.wicket.protocol.http.MockWebApplication.init(MockWebApplication.java:151)
   at
 
 org.apache.wicket.util.tester.BaseWicketTester.init(BaseWicketTester.java:205)
   at
 org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:308)
   at
 org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:291)
   at test.front.MyWicketTester.init(MyWicketTester.java:18)
   at test.front.LoginTest.setUp(LoginTest.java:34)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at
  org.junit.internal.runners.MethodRoadie.runBefores(MethodRoadie.java:122)
   at
 
 

Re: Modal Window question

2008-06-19 Thread mfs

Isn't there a way to call the appropriate javascript which does the
modal-close..



mfs wrote:
 
 Guys,
 
 I am posting this question yet again, hoping to get some feedback...
 
 The problem is regarding modal windows, as to how close it, when a form
 (within it) is submitted in a new window. Any suggestions
 
 
 Thanks in advance 
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-question-tp17989203p17998921.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Regarding Loacale

2008-06-19 Thread Maurice Marrink
Isn't the browser sending out a locale different from the os locale?
Check your browser it should have some options for a preferred
language or locale.

Maurice

On Thu, Jun 19, 2008 at 9:02 AM, Eyal Golan [EMAIL PROTECTED] wrote:
 Hi,
 I want to show my team mates the greatness of using wicket localization
 feature.
 We are working on Microsoft Windows XP.
 I put a System.out.println(getLocale()); in one of my components.
 I have changed in my computer from EN to FR (for example).
 But the print is always en_US.
 I know it's not a Wicket question, but how do I change the Locale not
 progrmatically?

 thanks

 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Breadcrumbs and Pages

2008-06-19 Thread Eyal Golan
Hi,
We have pages in our web application (naturally).
We have a special XML structure that represents the Pages' hierarchies.
According to this we create Links. Each Link has setResponsePage(...) to a
page.

Regarding Bread crumbs.
I looked into the examples and the source code itself and couldn't help
noticing that it is a panel.
I also noticed that the navigation is between panels.
Is it possible (and how) to integrate links to pages with bread crumbs
links?

Thanks

-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74


Re: Modal Window question

2008-06-19 Thread mfs

and also for some odd reason, spitting out a window.open through
ajaxtarget.appendjavascript() thought (in the ajaxform.onSubmit) works fine
in IE and Mozilla but doesn't on Safari, am not sure why that is, may be
safari doesnt allow popup onload (which i dont think is the case) or
something else

mfs wrote:
 
 that i did try out and it does work, where i do a
 ajaxRequestTarget.appendJavaScript(window.open(externalURL)), but the
 part i dont like is in this scenario is that the popup blockers dive in,
 since the window.open is not a result of a click, and i dont want that to
 happen..
 
 I want to work out a scenario where the popup blockers don't interfere..
 
 Farhan.
 
 
 igor.vaynberg wrote:
 
 why not just spit out some javascript that opens the results window to
 some bookmarkable url?
 
 -igor
 
 On Wed, Jun 18, 2008 at 11:06 PM, Matthijs Wensveen [EMAIL PROTECTED]
 wrote:
 Hmm, that's a hard one, because you have a requestTarget that does not
 even
 look at the modal window (I think). A solution (albeit a bit hacky) is
 to
 set some parameter in the session. Then, add an
 AbstractAjaxTimerBehaviour
 to the modal window that checks for the session parameter in onTimer and
 when it is set calls ModalWindow.this.close(target). Of course the
 ugliness
 lies in the session state tweaking, so if there's a cleaner solution for
 that, that would be preferable.

 Matthijs

 mfs wrote:

 No i mean a separate browser window, where i display the results of the
 form-submission.

 Matthijs Wensveen-2 wrote:


 What do you mean by submitted in a new window? The modal window
 itself?
 Matthijs

 mfs wrote:


 Guys,

 I am posting this question yet again, hoping to get some feedback...

 The problem is regarding modal windows, as to how close it, when a
 form
 (within it) is submitted in a new window. Any suggestions


 Thanks in advance

 --
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]








 --
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-question-tp17989203p17999422.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: idea: automatic component repo

2008-06-19 Thread Jonathan Locke


was thinking the same thing and would be the icing on the cake.  website
never shuts down... crawler adds components and the demos just appear on the
site automagically via OSGi.
mebbe we need cheeser's transparent OSGi first though?


brian.diekelman wrote:
 
 
 
 Jonathan Locke wrote:
 
  - (only signed) jars could be automatically picked up by some naming
 pattern from maven repos and deployed as live demos 
 
 
 Once a signed jar is identified, what about something like OSGi to deploy
 it?
 
 - metadata would define an application name
 - load the component(s) bundle into the OSGi framework, have a listener
 for new bundle registrations
 (http://felix.apache.org/site/apache-felix-tutorial-example-1.html)
 - deploy the application to http://sitename/appName/ (have a dispatcher
 servlet filter that reads the app name, trims it, and forwards to the
 appropriation WebApplication within a bundle)
 - when a new version of the module is released just de-activate the old
 bundle and activate the new one (versions based on maven artifact/group
 ids)
 
 I have only been playing with OSGi for jar deployments in a very narrow
 scope, but it seems like a good option.  It should allow you to avoid
 restarting anything for app deployments.
 

-- 
View this message in context: 
http://www.nabble.com/idea%3A-automatic-component-repo-tp17979177p17999577.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Regarding Loacale

2008-06-19 Thread Eyal Golan
I checked in IE7 and FF as well.
Couldn't find anything.

What I DID find is that I reach to Session.getLocale().
So, Is there a way to configure our Session to return the Locale from the
system?

thanks


On Thu, Jun 19, 2008 at 10:34 AM, Maurice Marrink [EMAIL PROTECTED] wrote:

 Isn't the browser sending out a locale different from the os locale?
 Check your browser it should have some options for a preferred
 language or locale.

 Maurice

 On Thu, Jun 19, 2008 at 9:02 AM, Eyal Golan [EMAIL PROTECTED] wrote:
  Hi,
  I want to show my team mates the greatness of using wicket localization
  feature.
  We are working on Microsoft Windows XP.
  I put a System.out.println(getLocale()); in one of my components.
  I have changed in my computer from EN to FR (for example).
  But the print is always en_US.
  I know it's not a Wicket question, but how do I change the Locale not
  progrmatically?
 
  thanks
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74


Re: idea: automatic component repo

2008-06-19 Thread Jonathan Locke


this sort of marketplace might give JSF's claim to have lots of prefab
components a real run for the money... i think with some effort, we could do
this in a few weeks...


Jonathan Locke wrote:
 
 
 was thinking the same thing and would be the icing on the cake.  website
 never shuts down... crawler adds components and the demos just appear on
 the site automagically via OSGi.
 mebbe we need cheeser's transparent OSGi first though?
 
 
 brian.diekelman wrote:
 
 
 
 Jonathan Locke wrote:
 
  - (only signed) jars could be automatically picked up by some naming
 pattern from maven repos and deployed as live demos 
 
 
 Once a signed jar is identified, what about something like OSGi to deploy
 it?
 
 - metadata would define an application name
 - load the component(s) bundle into the OSGi framework, have a listener
 for new bundle registrations
 (http://felix.apache.org/site/apache-felix-tutorial-example-1.html)
 - deploy the application to http://sitename/appName/ (have a dispatcher
 servlet filter that reads the app name, trims it, and forwards to the
 appropriation WebApplication within a bundle)
 - when a new version of the module is released just de-activate the old
 bundle and activate the new one (versions based on maven artifact/group
 ids)
 
 I have only been playing with OSGi for jar deployments in a very narrow
 scope, but it seems like a good option.  It should allow you to avoid
 restarting anything for app deployments.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/idea%3A-automatic-component-repo-tp17979177p17999625.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: idea: automatic component repo

2008-06-19 Thread Daniel Frisk
A friend of mine has a motto Appearence is everything. If this  
component marketplace also get a reasonably sexy frontend it could be  
a real winner. We have developed a kind of Theme marketplace for our  
photo album software but since we are tech guys we suitably named it  
Skin repository http://jalbum.net/skins


It has been a HUGE success and it's dead easy to install new skins for  
the end users. We as developers are of course more advanced users and  
could just as easy do a cvs/svn checkout. But it's not as easy and  
available, and even developers are as lazy (and not to mention busy)  
as everyone else. I for one would love to browse this component  
marketplace and checkout demos of fancy stuff!


// Daniel Frisk
jalbum.net


On 2008-06-19, at 10:17, Jonathan Locke wrote:




this sort of marketplace might give JSF's claim to have lots of  
prefab
components a real run for the money... i think with some effort, we  
could do

this in a few weeks...


Jonathan Locke wrote:



was thinking the same thing and would be the icing on the cake.   
website
never shuts down... crawler adds components and the demos just  
appear on

the site automagically via OSGi.
mebbe we need cheeser's transparent OSGi first though?




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Localizer cache with 150.000+ entries causing OutOfMemory

2008-06-19 Thread Quan Zhou
I've met the same problem several days away and resovled it by override a
method of Localizer

see:
http://www.nabble.com/Why-Localizer-Retained-so-many-heapsize--to17142582.html#a17182935

that may help you a little.


2008/6/9 Stefan Fußenegger [EMAIL PROTECTED]:


 I am just analysing a heap dump (god bless the
 -XX:+HeapDumpOnOutOfMemoryError flag) of a recent application cache due to
 an OutOfMemoryError (GC overhead limit exceeded to be precise). Using
 jhat, the 175456 instances of class
 org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry immediately got
 my attention. While looking through the 107 instance of ConcurrentHashMap,
 I
 found one *really* big one: Localizer.cache has a hash table length of
 262144, each of its 32 segments with about 5300 entries, where a hash key
 is
 a string, sometimes longer than 500 charactes, similar to (see
 Localizer.getCacheKey(String,Component)):


 fooTitle.bar-org.apache.wicket.markup.html.link.BookmarkablePageLink:fooLink-org.apache.wicket.markup.html.panel.Fragment:track-org.apache.wicket.markup.html.list.ListItem:14-my.company.FooListPanel$1:fooList-my.company.FooListPanel:foos-org.apache.wicket.markup.html.list.ListItem:0-my.company.BarListPanel$1:bars-my.company.FooListPanel:panel-my.company.boxes.BodyBox:2-org.apache.wicket.markup.repeater.RepeatingView:body-my.company.layout.Border:border-my.company.pages.music.FoobarPage:43-de-null

 Those numbers pretty much convinced me: The localizer cache has blown away
 my application.

 Looking at this hash keys, I suspect the following problem: those strings
 are constructed from the position of a localized String on a page, which
 is quite a bad thing if you use nested list views or repeating views to
 construct your page. For instance, I have a panel with a long (pageable)
 list of entries, might be  5000 entries which might appear on various
 positions in a repeating view I use as a container for most of my pages.
 Let's say there are 5 possible positions, this would cause 2500 thousand
 cached entries, each with a key of 300+ characters plus some more
 characters
 for the cached message - feel free to do the maths. From a quick estimate
 I'd say: No wonder, this has blown away my app.

 As a quick fix, I'd suggest to regularly clear the localizer cache, use a
 more sophisticated cache (that expires old entries once in a while!!) or to
 disable the cache completely. However, don't try to overwrite
 Localizer.newCache() and clear the cache regularly: clearCache() will
 replace your cache with a ConcurrentHashMap (not using
 Localizer.newCache()). However, quite unlikely, that this will happen as
 newCache() is private anyway ;) I am going to add some code to clear the
 cache regularly.

 Best regards, Stefan

 PS: I'll also create a JIRA issue, but I am really short on time right now.

 -
 ---
 Stefan Fußenegger
 http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
 --
 View this message in context:
 http://www.nabble.com/Localizer-cache-with-150.000%2B-entries-causing-OutOfMemory-tp17734931p17734931.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Regarding Loacale

2008-06-19 Thread Meindert Deen
To setup the locale in your brower:

In FF (v2) use:
(menu)Edit-(option)Preferences-(tab)Advanced-(Area)Languages-(button)Choose
In IE (v7) use: Internet Options-(button) Languages

On Thu, Jun 19, 2008 at 10:16 AM, Eyal Golan [EMAIL PROTECTED] wrote:

 I checked in IE7 and FF as well.
 Couldn't find anything.

 What I DID find is that I reach to Session.getLocale().
 So, Is there a way to configure our Session to return the Locale from the
 system?

 thanks


 On Thu, Jun 19, 2008 at 10:34 AM, Maurice Marrink [EMAIL PROTECTED]
 wrote:

  Isn't the browser sending out a locale different from the os locale?
  Check your browser it should have some options for a preferred
  language or locale.
 
  Maurice
 
  On Thu, Jun 19, 2008 at 9:02 AM, Eyal Golan [EMAIL PROTECTED] wrote:
   Hi,
   I want to show my team mates the greatness of using wicket localization
   feature.
   We are working on Microsoft Windows XP.
   I put a System.out.println(getLocale()); in one of my components.
   I have changed in my computer from EN to FR (for example).
   But the print is always en_US.
   I know it's not a Wicket question, but how do I change the Locale not
   progrmatically?
  
   thanks
  
   --
   Eyal Golan
   [EMAIL PROTECTED]
  
   Visit: http://jvdrums.sourceforge.net/
   LinkedIn: http://www.linkedin.com/in/egolan74
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74



Re: Localizer cache with 150.000+ entries causing OutOfMemory

2008-06-19 Thread Stefan Fußenegger

Hi,

According to https://issues.apache.org/jira/browse/WICKET-1667 this issue
will be fixed in Wicket 1.3.4 and 1.4-M3 respectively. I already put the
patch into production and it works. Thanks to Igor!

Regards, Stefan


Heart wrote:
 
 I've met the same problem several days away and resovled it by override a
 method of Localizer
 
 see:
 http://www.nabble.com/Why-Localizer-Retained-so-many-heapsize--to17142582.html#a17182935
 
 that may help you a little.
 
 
 2008/6/9 Stefan Fußenegger [EMAIL PROTECTED]:
 

 I am just analysing a heap dump (god bless the
 -XX:+HeapDumpOnOutOfMemoryError flag) of a recent application cache due
 to
 an OutOfMemoryError (GC overhead limit exceeded to be precise). Using
 jhat, the 175456 instances of class
 org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry immediately
 got
 my attention. While looking through the 107 instance of
 ConcurrentHashMap,
 I
 found one *really* big one: Localizer.cache has a hash table length of
 262144, each of its 32 segments with about 5300 entries, where a hash key
 is
 a string, sometimes longer than 500 charactes, similar to (see
 Localizer.getCacheKey(String,Component)):


 fooTitle.bar-org.apache.wicket.markup.html.link.BookmarkablePageLink:fooLink-org.apache.wicket.markup.html.panel.Fragment:track-org.apache.wicket.markup.html.list.ListItem:14-my.company.FooListPanel$1:fooList-my.company.FooListPanel:foos-org.apache.wicket.markup.html.list.ListItem:0-my.company.BarListPanel$1:bars-my.company.FooListPanel:panel-my.company.boxes.BodyBox:2-org.apache.wicket.markup.repeater.RepeatingView:body-my.company.layout.Border:border-my.company.pages.music.FoobarPage:43-de-null

 Those numbers pretty much convinced me: The localizer cache has blown
 away
 my application.

 Looking at this hash keys, I suspect the following problem: those strings
 are constructed from the position of a localized String on a page,
 which
 is quite a bad thing if you use nested list views or repeating views to
 construct your page. For instance, I have a panel with a long (pageable)
 list of entries, might be  5000 entries which might appear on various
 positions in a repeating view I use as a container for most of my pages.
 Let's say there are 5 possible positions, this would cause 2500 thousand
 cached entries, each with a key of 300+ characters plus some more
 characters
 for the cached message - feel free to do the maths. From a quick estimate
 I'd say: No wonder, this has blown away my app.

 As a quick fix, I'd suggest to regularly clear the localizer cache, use a
 more sophisticated cache (that expires old entries once in a while!!) or
 to
 disable the cache completely. However, don't try to overwrite
 Localizer.newCache() and clear the cache regularly: clearCache() will
 replace your cache with a ConcurrentHashMap (not using
 Localizer.newCache()). However, quite unlikely, that this will happen as
 newCache() is private anyway ;) I am going to add some code to clear the
 cache regularly.

 Best regards, Stefan

 PS: I'll also create a JIRA issue, but I am really short on time right
 now.

 -
 ---
 Stefan Fußenegger
 http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
 --
 View this message in context:
 http://www.nabble.com/Localizer-cache-with-150.000%2B-entries-causing-OutOfMemory-tp17734931p17734931.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 


-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/Localizer-cache-with-150.000%2B-entries-causing-OutOfMemory-tp17734931p18000380.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window question

2008-06-19 Thread Matthijs Wensveen
The javascript to close the ModalWindow is returned by a private method 
of ModalWindow:


   /**
* @return javascript that closes current modal window
*/
   private static String getCloseJavacript()
   {
   return var win;\n //
   + try {\n + win = window.parent.Wicket.Window;\n
   + } catch (ignore) {\n
   + }\n
   + if (typeof(win) == \undefined\ || typeof(win.current) 
== \undefined\) {\n

   +   try {\n
   +  win = window.Wicket.Window;\n
   +   } catch (ignore) {\n
   +   }\n
   + }\n
   + if (typeof(win) != \undefined\  typeof(win.current) 
!= \undefined\) {\n
   + window.parent.setTimeout(function() {\n + 
win.current.close();\n

   + }, 0);\n
   + };
   }


There ya go.

mfs wrote:

Isn't there a way to call the appropriate javascript which does the
modal-close..



mfs wrote:
  

Guys,

I am posting this question yet again, hoping to get some feedback...

The problem is regarding modal windows, as to how close it, when a form
(within it) is submitted in a new window. Any suggestions


Thanks in advance 




  



--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Regarding Loacale

2008-06-19 Thread Eyal Golan
OK thanks, i found it :)
But now I have something else that is not working.
When I start my application after I set the language to fr_CH for example,
then the Locale is really fr_CH.
When I, on the fly, change the language to something else (de_CH), the
Locale in my application is not changed.

Maybe this is the way it should work, but if it's like that, then we can't
use this feature.
BTW, I saw that the Locale should be set in request in Session.
When I put a break point there, it didn't stop.

On Thu, Jun 19, 2008 at 11:49 AM, Meindert Deen [EMAIL PROTECTED] wrote:

 To setup the locale in your brower:

 In FF (v2) use:

 (menu)Edit-(option)Preferences-(tab)Advanced-(Area)Languages-(button)Choose
 In IE (v7) use: Internet Options-(button) Languages

 On Thu, Jun 19, 2008 at 10:16 AM, Eyal Golan [EMAIL PROTECTED] wrote:

  I checked in IE7 and FF as well.
  Couldn't find anything.
 
  What I DID find is that I reach to Session.getLocale().
  So, Is there a way to configure our Session to return the Locale from the
  system?
 
  thanks
 
 
  On Thu, Jun 19, 2008 at 10:34 AM, Maurice Marrink [EMAIL PROTECTED]
  wrote:
 
   Isn't the browser sending out a locale different from the os locale?
   Check your browser it should have some options for a preferred
   language or locale.
  
   Maurice
  
   On Thu, Jun 19, 2008 at 9:02 AM, Eyal Golan [EMAIL PROTECTED]
 wrote:
Hi,
I want to show my team mates the greatness of using wicket
 localization
feature.
We are working on Microsoft Windows XP.
I put a System.out.println(getLocale()); in one of my components.
I have changed in my computer from EN to FR (for example).
But the print is always en_US.
I know it's not a Wicket question, but how do I change the Locale not
progrmatically?
   
thanks
   
--
Eyal Golan
[EMAIL PROTECTED]
   
Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74


Re: Junit Wicket tests in Wasp/Swarm environment

2008-06-19 Thread Andrea Jahn
My initial problem was, that I have different application contexts in the
test environment
and in the Web application and therefore different calls of
addComponentInstantiationListener.

In my test environment I have a ApplicationContextMock, which I have to add
as second parameter:
addComponentInstantiationListener(*new* SpringComponentInjector(*this*,
appctx));

In the Web application the application context for the Spring beans is
configured in
application-context.xml.

So when I call MyApplication.init() from the test environment I get the
exception
No WebApplicationContext found: noContextLoaderListener registered?,
when addComponentInstantiationListener(new SpringComponentInjector(this)) is
called.

Perhaps is there another possibility to add the appctx in the test
environment
or another place to call addComponentInstantiationListener(new
SpringComponentInjector(this))
in the Web application ??

Thanks
Andrea


2008/6/19, Maurice Marrink [EMAIL PROTECTED]:

 In the above code you are showing 2 different codes for MyApplication,
 both override the init method. one of them calls super.init the other
 does not. your init should look like this:
 protected void init() {
   super.init();
   addComponentInstantiationListener(new SpringComponentInjector(this));
   InjectorHolder.getInjector().inject(this);
   // optional other stuff by you
 };
 Also you are overriding the wrong place to return a new custom session.
 you are overriding WicketTester.getWicketSession() but you should be
 overriding MyApplication.newSession(Request, Response)

 Hope this helps.

 Maurice

 On Thu, Jun 19, 2008 at 8:43 AM, Andrea Jahn [EMAIL PROTECTED]
 wrote:
  Hi,
  Sorry, if this is a stupid Java question:
 
  But how can I call SwarmWebApplication.init() without calling
  MyApplication.init() ?
 
  Thanks
  Andrea
 
  public class MyWicketTester extends WicketTester
  {
   public MyWicketTester(final ApplicationContextMock appctx)
   {
 super(new MyApplication() {
   @Override
   protected void init() {
 
 super.init();  --- MyApplication.init()
   };
 });
   }
  }
 
 
  public class MyApplication extends SwarmWebApplication
  {
   protected void init() {
 super.init();
   }
  }
 
 
 
 
 
  2008/6/18, Maurice Marrink [EMAIL PROTECTED]:
 
  You need to call super.init(). that will fix your swarm problems. as
  for spring i think you need:
 
  addComponentInstantiationListener(new SpringComponentInjector(this));
  InjectorHolder.getInjector().inject(this);
 
  Maurice
 
 
  On Wed, Jun 18, 2008 at 10:23 AM, Andrea Jahn
  [EMAIL PROTECTED] wrote:
   Hi,
  
   after the integration of the Wasp/Swarm framework (only basic
  functionality
   at the moment) I have to adapt the wicket JUnit tests.
  
   But I have the following problems:
  
  
   public class LoginTest
   {
private WicketTester tester;
private FormTester form;
private PersonService personServiceMock;
private final int personId = 200; //same id is used in whole test
  
@Before
public void setUp() throws Exception {
  tester = new MyWicketTester();
 
  
  personServiceMock = EasyMock.createStrictMock(PersonService.class);
  
  ApplicationContextMock appctx = new ApplicationContextMock();
  appctx.putBean(personService, personServiceMock);
  
  // setup WicketTester and injection for @SpringBean
  tester.getApplication().addComponentInstantiationListener
(new SpringComponentInjector(tester.getApplication(), appctx));
}
  
@Test
public void testLoginPageRender(){
  tester.startPage(Login.class);
  tester.assertRenderedPage(Login.class);
  
  tester.assertNoErrorMessage();
  
  form = tester.newFormTester(loginForm);
  assertNotNull(form);
  tester.assertComponent(loginForm:userName, TextField.class);
  tester.assertComponent(loginForm:password, TextField.class);
}
  
   ...
   }
  
  
   public class MyWicketTester extends WicketTester
   {
public MyWicketTester()
{
  super(new MyApplication());   
}
  
@SuppressWarnings(serial)
@Override
  
public WebSession getWicketSession() {
  MySession session =
new MySession((MyApplication)getApplication(), getWicketRequest()) {
public boolean isPersonLoggedIn() {
  return true;
}
  };
  
  session.setPerson(HibernateTestHelper.createTestPerson( new
  Integer(123)
   ));
  return session;
}
   }
  
  
   public class MyApplication extends SwarmWebApplication
   {
protected void init() {
  super.init();
  
  addComponentInstantiationListener(new
 SpringComponentInjector(this));
   ---
}
  
   ...
   }
  
   java.lang.IllegalStateException: No WebApplicationContext found: no
   ContextLoaderListener registered?
at
  
 
 

Re: ModalWindow with internal ModalWindow problem

2008-06-19 Thread Nino Saturnino Martinez Vazquez Wael

Hi Marieke

Your war file does not deploy/startup, atleast on tomcat, could you do 
the same using the quickstart archetype, it should take you 2 mins doing 
that(and give me something that I can look at in eclipse without too 
much hassle)? I know Im being lazy but, thats the benefit of being the 
helper...


Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3722 ms
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ModalWindowTestcase2] startup failed due to previous 
errors


Marieke Vandamme wrote:
Hey, 


I found a place where I can place my war for a while :
http://www.driespannenkoeken.be/ModalWindowTestcase2.war

I can change my application without modalwindows, but I first want to find
out what the problem is..
Would find it easier if I don't have to change it :-)

Hope you guys find the time to download my war and test it. 
Thanks again !



Nino.Martinez wrote:
  

Hi Marieke

First of all upload your quickstart project somewhere and share the link 
here. Please be sure theres not too many commercials when downloading, 
people tend to bully you with it:)


So I have two suggestions.

   1. I think that we should try to sort out if it's a bug causing your
  problem or it's wrong usage.
   2. I used modal window too, as you can see from one of our previous
  discussions. But I found that it were better to actually just
  forward to another panel or page, hence no popup and no trouble,
  and better focus, and when people are done they return to the old
  panel/page. You can still use modal window for simple stuff, sort
  of like the prototip but with stuff that requires a larger screen.

Please ask if you are in any doubt.

Marieke Vandamme wrote:

Hello, 


I have a rather complex situation, but If I'm not clear enough here, I
can
make a test case. 


My situation:
- Page with contact details
- Open a window to send the details to my colleague by email
- In that window open another window to choose my colleague from a list
of
employees

My Application :
- Normal page with ajax link that opens ModalWindow
  |- ModalWindow. 
Contains link to open another ModalWindow, 
and a list that is updated by the child modalwindow

|- ChildModalWindow (of the ModalWindow).
  This is a chooser, which needs to fill the list on
ModalWindow.

My error situation:
- I open the ModalWindow and fill the list with employees from the
ChildModalWindow.
- I close the ModalWindow, (send the email).
- I open the ModalWindow again (want to send the details to another
colleague)
- I choose a colleague from the ChildModalWindow, but the list isn't
updated...

After much of testing and searching, I think it has something to do with
the
RequestCycle or something... 
- The first time the modalwindow is opened, the list on it has markupid

'a1'
- When closing the ChildModalWindow, the list is filled with ajax using
markupid 'a1'
- The second time the modalwindow is opened, the list on it has markupid
'b1'
- When closing the ChildModalWindow, ajax tries to get the component with
markupid 'a1' (and not 'b1')

Even when I refresh the main-page, ajax still searches for the component
with markupid 'a1'.

Can someone please help me? I've been stuck on this for a while, but
can't
get to the bottom of it.
Can I post a testcase-war to this list of where should I post it?

Thanks in advance !
Marie.
  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ModalWindow with internal ModalWindow problem

2008-06-19 Thread Marieke Vandamme

Hello, 

Okay, second try..
I made my war again and tested it myself in tomcat 6. It seems to work, so I
put it on the server again and hope it works for you too..
I also created a zip with my sources and libraries that you can use in
eclipse :
http://www.driespannenkoeken.be/src.zip

If that's still not enough , please let me know. 
Thanks for the help.


Nino.Martinez wrote:
 
 Hi Marieke
 
 Your war file does not deploy/startup, atleast on tomcat, could you do 
 the same using the quickstart archetype, it should take you 2 mins doing 
 that(and give me something that I can look at in eclipse without too 
 much hassle)? I know Im being lazy but, thats the benefit of being the 
 helper...
 
 Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 3722 ms
 Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
 SEVERE: Error filterStart
 Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
 SEVERE: Context [/ModalWindowTestcase2] startup failed due to previous 
 errors
  
 Marieke Vandamme wrote:
 Hey, 

 I found a place where I can place my war for a while :
 http://www.driespannenkoeken.be/ModalWindowTestcase2.war

 I can change my application without modalwindows, but I first want to
 find
 out what the problem is..
 Would find it easier if I don't have to change it :-)

 Hope you guys find the time to download my war and test it. 
 Thanks again !


 Nino.Martinez wrote:
   
 Hi Marieke

 First of all upload your quickstart project somewhere and share the link 
 here. Please be sure theres not too many commercials when downloading, 
 people tend to bully you with it:)

 So I have two suggestions.

1. I think that we should try to sort out if it's a bug causing your
   problem or it's wrong usage.
2. I used modal window too, as you can see from one of our previous
   discussions. But I found that it were better to actually just
   forward to another panel or page, hence no popup and no trouble,
   and better focus, and when people are done they return to the old
   panel/page. You can still use modal window for simple stuff, sort
   of like the prototip but with stuff that requires a larger screen.

 Please ask if you are in any doubt.

 Marieke Vandamme wrote:
 
 Hello, 

 I have a rather complex situation, but If I'm not clear enough here, I
 can
 make a test case. 

 My situation:
 - Page with contact details
 - Open a window to send the details to my colleague by email
 - In that window open another window to choose my colleague from a list
 of
 employees

 My Application :
 - Normal page with ajax link that opens ModalWindow
   |- ModalWindow. 
 Contains link to open another ModalWindow, 
 and a list that is updated by the child modalwindow
 |- ChildModalWindow (of the ModalWindow).
   This is a chooser, which needs to fill the list on
 ModalWindow.

 My error situation:
 - I open the ModalWindow and fill the list with employees from the
 ChildModalWindow.
 - I close the ModalWindow, (send the email).
 - I open the ModalWindow again (want to send the details to another
 colleague)
 - I choose a colleague from the ChildModalWindow, but the list isn't
 updated...

 After much of testing and searching, I think it has something to do
 with
 the
 RequestCycle or something... 
 - The first time the modalwindow is opened, the list on it has markupid
 'a1'
 - When closing the ChildModalWindow, the list is filled with ajax using
 markupid 'a1'
 - The second time the modalwindow is opened, the list on it has
 markupid
 'b1'
 - When closing the ChildModalWindow, ajax tries to get the component
 with
 markupid 'a1' (and not 'b1')

 Even when I refresh the main-page, ajax still searches for the
 component
 with markupid 'a1'.

 Can someone please help me? I've been stuck on this for a while, but
 can't
 get to the bottom of it.
 Can I post a testcase-war to this list of where should I post it?

 Thanks in advance !
 Marie.
   
   
 -- 
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 

   
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/ModalWindow-with-internal-ModalWindow-problem-tp17980837p18005312.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket in an existing jaas-app

2008-06-19 Thread Jesper Åkesson
Hello!

I have a webapplication built on JavaEE, servlets and jsp. Jaas is used for 
security.
The plan is to use Wicket but it will be done little by little.

Login is done by the originalapp and the wicket pages will be behind the 
loginpage.
How do I let wicket now about the logged in users roles or principals. It would 
be nice to have an AuthenticatedWebSession with the roles of the logged in user

Cheers Jesper

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ModalWindow with internal ModalWindow problem

2008-06-19 Thread Nino Saturnino Martinez Vazquez Wael
Hmm, okay I went ahead and created a maven project with a pom. For 
minimal setup. Using wicket 1.4-snapshot.


And it are working, which browser are you using, im using FF2 and safari3..

However this are using wicket 1.4-snapshot(from wicketstuff repo) can 
you try to use that and see it the problem are solved? Just to be sure?


Marieke Vandamme wrote:
Hello, 


Okay, second try..
I made my war again and tested it myself in tomcat 6. It seems to work, so I
put it on the server again and hope it works for you too..
I also created a zip with my sources and libraries that you can use in
eclipse :
http://www.driespannenkoeken.be/src.zip

If that's still not enough , please let me know. 
Thanks for the help.



Nino.Martinez wrote:
  

Hi Marieke

Your war file does not deploy/startup, atleast on tomcat, could you do 
the same using the quickstart archetype, it should take you 2 mins doing 
that(and give me something that I can look at in eclipse without too 
much hassle)? I know Im being lazy but, thats the benefit of being the 
helper...


Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3722 ms
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ModalWindowTestcase2] startup failed due to previous 
errors
 
Marieke Vandamme wrote:

Hey, 


I found a place where I can place my war for a while :
http://www.driespannenkoeken.be/ModalWindowTestcase2.war

I can change my application without modalwindows, but I first want to
find
out what the problem is..
Would find it easier if I don't have to change it :-)

Hope you guys find the time to download my war and test it. 
Thanks again !



Nino.Martinez wrote:
  
  

Hi Marieke

First of all upload your quickstart project somewhere and share the link 
here. Please be sure theres not too many commercials when downloading, 
people tend to bully you with it:)


So I have two suggestions.

   1. I think that we should try to sort out if it's a bug causing your
  problem or it's wrong usage.
   2. I used modal window too, as you can see from one of our previous
  discussions. But I found that it were better to actually just
  forward to another panel or page, hence no popup and no trouble,
  and better focus, and when people are done they return to the old
  panel/page. You can still use modal window for simple stuff, sort
  of like the prototip but with stuff that requires a larger screen.

Please ask if you are in any doubt.

Marieke Vandamme wrote:


Hello, 


I have a rather complex situation, but If I'm not clear enough here, I
can
make a test case. 


My situation:
- Page with contact details
- Open a window to send the details to my colleague by email
- In that window open another window to choose my colleague from a list
of
employees

My Application :
- Normal page with ajax link that opens ModalWindow
  |- ModalWindow. 
Contains link to open another ModalWindow, 
and a list that is updated by the child modalwindow

|- ChildModalWindow (of the ModalWindow).
  This is a chooser, which needs to fill the list on
ModalWindow.

My error situation:
- I open the ModalWindow and fill the list with employees from the
ChildModalWindow.
- I close the ModalWindow, (send the email).
- I open the ModalWindow again (want to send the details to another
colleague)
- I choose a colleague from the ChildModalWindow, but the list isn't
updated...

After much of testing and searching, I think it has something to do
with
the
RequestCycle or something... 
- The first time the modalwindow is opened, the list on it has markupid

'a1'
- When closing the ChildModalWindow, the list is filled with ajax using
markupid 'a1'
- The second time the modalwindow is opened, the list on it has
markupid
'b1'
- When closing the ChildModalWindow, ajax tries to get the component
with
markupid 'a1' (and not 'b1')

Even when I refresh the main-page, ajax still searches for the
component
with markupid 'a1'.

Can someone please help me? I've been stuck on this for a while, but
can't
get to the bottom of it.
Can I post a testcase-war to this list of where should I post it?

Thanks in advance !
Marie.
  
  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway 

How can i use template in wickets

2008-06-19 Thread Sushant

I want to build a template page and extend it to all my other pages.
How can i do that.
Help Please.
-- 
View this message in context: 
http://www.nabble.com/How-can-i-use-template-in-wickets-tp18006702p18006702.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ModalWindow with internal ModalWindow problem

2008-06-19 Thread Marieke Vandamme

Are you sure? The version I'm using is 1.4m2, so I don't think so much has
changed. 

Did you do the following steps and have the list filled the second time? :
1- click 'Open Head Modal Window'
2- click 'Open Inner Modal Window'
3- close the modalwindow with 'When closing this window a date will be added
to the list..' on it
4- close the head modal window
5- redo steps 1 to 3

Can you please test above for me again? Thanks.



Nino.Martinez wrote:
 
 Hmm, okay I went ahead and created a maven project with a pom. For 
 minimal setup. Using wicket 1.4-snapshot.
 
 And it are working, which browser are you using, im using FF2 and
 safari3..
 
 However this are using wicket 1.4-snapshot(from wicketstuff repo) can 
 you try to use that and see it the problem are solved? Just to be sure?
 
 Marieke Vandamme wrote:
 Hello, 

 Okay, second try..
 I made my war again and tested it myself in tomcat 6. It seems to work,
 so I
 put it on the server again and hope it works for you too..
 I also created a zip with my sources and libraries that you can use in
 eclipse :
 http://www.driespannenkoeken.be/src.zip

 If that's still not enough , please let me know. 
 Thanks for the help.


 Nino.Martinez wrote:
   
 Hi Marieke

 Your war file does not deploy/startup, atleast on tomcat, could you do 
 the same using the quickstart archetype, it should take you 2 mins doing 
 that(and give me something that I can look at in eclipse without too 
 much hassle)? I know Im being lazy but, thats the benefit of being the 
 helper...

 Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 3722 ms
 Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
 SEVERE: Error filterStart
 Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
 SEVERE: Context [/ModalWindowTestcase2] startup failed due to previous 
 errors
  
 Marieke Vandamme wrote:
 
 Hey, 

 I found a place where I can place my war for a while :
 http://www.driespannenkoeken.be/ModalWindowTestcase2.war

 I can change my application without modalwindows, but I first want to
 find
 out what the problem is..
 Would find it easier if I don't have to change it :-)

 Hope you guys find the time to download my war and test it. 
 Thanks again !


 Nino.Martinez wrote:
   
   
 Hi Marieke

 First of all upload your quickstart project somewhere and share the
 link 
 here. Please be sure theres not too many commercials when downloading, 
 people tend to bully you with it:)

 So I have two suggestions.

1. I think that we should try to sort out if it's a bug causing
 your
   problem or it's wrong usage.
2. I used modal window too, as you can see from one of our previous
   discussions. But I found that it were better to actually just
   forward to another panel or page, hence no popup and no trouble,
   and better focus, and when people are done they return to the
 old
   panel/page. You can still use modal window for simple stuff,
 sort
   of like the prototip but with stuff that requires a larger
 screen.

 Please ask if you are in any doubt.

 Marieke Vandamme wrote:
 
 
 Hello, 

 I have a rather complex situation, but If I'm not clear enough here,
 I
 can
 make a test case. 

 My situation:
 - Page with contact details
 - Open a window to send the details to my colleague by email
 - In that window open another window to choose my colleague from a
 list
 of
 employees

 My Application :
 - Normal page with ajax link that opens ModalWindow
   |- ModalWindow. 
 Contains link to open another ModalWindow, 
 and a list that is updated by the child modalwindow
 |- ChildModalWindow (of the ModalWindow).
   This is a chooser, which needs to fill the list on
 ModalWindow.

 My error situation:
 - I open the ModalWindow and fill the list with employees from the
 ChildModalWindow.
 - I close the ModalWindow, (send the email).
 - I open the ModalWindow again (want to send the details to another
 colleague)
 - I choose a colleague from the ChildModalWindow, but the list isn't
 updated...

 After much of testing and searching, I think it has something to do
 with
 the
 RequestCycle or something... 
 - The first time the modalwindow is opened, the list on it has
 markupid
 'a1'
 - When closing the ChildModalWindow, the list is filled with ajax
 using
 markupid 'a1'
 - The second time the modalwindow is opened, the list on it has
 markupid
 'b1'
 - When closing the ChildModalWindow, ajax tries to get the component
 with
 markupid 'a1' (and not 'b1')

 Even when I refresh the main-page, ajax still searches for the
 component
 with markupid 'a1'.

 Can someone please help me? I've been stuck on this for a while, but
 can't
 get to the bottom of it.
 Can I post a testcase-war to this list of where should I post it?

 Thanks in advance !
 Marie.
   
   
   
 -- 
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 

Send file from external page to wicket

2008-06-19 Thread Vit Rozkovec

Hallo,

I have an applet, which is run on users computer. In this applet I scan 
some photo and describe it.

I would like to send this foto along with the data to a wicket application.
How should I do that?

I thought of setting the form action parameter in the external 
non-wicket page to point to a bookmarkable wicket page, where I would 
handle the POST, but I do not know how should I extract the parameters 
and file from the POST.


How would you do it?

Thank you.

Vitek

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ModalWindow with internal ModalWindow problem

2008-06-19 Thread Nino Saturnino Martinez Vazquez Wael

Ahh, I did steps 1,2,3,2,3,2,4

Problem appears as you write.

Somethings seem to get out of synch. And it does seem that there are 
something that are inconsistant, 10 mins and i'll see if I can hack 
something up that works. Or if it's a true bug.


Marieke Vandamme wrote:

Are you sure? The version I'm using is 1.4m2, so I don't think so much has
changed. 


Did you do the following steps and have the list filled the second time? :
1- click 'Open Head Modal Window'
2- click 'Open Inner Modal Window'
3- close the modalwindow with 'When closing this window a date will be added
to the list..' on it
4- close the head modal window
5- redo steps 1 to 3

Can you please test above for me again? Thanks.



Nino.Martinez wrote:
  
Hmm, okay I went ahead and created a maven project with a pom. For 
minimal setup. Using wicket 1.4-snapshot.


And it are working, which browser are you using, im using FF2 and
safari3..

However this are using wicket 1.4-snapshot(from wicketstuff repo) can 
you try to use that and see it the problem are solved? Just to be sure?


Marieke Vandamme wrote:

Hello, 


Okay, second try..
I made my war again and tested it myself in tomcat 6. It seems to work,
so I
put it on the server again and hope it works for you too..
I also created a zip with my sources and libraries that you can use in
eclipse :
http://www.driespannenkoeken.be/src.zip

If that's still not enough , please let me know. 
Thanks for the help.



Nino.Martinez wrote:
  
  

Hi Marieke

Your war file does not deploy/startup, atleast on tomcat, could you do 
the same using the quickstart archetype, it should take you 2 mins doing 
that(and give me something that I can look at in eclipse without too 
much hassle)? I know Im being lazy but, thats the benefit of being the 
helper...


Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3722 ms
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ModalWindowTestcase2] startup failed due to previous 
errors
 
Marieke Vandamme wrote:


Hey, 


I found a place where I can place my war for a while :
http://www.driespannenkoeken.be/ModalWindowTestcase2.war

I can change my application without modalwindows, but I first want to
find
out what the problem is..
Would find it easier if I don't have to change it :-)

Hope you guys find the time to download my war and test it. 
Thanks again !



Nino.Martinez wrote:
  
  
  

Hi Marieke

First of all upload your quickstart project somewhere and share the
link 
here. Please be sure theres not too many commercials when downloading, 
people tend to bully you with it:)


So I have two suggestions.

   1. I think that we should try to sort out if it's a bug causing
your
  problem or it's wrong usage.
   2. I used modal window too, as you can see from one of our previous
  discussions. But I found that it were better to actually just
  forward to another panel or page, hence no popup and no trouble,
  and better focus, and when people are done they return to the
old
  panel/page. You can still use modal window for simple stuff,
sort
  of like the prototip but with stuff that requires a larger
screen.

Please ask if you are in any doubt.

Marieke Vandamme wrote:



Hello, 


I have a rather complex situation, but If I'm not clear enough here,
I
can
make a test case. 


My situation:
- Page with contact details
- Open a window to send the details to my colleague by email
- In that window open another window to choose my colleague from a
list
of
employees

My Application :
- Normal page with ajax link that opens ModalWindow
  |- ModalWindow. 
Contains link to open another ModalWindow, 
and a list that is updated by the child modalwindow

|- ChildModalWindow (of the ModalWindow).
  This is a chooser, which needs to fill the list on
ModalWindow.

My error situation:
- I open the ModalWindow and fill the list with employees from the
ChildModalWindow.
- I close the ModalWindow, (send the email).
- I open the ModalWindow again (want to send the details to another
colleague)
- I choose a colleague from the ChildModalWindow, but the list isn't
updated...

After much of testing and searching, I think it has something to do
with
the
RequestCycle or something... 
- The first time the modalwindow is opened, the list on it has

markupid
'a1'
- When closing the ChildModalWindow, the list is filled with ajax
using
markupid 'a1'
- The second time the modalwindow is opened, the list on it has
markupid
'b1'
- When closing the ChildModalWindow, ajax tries to get the component
with
markupid 'a1' (and not 'b1')

Even when I refresh the main-page, ajax still searches for the
component
with markupid 'a1'.

Can someone please help me? I've been stuck on this for a while, but
can't
get 

Re: How can i use template in wickets

2008-06-19 Thread jWeekend

Sushant,

Wicket makes providing a common look for pages very easy, providing you with
a neat technique called 
http://wicket.apache.org/examplemarkupinheritance.html markup inheritance .

If you prefer composition, look into using 
http://cwiki.apache.org/WICKET/panel.html Panel s and/or 
http://cwiki.apache.org/WICKET/consistent-page-layout-using-borders.html
Border s.

Most people prefer markup inheritance these days, but a combination of all
the above can be very powerful too.

Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 



Sushant wrote:
 
 I want to build a template page and extend it to all my other pages.
 How can i do that.
 Help Please.
 

-- 
View this message in context: 
http://www.nabble.com/How-can-i-use-template-in-wickets-tp18006702p18007783.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ModalWindow with internal ModalWindow problem

2008-06-19 Thread Nino Saturnino Martinez Vazquez Wael
Hmm seems to be something very wierd. I've debugged it(changed your 
source a bit so that the main page now gives the arraylist as a model to 
the headmodal), and it does not seem to maintain state somehow. So head 
modal gets an empty list on click 1 and then at click 3 it's suddenly 
there again wierd, filled. I'll poke at it some more.. Do you want the 
edited source?


Nino Saturnino Martinez Vazquez Wael wrote:

Ahh, I did steps 1,2,3,2,3,2,4

Problem appears as you write.

Somethings seem to get out of synch. And it does seem that there are 
something that are inconsistant, 10 mins and i'll see if I can hack 
something up that works. Or if it's a true bug.


Marieke Vandamme wrote:
Are you sure? The version I'm using is 1.4m2, so I don't think so 
much has

changed.
Did you do the following steps and have the list filled the second 
time? :

1- click 'Open Head Modal Window'
2- click 'Open Inner Modal Window'
3- close the modalwindow with 'When closing this window a date will 
be added

to the list..' on it
4- close the head modal window
5- redo steps 1 to 3

Can you please test above for me again? Thanks.



Nino.Martinez wrote:
 
Hmm, okay I went ahead and created a maven project with a pom. For 
minimal setup. Using wicket 1.4-snapshot.


And it are working, which browser are you using, im using FF2 and
safari3..

However this are using wicket 1.4-snapshot(from wicketstuff repo) 
can you try to use that and see it the problem are solved? Just to 
be sure?


Marieke Vandamme wrote:
   

Hello,
Okay, second try..
I made my war again and tested it myself in tomcat 6. It seems to 
work,

so I
put it on the server again and hope it works for you too..
I also created a zip with my sources and libraries that you can use in
eclipse :
http://www.driespannenkoeken.be/src.zip

If that's still not enough , please let me know. Thanks for the help.


Nino.Martinez wrote:
   

Hi Marieke

Your war file does not deploy/startup, atleast on tomcat, could 
you do the same using the quickstart archetype, it should take you 
2 mins doing that(and give me something that I can look at in 
eclipse without too much hassle)? I know Im being lazy but, thats 
the benefit of being the helper...


Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3722 ms
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext 
start

SEVERE: Error filterStart
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext 
start
SEVERE: Context [/ModalWindowTestcase2] startup failed due to 
previous errors
 
Marieke Vandamme wrote:
   

Hey,
I found a place where I can place my war for a while :
http://www.driespannenkoeken.be/ModalWindowTestcase2.war

I can change my application without modalwindows, but I first 
want to

find
out what the problem is..
Would find it easier if I don't have to change it :-)

Hope you guys find the time to download my war and test it. 
Thanks again !



Nino.Martinez wrote:
 

Hi Marieke

First of all upload your quickstart project somewhere and share the
link here. Please be sure theres not too many commercials when 
downloading, people tend to bully you with it:)


So I have two suggestions.

   1. I think that we should try to sort out if it's a bug causing
your
  problem or it's wrong usage.
   2. I used modal window too, as you can see from one of our 
previous

  discussions. But I found that it were better to actually just
  forward to another panel or page, hence no popup and no 
trouble,

  and better focus, and when people are done they return to the
old
  panel/page. You can still use modal window for simple stuff,
sort
  of like the prototip but with stuff that requires a larger
screen.

Please ask if you are in any doubt.

Marieke Vandamme wrote:
   

Hello,
I have a rather complex situation, but If I'm not clear enough 
here,

I
can
make a test case.
My situation:
- Page with contact details
- Open a window to send the details to my colleague by email
- In that window open another window to choose my colleague from a
list
of
employees

My Application :
- Normal page with ajax link that opens ModalWindow
  |- ModalWindow. Contains link to open another 
ModalWindow, and a list that is updated by the child 
modalwindow

|- ChildModalWindow (of the ModalWindow).
  This is a chooser, which needs to fill the list on
ModalWindow.

My error situation:
- I open the ModalWindow and fill the list with employees from the
ChildModalWindow.
- I close the ModalWindow, (send the email).
- I open the ModalWindow again (want to send the details to 
another

colleague)
- I choose a colleague from the ChildModalWindow, but the list 
isn't

updated...

After much of testing and searching, I think it has something 
to do

with
the
RequestCycle or something... - The first time the modalwindow 
is opened, the list on it has

markupid
'a1'
- When closing the 

Re: ModalWindow with internal ModalWindow problem

2008-06-19 Thread Nino Saturnino Martinez Vazquez Wael
Got it working, I believe there are an issue. Somehow the model on the 
modal window invoking page are not being updated. If I create a final 
page and pass that into the PageCreator it seems to work. But im still a 
little curious about why it seems that the main page's model aren't 
updated, could it be because it's the homepage maybe?...


Heres the edited source (please remember the full url including dots or 
you will get spammed with ads):


http://www15.flyupload.com/dl?fid=175617x=cCFDALnJB9T2ETL9UDILeA..

BTW if you know a better place to share files without too much hassle 
please say so..


Nino Saturnino Martinez Vazquez Wael wrote:
Hmm seems to be something very wierd. I've debugged it(changed your 
source a bit so that the main page now gives the arraylist as a model 
to the headmodal), and it does not seem to maintain state somehow. So 
head modal gets an empty list on click 1 and then at click 3 it's 
suddenly there again wierd, filled. I'll poke at it some more.. Do you 
want the edited source?


Nino Saturnino Martinez Vazquez Wael wrote:

Ahh, I did steps 1,2,3,2,3,2,4

Problem appears as you write.

Somethings seem to get out of synch. And it does seem that there are 
something that are inconsistant, 10 mins and i'll see if I can hack 
something up that works. Or if it's a true bug.


Marieke Vandamme wrote:
Are you sure? The version I'm using is 1.4m2, so I don't think so 
much has

changed.
Did you do the following steps and have the list filled the second 
time? :

1- click 'Open Head Modal Window'
2- click 'Open Inner Modal Window'
3- close the modalwindow with 'When closing this window a date will 
be added

to the list..' on it
4- close the head modal window
5- redo steps 1 to 3

Can you please test above for me again? Thanks.



Nino.Martinez wrote:
 
Hmm, okay I went ahead and created a maven project with a pom. For 
minimal setup. Using wicket 1.4-snapshot.


And it are working, which browser are you using, im using FF2 and
safari3..

However this are using wicket 1.4-snapshot(from wicketstuff repo) 
can you try to use that and see it the problem are solved? Just to 
be sure?


Marieke Vandamme wrote:
  

Hello,
Okay, second try..
I made my war again and tested it myself in tomcat 6. It seems to 
work,

so I
put it on the server again and hope it works for you too..
I also created a zip with my sources and libraries that you can 
use in

eclipse :
http://www.driespannenkoeken.be/src.zip

If that's still not enough , please let me know. Thanks for the help.


Nino.Martinez wrote:
  

Hi Marieke

Your war file does not deploy/startup, atleast on tomcat, could 
you do the same using the quickstart archetype, it should take 
you 2 mins doing that(and give me something that I can look at in 
eclipse without too much hassle)? I know Im being lazy but, thats 
the benefit of being the helper...


Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3722 ms
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext 
start

SEVERE: Error filterStart
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext 
start
SEVERE: Context [/ModalWindowTestcase2] startup failed due to 
previous errors
 
Marieke Vandamme wrote:
  

Hey,
I found a place where I can place my war for a while :
http://www.driespannenkoeken.be/ModalWindowTestcase2.war

I can change my application without modalwindows, but I first 
want to

find
out what the problem is..
Would find it easier if I don't have to change it :-)

Hope you guys find the time to download my war and test it. 
Thanks again !



Nino.Martinez wrote:


Hi Marieke

First of all upload your quickstart project somewhere and share 
the
link here. Please be sure theres not too many commercials when 
downloading, people tend to bully you with it:)


So I have two suggestions.

   1. I think that we should try to sort out if it's a bug causing
your
  problem or it's wrong usage.
   2. I used modal window too, as you can see from one of our 
previous
  discussions. But I found that it were better to actually 
just
  forward to another panel or page, hence no popup and no 
trouble,
  and better focus, and when people are done they return to 
the

old
  panel/page. You can still use modal window for simple stuff,
sort
  of like the prototip but with stuff that requires a larger
screen.

Please ask if you are in any doubt.

Marieke Vandamme wrote:
  

Hello,
I have a rather complex situation, but If I'm not clear enough 
here,

I
can
make a test case.
My situation:
- Page with contact details
- Open a window to send the details to my colleague by email
- In that window open another window to choose my colleague 
from a

list
of
employees

My Application :
- Normal page with ajax link that opens ModalWindow
  |- ModalWindow. Contains link to open another 
ModalWindow, and a list that is updated by the child 
modalwindow


Re: Problem with error message and refreshingView

2008-06-19 Thread Fabien D.

I find a solution but I supose that it's not the best. I  put between the
simple and the name the Id of the row  (the number of rows of my
refreshingView is not fixed :( )

form.simple.1.name.Required = 


-- 
View this message in context: 
http://www.nabble.com/Problem-with-error-message-and-refreshingView-tp18005178p18008324.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



CheckBoxMultipleChoice, Palette - onchange

2008-06-19 Thread Fabien D.

Hi everybody,

There is someone who can tell me how to change the model of selected items
for these similar objects?

Because it's possible to change the model of items with setChoices(IModel m)
or setChoices(List l) but there is not  setSelectedChoices(IModel m)


Thank you for your help!
-- 
View this message in context: 
http://www.nabble.com/CheckBoxMultipleChoice%2C-Palette--%3E-%22onchange%22-tp18008412p18008412.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Static text and condition

2008-06-19 Thread Goran Novak

Hi,

What is the best (wicket) way to do the next:

I have one page which has to show few sentences (static text), but the
sentences are different according to the input data.

For example if input to the page constructor is:
Page(input1 = 0, input2 = 0, inpu3 = 0)
Page has to show these three sentences:
  This first 'sentence 1' variation
  This first 'sentence 2' variation
  This first 'sentence 3' variation

Second time different input parameters come:
Page(input1 = 1, input2 = 0, inpu3 = 0)
Page has to show these three sentences:
  This second 'sentence 1' variation and some other text
  This first 'sentence 2' variation
  This first 'sentence 3' variation

And so on...

Is it better to put every possiable sentence to resource file and than to
show the right one according to the input parameter.
If(input1 = 0) {
  add(new Label(getLocalizer().getString(firstVariationKey, this)));
} else if (input1 = 1){
  add(new Label(getLocalizer().getString(secondVariationKey, this)));
}


Or to put all sentences staticaly to html file and than use in code
setVisible(true/false) method on that span/'webmarkup container' in which
sentence is.

Or is there a smarter way.

Thanks :)

-- 
View this message in context: 
http://www.nabble.com/Static-text-and-condition-tp18008831p18008831.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: compilation question

2008-06-19 Thread James Carman
Well, it would have helped to run it twice and only send the results
of the second run (you wouldn't have seen those dowloading
messages).  Anyway, it looks like wicket-extensions is on your
classpath (listed as a dependency with compile scope), so everything
should be okay.  Do a jar tf on that wicket-extensions jar file in
your repository to make sure the class/packages exist in that
particular version.

On Wed, Jun 18, 2008 at 5:18 PM, Frank Silbermann
[EMAIL PROTECTED] wrote:
 Everything from mvn dependency:list -- that's a lot.  Here goes:

 C:\webReports\web applications\WebCommonmvn dependency:list
 [INFO] Scanning for projects...
 [INFO] Searching repository for plugin with prefix: 'dependency'.
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-depend
 ency-plugin/2.0/maven-dependency-plugin-2.0.pom
 11K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-depend
 ency-plugin/2.0/maven-dependency-plugin-2.0.jar
 87K downloaded
 [INFO]
 
 [INFO] Building quickstart
 [INFO]task-segment: [dependency:list]
 [INFO]
 
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-file/1.0
 -beta-2/wagon-file-1.0-beta-2.pom
 637b downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-
 default/1.0-alpha-7/plexus-container-default-1.0-alpha-7.pom
 1K downloaded
 Downloading:
 http://repo1.maven.org/maven2/plexus/plexus-containers/1.0.2/plexus
 -containers-1.0.2.pom
 471b downloaded
 Downloading:
 http://repo1.maven.org/maven2/plexus/plexus-root/1.0.3/plexus-root-
 1.0.3.pom
 5K downloaded
 Downloading:
 http://repo1.maven.org/maven2/plexus/plexus-utils/1.0.2/plexus-util
 s-1.0.2.pom
 740b downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/1
 .0-alpha-9/plexus-archiver-1.0-alpha-9.pom
 1K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-components
 /1.1.9/plexus-components-1.1.9.pom
 2K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/codehaus/plexus/plexus/1.0.10/ple
 xus-1.0.10.pom
 8K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-io/1.0-alp
 ha-1/plexus-io-1.0-alpha-1.pom
 1K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/shared/file-manageme
 nt/1.1/file-management-1.1.pom
 2K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-
 components/4/maven-shared-components-4.pom
 2K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-
 io/1.0/maven-shared-io-1.0.pom
 2K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/shared/maven-depende
 ncy-analyzer/1.0/maven-dependency-analyzer-1.0.pom
 4K downloaded
 Downloading: http://repo1.maven.org/maven2/asm/asm/3.0/asm-3.0.pom
 360b downloaded
 Downloading:
 http://repo1.maven.org/maven2/asm/asm-parent/3.0/asm-parent-3.0.pom

 2K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/maven-project/2.0.5/
 maven-project-2.0.5.pom
 1K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/maven/2.0.5/maven-2.
 0.5.pom
 5K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/maven-model/2.0.5/ma
 ven-model-2.0.5.pom
 2K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/maven-artifact/2.0.5
 /maven-artifact-2.0.5.pom
 727b downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/shared/maven-depende
 ncy-tree/1.1/maven-dependency-tree-1.1.pom
 2K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/shared/maven-common-
 artifact-filters/1.0/maven-common-artifact-filters-1.0.pom
 1K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/shared/maven-plugin-
 testing-harness/1.1/maven-plugin-testing-harness-1.1.pom
 6K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-
 components/7/maven-shared-components-7.pom
 2K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.4.
 2/plexus-utils-1.4.2.pom
 1K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/reporting/maven-repo
 rting-api/2.0.6/maven-reporting-api-2.0.6.pom
 1K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/reporting/maven-repo
 rting/2.0.6/maven-reporting-2.0.6.pom
 1K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-sink-api
 /1.0-alpha-7/doxia-sink-api-1.0-alpha-7.pom
 424b downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia/1.0-alph
 a-7/doxia-1.0-alpha-7.pom
 3K downloaded
 Downloading:
 http://repo1.maven.org/maven2/org/apache/maven/reporting/maven-repo
 

Re: ModalWindow with internal ModalWindow problem

2008-06-19 Thread Marieke Vandamme

That's nice. Our company's surfing control blocks the site :-)
I'll try to download it at home.

I don't think the problems happen because it's the homepage.
In my original project, the page wasn't the homepage and the problem was the
same.
I debugged the project a couple of times and also couldn't get a grip of why
things go wrong..
I also think it's strange nobody else noticed this, as the example of a
modal window opening from another modal window is in the wicket-examples.

Are you going to post it as a bug?

Thanks for the help !


Nino.Martinez wrote:
 
 Got it working, I believe there are an issue. Somehow the model on the 
 modal window invoking page are not being updated. If I create a final 
 page and pass that into the PageCreator it seems to work. But im still a 
 little curious about why it seems that the main page's model aren't 
 updated, could it be because it's the homepage maybe?...
 
 Heres the edited source (please remember the full url including dots or 
 you will get spammed with ads):
 
 http://www15.flyupload.com/dl?fid=175617x=cCFDALnJB9T2ETL9UDILeA..
 
 BTW if you know a better place to share files without too much hassle 
 please say so..
 
 Nino Saturnino Martinez Vazquez Wael wrote:
 Hmm seems to be something very wierd. I've debugged it(changed your 
 source a bit so that the main page now gives the arraylist as a model 
 to the headmodal), and it does not seem to maintain state somehow. So 
 head modal gets an empty list on click 1 and then at click 3 it's 
 suddenly there again wierd, filled. I'll poke at it some more.. Do you 
 want the edited source?

 Nino Saturnino Martinez Vazquez Wael wrote:
 Ahh, I did steps 1,2,3,2,3,2,4

 Problem appears as you write.

 Somethings seem to get out of synch. And it does seem that there are 
 something that are inconsistant, 10 mins and i'll see if I can hack 
 something up that works. Or if it's a true bug.

 Marieke Vandamme wrote:
 Are you sure? The version I'm using is 1.4m2, so I don't think so 
 much has
 changed.
 Did you do the following steps and have the list filled the second 
 time? :
 1- click 'Open Head Modal Window'
 2- click 'Open Inner Modal Window'
 3- close the modalwindow with 'When closing this window a date will 
 be added
 to the list..' on it
 4- close the head modal window
 5- redo steps 1 to 3

 Can you please test above for me again? Thanks.



 Nino.Martinez wrote:
  
 Hmm, okay I went ahead and created a maven project with a pom. For 
 minimal setup. Using wicket 1.4-snapshot.

 And it are working, which browser are you using, im using FF2 and
 safari3..

 However this are using wicket 1.4-snapshot(from wicketstuff repo) 
 can you try to use that and see it the problem are solved? Just to 
 be sure?

 Marieke Vandamme wrote:
   
 Hello,
 Okay, second try..
 I made my war again and tested it myself in tomcat 6. It seems to 
 work,
 so I
 put it on the server again and hope it works for you too..
 I also created a zip with my sources and libraries that you can 
 use in
 eclipse :
 http://www.driespannenkoeken.be/src.zip

 If that's still not enough , please let me know. Thanks for the help.


 Nino.Martinez wrote:
   
 Hi Marieke

 Your war file does not deploy/startup, atleast on tomcat, could 
 you do the same using the quickstart archetype, it should take 
 you 2 mins doing that(and give me something that I can look at in 
 eclipse without too much hassle)? I know Im being lazy but, thats 
 the benefit of being the helper...

 Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 3722 ms
 Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext 
 start
 SEVERE: Error filterStart
 Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext 
 start
 SEVERE: Context [/ModalWindowTestcase2] startup failed due to 
 previous errors
  
 Marieke Vandamme wrote:
   
 Hey,
 I found a place where I can place my war for a while :
 http://www.driespannenkoeken.be/ModalWindowTestcase2.war

 I can change my application without modalwindows, but I first 
 want to
 find
 out what the problem is..
 Would find it easier if I don't have to change it :-)

 Hope you guys find the time to download my war and test it. 
 Thanks again !


 Nino.Martinez wrote:
 
 Hi Marieke

 First of all upload your quickstart project somewhere and share 
 the
 link here. Please be sure theres not too many commercials when 
 downloading, people tend to bully you with it:)

 So I have two suggestions.

1. I think that we should try to sort out if it's a bug causing
 your
   problem or it's wrong usage.
2. I used modal window too, as you can see from one of our 
 previous
   discussions. But I found that it were better to actually 
 just
   forward to another panel or page, hence no popup and no 
 trouble,
   and better focus, and when people are done they return to 
 the
 old
   panel/page. You can still use modal window for simple stuff,

Re: CheckBoxMultipleChoice, Palette - onchange

2008-06-19 Thread Fabien D.

I find the solution, I create a new object with a new model for selected
items, and i do a form.replace(Component c)
-- 
View this message in context: 
http://www.nabble.com/CheckBoxMultipleChoice%2C-Palette--%3E-%22onchange%22-tp18008412p18009282.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: ModalWindow with internal ModalWindow problem

2008-06-19 Thread Nino Saturnino Martinez Vazquez Wael



Marieke Vandamme wrote:

That's nice. Our company's surfing control blocks the site :-)
I'll try to download it at home.

I don't think the problems happen because it's the homepage.
  

Could just be a problem in what I've done then...

In my original project, the page wasn't the homepage and the problem was the
same.
I debugged the project a couple of times and also couldn't get a grip of why
things go wrong..
  
I also think it's strange nobody else noticed this, as the example of a

modal window opening from another modal window is in the wicket-examples.

Are you going to post it as a bug?
  

https://issues.apache.org/jira/browse/WICKET-1710

you can get the workaround there too. BTW your it department doesnt like 
zip files either...

Thanks for the help !


Nino.Martinez wrote:
  
Got it working, I believe there are an issue. Somehow the model on the 
modal window invoking page are not being updated. If I create a final 
page and pass that into the PageCreator it seems to work. But im still a 
little curious about why it seems that the main page's model aren't 
updated, could it be because it's the homepage maybe?...


Heres the edited source (please remember the full url including dots or 
you will get spammed with ads):


http://www15.flyupload.com/dl?fid=175617x=cCFDALnJB9T2ETL9UDILeA..

BTW if you know a better place to share files without too much hassle 
please say so..


Nino Saturnino Martinez Vazquez Wael wrote:

Hmm seems to be something very wierd. I've debugged it(changed your 
source a bit so that the main page now gives the arraylist as a model 
to the headmodal), and it does not seem to maintain state somehow. So 
head modal gets an empty list on click 1 and then at click 3 it's 
suddenly there again wierd, filled. I'll poke at it some more.. Do you 
want the edited source?


Nino Saturnino Martinez Vazquez Wael wrote:
  

Ahh, I did steps 1,2,3,2,3,2,4

Problem appears as you write.

Somethings seem to get out of synch. And it does seem that there are 
something that are inconsistant, 10 mins and i'll see if I can hack 
something up that works. Or if it's a true bug.


Marieke Vandamme wrote:

Are you sure? The version I'm using is 1.4m2, so I don't think so 
much has

changed.
Did you do the following steps and have the list filled the second 
time? :

1- click 'Open Head Modal Window'
2- click 'Open Inner Modal Window'
3- close the modalwindow with 'When closing this window a date will 
be added

to the list..' on it
4- close the head modal window
5- redo steps 1 to 3

Can you please test above for me again? Thanks.



Nino.Martinez wrote:
 
  
Hmm, okay I went ahead and created a maven project with a pom. For 
minimal setup. Using wicket 1.4-snapshot.


And it are working, which browser are you using, im using FF2 and
safari3..

However this are using wicket 1.4-snapshot(from wicketstuff repo) 
can you try to use that and see it the problem are solved? Just to 
be sure?


Marieke Vandamme wrote:
  


Hello,
Okay, second try..
I made my war again and tested it myself in tomcat 6. It seems to 
work,

so I
put it on the server again and hope it works for you too..
I also created a zip with my sources and libraries that you can 
use in

eclipse :
http://www.driespannenkoeken.be/src.zip

If that's still not enough , please let me know. Thanks for the help.


Nino.Martinez wrote:
  
  

Hi Marieke

Your war file does not deploy/startup, atleast on tomcat, could 
you do the same using the quickstart archetype, it should take 
you 2 mins doing that(and give me something that I can look at in 
eclipse without too much hassle)? I know Im being lazy but, thats 
the benefit of being the helper...


Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3722 ms
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext 
start

SEVERE: Error filterStart
Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext 
start
SEVERE: Context [/ModalWindowTestcase2] startup failed due to 
previous errors
 
Marieke Vandamme wrote:
  


Hey,
I found a place where I can place my war for a while :
http://www.driespannenkoeken.be/ModalWindowTestcase2.war

I can change my application without modalwindows, but I first 
want to

find
out what the problem is..
Would find it easier if I don't have to change it :-)

Hope you guys find the time to download my war and test it. 
Thanks again !



Nino.Martinez wrote:

  

Hi Marieke

First of all upload your quickstart project somewhere and share 
the
link here. Please be sure theres not too many commercials when 
downloading, people tend to bully you with it:)


So I have two suggestions.

   1. I think that we should try to sort out if it's a bug causing
your
  problem or it's wrong usage.
   2. I used modal window too, as you can see from one of our 
previous
  discussions. But I found that it 

Re: How can i use template in wickets

2008-06-19 Thread Brill Pappin

The short answer is RTFM.
See:
http://cwiki.apache.org/WICKET/reference-library.html


There are several ways, but the one I like most is Markup  
inheritance. See:

http://cwiki.apache.org/WICKET/markup-inheritance.html

... but, I also use panels extensively.


- Brill Pappin

On 19-Jun-08, at 7:38 AM, Sushant wrote:



I want to build a template page and extend it to all my other pages.
How can i do that.
Help Please.
--
View this message in context: 
http://www.nabble.com/How-can-i-use-template-in-wickets-tp18006702p18006702.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Breadcrumbs and Pages

2008-06-19 Thread Igor Vaynberg
why wouldnt it be possible? just roll your own breadcrumbs component.

-igor

On Thu, Jun 19, 2008 at 12:34 AM, Eyal Golan [EMAIL PROTECTED] wrote:
 Hi,
 We have pages in our web application (naturally).
 We have a special XML structure that represents the Pages' hierarchies.
 According to this we create Links. Each Link has setResponsePage(...) to a
 page.

 Regarding Bread crumbs.
 I looked into the examples and the source code itself and couldn't help
 noticing that it is a panel.
 I also noticed that the navigation is between panels.
 Is it possible (and how) to integrate links to pages with bread crumbs
 links?

 Thanks

 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Static text and condition

2008-06-19 Thread Igor Vaynberg
just give labels a model that can figure out which sentence to show.
if you want them stored in .properties files that is fine too.

-igor

On Thu, Jun 19, 2008 at 6:18 AM, Goran Novak [EMAIL PROTECTED] wrote:

 Hi,

 What is the best (wicket) way to do the next:

 I have one page which has to show few sentences (static text), but the
 sentences are different according to the input data.

 For example if input to the page constructor is:
 Page(input1 = 0, input2 = 0, inpu3 = 0)
 Page has to show these three sentences:
  This first 'sentence 1' variation
  This first 'sentence 2' variation
  This first 'sentence 3' variation

 Second time different input parameters come:
 Page(input1 = 1, input2 = 0, inpu3 = 0)
 Page has to show these three sentences:
  This second 'sentence 1' variation and some other text
  This first 'sentence 2' variation
  This first 'sentence 3' variation

 And so on...

 Is it better to put every possiable sentence to resource file and than to
 show the right one according to the input parameter.
 If(input1 = 0) {
  add(new Label(getLocalizer().getString(firstVariationKey, this)));
 } else if (input1 = 1){
  add(new Label(getLocalizer().getString(secondVariationKey, this)));
 }


 Or to put all sentences staticaly to html file and than use in code
 setVisible(true/false) method on that span/'webmarkup container' in which
 sentence is.

 Or is there a smarter way.

 Thanks :)

 --
 View this message in context: 
 http://www.nabble.com/Static-text-and-condition-tp18008831p18008831.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to indicate dependency on a .war file?

2008-06-19 Thread Frank Silbermann
I have a question about packaging.  I have two Wicket web  applications
that display data for two different corporate areas, but the
look-and-feel are similar.  Therefore, I coded in Wicket a tool project
consisting of a bunch of higher-level problem-specific components that
my two projects should depend upon.
 
In my tool project I built a web page that I use to test (display and
play with) these components.  Therefore, the output of my tool project
is also .war.  How do I tell Maven that my two business applications
depend upon a .war and not a .jar?  I'd rather not have to partition my
tool project into separate .war and .jar projects.
 
 


Re: Page Expired with ModalWindow

2008-06-19 Thread Daniel Wu

I'm trying to open a new modal dialog, which is called from the
modalWindow.setWindowClosedCallback() of the first dialog. The first dialog
is being closed but the new one is not being opened. Does anyone know how to
open a second modal dialog when you click a AjaxLink of the first dialog,
which must be closed before the second one is opened?


Daniel Wu wrote:
 
 Hi,
 the application I've been developing have to open modal dialogs in
 sequence. I have a dialog A, which is a panel with an AjaxLink, and when
 this AjaxLink is pressed, the dialog A should close and dialog B, which
 content is a WebPage, should be opened.
 
 In order to close dialog A before opening dialog B, the only way I found
 to do that is simulating the click of an AjaxSubmitLink of the page that
 contains all these modal dialogs, appending some javascript on the
 AjaxRequestTarget, which calls the onClick() of the AjaxSubmitLink. This
 is done when I click the AjaxLink of the panel of dialog A.
 
 After that, dialog B is being correctly opened. This dialog B also has an
 AjaxLink, which should close dialog B. This AjaxLink just call
 ModalWindow.closeCurrent(target); The problem is that when I click this
 AjaxLink, I'm getting a PageExpired error.
 
 Am I doing something wrong? Does anyone have any idea of why I'm getting
 this PageExpired? Is there an easier way to open modal dialogs in
 sequence, opening a new one only the previous one is closed?
 
 Daniel
 

-- 
View this message in context: 
http://www.nabble.com/Page-Expired-with-ModalWindow-tp17993206p18010940.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to indicate dependency on a .war file?

2008-06-19 Thread Brill Pappin
Look up war overlay in the maven-war-plugin that will give you some  
useful information on what you want to do beyond your original  
questions.


as for dep types.
A war can be depended upon just like a jar (or anything else for that  
matter) you simply specify the type:

dependency
groupIdcom.mypackage/groupId
artifactIdmywebapp/artifactId
version1.0.0XXX/version
typewar/type
/dependency

- Brill Pappin


On 19-Jun-08, at 10:59 AM, Frank Silbermann wrote:

I have a question about packaging.  I have two Wicket web   
applications

that display data for two different corporate areas, but the
look-and-feel are similar.  Therefore, I coded in Wicket a tool  
project

consisting of a bunch of higher-level problem-specific components that
my two projects should depend upon.

In my tool project I built a web page that I use to test (display and
play with) these components.  Therefore, the output of my tool project
is also .war.  How do I tell Maven that my two business applications
depend upon a .war and not a .jar?  I'd rather not have to partition  
my

tool project into separate .war and .jar projects.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to indicate dependency on a .war file?

2008-06-19 Thread John Krasnay
You can't AFAIK. A WAR file is not a JAR file, e.g. the contained
classfiles are under WEB-INF/classes, not the root.

You're shared component should be a JAR project instead of a WAR
project. Just remember to mount your test page in each app in which you
use it.

jk

On Thu, Jun 19, 2008 at 09:59:38AM -0500, Frank Silbermann wrote:
 I have a question about packaging.  I have two Wicket web  applications
 that display data for two different corporate areas, but the
 look-and-feel are similar.  Therefore, I coded in Wicket a tool project
 consisting of a bunch of higher-level problem-specific components that
 my two projects should depend upon.
  
 In my tool project I built a web page that I use to test (display and
 play with) these components.  Therefore, the output of my tool project
 is also .war.  How do I tell Maven that my two business applications
 depend upon a .war and not a .jar?  I'd rather not have to partition my
 tool project into separate .war and .jar projects.
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to indicate dependency on a .war file?

2008-06-19 Thread John Krasnay
On Thu, Jun 19, 2008 at 11:09:57AM -0400, Brill Pappin wrote:
 Look up war overlay in the maven-war-plugin that will give you some  
 useful information on what you want to do beyond your original  
 questions.
 
 as for dep types.
 A war can be depended upon just like a jar (or anything else for that  
 matter) you simply specify the type:
 dependency
   groupIdcom.mypackage/groupId
   artifactIdmywebapp/artifactId
   version1.0.0XXX/version
   typewar/type
 /dependency
 
 - Brill Pappin

Doh, I knew as soon as I sent my response that someone would pipe up
with a slick way of doing it in Maven!

jk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



update table with ajax

2008-06-19 Thread Manuel Corrales
Hi, i have an input and a link. The link is an ajax link, and then i want to
update a table on the same page according to the input.

final DataView table = new DataView(table, new
ListDataProvider(Collections.EMPTY_LIST)) {
public void populateItem(final Item item) {
item.add(new Label(nroAparato,test));
}};
table.setOutputMarkupId(true);
add(table);

AjaxLink link = new AjaxLink(linkSearchCliente) {

@Override
public void onClick(AjaxRequestTarget target) {
target.addComponent(table);
}
};

I get this error:

*This component is a repeater and cannot be repainted via ajax directly.
Instead add its parent or another markup container higher in the hierarchy.*

How can i solve this, i was unable to find any simple table update on the
web.

Thanks in advance!!


Re: update table with ajax

2008-06-19 Thread Nino Saturnino Martinez Vazquez Wael
You got to wrap it in a markupcontainer, and add that instead.. theres 
something on the wiki about this...


http://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html

Manuel Corrales wrote:

Hi, i have an input and a link. The link is an ajax link, and then i want to
update a table on the same page according to the input.

final DataView table = new DataView(table, new
ListDataProvider(Collections.EMPTY_LIST)) {
public void populateItem(final Item item) {
item.add(new Label(nroAparato,test));
}};
table.setOutputMarkupId(true);
add(table);

AjaxLink link = new AjaxLink(linkSearchCliente) {

@Override
public void onClick(AjaxRequestTarget target) {
target.addComponent(table);
}
};

I get this error:

*This component is a repeater and cannot be repainted via ajax directly.
Instead add its parent or another markup container higher in the hierarchy.*

How can i solve this, i was unable to find any simple table update on the
web.

Thanks in advance!!

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: update table with ajax

2008-06-19 Thread wicket user
add the DataTable in a WebmarkupContainer and repaint the container

cheers
dipu


On Thu, Jun 19, 2008 at 4:27 PM, Manuel Corrales [EMAIL PROTECTED]
wrote:

 Hi, i have an input and a link. The link is an ajax link, and then i want
 to
 update a table on the same page according to the input.

 final DataView table = new DataView(table, new
 ListDataProvider(Collections.EMPTY_LIST)) {
public void populateItem(final Item item) {
item.add(new Label(nroAparato,test));
}};
table.setOutputMarkupId(true);
add(table);

AjaxLink link = new AjaxLink(linkSearchCliente) {

@Override
public void onClick(AjaxRequestTarget target) {
target.addComponent(table);
}
};

 I get this error:

 *This component is a repeater and cannot be repainted via ajax directly.
 Instead add its parent or another markup container higher in the
 hierarchy.*

 How can i solve this, i was unable to find any simple table update on the
 web.

 Thanks in advance!!



Re: update table with ajax

2008-06-19 Thread Manuel Corrales
Fantastic !!

Thanks very much.

On Thu, Jun 19, 2008 at 12:33 PM, wicket user [EMAIL PROTECTED]
wrote:

 add the DataTable in a WebmarkupContainer and repaint the container

 cheers
 dipu


 On Thu, Jun 19, 2008 at 4:27 PM, Manuel Corrales [EMAIL PROTECTED]
 
 wrote:

  Hi, i have an input and a link. The link is an ajax link, and then i want
  to
  update a table on the same page according to the input.
 
  final DataView table = new DataView(table, new
  ListDataProvider(Collections.EMPTY_LIST)) {
 public void populateItem(final Item item) {
 item.add(new Label(nroAparato,test));
 }};
 table.setOutputMarkupId(true);
 add(table);
 
 AjaxLink link = new AjaxLink(linkSearchCliente) {
 
 @Override
 public void onClick(AjaxRequestTarget target) {
 target.addComponent(table);
 }
 };
 
  I get this error:
 
  *This component is a repeater and cannot be repainted via ajax directly.
  Instead add its parent or another markup container higher in the
  hierarchy.*
 
  How can i solve this, i was unable to find any simple table update on the
  web.
 
  Thanks in advance!!
 



Re: How to indicate dependency on a .war file?

2008-06-19 Thread Brill Pappin

chuckle

I've used a few convoluted ways of doing it including a combination of  
the dependency plugin to get the war dep and the antrun plugin to  
extract it, but the war overlay (which I only discovered a few months  
ago) is a much nicer way of doing it :)



- Brill Pappin


On 19-Jun-08, at 11:26 AM, John Krasnay wrote:


On Thu, Jun 19, 2008 at 11:09:57AM -0400, Brill Pappin wrote:

Look up war overlay in the maven-war-plugin that will give you some
useful information on what you want to do beyond your original
questions.

as for dep types.
A war can be depended upon just like a jar (or anything else for that
matter) you simply specify the type:
dependency
groupIdcom.mypackage/groupId
artifactIdmywebapp/artifactId
version1.0.0XXX/version
typewar/type
/dependency

- Brill Pappin


Doh, I knew as soon as I sent my response that someone would pipe up
with a slick way of doing it in Maven!

jk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to indicate dependency on a .war file?

2008-06-19 Thread Frank Silbermann
That satisfies Maven, thanks!  I'm not looking to add any resources or
pages from the dependency, just the java classes and HTML files, so I
don't think I need the war overlay feature.  But now I have another
problem.

For debugging in eclipse, how do I tell Eclipse about this dependency?
When I ran mvn eclipse:eclipse it did not produce a classpath
reference for the .war file.  When I hand coded the path to the .war
file in my local Maven repository, Eclipse couldn't use it -- perhaps
because the .war file places the .class and .html files inside the
WEB-INF/classes folder.

Is there a way I can expose the classes in the .war file to Eclipse?

-Original Message-
From: Brill Pappin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 19, 2008 10:10 AM
To: users@wicket.apache.org
Subject: Re: How to indicate dependency on a .war file?

Look up war overlay in the maven-war-plugin that will give you some
useful information on what you want to do beyond your original
questions.

as for dep types.
A war can be depended upon just like a jar (or anything else for that
matter) you simply specify the type:
dependency
groupIdcom.mypackage/groupId
artifactIdmywebapp/artifactId
version1.0.0XXX/version
typewar/type
/dependency

- Brill Pappin


On 19-Jun-08, at 10:59 AM, Frank Silbermann wrote:

 I have a question about packaging.  I have two Wicket web   
 applications
 that display data for two different corporate areas, but the 
 look-and-feel are similar.  Therefore, I coded in Wicket a tool 
 project consisting of a bunch of higher-level problem-specific 
 components that my two projects should depend upon.

 In my tool project I built a web page that I use to test (display and 
 play with) these components.  Therefore, the output of my tool project

 is also .war.  How do I tell Maven that my two business applications 
 depend upon a .war and not a .jar?  I'd rather not have to partition 
 my tool project into separate .war and .jar projects.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to indicate dependency on a .war file?

2008-06-19 Thread Brill Pappin
if you need to do that, then John was right, package it as a JAR file.  
In your case you presumably don't need all the webapp metadata that  
usually goes along with a war.



However, it still might be worth using the overlay feature because it  
means you can easily run the separate wars for debugging and  
development (which it sounds like you are doing). The result however  
will pretty much be the same.


1) if you *are not* running the common war code for independent  
debugging, package it as a jar.
2) if you *are* independently running the common code, then use the  
war overlay.


there is *no* way to get eclipse to see your war as a dependency in  
the eclipse classpath (as John pointed out) because a war is a  
packaged application, not a library.


- Brill Pappin


On 19-Jun-08, at 11:55 AM, Frank Silbermann wrote:


That satisfies Maven, thanks!  I'm not looking to add any resources or
pages from the dependency, just the java classes and HTML files, so I
don't think I need the war overlay feature.  But now I have another
problem.

For debugging in eclipse, how do I tell Eclipse about this dependency?
When I ran mvn eclipse:eclipse it did not produce a classpath
reference for the .war file.  When I hand coded the path to the .war
file in my local Maven repository, Eclipse couldn't use it -- perhaps
because the .war file places the .class and .html files inside the
WEB-INF/classes folder.

Is there a way I can expose the classes in the .war file to Eclipse?

-Original Message-
From: Brill Pappin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2008 10:10 AM
To: users@wicket.apache.org
Subject: Re: How to indicate dependency on a .war file?

Look up war overlay in the maven-war-plugin that will give you some
useful information on what you want to do beyond your original
questions.

as for dep types.
A war can be depended upon just like a jar (or anything else for that
matter) you simply specify the type:
dependency
groupIdcom.mypackage/groupId
artifactIdmywebapp/artifactId
version1.0.0XXX/version
typewar/type
/dependency

- Brill Pappin


On 19-Jun-08, at 10:59 AM, Frank Silbermann wrote:


I have a question about packaging.  I have two Wicket web
applications
that display data for two different corporate areas, but the
look-and-feel are similar.  Therefore, I coded in Wicket a tool
project consisting of a bunch of higher-level problem-specific
components that my two projects should depend upon.

In my tool project I built a web page that I use to test (display and
play with) these components.  Therefore, the output of my tool  
project



is also .war.  How do I tell Maven that my two business applications
depend upon a .war and not a .jar?  I'd rather not have to partition
my tool project into separate .war and .jar projects.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to indicate dependency on a .war file?

2008-06-19 Thread Frank Silbermann
OK, so I need to package my dependency as a JAR file because I need to
add it to my classpath in Eclipse.

I am not sure how the war overlay tool will help me; it seems to be used
for getting resources out of a .war file, and we've concluded that I
need a JAR file, right?  Is there an easy way to tell Maven to create
both a JAR and a WAR file from the same codebase?

Or, perhaps if I am satisfied to test the common code in Eclipse via
Jetty I don't need to create a WAR file at all? 

-Original Message-
From: Brill Pappin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 19, 2008 11:06 AM
To: users@wicket.apache.org
Subject: Re: How to indicate dependency on a .war file?

if you need to do that, then John was right, package it as a JAR file.  
In your case you presumably don't need all the webapp metadata that
usually goes along with a war.


However, it still might be worth using the overlay feature because it
means you can easily run the separate wars for debugging and development
(which it sounds like you are doing). The result however will pretty
much be the same.

1) if you *are not* running the common war code for independent
debugging, package it as a jar.
2) if you *are* independently running the common code, then use the war
overlay.

there is *no* way to get eclipse to see your war as a dependency in the
eclipse classpath (as John pointed out) because a war is a packaged
application, not a library.

- Brill Pappin


On 19-Jun-08, at 11:55 AM, Frank Silbermann wrote:

 That satisfies Maven, thanks!  I'm not looking to add any resources or

 pages from the dependency, just the java classes and HTML files, so I 
 don't think I need the war overlay feature.  But now I have another 
 problem.

 For debugging in eclipse, how do I tell Eclipse about this dependency?
 When I ran mvn eclipse:eclipse it did not produce a classpath 
 reference for the .war file.  When I hand coded the path to the .war 
 file in my local Maven repository, Eclipse couldn't use it -- perhaps 
 because the .war file places the .class and .html files inside the 
 WEB-INF/classes folder.

 Is there a way I can expose the classes in the .war file to Eclipse?

 -Original Message-
 From: Brill Pappin [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 19, 2008 10:10 AM
 To: users@wicket.apache.org
 Subject: Re: How to indicate dependency on a .war file?

 Look up war overlay in the maven-war-plugin that will give you some 
 useful information on what you want to do beyond your original 
 questions.

 as for dep types.
 A war can be depended upon just like a jar (or anything else for that
 matter) you simply specify the type:
 dependency
   groupIdcom.mypackage/groupId
   artifactIdmywebapp/artifactId
   version1.0.0XXX/version
   typewar/type
 /dependency

 - Brill Pappin


 On 19-Jun-08, at 10:59 AM, Frank Silbermann wrote:

 I have a question about packaging.  I have two Wicket web 
 applications that display data for two different corporate areas, but

 the look-and-feel are similar.  Therefore, I coded in Wicket a tool 
 project consisting of a bunch of higher-level problem-specific 
 components that my two projects should depend upon.

 In my tool project I built a web page that I use to test (display and

 play with) these components.  Therefore, the output of my tool 
 project

 is also .war.  How do I tell Maven that my two business applications 
 depend upon a .war and not a .jar?  I'd rather not have to partition 
 my tool project into separate .war and .jar projects.




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to insert childs to a tree with Ajax

2008-06-19 Thread Kai Schubert-Altmann
Hi,

I'm using an extendet wicket tree with an own tree model. I want to insert
child into the tree and want to update the tree with Ajax, but nothing
worked for me. I tried invalidateAll() and updateTree(). What can i do to
insert the childs with Ajax?

Kai

/* *
 * code snippet: create and setup tree
  */

TreeModel treeModel = null;
HwSubCategoryEnvironmentTree root = hwSubCategoryEnvironmentTreeSer
vice.loadPathToRoot(this.hwSubCategoryEnvironmentTree).get(0);
if (root != null) {
  NestedSetNodeWrapperHwSubCategoryEnvironmentTree node =
hwSubCategoryEnvironmentTreeService.loadSubtree(root);
  treeModel = node.convertToTreeModel();
}
tree = new IconTree(hwSubCategoryEnvironmentTree, treeModel) {

  private static final long serialVersionUID = -4004667936606595008L;

  protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode
node)
  {
  ...
  }
};

tree.setRootLess(false);
ResourceReference icon = new ResourceReference(IconTree.class,
square_orange.png);
tree.setFolderClosedResource(icon);
tree.setFolderOpenResource(icon);
tree.setItemResource(new ResourceReference(IconTree.class,
square_orange.png));
selectNode(this.hwSubCategoryEnvironmentTree);
tree.setOutputMarkupId(true);
// add tree
add(tree);

/* *
 * code snippet: update tree
  */
AjaxSubmitLink saveButton = new AjaxSubmitLink(saveRootButton){
...
protected void onSubmit(AjaxRequestTarget target, Form form) {
...

hwSubCategoryEnvironmentTreeService.save(hwSubCategoryEnvironmentTree);
tree.invalidateAll();
target.addComponent(tree);
}
}

/* *
 * IconTree class
  */
package com.nsn.forlabs.front.components;

import java.io.Serializable;
import java.util.Comparator;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.NoSuchElementException;

import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreeNode;

import org.apache.wicket.Component;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.behavior.AbstractBehavior;
import org.apache.wicket.extensions.markup.html.tree.Tree;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.tree.ITreeStateListener;
import org.apache.wicket.model.IModel;
import org.apache.wicket.util.lang.PropertyResolver;

/**
 * Subclass of [EMAIL PROTECTED] wicket.extensions.markup.html.tree.Tree}
 * ol
 * lito tweak its appearance/li
 * lito allow for easy setting and retrieval of selected nodes/li
 * lito override a TooltipExtractor/li
 * lito provide for event callbacks on changes to the tree/li
 * /ol
 * @author Marco Holmer
 */
@SuppressWarnings(deprecation)
public class IconTree extends Tree implements Serializable
{
  private static final long serialVersionUID = 0L;

  /** Reference to the icon of open tree folder */
  private static final ResourceReference FOLDER_OPEN = new
ResourceReference(
  IconTree.class, res/node-open.gif);

  /** Reference to the icon of closed tree folder */
  private static final ResourceReference FOLDER_CLOSED = new
ResourceReference(
  IconTree.class, res/node-closed.gif);

  /** Reference to the icon of tree item (not a folder) */
  private static final ResourceReference ITEM = new ResourceReference(
  IconTree.class, res/item.gif);

  private TreeStateCallback treeStateCallback;

  private static final Comparator NODE_COMPARATOR = new Comparator() {
public int compare(Object o1, Object o2) {
  return (o1.equals(o2))? 0 : 1;
}
  };

  private static final TooltipExtractor TOOLTIP_EXTRACTOR = new
DefaultTooltipExtractor();

  private ResourceReference itemResource = ITEM;
  private ResourceReference folderClosedResource = FOLDER_CLOSED;
  private ResourceReference folderOpenResource = FOLDER_OPEN;
  private boolean showIcons = true;
  private TooltipExtractor tooltipExtractor = TOOLTIP_EXTRACTOR;

  /**
   * Tree constructor.
   * @param id The component id
   */
  public IconTree(String id)
  {
super(id);
init();
  }

  /**
   * Tree constructor.
   * @param id The component id
   * @param model The tree model
   */
  public IconTree(String id, IModel model)
  {
super(id, model);
init();
  }

  /**
   * Tree constructor.
   * @param id The component id
   * @param treeModel The tree model
   */
  public IconTree(String id, TreeModel treeModel)
  {
super(id, treeModel);
init();
  }

  private void init() {
//getTreeState().addTreeStateListener(new

Re: How to indicate dependency on a .war file?

2008-06-19 Thread John Krasnay
On Thu, Jun 19, 2008 at 11:22:03AM -0500, Frank Silbermann wrote:
 OK, so I need to package my dependency as a JAR file because I need to
 add it to my classpath in Eclipse.
 
 I am not sure how the war overlay tool will help me; it seems to be used
 for getting resources out of a .war file, and we've concluded that I
 need a JAR file, right?  Is there an easy way to tell Maven to create
 both a JAR and a WAR file from the same codebase?
 

Maven tends towards one artifact per project, and I've come to let Maven
have it's way. One solution is to have a small test WAR project that
depends on your JAR project. It's slightly cleaner too, since (if you
like) you can keep your test code out of the JAR, and therefore out of
your production code.

jk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to indicate dependency on a .war file?

2008-06-19 Thread Brill Pappin

overlay takes two war files and merges them.

so whatever classes and resources you have in one will be included in  
the other.


The reason to use a war instead of a jar is if you want to be able to  
run that common war in its own (for dev and debug)



- Brill Pappin

On 19-Jun-08, at 12:22 PM, Frank Silbermann wrote:


OK, so I need to package my dependency as a JAR file because I need to
add it to my classpath in Eclipse.

I am not sure how the war overlay tool will help me; it seems to be  
used

for getting resources out of a .war file, and we've concluded that I
need a JAR file, right?  Is there an easy way to tell Maven to create
both a JAR and a WAR file from the same codebase?

Or, perhaps if I am satisfied to test the common code in Eclipse via
Jetty I don't need to create a WAR file at all?

-Original Message-
From: Brill Pappin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2008 11:06 AM
To: users@wicket.apache.org
Subject: Re: How to indicate dependency on a .war file?

if you need to do that, then John was right, package it as a JAR file.
In your case you presumably don't need all the webapp metadata that
usually goes along with a war.


However, it still might be worth using the overlay feature because it
means you can easily run the separate wars for debugging and  
development

(which it sounds like you are doing). The result however will pretty
much be the same.

1) if you *are not* running the common war code for independent
debugging, package it as a jar.
2) if you *are* independently running the common code, then use the  
war

overlay.

there is *no* way to get eclipse to see your war as a dependency in  
the

eclipse classpath (as John pointed out) because a war is a packaged
application, not a library.

- Brill Pappin


On 19-Jun-08, at 11:55 AM, Frank Silbermann wrote:

That satisfies Maven, thanks!  I'm not looking to add any resources  
or



pages from the dependency, just the java classes and HTML files, so I
don't think I need the war overlay feature.  But now I have another
problem.

For debugging in eclipse, how do I tell Eclipse about this  
dependency?

When I ran mvn eclipse:eclipse it did not produce a classpath
reference for the .war file.  When I hand coded the path to the .war
file in my local Maven repository, Eclipse couldn't use it -- perhaps
because the .war file places the .class and .html files inside the
WEB-INF/classes folder.

Is there a way I can expose the classes in the .war file to Eclipse?

-Original Message-
From: Brill Pappin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2008 10:10 AM
To: users@wicket.apache.org
Subject: Re: How to indicate dependency on a .war file?

Look up war overlay in the maven-war-plugin that will give you some
useful information on what you want to do beyond your original
questions.

as for dep types.
A war can be depended upon just like a jar (or anything else for that
matter) you simply specify the type:
dependency
groupIdcom.mypackage/groupId
artifactIdmywebapp/artifactId
version1.0.0XXX/version
typewar/type
/dependency

- Brill Pappin


On 19-Jun-08, at 10:59 AM, Frank Silbermann wrote:


I have a question about packaging.  I have two Wicket web
applications that display data for two different corporate areas,  
but



the look-and-feel are similar.  Therefore, I coded in Wicket a tool
project consisting of a bunch of higher-level problem-specific
components that my two projects should depend upon.

In my tool project I built a web page that I use to test (display  
and



play with) these components.  Therefore, the output of my tool
project



is also .war.  How do I tell Maven that my two business applications
depend upon a .war and not a .jar?  I'd rather not have to partition
my tool project into separate .war and .jar projects.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Grabbing a form component's input before the form has been submitted

2008-06-19 Thread Michael Mehrle
I tried that - the onUpdate() method is being called as soon as the
field is being populated with a date. The onError() method is being
called as well when invalid input is entered (e.g. 'foo').

This must be something simple - I mean grabbing a field's input is the
underlying mechanism allowing AJAX in the first place.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2008 10:28 PM
To: users@wicket.apache.org
Subject: Re: Grabbing a form component's input before the form has been
submitted

are you sure the field validates? override onerror() in the ajax
behavior and set a break point there.

-igor

On Wed, Jun 18, 2008 at 6:30 PM, Michael Mehrle [EMAIL PROTECTED]
wrote:
 I wonder what difference it makes what 'link' I'm using. The more
 interesting code is this:

 dateField.add(new
AjaxFormComponentUpdatingBehavior(JavaScriptUtil.BLUR)
 {
@Override
protected void onUpdate(AjaxRequestTarget
 target) {
LOG.debug(Date Input: {},
 dateField.getInput());
LOG.debug(Date Model: {},
 dateField.getModelObject());
}

});

 Although there is a behavior attached to the text field it still logs
 null for both the input and the model. Don't understand why this isn't
 being updated.

 Thanks,

 Michael

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2008 5:45 PM
 To: users@wicket.apache.org
 Subject: Re: Grabbing a form component's input before the form has
been
 submitted

 if you would have actually pasted your code someone would have been
 able to help you a long time ago...

 i dont know what kind of link you are using to launch the modal

 or how you are launching the modal

 etc


 -igor

 On Wed, Jun 18, 2008 at 5:17 PM, Michael Mehrle
[EMAIL PROTECTED]
 wrote:
 Added that listener and my logger shows that it's still empty - about
 to
 pull my hair out here. I frankly think there should be a default
 method
 of handling such a scenario.

 Any input/help would be appreciated.

 Thanks,

 Michael

 -Original Message-
 From: brian.diekelman [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2008 3:42 PM
 To: users@wicket.apache.org
 Subject: RE: Grabbing a form component's input before the form has
 been
 submitted


 If I'm understanding you correctly the input it still sitting on the
 client
 (since the form hasn't been submitted) and the server doesn't have
any
 knowledge of it when it renders the modal.

 You should be able to use AjaxFormComponentUpdatingBehavor(onblur)
 on
 the
 date field.  That will send an ajax event to notify the server of the
 component change so it is updated in the modal.


 Michael Mehrle wrote:

 Nope - still getting null, although the field is populated. How can
I
 force this without submitting the form?

 Michael

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 17, 2008 8:24 PM
 To: users@wicket.apache.org
 Subject: Re: Grabbing a form component's input before the form has
 been
 submitted

 getinput()

 -igor

 On Tue, Jun 17, 2008 at 6:10 PM, Michael Mehrle
 [EMAIL PROTECTED]
 wrote:
 I have a form that contains a date textfield. When a user fills out
 the
 date and then launches a modal via another link I need to somehow
 pass
 that field's input to the modal's panel. Problem is that the form
at
 that point has not been submitted yet. I already tried:



 Date startDate = (Date)startTimeField.getConvertedInput();



 However, it's always null. How can I do this?



 Thanks in advance...



 Michael




-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 View this message in context:


http://www.nabble.com/Grabbing-a-form-component%27s-input-before-the-for
 m-has-been-submitted-tp17957853p17993636.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




RE: Grabbing a form component's input before the form has been submitted

2008-06-19 Thread Michael Mehrle
Okay, I fixed it - by accident I realized that the field started
populating AFTER I first entered some erroneous data, and then a real
date. Changing the JS even from BLUR to CHANGE fixed the issue. It was
simply an event based timing problem. Works like a charm now.

Thanks for the help, Igor - the onError() method implicitly lead to
finding the solution :-)

Cheers,

Michael

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 19, 2008 10:36 AM
To: users@wicket.apache.org
Subject: RE: Grabbing a form component's input before the form has been
submitted

I tried that - the onUpdate() method is being called as soon as the
field is being populated with a date. The onError() method is being
called as well when invalid input is entered (e.g. 'foo').

This must be something simple - I mean grabbing a field's input is the
underlying mechanism allowing AJAX in the first place.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2008 10:28 PM
To: users@wicket.apache.org
Subject: Re: Grabbing a form component's input before the form has been
submitted

are you sure the field validates? override onerror() in the ajax
behavior and set a break point there.

-igor

On Wed, Jun 18, 2008 at 6:30 PM, Michael Mehrle [EMAIL PROTECTED]
wrote:
 I wonder what difference it makes what 'link' I'm using. The more
 interesting code is this:

 dateField.add(new
AjaxFormComponentUpdatingBehavior(JavaScriptUtil.BLUR)
 {
@Override
protected void onUpdate(AjaxRequestTarget
 target) {
LOG.debug(Date Input: {},
 dateField.getInput());
LOG.debug(Date Model: {},
 dateField.getModelObject());
}

});

 Although there is a behavior attached to the text field it still logs
 null for both the input and the model. Don't understand why this isn't
 being updated.

 Thanks,

 Michael

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2008 5:45 PM
 To: users@wicket.apache.org
 Subject: Re: Grabbing a form component's input before the form has
been
 submitted

 if you would have actually pasted your code someone would have been
 able to help you a long time ago...

 i dont know what kind of link you are using to launch the modal

 or how you are launching the modal

 etc


 -igor

 On Wed, Jun 18, 2008 at 5:17 PM, Michael Mehrle
[EMAIL PROTECTED]
 wrote:
 Added that listener and my logger shows that it's still empty - about
 to
 pull my hair out here. I frankly think there should be a default
 method
 of handling such a scenario.

 Any input/help would be appreciated.

 Thanks,

 Michael

 -Original Message-
 From: brian.diekelman [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2008 3:42 PM
 To: users@wicket.apache.org
 Subject: RE: Grabbing a form component's input before the form has
 been
 submitted


 If I'm understanding you correctly the input it still sitting on the
 client
 (since the form hasn't been submitted) and the server doesn't have
any
 knowledge of it when it renders the modal.

 You should be able to use AjaxFormComponentUpdatingBehavor(onblur)
 on
 the
 date field.  That will send an ajax event to notify the server of the
 component change so it is updated in the modal.


 Michael Mehrle wrote:

 Nope - still getting null, although the field is populated. How can
I
 force this without submitting the form?

 Michael

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 17, 2008 8:24 PM
 To: users@wicket.apache.org
 Subject: Re: Grabbing a form component's input before the form has
 been
 submitted

 getinput()

 -igor

 On Tue, Jun 17, 2008 at 6:10 PM, Michael Mehrle
 [EMAIL PROTECTED]
 wrote:
 I have a form that contains a date textfield. When a user fills out
 the
 date and then launches a modal via another link I need to somehow
 pass
 that field's input to the modal's panel. Problem is that the form
at
 that point has not been submitted yet. I already tried:



 Date startDate = (Date)startTimeField.getConvertedInput();



 However, it's always null. How can I do this?



 Thanks in advance...



 Michael




-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 View this message in context:


http://www.nabble.com/Grabbing-a-form-component%27s-input-before-the-for
 m-has-been-submitted-tp17957853p17993636.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 

help with ajax behavior

2008-06-19 Thread francisco treacy
hi!

a few days ago i posted a NicEditTextAreaBehavior. thanks to some
exchange with another wicketer, we managed to get a working version.

in order to use it and post an updated version of the field contents
(hence correctly updating the underlying Model), nicEdit textarea
requires the user to call a javascript snippet [
wicketNicEditor.nicInstances[0].saveContent(); ].

the approach that worked for me was decorating the ajax button call,
preppending the mentioned js code. i was just wondering if there was a
more elegant way, i.e. not having to explicitly call

   protected IAjaxCallDecorator getAjaxCallDecorator() {
   return behavior.NICEDIT_AJAX_BUTTON_DECORATOR;
   }

is there a way to encapsulate 100% functionality inside the behavior,
maybe through an implicit ajax callback to the behavior?  i tried but
couldn't it figure out.

thanks,

francisco


usage:

(...)
final NicEditTextAreaBehavior behavior = new NicEditTextAreaBehavior();
textarea.add(behavior);
(...)

form.add(new AjaxFallbackButton(submit, form) {

   @Override
   protected IAjaxCallDecorator getAjaxCallDecorator() {
   return behavior.NICEDIT_AJAX_BUTTON_DECORATOR;
   }

   (...)

});

(...)




public class NicEditTextAreaBehavior extends AbstractAjaxBehavior {

   private Boolean fullPanel = Boolean.TRUE;

   private static final ResourceReference NICEDIT_JAVASCRIPT =
   new
JavascriptResourceReference(NicEditTextAreaBehavior.class,
nicEdit.js);

   private static final ResourceReference NICEDIT_ICONS = new
ResourceReference(NicEditTextAreaBehavior.class,
   nicEditorIcons.gif);

   public static final AjaxCallDecorator NICEDIT_AJAX_BUTTON_DECORATOR =
new AjaxCallDecorator() {
   @Override
   public CharSequence decorateScript(final CharSequence script) {
   return
wicketNicEditor.nicInstances[0].saveContent(); + script;
   }
   };

   public NicEditTextAreaBehavior() {
   }

   public NicEditTextAreaBehavior(Boolean fullPanel) {
   this.fullPanel = fullPanel;
   }

   @Override
   protected void onBind() {
   super.onBind();
   getComponent().setOutputMarkupId(true);
   }

   @Override
   public void onRequest() {
   }

   @Override
   public void renderHead(IHeaderResponse response) {
   super.renderHead(response);
   response.renderJavascriptReference(NICEDIT_JAVASCRIPT);
   response.renderJavascript(var wicketNicEditor; function
wicketNicEditorUpdate() {
wicketNicEditor.nicInstances[0].saveContent(); };, null);
   response.renderOnDomReadyJavascript(wicketNicEditor = new
nicEditor({iconsPath : '+ RequestCycle.get().urlFor(
   NICEDIT_ICONS) +', fullPanel : +
fullPanel +}).panelInstance('
+ getComponent().getMarkupId() + '););
   }

}

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Change to PageParameters?

2008-06-19 Thread Frank Silbermann
In my Wicket 1.2 application I used PageParameters like a simple
HashMap, calling:
 
pageParameters.put(keyString, valueString)
 
and
 
String s = (String) pageParameters.get(keyString)
 
After upgrading to Wicket 1.3 the GET is causing a ClassCastException:
[Ljava.lang.String; cannot be cast to java.lang.String
 
I didn't read anything about PageParameters in
http://cwiki.apache.org/WICKET/migrate-13.html
 
What change should I make to my code?  Would I simply replace (String)
pp.get(x) with pp.getString(x)?


Re: Change to PageParameters?

2008-06-19 Thread Brill Pappin
not sure about what the javadocs say, but that exception says your  
casting a string array to a string.



What your doing is:
String[] x = {value1,value2};
String y = (String)x;

- Brill Pappin


On 19-Jun-08, at 3:29 PM, Frank Silbermann wrote:


In my Wicket 1.2 application I used PageParameters like a simple
HashMap, calling:

pageParameters.put(keyString, valueString)

and

String s = (String) pageParameters.get(keyString)

After upgrading to Wicket 1.3 the GET is causing a ClassCastException:
[Ljava.lang.String; cannot be cast to java.lang.String

I didn't read anything about PageParameters in
http://cwiki.apache.org/WICKET/migrate-13.html

What change should I make to my code?  Would I simply replace  
(String)

pp.get(x) with pp.getString(x)?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Newbie]Session lost in an AjaxFallbackLink onClick()

2008-06-19 Thread A nono life

Hi,

When in an AjaxFallbackLink's onClick(), the object I retrieve from my
session is null, even if in my form constructor the object was properly
retrieved :
public CreatureForm(String id, HibernateObjectModel object ) {
super(id,  object);
Creature sessionCreature = ((DemoUser) ((DemoSession)
getSession()).getUser()).getCreature() ;
System.out.println(Creature name in the form :  +
sessionCreature.getName());
System.out.println(Creature location :  +
sessionCreature.getCurrentXP());
add(new AjaxFallbackLink(aLink){
 @Override
 public void onClick(AjaxRequestTarget target) {
Creature sessionCreature = ((DemoUser) ((DemoSession)
getSession()).getUser()).getCreature() ;
System.out.println(Creature name in the form :  +
sessionCreature.getName());
System.out.println(Creature location :  +
sessionCreature.getCurrentXP());
 }
}

In the onClick, I get a java.lang.NullPointerException...

What do I do wrong ?

Thanks in advance
++
Nono
-- 
View this message in context: 
http://www.nabble.com/-Newbie-Session-lost-in-an-AjaxFallbackLink-onClick%28%29-tp18016504p18016504.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Inheritance inside a Container

2008-06-19 Thread smallufo
Hello ,
I had exactly the same problem , and solved by searching to this post.
Thanks a lot.

BUT , today , I have another problem...

Today , the ChildPanel can accept a new parameter : boolean defaultVisible
if true , the content will be shown;
if false , the content will be invisible , only the title bar is visible.
The title bar is defined in ParentPanel , containing a title label and a
expand/collapse ajax link (a toggle).

Here comes the problem.
In the ChildPanel , if I write :
setVisible(defaultVisible);
and if the defaultVisible is false , the whole panel , including ParentPanel
(including title bar) will be invisible;
This makes users unable to make it re-appear.

However , if I write code like this :
get(content).setVisible(defaultVisible);
(content is the WebMarkupContainer defined in ParentPanel returning
isTransparentResolver()  TRUE)

It will throw WicketRuntimeException while
org.apache.wicket.Page.checkRendering
org.apache.wicket.WicketRuntimeException: The component(s) below failed to
render. A common problem is that you have added a component in code but
forgot to reference it in the markup (thus the component will never be
rendered).

How to solve it ?






2008/4/6 Martijn Dashorst [EMAIL PROTECTED]:

 You should do this:

 WMC wmc = new WMC(childContainer) {
@override boolean isTransparentResolver() { return true; }
 };

 This is not a bug. If you do add() in the subclass's constructor, you
 add to the page itself. Which is how the hierarchy is constructed. By
 telling the WMC that it is a transparent resolver, you tell it to look
 for children without attached markup in its siblings.

 Martijn

 On 4/5/08, Oliver Sawade [EMAIL PROTECTED] wrote:
  Hi everyone,
   my first mail to the list, i hope this wasn`t answered million times
  before, but the wicket users faq is empty so i couldn`t find it there ;)
 
   I'm using wicket1.3 to create a generic panel with the option to hide
  everything inside when clicking an ajax-button. While the actual
  hidingshowing works fine I'm having trouble with inheritance.
   This example should show what I mean:
 
   This is my generic super panel (no ajax stuff in it here to show the
  essential problem). The idea is, that the childContainer is set to
  Visible:false when the button is clicked. All of this should happen in
 the
  super class, so i don't have to care about it in the child class:
 
   public class testSuperPanel extends Panel {
 public testSuperPanel(String id) {
 super(id);
 add(new WebMarkupContainer(childContainer));
 }
   }
 
   The markup for testSuperPanel:
   wicket:panel
 div wicket:id=childContainer
 wicket:child/
 /div
   /wicket:panel
 
   This is a sample child panel:
 
   public class testChildPanel extends testSuperPanel {
 public testChildPanel(String id) {
 super(id);
 add(new Label(childLabel,Test!));
 }
   }
 
   and the Markup:
   wicket:extend
 span wicket:id=childLabel/span
   /wicket:extend
 
   As you see, it should simply display Test inside a MarkupContainer
 (which
  could be hidden from the superClass). When i try to display this Panel
  however I get an Exception stating that no code is added for the Label
  childLabel!
   This can be solved by adding the childLabel to the container in the
  superClass, but thats obviously not the way it is meant to be:
 
   public class testSuperPanel extends Panel {
 public testSuperPanel(String id) {
 super(id);
 WebMarkupContainer wmc = new
  WebMarkupContainer(childContainer);
 wmc.add(new Label(childLabel,Test!));
 add(wmc);
 }
   }
 
   So, is this a wicket bug with inheritance inside containers or am I just
  doing things the wrong way?
 
   Thanks for your help!
   best regards, Oli
 
  -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.2 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Change to PageParameters?

2008-06-19 Thread Igor Vaynberg
in 1.3 pageparameters properly support string[] arrays like httpservletrequest.

you should use pageparameters.getstring(keystring);

-igor

On Thu, Jun 19, 2008 at 12:29 PM, Frank Silbermann
[EMAIL PROTECTED] wrote:
 In my Wicket 1.2 application I used PageParameters like a simple
 HashMap, calling:

 pageParameters.put(keyString, valueString)

 and

 String s = (String) pageParameters.get(keyString)

 After upgrading to Wicket 1.3 the GET is causing a ClassCastException:
 [Ljava.lang.String; cannot be cast to java.lang.String

 I didn't read anything about PageParameters in
 http://cwiki.apache.org/WICKET/migrate-13.html

 What change should I make to my code?  Would I simply replace (String)
 pp.get(x) with pp.getString(x)?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket in an existing jaas-app

2008-06-19 Thread Maurice Marrink
Take a look at swarm, it has a jaas history. It should be dead simple
to port it back to jaas again.
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security

Maurice

On Thu, Jun 19, 2008 at 12:10 PM, Jesper Åkesson
[EMAIL PROTECTED] wrote:
 Hello!

 I have a webapplication built on JavaEE, servlets and jsp. Jaas is used for 
 security.
 The plan is to use Wicket but it will be done little by little.

 Login is done by the originalapp and the wicket pages will be behind the 
 loginpage.
 How do I let wicket now about the logged in users roles or principals. It 
 would be nice to have an AuthenticatedWebSession with the roles of the logged 
 in user

 Cheers Jesper

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Two gmap2 applications

2008-06-19 Thread smallufo
The two applications are presented in Google Developers Day 2008 in Taipei

2008/6/17 smallufo [EMAIL PROTECTED]:

 FYI...

 http://destiny.xfiles.to/app/calendar/StarTrans

 http://destiny.xfiles.to/app/LuckyMap

 BR



Re: wicket servlet mapping to subdirectory

2008-06-19 Thread Gwyn Evans
When you say I always get redirected to the root of the webapp, do you
mean when first trying to access your app, you have to go via a redirect or
some such that takes you to http://www.mysite.com/; or similar?

The 'traditional' trick was to have an index.html that redirected to app/
as below - any uise?

html
head
meta http-equiv=Refresh content=0; url=app
/head
/html

/Gwyn

On Thu, Jun 19, 2008 at 5:30 PM, Thomas Lutz [EMAIL PROTECTED] wrote:

 Hi list !

 I am forced to use the wicket servlet (1.3.3) instead of the filter because
 of oc4j.

 I mapped the servlet to

 servlet-mapping
   servlet-nameWicket Webapp/servlet-name
   url-pattern/app/*/url-pattern
 /servlet-mapping

 This does not work, I always get redirected to the root of the webapp, and
 therefore none of my pages shows up. If I map to /*, everything works fine,
 but then my acegi filters to not work...

 Is there any parameter I need to set to tell wicket about the different
 location ? Or, is it possible to configure some fake name in front of the
 request strings ? ?

 Thanks a lot,
 Tom

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Inheritance inside a Container

2008-06-19 Thread Maurice Marrink
What wicket version are you on? There was a bug about this but is has
long been fixed. https://issues.apache.org/jira/browse/WICKET-1095

Maurice

On Thu, Jun 19, 2008 at 9:40 PM, smallufo [EMAIL PROTECTED] wrote:
 Hello ,
 I had exactly the same problem , and solved by searching to this post.
 Thanks a lot.

 BUT , today , I have another problem...

 Today , the ChildPanel can accept a new parameter : boolean defaultVisible
 if true , the content will be shown;
 if false , the content will be invisible , only the title bar is visible.
 The title bar is defined in ParentPanel , containing a title label and a
 expand/collapse ajax link (a toggle).

 Here comes the problem.
 In the ChildPanel , if I write :
 setVisible(defaultVisible);
 and if the defaultVisible is false , the whole panel , including ParentPanel
 (including title bar) will be invisible;
 This makes users unable to make it re-appear.

 However , if I write code like this :
 get(content).setVisible(defaultVisible);
 (content is the WebMarkupContainer defined in ParentPanel returning
 isTransparentResolver()  TRUE)

 It will throw WicketRuntimeException while
 org.apache.wicket.Page.checkRendering
 org.apache.wicket.WicketRuntimeException: The component(s) below failed to
 render. A common problem is that you have added a component in code but
 forgot to reference it in the markup (thus the component will never be
 rendered).

 How to solve it ?






 2008/4/6 Martijn Dashorst [EMAIL PROTECTED]:

 You should do this:

 WMC wmc = new WMC(childContainer) {
@override boolean isTransparentResolver() { return true; }
 };

 This is not a bug. If you do add() in the subclass's constructor, you
 add to the page itself. Which is how the hierarchy is constructed. By
 telling the WMC that it is a transparent resolver, you tell it to look
 for children without attached markup in its siblings.

 Martijn

 On 4/5/08, Oliver Sawade [EMAIL PROTECTED] wrote:
  Hi everyone,
   my first mail to the list, i hope this wasn`t answered million times
  before, but the wicket users faq is empty so i couldn`t find it there ;)
 
   I'm using wicket1.3 to create a generic panel with the option to hide
  everything inside when clicking an ajax-button. While the actual
  hidingshowing works fine I'm having trouble with inheritance.
   This example should show what I mean:
 
   This is my generic super panel (no ajax stuff in it here to show the
  essential problem). The idea is, that the childContainer is set to
  Visible:false when the button is clicked. All of this should happen in
 the
  super class, so i don't have to care about it in the child class:
 
   public class testSuperPanel extends Panel {
 public testSuperPanel(String id) {
 super(id);
 add(new WebMarkupContainer(childContainer));
 }
   }
 
   The markup for testSuperPanel:
   wicket:panel
 div wicket:id=childContainer
 wicket:child/
 /div
   /wicket:panel
 
   This is a sample child panel:
 
   public class testChildPanel extends testSuperPanel {
 public testChildPanel(String id) {
 super(id);
 add(new Label(childLabel,Test!));
 }
   }
 
   and the Markup:
   wicket:extend
 span wicket:id=childLabel/span
   /wicket:extend
 
   As you see, it should simply display Test inside a MarkupContainer
 (which
  could be hidden from the superClass). When i try to display this Panel
  however I get an Exception stating that no code is added for the Label
  childLabel!
   This can be solved by adding the childLabel to the container in the
  superClass, but thats obviously not the way it is meant to be:
 
   public class testSuperPanel extends Panel {
 public testSuperPanel(String id) {
 super(id);
 WebMarkupContainer wmc = new
  WebMarkupContainer(childContainer);
 wmc.add(new Label(childLabel,Test!));
 add(wmc);
 }
   }
 
   So, is this a wicket bug with inheritance inside containers or am I just
  doing things the wrong way?
 
   Thanks for your help!
   best regards, Oli
 
  -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.2 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket servlet mapping to subdirectory

2008-06-19 Thread Mattom
Hi !

No, sorry, maybe i was not precise enough, when i have the /app/* mapping, i 
can access my HomePage directly, but all links from the HomePage as well as 
the style sheet link and some image links (all within wicket:link) don't work, 
as the /app/ part is missing. The only images working are the one from the 
tree I use as menu.

Basically I don't need the /app/ subdirectory, but servlet filters in oc4j seem 
to be rather buggy, and they are not called, if you don't have either a page or 
a directory, just ip:port/context/?... does not work, as the filters are not 
called.

So I tried to trick the filter (acegi) by adding a subdirectory... I guess I 
have to add some filterPath or filterMappingPath flag to the init-params of the 
servlet, but so far nothing worked. I'll dig into the sources deeper tomorrow.

Thanks !
Tom

 Original-Nachricht 
 Datum: Thu, 19 Jun 2008 21:42:45 +0100
 Von: Gwyn Evans [EMAIL PROTECTED]
 An: users@wicket.apache.org
 Betreff: Re: wicket servlet mapping to subdirectory

 When you say I always get redirected to the root of the webapp, do you
 mean when first trying to access your app, you have to go via a redirect
 or
 some such that takes you to http://www.mysite.com/; or similar?
 
 The 'traditional' trick was to have an index.html that redirected to
 app/
 as below - any uise?
 
 html
 head
 meta http-equiv=Refresh content=0; url=app
 /head
 /html
 
 /Gwyn
 
 On Thu, Jun 19, 2008 at 5:30 PM, Thomas Lutz [EMAIL PROTECTED] wrote:
 
  Hi list !
 
  I am forced to use the wicket servlet (1.3.3) instead of the filter
 because
  of oc4j.
 
  I mapped the servlet to
 
  servlet-mapping
servlet-nameWicket Webapp/servlet-name
url-pattern/app/*/url-pattern
  /servlet-mapping
 
  This does not work, I always get redirected to the root of the webapp,
 and
  therefore none of my pages shows up. If I map to /*, everything works
 fine,
  but then my acegi filters to not work...
 
  Is there any parameter I need to set to tell wicket about the different
  location ? Or, is it possible to configure some fake name in front of
 the
  request strings ? ?
 
  Thanks a lot,
  Tom
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Inheritance inside a Container

2008-06-19 Thread smallufo
Hi...

I am using 1.3.3

2008/6/20 Maurice Marrink [EMAIL PROTECTED]:

 What wicket version are you on? There was a bug about this but is has
 long been fixed. https://issues.apache.org/jira/browse/WICKET-1095

 Maurice

 On Thu, Jun 19, 2008 at 9:40 PM, smallufo [EMAIL PROTECTED] wrote:
  Hello ,
  I had exactly the same problem , and solved by searching to this post.
  Thanks a lot.
 
  BUT , today , I have another problem...
 
  Today , the ChildPanel can accept a new parameter : boolean
 defaultVisible
  if true , the content will be shown;
  if false , the content will be invisible , only the title bar is visible.
  The title bar is defined in ParentPanel , containing a title label and a
  expand/collapse ajax link (a toggle).
 
  Here comes the problem.
  In the ChildPanel , if I write :
  setVisible(defaultVisible);
  and if the defaultVisible is false , the whole panel , including
 ParentPanel
  (including title bar) will be invisible;
  This makes users unable to make it re-appear.
 
  However , if I write code like this :
  get(content).setVisible(defaultVisible);
  (content is the WebMarkupContainer defined in ParentPanel returning
  isTransparentResolver()  TRUE)
 
  It will throw WicketRuntimeException while
  org.apache.wicket.Page.checkRendering
  org.apache.wicket.WicketRuntimeException: The component(s) below failed
 to
  render. A common problem is that you have added a component in code but
  forgot to reference it in the markup (thus the component will never be
  rendered).
 
  How to solve it ?
 
 
 
 
 
 
  2008/4/6 Martijn Dashorst [EMAIL PROTECTED]:
 
  You should do this:
 
  WMC wmc = new WMC(childContainer) {
 @override boolean isTransparentResolver() { return true; }
  };
 
  This is not a bug. If you do add() in the subclass's constructor, you
  add to the page itself. Which is how the hierarchy is constructed. By
  telling the WMC that it is a transparent resolver, you tell it to look
  for children without attached markup in its siblings.
 
  Martijn
 
  On 4/5/08, Oliver Sawade [EMAIL PROTECTED] wrote:
   Hi everyone,
my first mail to the list, i hope this wasn`t answered million times
   before, but the wicket users faq is empty so i couldn`t find it there
 ;)
  
I'm using wicket1.3 to create a generic panel with the option to hide
   everything inside when clicking an ajax-button. While the actual
   hidingshowing works fine I'm having trouble with inheritance.
This example should show what I mean:
  
This is my generic super panel (no ajax stuff in it here to show the
   essential problem). The idea is, that the childContainer is set to
   Visible:false when the button is clicked. All of this should happen in
  the
   super class, so i don't have to care about it in the child class:
  
public class testSuperPanel extends Panel {
  public testSuperPanel(String id) {
  super(id);
  add(new WebMarkupContainer(childContainer));
  }
}
  
The markup for testSuperPanel:
wicket:panel
  div wicket:id=childContainer
  wicket:child/
  /div
/wicket:panel
  
This is a sample child panel:
  
public class testChildPanel extends testSuperPanel {
  public testChildPanel(String id) {
  super(id);
  add(new Label(childLabel,Test!));
  }
}
  
and the Markup:
wicket:extend
  span wicket:id=childLabel/span
/wicket:extend
  
As you see, it should simply display Test inside a MarkupContainer
  (which
   could be hidden from the superClass). When i try to display this Panel
   however I get an Exception stating that no code is added for the Label
   childLabel!
This can be solved by adding the childLabel to the container in the
   superClass, but thats obviously not the way it is meant to be:
  
public class testSuperPanel extends Panel {
  public testSuperPanel(String id) {
  super(id);
  WebMarkupContainer wmc = new
   WebMarkupContainer(childContainer);
  wmc.add(new Label(childLabel,Test!));
  add(wmc);
  }
}
  
So, is this a wicket bug with inheritance inside containers or am I
 just
   doing things the wrong way?
  
Thanks for your help!
best regards, Oli
  
   -
To unsubscribe, e-mail:
   [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  Buy Wicket in Action: http://manning.com/dashorst
  Apache Wicket 1.3.2 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Inheritance inside a Container

2008-06-19 Thread smallufo
Well , let me describe more detail
When the user enters the page , he can successfully show/hide the content
(ChildPanel) without problems.
The state is stored in wicket's session.

If the ChildPanel is open(expand/show) , and he reloads the page ,
everything works fine.
BUT...
If he close (collapse/hide) the ChildPanel , and reloads the page , the
runtimeException is thrown.


I don't know how to solve this problem...



2008/6/20 smallufo [EMAIL PROTECTED]:

 Hi...

 I am using 1.3.3

 2008/6/20 Maurice Marrink [EMAIL PROTECTED]:

 What wicket version are you on? There was a bug about this but is has
 long been fixed. https://issues.apache.org/jira/browse/WICKET-1095

 Maurice

 On Thu, Jun 19, 2008 at 9:40 PM, smallufo [EMAIL PROTECTED] wrote:
  Hello ,
  I had exactly the same problem , and solved by searching to this post.
  Thanks a lot.
 
  BUT , today , I have another problem...
 
  Today , the ChildPanel can accept a new parameter : boolean
 defaultVisible
  if true , the content will be shown;
  if false , the content will be invisible , only the title bar is
 visible.
  The title bar is defined in ParentPanel , containing a title label and a
  expand/collapse ajax link (a toggle).
 
  Here comes the problem.
  In the ChildPanel , if I write :
  setVisible(defaultVisible);
  and if the defaultVisible is false , the whole panel , including
 ParentPanel
  (including title bar) will be invisible;
  This makes users unable to make it re-appear.
 
  However , if I write code like this :
  get(content).setVisible(defaultVisible);
  (content is the WebMarkupContainer defined in ParentPanel returning
  isTransparentResolver()  TRUE)
 
  It will throw WicketRuntimeException while
  org.apache.wicket.Page.checkRendering
  org.apache.wicket.WicketRuntimeException: The component(s) below failed
 to
  render. A common problem is that you have added a component in code but
  forgot to reference it in the markup (thus the component will never be
  rendered).
 
  How to solve it ?
 
 
 
 
 
 
  2008/4/6 Martijn Dashorst [EMAIL PROTECTED]:
 
  You should do this:
 
  WMC wmc = new WMC(childContainer) {
 @override boolean isTransparentResolver() { return true; }
  };
 
  This is not a bug. If you do add() in the subclass's constructor, you
  add to the page itself. Which is how the hierarchy is constructed. By
  telling the WMC that it is a transparent resolver, you tell it to look
  for children without attached markup in its siblings.
 
  Martijn
 
  On 4/5/08, Oliver Sawade [EMAIL PROTECTED] wrote:
   Hi everyone,
my first mail to the list, i hope this wasn`t answered million times
   before, but the wicket users faq is empty so i couldn`t find it there
 ;)
  
I'm using wicket1.3 to create a generic panel with the option to
 hide
   everything inside when clicking an ajax-button. While the actual
   hidingshowing works fine I'm having trouble with inheritance.
This example should show what I mean:
  
This is my generic super panel (no ajax stuff in it here to show the
   essential problem). The idea is, that the childContainer is set to
   Visible:false when the button is clicked. All of this should happen
 in
  the
   super class, so i don't have to care about it in the child class:
  
public class testSuperPanel extends Panel {
  public testSuperPanel(String id) {
  super(id);
  add(new WebMarkupContainer(childContainer));
  }
}
  
The markup for testSuperPanel:
wicket:panel
  div wicket:id=childContainer
  wicket:child/
  /div
/wicket:panel
  
This is a sample child panel:
  
public class testChildPanel extends testSuperPanel {
  public testChildPanel(String id) {
  super(id);
  add(new Label(childLabel,Test!));
  }
}
  
and the Markup:
wicket:extend
  span wicket:id=childLabel/span
/wicket:extend
  
As you see, it should simply display Test inside a MarkupContainer
  (which
   could be hidden from the superClass). When i try to display this
 Panel
   however I get an Exception stating that no code is added for the
 Label
   childLabel!
This can be solved by adding the childLabel to the container in the
   superClass, but thats obviously not the way it is meant to be:
  
public class testSuperPanel extends Panel {
  public testSuperPanel(String id) {
  super(id);
  WebMarkupContainer wmc = new
   WebMarkupContainer(childContainer);
  wmc.add(new Label(childLabel,Test!));
  add(wmc);
  }
}
  
So, is this a wicket bug with inheritance inside containers or am I
 just
   doing things the wrong way?
  
Thanks for your help!
best regards, Oli
  
   -
To unsubscribe, e-mail:
   [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  Buy Wicket in Action: http://manning.com/dashorst
  Apache Wicket 1.3.2 is 

Re: Inheritance inside a Container

2008-06-19 Thread smallufo
I tried to pull up the boolean defaultVisible parameter to the ParentPanel
, but still the same error 

public abstract class AbstractPullDownPanel extends Panel
{
  private final WebMarkupContainer content;

  public AbstractPullDownPanel(String id , String title , final boolean
defaultVisible)
  {
super(id);

Label titleLabel = new Label(title , title);

content = new WebMarkupContainer(content)
{
  @Override
  public boolean isTransparentResolver()
  {
return true;
  }
};

content.setOutputMarkupPlaceholderTag(true);
content.setVisible(defaultVisible);
add(content);

final Label collapseExpandText = new Label(collapseExpandText);
collapseExpandText.setOutputMarkupPlaceholderTag(true);
if (content.isVisible())
  collapseExpandText.setModel(new StringResourceModel(collapse , this
, null));
else
  collapseExpandText.setModel(new StringResourceModel(expand , this ,
null));

Link collapseExpandLink = new AjaxFallbackLink(collapseExpandLink)
{
  @Override
  public void onClick(AjaxRequestTarget target)
  {
if (content.isVisible())
{
  target.addComponent(content.setVisible(false));
  target.addComponent(collapseExpandText.setModel(new
StringResourceModel(expand , this , null)));

  //call template method
  invisible();
}
else
{
  target.addComponent(content.setVisible(true));
  target.addComponent(collapseExpandText.setModel(new
StringResourceModel(collapse , this , null)));

  //call template method
  visible();
}
  }
};
add(collapseExpandLink);
collapseExpandLink.add(collapseExpandText);
collapseExpandLink.add(titleLabel);
  }





2008/6/20 smallufo [EMAIL PROTECTED]:

 Well , let me describe more detail
 When the user enters the page , he can successfully show/hide the content
 (ChildPanel) without problems.
 The state is stored in wicket's session.

 If the ChildPanel is open(expand/show) , and he reloads the page ,
 everything works fine.
 BUT...
 If he close (collapse/hide) the ChildPanel , and reloads the page , the
 runtimeException is thrown.


 I don't know how to solve this problem...



 2008/6/20 smallufo [EMAIL PROTECTED]:

 Hi...

 I am using 1.3.3

 2008/6/20 Maurice Marrink [EMAIL PROTECTED]:

 What wicket version are you on? There was a bug about this but is has
 long been fixed. https://issues.apache.org/jira/browse/WICKET-1095

 Maurice

 On Thu, Jun 19, 2008 at 9:40 PM, smallufo [EMAIL PROTECTED] wrote:
  Hello ,
  I had exactly the same problem , and solved by searching to this post.
  Thanks a lot.
 
  BUT , today , I have another problem...
 
  Today , the ChildPanel can accept a new parameter : boolean
 defaultVisible
  if true , the content will be shown;
  if false , the content will be invisible , only the title bar is
 visible.
  The title bar is defined in ParentPanel , containing a title label and
 a
  expand/collapse ajax link (a toggle).
 
  Here comes the problem.
  In the ChildPanel , if I write :
  setVisible(defaultVisible);
  and if the defaultVisible is false , the whole panel , including
 ParentPanel
  (including title bar) will be invisible;
  This makes users unable to make it re-appear.
 
  However , if I write code like this :
  get(content).setVisible(defaultVisible);
  (content is the WebMarkupContainer defined in ParentPanel returning
  isTransparentResolver()  TRUE)
 
  It will throw WicketRuntimeException while
  org.apache.wicket.Page.checkRendering
  org.apache.wicket.WicketRuntimeException: The component(s) below failed
 to
  render. A common problem is that you have added a component in code but
  forgot to reference it in the markup (thus the component will never be
  rendered).
 
  How to solve it ?
 
 
 
 
 
 
  2008/4/6 Martijn Dashorst [EMAIL PROTECTED]:
 
  You should do this:
 
  WMC wmc = new WMC(childContainer) {
 @override boolean isTransparentResolver() { return true; }
  };
 
  This is not a bug. If you do add() in the subclass's constructor, you
  add to the page itself. Which is how the hierarchy is constructed. By
  telling the WMC that it is a transparent resolver, you tell it to look
  for children without attached markup in its siblings.
 
  Martijn
 
  On 4/5/08, Oliver Sawade [EMAIL PROTECTED] wrote:
   Hi everyone,
my first mail to the list, i hope this wasn`t answered million
 times
   before, but the wicket users faq is empty so i couldn`t find it
 there ;)
  
I'm using wicket1.3 to create a generic panel with the option to
 hide
   everything inside when clicking an ajax-button. While the actual
   hidingshowing works fine I'm having trouble with inheritance.
This example should show what I mean:
  
This is my generic super panel (no ajax stuff in it here to show
 the
   essential problem). The idea is, that the childContainer is set to
   Visible:false when the button is 

Re: Two gmap2 applications

2008-06-19 Thread Martin Funk

smallufo wrote:

The two applications are presented in Google Developers Day 2008 in Taipei

2008/6/17 smallufo [EMAIL PROTECTED]:

  

FYI...

http://destiny.xfiles.to/app/calendar/StarTrans

http://destiny.xfiles.to/app/LuckyMap

BR




  

ok, I got to admit I didn't check the apps thoroughly at first.
Could you give us some more insight?
Is it the event described on this site?
http://code.google.com/intl/zh-TW/events/developerday/2008/sessions.html
I personally neither can read nor understand Chinese, the Google 
translation gives a good start but wouldn't want to rely on it.


About the applications, do they work for you from were you can see em?
The Lucky Maps works to the extend that it draws the Polygons/Lines on 
the map but it stays fixed on Berlin for me.
The Sunrise Sunset Moonrise Moonset Calculation only works for me if I 
select English, then it stays fixed on New York.


If its possible, I'm more than happy to assist on any problem.

Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Session end method

2008-06-19 Thread Eyal Golan
Hello,
Is there a method in Session that is called when the Session is ended?
Ended = user logs out (invalidate) or time-out (or anything else that can do
that)

My goal is to keep some information in the session and persist it when the
session terminates.

Is it legal to create a Thread (as a member in the Session / Application)
that every X minutes will get information from the Session and do something
with it?

-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74


Re: Session end method

2008-06-19 Thread Igor Vaynberg
according to the servlet spec by the time you get session invalidation
notification you can no longer access session attributes in the
invalidated session so you cannot store information like this in
session itself. instead you need some sort of map:session-info, but
then you have to cluster that yourself, etc. see HttpSessionListener.

-igor

On Thu, Jun 19, 2008 at 4:24 PM, Eyal Golan [EMAIL PROTECTED] wrote:
 Hello,
 Is there a method in Session that is called when the Session is ended?
 Ended = user logs out (invalidate) or time-out (or anything else that can do
 that)

 My goal is to keep some information in the session and persist it when the
 session terminates.

 Is it legal to create a Thread (as a member in the Session / Application)
 that every X minutes will get information from the Session and do something
 with it?

 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window question

2008-06-19 Thread mfs

Exactly what i needed...thanks a lot man..i should have looked into the
source code myself..my bad..



Matthijs Wensveen-2 wrote:
 
 The javascript to close the ModalWindow is returned by a private method 
 of ModalWindow:
 
 /**
  * @return javascript that closes current modal window
  */
 private static String getCloseJavacript()
 {
 return var win;\n //
 + try {\n + win = window.parent.Wicket.Window;\n
 + } catch (ignore) {\n
 + }\n
 + if (typeof(win) == \undefined\ || typeof(win.current) 
 == \undefined\) {\n
 +   try {\n
 +  win = window.Wicket.Window;\n
 +   } catch (ignore) {\n
 +   }\n
 + }\n
 + if (typeof(win) != \undefined\  typeof(win.current) 
 != \undefined\) {\n
 + window.parent.setTimeout(function() {\n + 
 win.current.close();\n
 + }, 0);\n
 + };
 }
 
 
 There ya go.
 
 mfs wrote:
 Isn't there a way to call the appropriate javascript which does the
 modal-close..



 mfs wrote:
   
 Guys,

 I am posting this question yet again, hoping to get some feedback...

 The problem is regarding modal windows, as to how close it, when a form
 (within it) is submitted in a new window. Any suggestions


 Thanks in advance 

 

   
 
 
 -- 
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-question-tp17989203p18022861.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Two gmap2 applications

2008-06-19 Thread smallufo
2008/6/20 Martin Funk [EMAIL PROTECTED]:

 smallufo wrote:

 The two applications are presented in Google Developers Day 2008 in Taipei

 2008/6/17 smallufo [EMAIL PROTECTED]:



 FYI...

 http://destiny.xfiles.to/app/calendar/StarTrans

 http://destiny.xfiles.to/app/LuckyMap

 BR






 ok, I got to admit I didn't check the apps thoroughly at first.
 Could you give us some more insight?
 Is it the event described on this site?
 http://code.google.com/intl/zh-TW/events/developerday/2008/sessions.html
 I personally neither can read nor understand Chinese, the Google
 translation gives a good start but wouldn't want to rely on it.

yes.
http://code.google.com/intl/zh-TW/events/developerday/2008/agenda.html
It is presented in the  Developer Showcase session of Geo type
(there are other Social and Mobile types )

About the applications, do they work for you from were you can see em?
 The Lucky Maps works to the extend that it draws the Polygons/Lines on the
 map but it stays fixed on Berlin for me.
 The Sunrise Sunset Moonrise Moonset Calculation only works for me if I
 select English, then it stays fixed on New York.

It depends on session.getLocale()
if de , default return Berlin's lat/lon
if us , default return NY's lat/lon
It should be clickable (to point out your location) on the map.
Because it is just an amateur product , I have no money to buy ip to
location database


 If its possible, I'm more than happy to assist on any problem.

Thank you
currently , I found bug WICKET-1095 seems not solved completely.
see my another thread...
http://www.nabble.com/Inheritance-inside-a-Container-tt16514647.html#a18018833