Re: Resource lookup/caching in OSGI environment

2009-04-06 Thread Kristof Jozsa
https://issues.apache.org/jira/browse/WICKET-2212

thanks,
K

On Mon, Apr 6, 2009 at 4:02 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 open a jira issue for this

 -igor

 On Sun, Apr 5, 2009 at 4:38 PM, Kristof Jozsa kristof.jo...@gmail.com
 wrote:
  Hi all,
 
  I'd put together a simple dynamic menu example running on Modulefusion
 where
  the contributed menu items and pages come from another OSGI bundles. It
  works exactly as expected, eg. submenus appear/disappear automatically
  without restarts on submenu modules' deploys and undeploys, but after
  undeploying an already visited page's module, my server logs starts
  repeating messages like this:
 
  352322 [ModificationWatcher Task] ERROR
  org.apache.wicket.util.resource.UrlResourceStream  - getLastModified for
  bundle://38.0:1/com/ftldev/wicket1/Boo.html failed: No bundle associated
  with resource: bundle://38.0:1/com/ftldev/wicket1/Boo.html
 
  I guess this has to do with resource caching. Is it possible to get this
  behaviour turn into a warning and/or get it stop after the first message?
 I
  guess once a resource has gone, it makes no good to keep looking for it
  forever anyway.. or is it another approach getting around this message?
  (again, appearently all my app keeps working fine meanwhile..)
 
  thanks,
  Kristof
 

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




Re: Using Prince XML to generate PDF of wicket page

2009-04-06 Thread Peter Ross
On Mon, Apr 6, 2009 at 12:18 PM, Peter Ross pdr...@gmail.com wrote:
 Hi,

 I'm new to wicket and I am looking at integrating Prince XML with Wicket.

 Prince supplies a method

  public boolean convert(InputStream xmlInput, OutputStream pdfOutput)
 throws IOException

 What I would like to do is add this into the rendering pipeline for a
 page, so that I can get the HTML of the page as a stream and then
 return the page as a PDF.

 I've explored the mailing list and examples and the closest example I
 can find is for sending an email at

  http://www.wicket-library.com/wicket-examples/staticpages/

 and I was wondering is this the correct approach, or should I be
 looking at something else?

I ended up pretty much following the code from the static pages
example, except I use requestCycle.setRedirect(false) rather than
using mount and having a special
BookmarkablePageRequestTargetUrlCodingStrategy.

As far as I can tell the only problem with doing it my way is the
double submit problem.  However as long as the page I render doesn't
do any state updates then this is not a problem because all that will
happen is that I will get the file being generated twice on the
server.

Here is the code that I'm using:

public class PdfPageRequestTarget extends BookmarkablePageRequestTarget {

private String filename;

public PdfPageRequestTarget(java.lang.Class PageClass, String filename) {
super(PageClass);
this.filename = filename;
}

@Override
public void respond(RequestCycle requestCycle) {
// In the staticpages example of wicket there is the
following comment:
//   Unfortunately, you cannot use
//   CapturingBookmarkablePageRequestTarget in an event listener
//   like onClick() unless you change the application's
//   IRequestCycleSettings to ONE_PASS_RENDER
//
// Thus we setRedirect to be false, meaning that ONE_PASS_RENDER is
// enabled for just this request.  If you don't then s.ToString()
// returns the empty string.
requestCycle.setRedirect(false);

// Save the web response we are rendering into
WebResponse w = (WebResponse) requestCycle.get().getResponse();

// Render into a string
StringResponse s = new StringResponse();
requestCycle.get().setResponse(s);
super.respond(requestCycle);

// Restore the web response
RequestCycle.get().setResponse(w);

// Now set up a text file which contains the requested pages html.
ResourceStreamRequestTarget target = new
ResourceStreamRequestTarget(new StringResourceStream(s.toString(),
text/plain));
target.setFileName(this.filename);

// Now request that the result of rendering be the text file.
requestCycle.get().setRequestTarget(target);
}
}

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



Re: Display other page in panel

2009-04-06 Thread reiern70

I would use a panel (as Igor already suggested) but in case you decide to use
a Page there is already an 

org.apache.wicket.markup.html.link.InlineFrame 

class that can be handy.

Ernesto


TradeMark wrote:
 
 Hi there,
 
 -i would like to ask whether it is possible to display other page in
 panel of my page. I made a web application and a friend of mine made a
 plugin. We both created it same way - Maven  Wicket. The thing is
 that I would like to allow control of his page through my page. So the
 question is - can his page be displayed in a panel so that user could
 control it and if not, is there other way to accomplish this? (frames?)
 
 Tomas Mihok
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Display-other-page-in-panel-tp22892570p22904246.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: validation message-keys differences on m3 to rc2

2009-04-06 Thread Gianni Doe

ComponentStringResourceLoader's javadoc is very helpful here:

quote
assume a component hierarchy like page1.form1.input1 and your are  
requesting a key named 'Required'. Wicket will search the property in  
the following order:


page1.properties = form1.input1.Required
page1.properties = Required
form1.properties = input1.Required
form1.properties = Required
input1.properties = Required
myApplication.properties = page1.form1.input1.Required
myApplication.properties = Required
/quote

What it doesn't mention is that if the form component is nested in  
another container such as a border then the border id needs to be  
included in the key.


e.g. if I have page1.form1.border1.input1 then in the form's  
properties file I have to include the border component in the key -  
border1.input1.Required, it would be cleaner just to be able to use  
input1.Required.


-Gianni



On 18/mar/09, at 21:09, Gianni Doe wrote:


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

On 10/mar/09, at 15:55, Igor Vaynberg wrote:


jira, quickstart, you know the drill

-igor

On Tue, Mar 10, 2009 at 3:15 AM, gilberthuph gdoe6...@yahoo.it  
wrote:


I'm having exactly the same problem after moving from 1.4-rc1 -  
1.4-rc2


Here's the extract from my properties file TaxiBookingPage.xml.

?xml version=1.0 encoding=UTF-8?
!DOCTYPE properties SYSTEM http://java.sun.com/dtd/ 
properties.dtd

properties
  entry  
key=generalDetails.numberOfVehiclesRequired.RequiredYou must

enter the number of vehicles/entry
  .. snip ..
/properties

RC1

The key generalDetails.numberOfVehiclesRequired.Required is found
immediately and the appropriate message retrieved.

11:00:38.595 [http-8180-3] DEBUG org.apache.wicket.Session -  
Getting

page [path = 4:taxiBookingForm, versionNumber = 0]
11:00:38.609 [http-8180-3] DEBUG
org.apache.wicket.resource.loader.ComponentStringResourceLoader -  
Found

resource from: com/rp/webapp/taxi/TaxiBookingPage.; key:
generalDetails.numberOfVehiclesRequired.Required


RC2

Does not attempt to look up
generalDetails.numberOfVehiclesRequired.Required but the key
taxiBookingForm 
.numberOfVehiclesContainer 
.numberOfVehiclesRequiredBorder 
.generalDetails.numberOfVehiclesRequired.Required

which is not found.

10:47:47.902 [http-8180-1] DEBUG org.apache.wicket.Localizer -  
Locate
property: key: 'Required'; Component: '[MarkupContainer [Component  
id =

generalDetails.numberOfVehiclesRequired]]'
10:47:47.903 [http-8180-1] DEBUG
org.apache.wicket.resource.loader.ComponentStringResourceLoader -  
component:

'[MarkupContainer [Component id =
generalDetails.numberOfVehiclesRequired]]'; key: 'Required'
10:47:47.903 [http-8180-1] DEBUG
org.apache.wicket.resource.loader.ComponentStringResourceLoader -  
key:
'taxiBookingForm 
.numberOfVehiclesContainer 
.numberOfVehiclesRequiredBorder 
.generalDetails.numberOfVehiclesRequired.Required';
class: 'com.rp.webapp.taxi.TaxiBookingPage'; locale: 'en_GB';  
Style: 'null'

10:47:47.903 [http-8180-1] DEBUG
org.apache.wicket.resource.loader.ComponentStringResourceLoader -  
Found
properties file: 'com/rp/webapp/taxi/TaxiBookingPage.' but it  
doesn't

contain the property

So it seems the lookup algorithm hasn't changed but the message key.

Is this a bug or should we now be using the full form-relative key  
as shown

above?



Alexander Lohse wrote:


I could not find any reported changes concerning validation message
keys from version 1.4-m3 to 1.4-rc2, but I have the following
required key in my application resources that does not work  
anymore.

.. trim ..



--
View this message in context: 
http://www.nabble.com/validation-message-keys-differences-on-m3-to-rc2-tp22155986p22431244.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




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





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





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



Re: Pop up window after file upload

2009-04-06 Thread Kevin Logue
It could probably be done using an AjaxSelfUpdatingBehavior, though 
you'll need to off load the actual uploading to a separate thread. Once 
the upload is complete set some flag/messages in the session and have 
the behaviour show the modal window based upon this(could use a second 
behaviour on the modal window to refresh its status). There's a few 
tutorials on the web about creating a custom progress bar for uploading, 
I think what you're trying to achieve isn't a million miles away from 
it. However I'm relatively new to wicket so I'm unsure if this is the 
best course of action(or if its even condoned!)


jack jones wrote:
Hi, 
I am trying to create a pop-up window to display some feedback after a bulk upload. The pop-up window needs to be created using a submitLink not a BookmarkablePageLink, I have tried using a BookmarkablPageLink but you cannot not override the onClick() method, also it cannot be an ajax pop-up because I am using a file upload. The code would be something like this:


add(new SubmitLink(add){ public void onSubmit() {   FileUpload 
upload = fileUploadField.getFileUpload();
   List feedback = myService.doSomethingWithUpload(upload);
   if(feedback.size() 0 )  Create a popup window to display 
the feedback.   }});

Do you know how this can be achieved?
Thanks in advance.
_
Rediscover Hotmail®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009



__ Information from ESET NOD32 Antivirus, version of virus signature 
database 3984 (20090402) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


  



--





Kevin Logue

[t]+353 (0) 42 939 1039

[e]   ke...@viableoptions.ie mailto:ke...@viableoptions.ie






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



Runtime error with TabbedPanel and AbstractTab (I know it's my mistake somewhere)

2009-04-06 Thread Branden Tanga
Hello all,
I'm trying to follow the examples given on wicketstuff.org for TabbedPanel
here: http://tinyurl.com/cpzkas

My code compiles fine, but when I run it I get a noclassdeffound error for
AbstractTab. Here's my snippet of code:

import org.apache.wicket.markup.html.WebPage;

import org.apache.wicket.extensions.ajax.markup.html.tabs.*;

import org.apache.wicket.extensions.markup.html.tabs.*;

import org.apache.wicket.markup.html.panel.*;

import org.apache.wicket.model.*;

import java.util.*;


public class MainMenu extends WebPage{

/*Constructor*/

public MainMenu() {

ListITab tabs = new ArrayListITab();

tabs.add(new AbstractTab(new Model(first tab)) {

@Override

public Panel getPanel(String panelID) {

return new MyPanel(panelID);

}

});

} // end constructor

and here's the corresponding runtime error:

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

Root cause:

java.lang.NoClassDefFoundError:
org/apache/wicket/extensions/markup/html/tabs/AbstractTab
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:675)

This makes sense, as you can't directly instantiate an abstract class right?
You have to extend it and then implement the subclass. But I am following
the code example as closely as I can, and I still do not understand what I
am doing wrong.



Thanks,
Branden Tanga
Programmer / EHR Systems Engineer


Re: Runtime error with TabbedPanel and AbstractTab (I know it's my mistake somewhere)

2009-04-06 Thread mailingl...@jorgenpersson.se

Hi.

Seems like you're missing a jar file. The 
java.lang.NoClassDefFoundError means just what it sais. The class can 
not be found in the classpath.

It has nothing to do whether the class is abstract or not.

/Jörgen

Branden Tanga skrev:

Hello all,
I'm trying to follow the examples given on wicketstuff.org for TabbedPanel
here: http://tinyurl.com/cpzkas

My code compiles fine, but when I run it I get a noclassdeffound error for
AbstractTab. Here's my snippet of code:

import org.apache.wicket.markup.html.WebPage;

import org.apache.wicket.extensions.ajax.markup.html.tabs.*;

import org.apache.wicket.extensions.markup.html.tabs.*;

import org.apache.wicket.markup.html.panel.*;

import org.apache.wicket.model.*;

import java.util.*;


public class MainMenu extends WebPage{

/*Constructor*/

public MainMenu() {

ListITab tabs = new ArrayListITab();

tabs.add(new AbstractTab(new Model(first tab)) {

@Override

public Panel getPanel(String panelID) {

return new MyPanel(panelID);

}

});

} // end constructor

and here's the corresponding runtime error:

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

Root cause:

java.lang.NoClassDefFoundError:
org/apache/wicket/extensions/markup/html/tabs/AbstractTab
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:675)

This makes sense, as you can't directly instantiate an abstract class right?
You have to extend it and then implement the subclass. But I am following
the code example as closely as I can, and I still do not understand what I
am doing wrong.



Thanks,
Branden Tanga
Programmer / EHR Systems Engineer

  



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



Re: Dojo Tooltip JS Error (And Mootips)

2009-04-06 Thread nino martinez wael
wicketstuff core.. But the common js lib are something that the
libraries so use internally. Like Dojo, scriptaculous or minies.. So
the thing would be to patch both to use that..

2009/4/4 TH Lim ssh...@gmail.com:

 Are you refering to Wicket core or  wicketsutff-core? Where do I find this
 common JS library?

 I have made minor changes in lightbox-1.0.3. to be compliant with Wicket-1.4
 API. How do I check in the changes? Instead can I add to wicketstuff-core
 instead?

 Thanks

 /lim/


 nino martinez wael wrote:

 Bad it seem that we have a lot of clashes.. So the libs needs to be
 cleaned.. I know Jeremy has done an effort in wicket core by supplying a
 common js library..


 --
 View this message in context: 
 http://www.nabble.com/Dojo-Tooltip-JS-Error-tp22164739p22886339.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Extending wicket for non webapp implementations

2009-04-06 Thread Erik van Oosten

Tip: search for rendering to String.

Regards,
   Erik.


James Carman wrote:

On Wed, Apr 1, 2009 at 9:57 AM, Brill Pappin br...@pappin.ca wrote:
  

I'd love to use wicket as a more general template library.
My immediate problem is that I need to build email template library.

Has anyone done an extension that would allow it to process non HTML files?



This question has been asked multiple times in the past.  Check
Nabble's archives for the discussions.  Folks have done it before and
yes, it works.  I had the same objections as Christian before, but
folks insisted they still wanted it.
  


--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



Tips to implement this switch technique

2009-04-06 Thread HHB
Hey,
For our application layout we decided to go with 
switching panels technique.
The Index page contains the navigation panel 
which contains links to switch panels.
I know how to implement this technique but only 
when the links that are supposed
to switch panels are on the same Index page, not 
contained in another panel.
Would you please give some tips how to implement 
this?
Thanks.


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



Re: Dojo Tooltip JS Error (And Mootips)

2009-04-06 Thread TH Lim

As I went thru the new wicketstuff-core, I found there is a lightbox for
JQuery. I suppose we could use   lightbox for JQuery for those who move to
Wicket-1.4. Sorry I haven't gone in details but I presume it has the same
style and serves the same purpose.


nino martinez wael wrote:
 
 wicketstuff core.. But the common js lib are something that the
 libraries so use internally. Like Dojo, scriptaculous or minies.. So
 the thing would be to patch both to use that..
 
 2009/4/4 TH Lim ssh...@gmail.com:

 Are you refering to Wicket core or  wicketsutff-core? Where do I find
 this
 common JS library?

 I have made minor changes in lightbox-1.0.3. to be compliant with
 Wicket-1.4
 API. How do I check in the changes? Instead can I add to wicketstuff-core
 instead?

 Thanks

 /lim/


 nino martinez wael wrote:

 Bad it seem that we have a lot of clashes.. So the libs needs to be
 cleaned.. I know Jeremy has done an effort in wicket core by supplying a
 common js library..


 --
 View this message in context:
 http://www.nabble.com/Dojo-Tooltip-JS-Error-tp22164739p22886339.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Dojo-Tooltip-JS-Error-tp22164739p22909815.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Spring integration problem

2009-04-06 Thread HHB
Hey,
I'm trying to integrate Spring 2.5 into our Wicket 
application, I did the following:

web.xml:
context-param
param-namecontextConfigLocation/param-name
param-valueclasspath:applicationContext.xml/param-value
/context-param
listener
listener-classorg.springframework.web.
context.ContextLoaderListener/listener-class
/listener
filter
filter-nameOpenSessionInViewFilter/filter-name
filter-classorg.springframework.orm.hibernate3.
support.OpenSessionInViewFilter/filter-class
/filter

filter
filter-nameWicketFilter/filter-name
filter-classorg.apache.wicket.
protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-valueorg.apache.wicket.spring.
SpringWebApplicationFactory/param-value
/init-param
/filter
filter
filter-nameWicketFilter/filter-name
filter-classorg.apache.wicket.
protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-valueorg.apache.wicket.spring.
SpringWebApplicationFactory/param-value
/init-param
/filter

applicationContext.xml:

bean id=wicketApplication class=domain.WicketApplication/


pom.xml:

dependency
groupIdorg.springframework/groupId
artifactIdspring/artifactId
version2.5.6/version
/dependency

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring/artifactId
version1.3.5/version
/dependency
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring-annot/artifactId
version1.3.5/version
/dependency

WicketApplication:

   @Override
protected void init() {
super.init();
addComponentInstantiationListener
(new SpringComponentInjector(this));
}

But when trying:
mvn test
I got the following exception:

---
Test set: TestSuite

---
Tests run: 2, Failures: 1, Errors: 0, 
Skipped: 1, Time elapsed: 0.498 sec  FAILURE!
init(domain.TestHomePage)  Time elapsed: 0 sec   FAILURE!
java.lang.IllegalStateException: 
No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.
WebApplicationContextUtils.
getRequiredWebApplicationContext(WebApplicationContextUtils.java:70)
at org.apache.wicket.spring.
injection.annot.SpringComponentInjector.
init(SpringComponentInjector.java:74)

Any ideas?
Thanks.


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



Re: Spring integration problem

2009-04-06 Thread Leandro Féres
You must tell where's your spring context (applicationContext.xml).
Try this:

listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
context-param
param-namecontextConfigLocation/param-name
param-valueWEB-INF/applicationContext.xml/param-value
/context-param

Regards,


Leandro.


2009/4/6 HHB hubaghd...@yahoo.ca

 Hey,
 I'm trying to integrate Spring 2.5 into our Wicket
 application, I did the following:

 web.xml:
context-param
param-namecontextConfigLocation/param-name
param-valueclasspath:applicationContext.xml/param-value
/context-param
listener
listener-classorg.springframework.web.
 context.ContextLoaderListener/listener-class
/listener
filter
filter-nameOpenSessionInViewFilter/filter-name
filter-classorg.springframework.orm.hibernate3.
 support.OpenSessionInViewFilter/filter-class
/filter

filter
filter-nameWicketFilter/filter-name
filter-classorg.apache.wicket.
 protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-valueorg.apache.wicket.spring.
 SpringWebApplicationFactory/param-value
/init-param
/filter
filter
filter-nameWicketFilter/filter-name
filter-classorg.apache.wicket.
 protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-valueorg.apache.wicket.spring.
 SpringWebApplicationFactory/param-value
/init-param
/filter

 applicationContext.xml:

bean id=wicketApplication class=domain.WicketApplication/


 pom.xml:

dependency
groupIdorg.springframework/groupId
artifactIdspring/artifactId
version2.5.6/version
/dependency

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring/artifactId
version1.3.5/version
/dependency
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring-annot/artifactId
version1.3.5/version
/dependency

 WicketApplication:

   @Override
protected void init() {
super.init();
addComponentInstantiationListener
 (new SpringComponentInjector(this));
}

 But when trying:
 mvn test
 I got the following exception:
 
 ---
 Test set: TestSuite
 
 ---
 Tests run: 2, Failures: 1, Errors: 0,
 Skipped: 1, Time elapsed: 0.498 sec  FAILURE!
 init(domain.TestHomePage)  Time elapsed: 0 sec   FAILURE!
 java.lang.IllegalStateException:
 No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.
 WebApplicationContextUtils.
 getRequiredWebApplicationContext(WebApplicationContextUtils.java:70)
at org.apache.wicket.spring.
 injection.annot.SpringComponentInjector.
 init(SpringComponentInjector.java:74)

 Any ideas?
 Thanks.


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




Re: Spring integration problem

2009-04-06 Thread Leandro Féres
Sorry, didn't see (at first) that you've already done something similar.
Anyway, try replacing classpath:applicationContext.xml for
WEB-INF/applicationContext.xml. I'm not sure if this classpath param works
there.

Regards,


Leandro.

2009/4/6 Leandro Féres leandro.fe...@gmail.com

 You must tell where's your spring context (applicationContext.xml).
 Try this:

 listener

 listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
 /listener
 context-param
 param-namecontextConfigLocation/param-name
 param-valueWEB-INF/applicationContext.xml/param-value
 /context-param

 Regards,


 Leandro.


 2009/4/6 HHB hubaghd...@yahoo.ca

 Hey,
 I'm trying to integrate Spring 2.5 into our Wicket
 application, I did the following:

 web.xml:
context-param
param-namecontextConfigLocation/param-name
param-valueclasspath:applicationContext.xml/param-value
/context-param
listener
listener-classorg.springframework.web.
 context.ContextLoaderListener/listener-class
/listener
filter
filter-nameOpenSessionInViewFilter/filter-name
filter-classorg.springframework.orm.hibernate3.
 support.OpenSessionInViewFilter/filter-class
/filter

filter
filter-nameWicketFilter/filter-name
filter-classorg.apache.wicket.
 protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-valueorg.apache.wicket.spring.
 SpringWebApplicationFactory/param-value
/init-param
/filter
filter
filter-nameWicketFilter/filter-name
filter-classorg.apache.wicket.
 protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-valueorg.apache.wicket.spring.
 SpringWebApplicationFactory/param-value
/init-param
/filter

 applicationContext.xml:

bean id=wicketApplication class=domain.WicketApplication/


 pom.xml:

dependency
groupIdorg.springframework/groupId
artifactIdspring/artifactId
version2.5.6/version
/dependency

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring/artifactId
version1.3.5/version
/dependency
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring-annot/artifactId
version1.3.5/version
/dependency

 WicketApplication:

   @Override
protected void init() {
super.init();
addComponentInstantiationListener
 (new SpringComponentInjector(this));
}

 But when trying:
 mvn test
 I got the following exception:
 
 ---
 Test set: TestSuite
 
 ---
 Tests run: 2, Failures: 1, Errors: 0,
 Skipped: 1, Time elapsed: 0.498 sec  FAILURE!
 init(domain.TestHomePage)  Time elapsed: 0 sec   FAILURE!
 java.lang.IllegalStateException:
 No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.
 WebApplicationContextUtils.
 getRequiredWebApplicationContext(WebApplicationContextUtils.java:70)
at org.apache.wicket.spring.
 injection.annot.SpringComponentInjector.
 init(SpringComponentInjector.java:74)

 Any ideas?
 Thanks.


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





Re: Spring integration problem

2009-04-06 Thread HHB

I tried what you suggested, no luck, the same error.


Leandro Féres wrote:
 
 Sorry, didn't see (at first) that you've already done something similar.
 Anyway, try replacing classpath:applicationContext.xml for
 WEB-INF/applicationContext.xml. I'm not sure if this classpath param
 works
 there.
 
 Regards,
 
 
 Leandro.
 
 2009/4/6 Leandro Féres leandro.fe...@gmail.com
 
 You must tell where's your spring context (applicationContext.xml).
 Try this:

 listener

 listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
 /listener
 context-param
 param-namecontextConfigLocation/param-name
 param-valueWEB-INF/applicationContext.xml/param-value
 /context-param

 Regards,


 Leandro.


 2009/4/6 HHB hubaghd...@yahoo.ca

 Hey,
 I'm trying to integrate Spring 2.5 into our Wicket
 application, I did the following:

 web.xml:
context-param
param-namecontextConfigLocation/param-name
param-valueclasspath:applicationContext.xml/param-value
/context-param
listener
listener-classorg.springframework.web.
 context.ContextLoaderListener/listener-class
/listener
filter
filter-nameOpenSessionInViewFilter/filter-name
filter-classorg.springframework.orm.hibernate3.
 support.OpenSessionInViewFilter/filter-class
/filter

filter
filter-nameWicketFilter/filter-name
filter-classorg.apache.wicket.
 protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-valueorg.apache.wicket.spring.
 SpringWebApplicationFactory/param-value
/init-param
/filter
filter
filter-nameWicketFilter/filter-name
filter-classorg.apache.wicket.
 protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-valueorg.apache.wicket.spring.
 SpringWebApplicationFactory/param-value
/init-param
/filter

 applicationContext.xml:

bean id=wicketApplication class=domain.WicketApplication/


 pom.xml:

dependency
groupIdorg.springframework/groupId
artifactIdspring/artifactId
version2.5.6/version
/dependency

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring/artifactId
version1.3.5/version
/dependency
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring-annot/artifactId
version1.3.5/version
/dependency

 WicketApplication:

   @Override
protected void init() {
super.init();
addComponentInstantiationListener
 (new SpringComponentInjector(this));
}

 But when trying:
 mvn test
 I got the following exception:
 
 ---
 Test set: TestSuite
 
 ---
 Tests run: 2, Failures: 1, Errors: 0,
 Skipped: 1, Time elapsed: 0.498 sec  FAILURE!
 init(domain.TestHomePage)  Time elapsed: 0 sec   FAILURE!
 java.lang.IllegalStateException:
 No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.
 WebApplicationContextUtils.
 getRequiredWebApplicationContext(WebApplicationContextUtils.java:70)
at org.apache.wicket.spring.
 injection.annot.SpringComponentInjector.
 init(SpringComponentInjector.java:74)

 Any ideas?
 Thanks.


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



 
 

-- 
View this message in context: 
http://www.nabble.com/Spring-integration-problem-tp22911007p22911597.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Tips to implement this switch technique

2009-04-06 Thread Sergey Podatelev
Although it'd probably be more correct to check the state of the
navPanel within a switchingPanel (
switchingPanel.getPage().get(navPanel) ) and render it accordingly.

On Mon, Apr 6, 2009 at 8:00 PM, Sergey Podatelev
brightnesslev...@gmail.com wrote:
 Not sure if I understand your problem correctly, but you can try to
 use navPanel.getPage().get(switchingPanel)

 On Mon, Apr 6, 2009 at 5:23 PM, HHB hubaghd...@yahoo.ca wrote:
 Hey,
 For our application layout we decided to go with
 switching panels technique.
 The Index page contains the navigation panel
 which contains links to switch panels.
 I know how to implement this technique but only
 when the links that are supposed
 to switch panels are on the same Index page, not
 contained in another panel.
 Would you please give some tips how to implement
 this?
 Thanks.


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





 --
 sp




-- 
sp

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



publish resources in webapp

2009-04-06 Thread Fernando Wermus
Hi all!

   I have several swf files in webapp/ folder and I need to publish them
for any user. How can I achieve that in wicket?

Thanks in advance!

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


problems with form submits and AJAX modal window

2009-04-06 Thread Alexander Elsholz
hi,

i've problems with submitting my form in a modal window. when i use the same
component (surrounded with a panel) directly on a page everything works fine. 

the problem is, that all component-models are set to null.

in the request-map i found these parameters:
-random:0.5499189677089167
-button:1
-forme_hf_0:


here are the ajax-debug messages:
  INFO:
INFO: Initiating Ajax POST request on
?wicket:interface=:6:pnlPanel:modal.test:content:content:form:btn.test.test:1:
IActivePageBehaviorListener:0:-1wicket:ignoreIfNotActive=truerandom=
0.20329140486022013
INFO: Invoking pre-call handler(s)...

and a bit stacktrace:

Can't convert null value to a primitive class: int for setting it on
de.klingel.kunde.bo.b...@dbdc4b
at
org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(
PropertyResolver.java:1082)
at
org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(
PropertyResolver.java:579)
at org.apache.wicket.util.lang.PropertyResolver.setValue(
PropertyResolver.java:133)
at
org.apache.wicket.model.AbstractPropertyModel.setObject(
AbstractPropertyModel.java:164)
at org.apache.wicket.Component.setModelObject(Component.java:2891)
at
org.apache.wicket.markup.html.form.FormComponent.updateModel(
FormComponent.java:1069)
at org.apache.wicket.markup.html.form.Form$19.validate(Form.java:1806)
at
org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(
Form.java:165)
at
org.apache.wicket.markup.html.form.FormComponent.
visitFormComponentsPostOrderHelper(FormComponent.java:421)
at
org.apache.wicket.markup.html.form.FormComponent.
visitFormComponentsPostOrderHelper(FormComponent.java:408)
at
org.apache.wicket.markup.html.form.FormComponent.
visitFormComponentsPostOrder(FormComponent.java:385)
at
org.apache.wicket.markup.html.form.Form.
visitFormComponentsPostOrder(Form.java:1060)
at
org.apache.wicket.markup.html.form.Form.
internalUpdateFormComponentModels(Form.java:1798)
at
org.apache.wicket.markup.html.form.Form.
updateFormComponentModels(Form.java:1765)
at org.apache.wicket.markup.html.form.Form.process(Form.java:865)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(
Form.java:807)
at
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(
AjaxFormSubmitBehavior.java:120)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(
AjaxEventBehavior.java:163)
at
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(
AbstractDefaultAjaxBehavior.java:293)

i also have an onchange-behavior on a dropdownchoice, where i en- and disable
other fields. that works fine in both cases, page and modal window.

has anyone an idea whats wron with the form-submit?

thanks alex


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



Updating form components in list view

2009-04-06 Thread Jeff Palmer
I have a list view that has some form components (a checkbox and a 
RadioChoice). All of the data from the ListView is getting displayed on the 
page properly, but when I try to modify one of the form values, it isn't 
getting updated as expected. If anyone has any idea what I might be doing 
wrong, please let me know. I have pasted the contents of my code below.

public class MaintainUsersPage extends EzdecBaseWebPage {

@SpringBean
private ISecurityRepository securityRepository;

@SpringBean
private ISecurityService securityService;

private EzdecAccount account;

public class UsersModel extends LoadableDetachableModel {
private EzdecAccount account;

public UsersModel(EzdecAccount account) {
this.account = account;
}

@Override
protected Object load() {
ListEzdecUser users = 
securityRepository.findAllNonArchivedUsersByAccount(account);
return users;
}
}

public MaintainUsersPage() {
add(new FeedbackPanel(feedback));
   
account = EzdecSession.getCurrentUser().getAccount();

add(new BookmarkablePageLink(inviteUserLink, InviteUser.class));

add(new Label(accountName, new PropertyModel(account, name)));
 
Form form = new Form(maintainUsersForm);
PageableListView users = new PageableListView(users, new 
UsersModel(account), 20) {

@Override
protected void populateItem(final ListItem item) {
if (item.getIndex() % 2 == 0) {
item.add(new SimpleAttributeModifier(class, odd));
}
final EzdecUser user = (EzdecUser) item.getModelObject();
Link nameLink = new Link(nameLink) {
@Override
public void onClick() {
setResponsePage(new UpdateUserProfilePage(user));
}
};
nameLink.add(new Label(fullname, user.getFullname()));
item.add(nameLink);
item.add(new ExternalLink(emailLink, mailto:; + 
user.getEmail()).add(new Label(email, user.getEmail(;
item.add(new CheckBox(active, new PropertyModel(user, 
active)));
item.add(new RadioChoice(roles,
 new PropertyModel(user, roles),
 Arrays.asList(EzdecRole.values(;
Link deleteLink = new Link(delete) {
@Override
public void onClick() {
if (securityService.archiveUser(user)) {
EzdecSession.get().info(User  + 
user.getFullname() +  has been deleted.);
setResponsePage(MaintainUsersPage.class);
} else {
EzdecSession.get().info(User  + 
user.getFullname() +
 could not be be deleted. Please ensure that 
you  +
 are an account administrator and that you are 
 +
 not trying to delete your own account.);
setResponsePage(MaintainUsersPage.class);
}
}
};
deleteLink.add(new SimpleAttributeModifier(onclick,
return confirm('Are you sure?');));
item.add(deleteLink);

Link submitLink = new Link(submitLink) {
@Override
public void onClick() {
if (securityService.updateUser(user)) {
EzdecSession.get().info(User  + 
user.getFullname() +  has been updated.);
setResponsePage(MaintainUsersPage.class);
} else {
EzdecSession.get().info(User  + 
user.getFullname() +  has not been updated.);
setResponsePage(MaintainUsersPage.class);
}
}
};
item.add(submitLink);
}  
};

form.add(users);
add(form);
add(new PagingNavigator(navigator, users));
}
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Updating form components in list view

2009-04-06 Thread Ryan Gravener
have you tried ListView#setReuseItems(true) ?

Ryan Gravener
http://ryangravener.com/flex | http://twitter.com/ryangravener


On Mon, Apr 6, 2009 at 4:57 PM, Jeff Palmer jpal...@citytechinc.com wrote:

 I have a list view that has some form components (a checkbox and a
 RadioChoice). All of the data from the ListView is getting displayed on the
 page properly, but when I try to modify one of the form values, it isn't
 getting updated as expected. If anyone has any idea what I might be doing
 wrong, please let me know. I have pasted the contents of my code below.

 public class MaintainUsersPage extends EzdecBaseWebPage {

@SpringBean
private ISecurityRepository securityRepository;

@SpringBean
private ISecurityService securityService;

private EzdecAccount account;

public class UsersModel extends LoadableDetachableModel {
private EzdecAccount account;

public UsersModel(EzdecAccount account) {
this.account = account;
}

@Override
protected Object load() {
ListEzdecUser users =
 securityRepository.findAllNonArchivedUsersByAccount(account);
return users;
}
}

 public MaintainUsersPage() {
add(new FeedbackPanel(feedback));

account = EzdecSession.getCurrentUser().getAccount();

add(new BookmarkablePageLink(inviteUserLink, InviteUser.class));

add(new Label(accountName, new PropertyModel(account, name)));

Form form = new Form(maintainUsersForm);
PageableListView users = new PageableListView(users, new
 UsersModel(account), 20) {

@Override
protected void populateItem(final ListItem item) {
if (item.getIndex() % 2 == 0) {
item.add(new SimpleAttributeModifier(class, odd));
}
final EzdecUser user = (EzdecUser) item.getModelObject();
Link nameLink = new Link(nameLink) {
@Override
public void onClick() {
setResponsePage(new UpdateUserProfilePage(user));
}
};
nameLink.add(new Label(fullname, user.getFullname()));
item.add(nameLink);
item.add(new ExternalLink(emailLink, mailto:; +
 user.getEmail()).add(new Label(email, user.getEmail(;
item.add(new CheckBox(active, new PropertyModel(user,
 active)));
item.add(new RadioChoice(roles,
 new PropertyModel(user, roles),
 Arrays.asList(EzdecRole.values(;
Link deleteLink = new Link(delete) {
@Override
public void onClick() {
if (securityService.archiveUser(user)) {
EzdecSession.get().info(User  +
 user.getFullname() +  has been deleted.);
setResponsePage(MaintainUsersPage.class);
} else {
EzdecSession.get().info(User  +
 user.getFullname() +
 could not be be deleted. Please ensure
 that you  +
 are an account administrator and that you
 are  +
 not trying to delete your own account.);
setResponsePage(MaintainUsersPage.class);
}
}
};
deleteLink.add(new SimpleAttributeModifier(onclick,
return confirm('Are you sure?');));
item.add(deleteLink);

Link submitLink = new Link(submitLink) {
@Override
public void onClick() {
if (securityService.updateUser(user)) {
EzdecSession.get().info(User  +
 user.getFullname() +  has been updated.);
setResponsePage(MaintainUsersPage.class);
} else {
EzdecSession.get().info(User  +
 user.getFullname() +  has not been updated.);
setResponsePage(MaintainUsersPage.class);
}
}
};
item.add(submitLink);
}
};

form.add(users);
add(form);
add(new PagingNavigator(navigator, users));
}
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Button markup id is missing on Modal Window

2009-04-06 Thread Warren Bell
I have a Modal Window that acts like a progress indicator. It has an 
AbstractAjaxTimerBehavior that checks to see if a condition is met. When 
it is met an image on the Modal Window is removed and a form with an 
AjaxButton is added. The image starts with isVisible() = true and the 
form and button start with it set false. The image comes off fine, but 
the form and button never get added. The Ajax debugger error is:


ERROR: Component with id [[processingForm]] a was not found while trying 
to perform markup update. Make sure you called 
component.setOutputMarkupId(true) on the component whose markup you are 
trying to update.
ERROR: Component with id [[okButton]] a was not found while trying to 
perform markup update. Make sure you called 
component.setOutputMarkupId(true) on the component whose markup you are 
trying to update.


I am calling Component#setOutputMarkupId(true), 
Component#setMarkupId(String id) and 
Component#setOutputMarkupPlaceholderTag(true). If I start with 
everything visible and then remove all of them, it works fine. It looks 
like Component#setOutputMarkupPlaceholderTag(true) is not working.


What do I need to do to make this work?

Thanks,

Warren

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



Re: Security in a Spring Wicket layered application

2009-04-06 Thread Eduardo Nunes
Are you using something else together with wicket-jsecurity? I saw the
example in the svn and there is no annotation based authorization or
something like this. How did you implement the authorization in your
(big) application?

Thanks,
Eduardo S. Nunes

On Tue, Mar 10, 2009 at 2:53 PM, Les Hazlewood lhazlew...@apache.org wrote:
 Hi Kent,

 Although it is early, I am using the wicket-jsecurity integration in one of
 my (big) projects.  It is working pretty well.  Feel free to ask questions -
 I'm happy to help along the way.

 Cheers,

 Les
 (JSecurity founder)

 On Tue, Mar 10, 2009 at 1:42 PM, Kent Larsson kent.lars...@gmail.comwrote:

 Integrating with jSecurity instead is really a last resort. If it is
 at all possible I wouldn't like to introduce more framework
 dependencies. That integration project seems a bit early to use as
 well, but it might be interesting in the future. Thanks for the link!

 Regarding Spring Security (SS). Is anyone integrating Wicket with SS
 on their own? I've read lots about SS now but I still find it hard to
 see what I need for a Wicket application.

 I got some tips at:
 http://wiki.apache.org/tapestry/Tapestry5AcegiNoAnnotations

 But I still have lots of questions.
 - In the above link they are using a link and passing the information
 by GET. I would like to use POST, and I guess that shouldn't be a
 problem. Tell me if you see some?
 - I have to instruct SS to redirect a user to my own login page if
 (s)he tries to access something which requires authentication. How is
 that done?
 - When a user registers an account I guess I should pass something on
 to a servlet filter, similar to how authentication works?
 - Which servlet filters do you think I'll need?

 If I can just get someone to register and authenticate. Then I'll just
 use the instructions in SS documentation to get GrantedAuthority
 objects. I'll use these to show/hide things in Wicket pages as well as
 enable/disable other things. Does that sound like a good approach?

 If anyone has *any* tips I would be immensely greatful!! As I think
 this is quite complex and I'm new to Spring Security.

 Best regards,
 Kent


 On Mon, Mar 9, 2009 at 7:16 PM, Ryan McKinley ryan...@gmail.com wrote:
  I have not used it (yet), but check:
  http://code.google.com/p/wicket-jsecurity/
 
 
 
  On Mar 9, 2009, at 1:46 PM, Kent Larsson wrote:
 
  Hm, I had some problems. Are there any examples out there for this?
 
  On Mon, Mar 9, 2009 at 9:43 AM, Kent Larsson kent.lars...@gmail.com
  wrote:
 
  Hi,
 
  Great answer! :-) I'll try to do that today.
 
  Best regards, Kent
 
 
  On Sun, Mar 8, 2009 at 8:38 PM, Erik van Oosten e.vanoos...@grons.nl
  wrote:
 
  Hi Kent,
 
  Go with something that enables authorization in the service layer
 (e.g.
  Spring Security, jSecurity, ...).
 
  Next base your custom wicket authorization on the authentication store
  of
  the chosen base technology. Spring Security uses a thread local as
  authentication store and has a servlet filter to copy the
 authenticated
  user
  to/from the session so that the authenticated user is handily
 available
  during a request and properly stored afterwards.
 
  Authentication itself can be implemented from Wicket in a custom way
  (e.g. a
  username/password form). On success you just store the authenticated
  user in
  the authentication store.
 
  Regards,
   Erik.
 
 
  Kent Larsson wrote:
 
  Hi,
 
  I know there has been some discussion on this. But I've had a hard
  time deciding how this project should use security anyway.
 
  The application in question is layered into three layers for
  presentation, services and persistence using Wicket, Spring and
  Hibernate.
 
  What we need:
  - Authentication
  - Authorization on pages, components
  - Authorization before being able to run methods in the service layer
  - Authorization for viewing/editing some domain objects using Access
  Control List's (ACL's)
 
  I have read Wicket in Action and it's custom security solution has
 some
  pros:
  - It's quite easy to understand
  - We have a lot of freedom in how to do authentication and
  authorization
 
  And some cons:
  - I don't know how to authorize calls of specific methods, and thus
  - All security will be in the presentation layer
  - It won't be usable if we want security on web services later (which
  we do not need now, so maybe this can be disregarded)
 
  It would be nice if we could have a common solution to our security
  needs that integrates well with Wicket and Spring. I know that the
  Auth Roles project is out there as well as Swarm. But I don't know
  which will meet our needs and which will most likely be an option to
  us when we later move to Wicket 1.4 or a higher version.
 
  Best regards,
  Kent
 
 
 
 
  --
  Erik van Oosten
  http://www.day-to-day-stuff.blogspot.com/
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional 

Custom validation

2009-04-06 Thread Chris Carlson
New to wicket trying to figure out the best way to do custom validation. I
have a dropdown and a textfield, only 1 of which is required.  I want the
user to select from the dropdown, and if their option is not listed, be
able to enter anything in the textfield


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



AppleTV!

2009-04-06 Thread John Armstrong
I think this may be a first but I am now running wicket on my AppleTV
under Jetty.

This is for a home automation project where wicket will be the glue
between serial port communications and a USB-UIRT infrared input
device.

Hooray for Wicket, new frontiers.. Well, it wasn't that hard but I
think its cool.
John-

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



Re: AppleTV!

2009-04-06 Thread Igor Vaynberg
thats pretty freaking cool :)

-igor

On Mon, Apr 6, 2009 at 8:52 PM, John Armstrong siber...@gmail.com wrote:
 I think this may be a first but I am now running wicket on my AppleTV
 under Jetty.

 This is for a home automation project where wicket will be the glue
 between serial port communications and a USB-UIRT infrared input
 device.

 Hooray for Wicket, new frontiers.. Well, it wasn't that hard but I
 think its cool.
 John-

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



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



Re: Custom validation

2009-04-06 Thread Martin Makundi
You might want to use ajax to show the textfield only after a specific
option in the dropdown is chosen.

Add, for example, OnChangeAjaxBehavior to the dropdown where you add
the textfield to the target. In the textfield's isVisible method you
evaluate whether to show it or not.

textfield = new textfield() {
  public boolean isVisible() {
 // should I show or should I not
  }
}
textfield.setOutputMarkupPlaceholderTag(true); // So that you can
update a hidden(not-shown) component

dropdown = new dropdown();
dropdown.add(new onchangeajaxbehavior() {
  onchange(target) {
target.addComponent(textfield);
  }
});

**
Martin

2009/4/7 Chris Carlson ch...@carlsoncentral.com:
 New to wicket trying to figure out the best way to do custom validation. I
 have a dropdown and a textfield, only 1 of which is required.  I want the
 user to select from the dropdown, and if their option is not listed, be
 able to enter anything in the textfield


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



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



Re: Custom validation

2009-04-06 Thread Igor Vaynberg
make both of your components not required, and use IFormValidator to
make sure at least one is filled in. alternatively you can override
form.onvalidate() and perform custom validation there. remember to use
component.getconvertedinput() and not getmodelobject() during
validation.

-igor


On Mon, Apr 6, 2009 at 7:26 PM, Chris Carlson ch...@carlsoncentral.com wrote:
 New to wicket trying to figure out the best way to do custom validation. I
 have a dropdown and a textfield, only 1 of which is required.  I want the
 user to select from the dropdown, and if their option is not listed, be
 able to enter anything in the textfield


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



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