Re: wicket 1.4.12 cannot cast to org.apache.wicket.protocol.http.WebApplication

2010-10-07 Thread Martijn Dashorst
make sure your wicket-auth-roles dependency is from the same version
as your wicket jar.

Martijn

On Wed, Oct 6, 2010 at 7:24 PM, cablepuff cablep...@gmail.com wrote:

 Hi i have the following in my web.xml


 filter
                filter-namewicket.filter/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
                init-param
                        param-nameapplicationBean/param-name
                        param-valueauthenticatedApplication/param-value
                /init-param
                init-param
                        param-nameconfiguration/param-name
                        param-valuedeployment/param-value
                /init-param
                init-param
                param-namecontextConfigLocation/param-name
                        
 param-valueclasspath:applicationContext.xml/param-value
           /init-param
 /filter


 in my applicationContext.xml i have this define

 bean id=authenticatedApplication
 class=com.myapp.MyAuthenticatedApplication/

 my MyAuthenticatedApplication extends AuthenticatedWebApplication ...


 so i get this error.

 java.lang.ClassCastException: $Proxy35 cannot be cast to
 org.apache.wicket.protocol.http.WebApplication
        at
 org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:150)
        at
 org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:143)
        at 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:706)
        at
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:287)
        at
 org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
        at
 org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:115)
        at
 org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4001)
        at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4651)
        at 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
        at 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at 
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
        at 
 org.apache.catalina.core.StandardService.start(StandardService.java:519)
        at 
 org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)


 What is wrong?

 i am using wicket-ioc 1.4.12 and wicket-auth-roles 1.4.12.

 P.S. i already try applicationClassName with value of
 com.myapp.MyAuthenticatedApplication and i get no bean of type
 org.apache.wicket.protocol.http.WebApplication found.

 Thanks,

 Chun Ping Wang.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-1-4-12-cannot-cast-to-org-apache-wicket-protocol-http-WebApplication-tp2965438p2965438.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8

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



Enable FormFields on Error

2010-10-07 Thread splitshade

Hi All!,

we have a Problem here.
We have a Page, where lots of Panels are added.
These Panels should be individually enabled, as soon as a ValidationError is
available for one of them.
We have overridden isEnabled() for all Panels to return true, whenever an
Errormessage is registered for a Panel or one of its subcomponents (using
Visitor).


Enablement works like a charm, Problem is, that isEnabled is called before
FormValidation takes process, so in the first place, the panel  and its
subcomponents are not validated, and as last call, isEnabled is called again
to check, if the panel should be displayed as Enabled.

So, is this a bad design? would you solve it this way or is there even a
better solution i did not think of?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Enable-FormFields-on-Error-tp2966341p2966341.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Bean injection

2010-10-07 Thread James Carman
On Wed, Oct 6, 2010 at 10:51 PM, Mauro Ciancio maurocian...@gmail.com wrote:
  BTW, I've defined all the beans with prototype scope, so it's not a
 spring issue.


Why are you using prototype scope anyway?

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



Re: urls after a form submission

2010-10-07 Thread James Carman
On Wed, Oct 6, 2010 at 10:38 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:

 Wrong.  First, you have to understand what is happening behind the scenes.
  Look at the URL that actually appears in your form's action attribute -
 it is a full URL to a specific component, which will invoke the
 IFormSubmitListener on that component (i.e.
 ../?wicket:interface=:13:loginForm::IFormSubmitListener::).  After that form
 is done processing, you are redirected to a URL to render whatever page is
 supposed to be rendered.  If you haven't specifically called
 setResponsePage(...), then this means that Wicket hast re-render the page
 that your form was on.  BUT - it can't send you back to a bookmarkable URL
 for that page (your pretty mount with query string parameters, etc), because
 your form submission could have changed all kinds of state on the page, and
 sending you to a bookmarkable URL will result in your page constructor
 getting called and rendering a new page (without all of those state
 changes).  So, you must be redirected to the exact version of the page that
 your form just modified.  Thus, you are redirected to something like
 http://localhost:8080/?wicket:interface=:13:1::: - which is a URL, not for
 the form, but for the specific version of the page that should be rendered.


We should copy/paste this into a Wiki page or something, Jeremy.
Thanks for taking the time to explain this in-depth for folks.

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



Re: JFreeChart with clickable imagemap

2010-10-07 Thread Peter Karich
Hi James!

 I checked jetwick and it looks cool. ;-)
   
hey, thanks ;-)

 Do you use JFreeChart to create those charts?
   

initially I did. But now only that tiny bar image is stolen from
jfreechart :-)

http://jetwick.com/img/bar-min.png

the rest is created via divs and css and a bit java 'magic'. settings
the height of a div is all:
Label bar = new Label(itemSpan);
bar.add(new AttributeAppender(style, new Model(height: + (int)
(zoomer * entry.count) + px),  ));

 I'm willing to try that option as well. Kindly blog about it!

Finally I did a small post here:

http://karussell.wordpress.com/2010/10/01/barchart-with-wicket-and-pure-html/

please comment if something is against wicket philosophy or if it
contains bugs etc

Regards,
Peter.


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



Wicket site on Android phone

2010-10-07 Thread Chris Colman
I've just picked up a new Android phone (HTC Desire - awesome phone BTW)
and most of our wicket powered site works well. There are two issues
which maybe just me not knowing how to use the phone properly or they
may be issues with the Webkit based browser on those things:
1.  I haven't been able to grab the caption on modal windows in
order to drag them around on the screen. Being a 'touch' based paradigm
maybe there is no such thing as a 'grab'.
2.  Clicking the OK button on a modal window doesn't seem to have
any effect - the modal stays open.
I have only had the phone for a couple of days so the issues could be
all me - not knowing how to perform the above operations - if anyone has
some enlightenment, please let me know.
 


Re: Wicket site on Android phone

2010-10-07 Thread Martin Grigorov
I guess it is some WebKit related Javascript issues.
Don't know how hard is to debug them but if you manage - send us a patch ;-)

On Thu, Oct 7, 2010 at 2:03 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 I've just picked up a new Android phone (HTC Desire - awesome phone BTW)
 and most of our wicket powered site works well. There are two issues
 which maybe just me not knowing how to use the phone properly or they
 may be issues with the Webkit based browser on those things:
 1.  I haven't been able to grab the caption on modal windows in
 order to drag them around on the screen. Being a 'touch' based paradigm
 maybe there is no such thing as a 'grab'.
 2.  Clicking the OK button on a modal window doesn't seem to have
 any effect - the modal stays open.
 I have only had the phone for a couple of days so the issues could be
 all me - not knowing how to perform the above operations - if anyone has
 some enlightenment, please let me know.




Re: Bean injection

2010-10-07 Thread Leszek Gawron

On 2010-10-07 04:51, Mauro Ciancio wrote:

Hello everyone,
   I'm using spring in one wicket project and I'm lost about how the
proxy stuff works. I've realized that the fields marked with
@springbean are injected when the component injection listener runs.

   Also, I've looked in AnnotProxyFieldValueFactory.class to find out
how the bean proxy is created and how it can be serialized.

   Now, this is my issue. The page is created by wicket, the injection
is done and I have the bean ready for use. If the page is serialized,
the bean will be reconstructed using the bean factory (through the
proxy). But, somehow when I click a non bookmarkable link in my page,
the bean is never reconstructed and I have the previous reference to
the bean (I mean, the same object).

   Is this the correct behavior? Shouldn't this bean be reconstructed
when another request arrives?

   BTW, I've defined all the beans with prototype scope, so it's not a
spring issue.


AFAIR the once the bean is looked up from spring it is being cached by 
AnnotProxyFieldValueFactory itself.


So using prototype scope will not work anyway: either way you always get 
a fresh bean (so you cannot keep state) or you will always get the same 
bean (even worse if the bean is stateful).


You probably should convert your code to using singleton beans and pass 
appropriate state from wicket component itself.


lg

--
Leszek Gawron  http://lgawron.blogspot.com

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



How to get 'value' of input recognized in HiddenField component?

2010-10-07 Thread dbuttery

Hi all,

I am using a HiddenField to hold the result of some jquery processing
and can see the 'value' changing in the dom (using FireBug).   I am also
able to trigger the onchange event and the HiddenField is notified of the
change (via AjaxEventBehavior).

At that point, however, the HiddenField does not seem to know anything
about the new value ...

How do we get the updated 'value' to be accessible to the HiddenField as
either raw or converted input?

Basically, I need this to act as if a user had manually typed the value
into the field themselves ...

Thanks,
-Dennis
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-get-value-of-input-recognized-in-HiddenField-component-tp2966761p2966761.html
Sent from the Users forum mailing list archive at Nabble.com.

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



wicket 1.5, css resourcereference from string?

2010-10-07 Thread nino martinez wael
Hi

I cant get below working:

public void renderHead(IHeaderResponse response) {
super.renderHead(response);
if (wallboardConfigurationModel.getObject().hasCustomCss()) {
final StringResourceStream stringResourceStream = new StringResourceStream(
wallboardConfigurationModel.getObject().getCustomCss(),
text/css);

ResourceReference resourceReference = new ResourceReference(
wallboardConfigurationModel.getObject().getId()) {
@Override
public IResource getResource() {
return new ResourceStreamResource(stringResourceStream);
}
};
response.renderCSSReference(resourceReference);

}
}

I get this out put in the log:

010-10-07 15:33:57,555 WARN
 [org.apache.wicket.request.resource.ResourceReferenceRegistry]  - Asked to
auto-create a ResourceReference, but
ResourceReferenceRegistry.createDefaultResourceReference() return null.
 [scope: org.apache.wicket.Application; name: test1; locale: null; style:
null; variation: null]
2010-10-07 15:33:57,555 ERROR [org.apache.wicket.request.cycle.RequestCycle]
 - Unable to execute request. No suitable RequestHandler found.
URL=wicket/resource/org.apache.wicket.Application/test1


Re: Bean injection

2010-10-07 Thread Mauro Ciancio
Hi,

 Why are you using prototype scope anyway?

In order to get a new fresh instance every time is requested.

 AFAIR the once the bean is looked up from spring it is being cached by
 AnnotProxyFieldValueFactory itself.

 So using prototype scope will not work anyway: either way you always get a
 fresh bean (so you cannot keep state) or you will always get the same bean
 (even worse if the bean is stateful).

 You probably should convert your code to using singleton beans and pass
 appropriate state from wicket component itself.

OK, I understand, that explains my issue. However, I have a bean that
is stateful and the state cannot be sent by wicket componets (more
precisely it's a bean that provides the local date and local time, and
it's cached in a field so every time you invoke it, it returns the
same date).

So, I'm getting the same date when I navigate through a stateful page.

Is there any another workaround or the only way out is not to keep the
date cached?

Thanks for the replies.
Regards.
-- 
Mauro Ciancio

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



Help with custom component that implements IOnChangeListener

2010-10-07 Thread Rut Bastoni

Hi everyone,
i'm trying to implement a  custom TextField that fires onchange event
without using Ajax (it is a requirement of my project - i have good reasons
not to use Ajax).

Looking at the source files of DropDownChoice, CheckBox etc. (they all
implement the wantOnSelectionChangedNotifications() mechanism) i created a
class:

class OnChangeTextFieldT extends TextFieldT implements IOnChangeListener
{

   // . my stuff

   @Override
   public void onSelectionChanged()
   {
   updateModel();
   onSelectionChanged(getModelObject());
   }

   protected void onSelectionChanged(final Object newSelection)
{
   System.out.println(Event fired);
}

   /**
* Processes the component tag - This is like DropDownChoice and other
default FormComponents di
*/
   @Override
   protected void onComponentTag(final ComponentTag tag)
   {
   // url that points to this components IOnChangeListener method
   CharSequence url = urlFor(IOnChangeListener.INTERFACE);

   Form? form = findParent(Form.class);
   if (form != null)
   {
   tag.put(onchange, form.getJsForInterfaceUrl(url));
   }
   super.onComponentTag(tag);
   }

but that doesn't work. When i type into my textfield, i get an error page
saying:

WicketMessage: Attempt to access unknown request listener interface
IRedirectListener

Root cause:

org.apache.wicket.WicketRuntimeException: Attempt to access unknown request
listener interface IRedirectListener
at org.apache.wicket.markup.html.form.Form.dispatchEvent(Form.java:1320)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:870)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
at
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)

 etc. etc.

I looked into the sources, in particular Form.java, it seems like the url of
my listener (obtained by urlFor(IOnChangeListener.INTERFACE)) is wrong,
because this is the value that get stored in the hidden fild of the form,
and when the form dispatches events, it does not cause the correct
IListenerInterfaceRequestTarget be created.

I wonder, why does this mechanism work on DropDownChoice and others, and not
on my component?
Is this a bug? Or am I doing some mistake?

Thanks a Lot

Rut Bastoni


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



Re: Bean injection

2010-10-07 Thread jcgarciam

I think as a WorkAround is to get the beans yourself from the Spring context
insteads of relying on the @SpringBean annotation

On Thu, Oct 7, 2010 at 10:51 AM, Mauro Ciancio [via Apache Wicket] 
ml-node+2966817-1959417264-65...@n4.nabble.comml-node%2b2966817-1959417264-65...@n4.nabble.com
 wrote:

 Hi,

  Why are you using prototype scope anyway?

 In order to get a new fresh instance every time is requested.

  AFAIR the once the bean is looked up from spring it is being cached by
  AnnotProxyFieldValueFactory itself.
 
  So using prototype scope will not work anyway: either way you always get
 a
  fresh bean (so you cannot keep state) or you will always get the same
 bean
  (even worse if the bean is stateful).
 
  You probably should convert your code to using singleton beans and pass
  appropriate state from wicket component itself.

 OK, I understand, that explains my issue. However, I have a bean that
 is stateful and the state cannot be sent by wicket componets (more
 precisely it's a bean that provides the local date and local time, and
 it's cached in a field so every time you invoke it, it returns the
 same date).

 So, I'm getting the same date when I navigate through a stateful page.

 Is there any another workaround or the only way out is not to keep the
 date cached?

 Thanks for the replies.
 Regards.
 --
 Mauro Ciancio

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2966817i=0
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2966817i=1



 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/Bean-injection-tp2966113p2966817.html
 To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.comml-node%2b1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bean-injection-tp2966113p2966851.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Bean injection

2010-10-07 Thread James Carman
On Thu, Oct 7, 2010 at 9:13 AM, Leszek Gawron lgaw...@apache.org wrote:
 AFAIR the once the bean is looked up from spring it is being cached by
 AnnotProxyFieldValueFactory itself.

 So using prototype scope will not work anyway: either way you always get a
 fresh bean (so you cannot keep state) or you will always get the same bean
 (even worse if the bean is stateful).


The code specifically checks to see if the bean is a singleton before
it caches it.  Non-singleton beans should not be cached:

http://svn.apache.org/repos/asf/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java

Search for isSingletonBean

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



Monitor external link clicks

2010-10-07 Thread Abid K
Hi,

I am using the ExternalLink class for external sites. I've noticed
this class does not implement the ILinkListener interface and I am not
able to monitor these clicks.

I tried to implement the listener, but I did not get far. e.g.
public class MonitorExternalLink extends ExternalLink implements ILinkListener {
...
}

Does anyone know how I can implement a listener on the ExternalLink class?

Thanks

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



Re: Bean injection

2010-10-07 Thread James Carman
On Thu, Oct 7, 2010 at 9:50 AM, Mauro Ciancio maurocian...@gmail.com wrote:
 OK, I understand, that explains my issue. However, I have a bean that
 is stateful and the state cannot be sent by wicket componets (more
 precisely it's a bean that provides the local date and local time, and
 it's cached in a field so every time you invoke it, it returns the
 same date).

 So, I'm getting the same date when I navigate through a stateful page.

 Is there any another workaround or the only way out is not to keep the
 date cached?


So, every time you ask the bean, you want it to return the date/time
when it was created (or when it was first asked for the current
date/time)?  Is that an important date/time?

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



Re: Monitor external link clicks

2010-10-07 Thread Martin Makundi
Add onclickbehavior?

**
Martin

2010/10/7 Abid K abz...@gmail.com:
 Hi,

 I am using the ExternalLink class for external sites. I've noticed
 this class does not implement the ILinkListener interface and I am not
 able to monitor these clicks.

 I tried to implement the listener, but I did not get far. e.g.
 public class MonitorExternalLink extends ExternalLink implements 
 ILinkListener {
 ...
 }

 Does anyone know how I can implement a listener on the ExternalLink class?

 Thanks

 -
 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: Monitor external link clicks

2010-10-07 Thread Abid K
Hi Martin,

Do you mean the javascript 'onclick' function? Cause I have tried to
implement the onLinkClicked( ) method, and copied the 'getUrl()',
'onComponentTag()' methods from the Link class. But, did not manage to
get it working.

Thanks




On 7 October 2010 16:00, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 Add onclickbehavior?

 **
 Martin

 2010/10/7 Abid K abz...@gmail.com:
 Hi,

 I am using the ExternalLink class for external sites. I've noticed
 this class does not implement the ILinkListener interface and I am not
 able to monitor these clicks.

 I tried to implement the listener, but I did not get far. e.g.
 public class MonitorExternalLink extends ExternalLink implements 
 ILinkListener {
 ...
 }

 Does anyone know how I can implement a listener on the ExternalLink class?

 Thanks

 -
 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: Monitor external link clicks

2010-10-07 Thread Martin Makundi
I mean:

link.add(new AjaxEventBehavior(onclick) {
  ...
});


**
Martin

2010/10/7 Abid K abz...@gmail.com:
 Hi Martin,

 Do you mean the javascript 'onclick' function? Cause I have tried to
 implement the onLinkClicked( ) method, and copied the 'getUrl()',
 'onComponentTag()' methods from the Link class. But, did not manage to
 get it working.

 Thanks




 On 7 October 2010 16:00, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Add onclickbehavior?

 **
 Martin

 2010/10/7 Abid K abz...@gmail.com:
 Hi,

 I am using the ExternalLink class for external sites. I've noticed
 this class does not implement the ILinkListener interface and I am not
 able to monitor these clicks.

 I tried to implement the listener, but I did not get far. e.g.
 public class MonitorExternalLink extends ExternalLink implements 
 ILinkListener {
 ...
 }

 Does anyone know how I can implement a listener on the ExternalLink class?

 Thanks

 -
 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: Monitor external link clicks

2010-10-07 Thread Martijn Dashorst
That is the whole point of externallink: it links to an external URL.
If you want to receive the request prior to sending the user onwards,
use a proper Link and redirect the browser to the external url using
setRequestTarget(new RedirectRequestTarget(url));

Martijn

On Thu, Oct 7, 2010 at 4:55 PM, Abid K abz...@gmail.com wrote:
 Hi,

 I am using the ExternalLink class for external sites. I've noticed
 this class does not implement the ILinkListener interface and I am not
 able to monitor these clicks.

 I tried to implement the listener, but I did not get far. e.g.
 public class MonitorExternalLink extends ExternalLink implements 
 ILinkListener {
 ...
 }

 Does anyone know how I can implement a listener on the ExternalLink class?

 Thanks

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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8

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



Re: Bean injection

2010-10-07 Thread mwilber

We have had to grab the beans ourselves for request scoped beans. In our case
they are trying to cache service call results that may change over time and
allows for data consistency through the request. If we use the @SpringBean
annotation for this we have seen that the bean is cached and not
refetched. I have wanted to look more at this in the Proxy factory but
have not had a chance.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bean-injection-tp2966113p2967048.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Bean injection

2010-10-07 Thread Mauro Ciancio
Hi, thanks for the quick replies.

 I think as a WorkAround is to get the beans yourself from the Spring context
 insteads of relying on the @SpringBean annotation

Yes, that would work.

 The code specifically checks to see if the bean is a singleton before
 it caches it.  Non-singleton beans should not be cached:

 http://svn.apache.org/repos/asf/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java

 Search for isSingletonBean

Yes, I've looked at that code and that's why I'm confused. I meant,
the bean is inyected properly when the page is constructed (via page
constructor, fresh bean). But when I stay in the same page instance
(using stateful links for example), in a later request I have the same
bean instance.

 So, every time you ask the bean, you want it to return the date/time
 when it was created (or when it was first asked for the current
 date/time)?  Is that an important date/time?

It's not so important, but I can't figure out why I have the same bean
instance, taking into account that the page is serialized at the end
of the request and the inyected bean is actually a proxy of the bean,
so no real bean is in the serialization.

I've double checked it, and the _same_ bean instance is holded in my
page en each request to the same page.

Shouldn't the bean get relocated after serialization?

Thanks again :)
Regards.
-- 
Mauro Ciancio

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



Re: Monitor external link clicks

2010-10-07 Thread Abid K
Thanks, that has worked.

On 7 October 2010 16:34, Martijn Dashorst martijn.dasho...@gmail.com wrote:
 That is the whole point of externallink: it links to an external URL.
 If you want to receive the request prior to sending the user onwards,
 use a proper Link and redirect the browser to the external url using
 setRequestTarget(new RedirectRequestTarget(url));

 Martijn

 On Thu, Oct 7, 2010 at 4:55 PM, Abid K abz...@gmail.com wrote:
 Hi,

 I am using the ExternalLink class for external sites. I've noticed
 this class does not implement the ILinkListener interface and I am not
 able to monitor these clicks.

 I tried to implement the listener, but I did not get far. e.g.
 public class MonitorExternalLink extends ExternalLink implements 
 ILinkListener {
 ...
 }

 Does anyone know how I can implement a listener on the ExternalLink class?

 Thanks

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





 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.4 increases type safety for web applications
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8

 -
 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: wicket 1.4.12 cannot cast to org.apache.wicket.protocol.http.WebApplication

2010-10-07 Thread cablepuff

Thanks martin: however all of them unfortuantely is at 1.4.12 

wicket-ioc
wicket-spring
wicket
wicket-auth-roles. 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-1-4-12-cannot-cast-to-org-apache-wicket-protocol-http-WebApplication-tp2965438p2967100.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to get 'value' of input recognized in HiddenField component?

2010-10-07 Thread Igor Vaynberg
use ajaxformcomponentupdatingbehavior, ajaxeventbehavior does not send data over

-igor

On Thu, Oct 7, 2010 at 6:23 AM, dbuttery dbutt...@bplglobal.net wrote:

 Hi all,

    I am using a HiddenField to hold the result of some jquery processing
 and can see the 'value' changing in the dom (using FireBug).   I am also
 able to trigger the onchange event and the HiddenField is notified of the
 change (via AjaxEventBehavior).

    At that point, however, the HiddenField does not seem to know anything
 about the new value ...

    How do we get the updated 'value' to be accessible to the HiddenField as
 either raw or converted input?

    Basically, I need this to act as if a user had manually typed the value
 into the field themselves ...

 Thanks,
 -Dennis
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-get-value-of-input-recognized-in-HiddenField-component-tp2966761p2966761.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: Enable FormFields on Error

2010-10-07 Thread Igor Vaynberg
you can toggle the state with setenabled(true/false) inside onconfigure() method

-igor

On Thu, Oct 7, 2010 at 1:10 AM, splitshade martin.dil...@googlemail.com wrote:

 Hi All!,

 we have a Problem here.
 We have a Page, where lots of Panels are added.
 These Panels should be individually enabled, as soon as a ValidationError is
 available for one of them.
 We have overridden isEnabled() for all Panels to return true, whenever an
 Errormessage is registered for a Panel or one of its subcomponents (using
 Visitor).


 Enablement works like a charm, Problem is, that isEnabled is called before
 FormValidation takes process, so in the first place, the panel  and its
 subcomponents are not validated, and as last call, isEnabled is called again
 to check, if the panel should be displayed as Enabled.

 So, is this a bad design? would you solve it this way or is there even a
 better solution i did not think of?
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Enable-FormFields-on-Error-tp2966341p2966341.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: How to get 'value' of input recognized in HiddenField component?

2010-10-07 Thread dbuttery

That was it!!  Works like a charm ...

Thanks Igor!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-get-value-of-input-recognized-in-HiddenField-component-tp2966761p2967157.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Forms ajax doesn't update components models

2010-10-07 Thread Tito
I made a quickstart and it works.

Now I'm looking for the bug in my application.

Thanks

Tito

2010/10/6 Tito njyt...@gmail.com

 Well thank you!!

 I'm going to see this. If I see another details or if I can solve I will
 tell you.

 Thank you very much for helping!

 Bye


 2010/10/6 vov vov...@mail.ru


 Sorry, but I'm not see the problems.
 Try to debug your isVisible method after submitting the form and find the
 place in which this code return false. I think that isVisibleInHierarchy()
 for your RequiredTextFieldString(patente) will have a problem
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





RE: PropertyModel Not Refreshing

2010-10-07 Thread Shelli Orton
Does nobody have any suggestions?  If I can't get this fixed, I'm going
to have to write the app in another framework (possibly GWT) and I'd
really rather not have to do that.

Shelli

-Original Message-
From: Shelli Orton 
Sent: Wednesday, October 06, 2010 3:52 PM
To: users@wicket.apache.org
Subject: PropertyModel Not Refreshing

Hi,

First, thanks to all who have been helping me as I am new to Wicket.  I
am splitting out two issues I am dealing with to try to keep things
clear.

I am trying to write a simple app that does CRUD operations on database
records.  The goal is for the app to make use of a tab panel where each
tab encapsulates one table from the database.  Each tab panel has two
groups (WebMarkupContainer).  The first, selectGroup, displays a list
(DDC) of the current items, and three buttons, add, edit and delete.
The second, editGroup, is displayed when either the add or edit button
was clicked on the select group, displays the record attributes and save
and cancel buttons.  The tab panel has a selectedRecord which is used
by both groups' components via PropertyModels. Very basic stuff.

When I choose a record and click the edit button, the record is
displayed in the edit group properly.  If I then choose cancel, the edit
group is no longer displayed and the select group DDC selection is null
as expected. I then choose another record from the list and click the
edit button and the previous record information is displayed in the edit
group even though the select group DDC shows the correct/selected
record.

This problem also occurs if I first choose to add a new record and then
cancel the add and then choose to edit a different record.  The DDC
shows the correct/selected record, but all the attributes in the edit
group are null/defaults for a new record.

If I remove the call to setDefaultFormProcessing(false) on the cancel
button, selecting other records for edit works correctly, but I can't
cancel a creating a new record if I use a RequiredTextField because the
form validation fails.

If I select a record for editing or save the newly created record, I can
select a different record for edit or create another one correctly.  So
I must be doing something wrong in the cancel logic. My editForm
(created in the EditGroup constructor) looks like this:

Form editForm = new Form(editForm);

editForm.add(new Label(nameLabel, Name));

editForm.add(new Label(attributeLabel, Attribute));

editForm.add(new RequiredTextFieldString(recordNameText,
new PropertyModelString(MyRecordPanel.this,
selectedRecord.name)));

editForm.add(new DropDownChoiceLir(attributes,
new PropertyModelAttribute(MyRecordPanel.this,
selectedRecord.attribute),
RateCentrePanel.this.getAttributes(),
new AttributeRenderer()));



editForm.add(new Button(cancel)
{
private static final long serialVersionUID = 1L;

public void onSubmit()
{
MyRecordPanel.this.selectedRecord = null;
editGroup.setVisible(false);
selectGroup.setVisible(true);
}
}.setDefaultFormProcessing(false));

add(editForm);

Other than setting the selectedRecord to null, what should I be doing
differently?

Thanks in advance!

Shelli

-
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: Processing Flow for Button onSubmit and LDM load

2010-10-07 Thread Shelli Orton
Again, does nobody have any suggestions?  If I can't get this fixed, I'm
going to have to write the app in another framework (possibly GWT) and
I'd really rather not have to do that.

Shelli

-Original Message-
From: Shelli Orton 
Sent: Wednesday, October 06, 2010 4:05 PM
To: users@wicket.apache.org
Subject: Processing Flow for Button onSubmit and LDM load

Hi,

Again, thanks to all who have been helping me as I am new to Wicket.  I
am splitting out two issues I am dealing with to try to keep things
clear.

I am trying to write a simple app that does CRUD operations on database
records.  The goal is for the app to make use of a tab panel where each
tab encapsulates one table from the database.  Each tab panel has two
groups (WebMarkupContainer).  The first, selectGroup, displays a list
(DDC) of the current items, and three buttons, add, edit and delete.
The DDC uses a LDM to get the list of records so that changes to the
records are reflected on each request.  

When the save button is clicked the onSubmit method is called, then the
LDM load method and then the detach method (twice).  Therefore the
changes are reflected in the list when the page refreshes.

However, when the delete button is clicked, the LDM load and detach
methods are called and then the button's onSubmit.  Therefore the
changes are not reflected in the list.  This same flow is followed by
the cancel and add buttons, but since there are no changes made, it
doesn't make a practical difference in those cases.

Is it weird that the onSubmit is called before the LDM load and detach
methods for one button and after for another?  Which is the expected
processing flow?  Is there any way to change it so that the delete
process matches the save process?

Thanks in advance!

Shelli

-
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: PropertyModel Not Refreshing

2010-10-07 Thread Igor Vaynberg
you have posted an incomplete piece of code and somehow from that we
are supposed to guess what is not working? create a quickstart and
provide that.

-igor

On Thu, Oct 7, 2010 at 10:15 AM, Shelli Orton shelli.or...@sjrb.ca wrote:
 Does nobody have any suggestions?  If I can't get this fixed, I'm going
 to have to write the app in another framework (possibly GWT) and I'd
 really rather not have to do that.

 Shelli

 -Original Message-
 From: Shelli Orton
 Sent: Wednesday, October 06, 2010 3:52 PM
 To: users@wicket.apache.org
 Subject: PropertyModel Not Refreshing

 Hi,

 First, thanks to all who have been helping me as I am new to Wicket.  I
 am splitting out two issues I am dealing with to try to keep things
 clear.

 I am trying to write a simple app that does CRUD operations on database
 records.  The goal is for the app to make use of a tab panel where each
 tab encapsulates one table from the database.  Each tab panel has two
 groups (WebMarkupContainer).  The first, selectGroup, displays a list
 (DDC) of the current items, and three buttons, add, edit and delete.
 The second, editGroup, is displayed when either the add or edit button
 was clicked on the select group, displays the record attributes and save
 and cancel buttons.  The tab panel has a selectedRecord which is used
 by both groups' components via PropertyModels. Very basic stuff.

 When I choose a record and click the edit button, the record is
 displayed in the edit group properly.  If I then choose cancel, the edit
 group is no longer displayed and the select group DDC selection is null
 as expected. I then choose another record from the list and click the
 edit button and the previous record information is displayed in the edit
 group even though the select group DDC shows the correct/selected
 record.

 This problem also occurs if I first choose to add a new record and then
 cancel the add and then choose to edit a different record.  The DDC
 shows the correct/selected record, but all the attributes in the edit
 group are null/defaults for a new record.

 If I remove the call to setDefaultFormProcessing(false) on the cancel
 button, selecting other records for edit works correctly, but I can't
 cancel a creating a new record if I use a RequiredTextField because the
 form validation fails.

 If I select a record for editing or save the newly created record, I can
 select a different record for edit or create another one correctly.  So
 I must be doing something wrong in the cancel logic. My editForm
 (created in the EditGroup constructor) looks like this:

            Form editForm = new Form(editForm);

            editForm.add(new Label(nameLabel, Name));

            editForm.add(new Label(attributeLabel, Attribute));

            editForm.add(new RequiredTextFieldString(recordNameText,
                    new PropertyModelString(MyRecordPanel.this,
                            selectedRecord.name)));

            editForm.add(new DropDownChoiceLir(attributes,
                    new PropertyModelAttribute(MyRecordPanel.this,
                            selectedRecord.attribute),
                    RateCentrePanel.this.getAttributes(),
                    new AttributeRenderer()));

            

            editForm.add(new Button(cancel)
            {
                private static final long serialVersionUID = 1L;

                public void onSubmit()
                {
                    MyRecordPanel.this.selectedRecord = null;
                    editGroup.setVisible(false);
                    selectGroup.setVisible(true);
                }
            }.setDefaultFormProcessing(false));

            add(editForm);

 Other than setting the selectedRecord to null, what should I be doing
 differently?

 Thanks in advance!

 Shelli

 -
 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: Processing Flow for Button onSubmit and LDM load

2010-10-07 Thread Igor Vaynberg
the ldm's load() is called whenever ldm's getobject() is called, which
is called whenever *your* code uses the model. you are free to call
detach() on the ldm yourself if you need it to reload the value at
some point.

-igor

On Wed, Oct 6, 2010 at 3:05 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 Hi,

 Again, thanks to all who have been helping me as I am new to Wicket.  I
 am splitting out two issues I am dealing with to try to keep things
 clear.

 I am trying to write a simple app that does CRUD operations on database
 records.  The goal is for the app to make use of a tab panel where each
 tab encapsulates one table from the database.  Each tab panel has two
 groups (WebMarkupContainer).  The first, selectGroup, displays a list
 (DDC) of the current items, and three buttons, add, edit and delete.
 The DDC uses a LDM to get the list of records so that changes to the
 records are reflected on each request.

 When the save button is clicked the onSubmit method is called, then the
 LDM load method and then the detach method (twice).  Therefore the
 changes are reflected in the list when the page refreshes.

 However, when the delete button is clicked, the LDM load and detach
 methods are called and then the button's onSubmit.  Therefore the
 changes are not reflected in the list.  This same flow is followed by
 the cancel and add buttons, but since there are no changes made, it
 doesn't make a practical difference in those cases.

 Is it weird that the onSubmit is called before the LDM load and detach
 methods for one button and after for another?  Which is the expected
 processing flow?  Is there any way to change it so that the delete
 process matches the save process?

 Thanks in advance!

 Shelli

 -
 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: PropertyModel Not Refreshing

2010-10-07 Thread jcgarciam

Take a look at this, it may helps.

https://cwiki.apache.org/WICKET/lifecycle-of-a-wicket-application.html#LifecycleofaWicketApplication-ModelChanges

On Thu, Oct 7, 2010 at 2:15 PM, Shelli Orton [via Apache Wicket] 
ml-node+2967225-1123928259-65...@n4.nabble.comml-node%2b2967225-1123928259-65...@n4.nabble.com
 wrote:

 Does nobody have any suggestions?  If I can't get this fixed, I'm going
 to have to write the app in another framework (possibly GWT) and I'd
 really rather not have to do that.

 Shelli

 -Original Message-
 From: Shelli Orton
 Sent: Wednesday, October 06, 2010 3:52 PM
 To: [hidden email] http://user/SendEmail.jtp?type=nodenode=2967225i=0
 Subject: PropertyModel Not Refreshing

 Hi,

 First, thanks to all who have been helping me as I am new to Wicket.  I
 am splitting out two issues I am dealing with to try to keep things
 clear.

 I am trying to write a simple app that does CRUD operations on database
 records.  The goal is for the app to make use of a tab panel where each
 tab encapsulates one table from the database.  Each tab panel has two
 groups (WebMarkupContainer).  The first, selectGroup, displays a list
 (DDC) of the current items, and three buttons, add, edit and delete.
 The second, editGroup, is displayed when either the add or edit button
 was clicked on the select group, displays the record attributes and save
 and cancel buttons.  The tab panel has a selectedRecord which is used
 by both groups' components via PropertyModels. Very basic stuff.

 When I choose a record and click the edit button, the record is
 displayed in the edit group properly.  If I then choose cancel, the edit
 group is no longer displayed and the select group DDC selection is null
 as expected. I then choose another record from the list and click the
 edit button and the previous record information is displayed in the edit
 group even though the select group DDC shows the correct/selected
 record.

 This problem also occurs if I first choose to add a new record and then
 cancel the add and then choose to edit a different record.  The DDC
 shows the correct/selected record, but all the attributes in the edit
 group are null/defaults for a new record.

 If I remove the call to setDefaultFormProcessing(false) on the cancel
 button, selecting other records for edit works correctly, but I can't
 cancel a creating a new record if I use a RequiredTextField because the
 form validation fails.

 If I select a record for editing or save the newly created record, I can
 select a different record for edit or create another one correctly.  So
 I must be doing something wrong in the cancel logic. My editForm
 (created in the EditGroup constructor) looks like this:

 Form editForm = new Form(editForm);

 editForm.add(new Label(nameLabel, Name));

 editForm.add(new Label(attributeLabel, Attribute));

 editForm.add(new RequiredTextFieldString(recordNameText,
 new PropertyModelString(MyRecordPanel.this,
 selectedRecord.name)));

 editForm.add(new DropDownChoiceLir(attributes,
 new PropertyModelAttribute(MyRecordPanel.this,
 selectedRecord.attribute),
 RateCentrePanel.this.getAttributes(),
 new AttributeRenderer()));

 

 editForm.add(new Button(cancel)
 {
 private static final long serialVersionUID = 1L;

 public void onSubmit()
 {
 MyRecordPanel.this.selectedRecord = null;
 editGroup.setVisible(false);
 selectGroup.setVisible(true);
 }
 }.setDefaultFormProcessing(false));

 add(editForm);

 Other than setting the selectedRecord to null, what should I be doing
 differently?

 Thanks in advance!

 Shelli

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967225i=1
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967225i=2


 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967225i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967225i=4



 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-Model-Confusion-tp2955144p2967225.html
 To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.comml-node%2b1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 

Re: Enable FormFields on Error

2010-10-07 Thread splitshade

hi, wow, this is great, thank you so much!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Enable-FormFields-on-Error-tp2966341p2967462.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: why is there no redirectToIntercept *Target*

2010-10-07 Thread Eike Kettner
This is what worked for me, maybe this is of use for someone else

  IPageMap pageMap = //get page map (like in
//RestartResponseAtInterceptPageException#redirectToInterceptPage())

  IRequestTarget target = createMySpecialTarget();
  //now just to setup intercept url
  pageMap.redirectToInterceptPage(SomePageIdontCareAbout.class);
  //reset the target ..
  cycle.setRequestTarget(target);
  

regards,
Eike

On [Mon, 27.09.2010 23:36], Eike Kettner wrote:
 Hi!
 I found two methods redirectToInterceptPage(Class) and
 redirectToInterceptPage(Page). I was wondering why there is no
 overloaded method with a IRequestTarget as argument. I'd like to use
 this with a custom request target, that's why i stumbled into this. So I
 like to do something like this:
 
throw new Restart..InterceptException(new MyRequestTarget(..));
 
 
 But maybe there is a better way?
 
 Thank you for your time!
 regards, Eike
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

-- 
email: e...@eknet.org   https://www.eknet.org  pgp: 481161A0

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



RadioChoice - what's wrong?

2010-10-07 Thread Zeldor

Hi,

I am trying to get through with the very basics of Wicket - radiochoice. But
somehow I got stuck and all solutions I tried made my problems even worse...
So, what am I doing wrong?

I have this code:

static final ListString NUMBERS = Arrays.asList(new String[] { 1, 2,
3 });

private RadioChoiceString rc;

{
RadioChoiceString rc = new 
RadioChoiceString(numberRadioChoice, new
ModelString(), NUMBERS).setSuffix();
add(rc.setRequired(true));
}

String _numbers = rc.getModelObject();
System.out.println(_numbers);

When I submit the form I get:
NullPointerException

What am I doing wrong then? 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967576.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: RadioChoice - what's wrong?

2010-10-07 Thread Igor Vaynberg
cant help you without seeing more code and stack

-igor

On Thu, Oct 7, 2010 at 2:28 PM, Zeldor pgronkiew...@gmail.com wrote:

 Hi,

 I am trying to get through with the very basics of Wicket - radiochoice. But
 somehow I got stuck and all solutions I tried made my problems even worse...
 So, what am I doing wrong?

 I have this code:

 static final ListString NUMBERS = Arrays.asList(new String[] { 1, 2,
 3 });

 private RadioChoiceString rc;

                        {
                        RadioChoiceString rc = new 
 RadioChoiceString(numberRadioChoice, new
 ModelString(), NUMBERS).setSuffix();
                add(rc.setRequired(true));
                        }

 String _numbers = rc.getModelObject();
 System.out.println(_numbers);

 When I submit the form I get:
 NullPointerException

 What am I doing wrong then?
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967576.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: RadioChoice - what's wrong?

2010-10-07 Thread Zeldor

I doubt anything else is needed, it throws NullPointerException at syso
attempt. Rest of the form is working properly - I can of course post more
code, but what would be needed?

Stacktrace is pretty generic too...

org.apache.wicket.RequestCycle logRuntimeException: Method
onFormSubmitted of interface
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
component [MarkupContainer [Component id = registrationForm]] threw an
exception
org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of
interface org.apache.wicket.markup.html.form.IFormSubmitListener
targeted at component [MarkupContainer [Component id =
registrationForm]] threw an exception
...
...
...
Caused by: java.lang.reflect.InvocationTargetException
at 
com.google.appengine.runtime.Request.process-a82d7b755ed3a9dd(Request.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:43)
at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
... 50 more
Caused by: java.lang.NullPointerException
at com.spiritia.auth.Registration$1.onSubmit(Registration.java:186)
at 
org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1538)
at org.apache.wicket.markup.html.form.Form.process(Form.java:934)
at 
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:896)
... 55 more





On Thu, Oct 7, 2010 at 11:51 PM, Igor Vaynberg-2 [via Apache Wicket] 
ml-node+2967607-1764587878-152...@n4.nabble.comml-node%2b2967607-1764587878-152...@n4.nabble.com
 wrote:

 cant help you without seeing more code and stack

 -igor

 On Thu, Oct 7, 2010 at 2:28 PM, Zeldor [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967607i=0
 wrote:

 
  Hi,
 
  I am trying to get through with the very basics of Wicket - radiochoice.
 But
  somehow I got stuck and all solutions I tried made my problems even
 worse...
  So, what am I doing wrong?
 
  I have this code:
 
  static final ListString NUMBERS = Arrays.asList(new String[] { 1,
 2,
  3 });
 
  private RadioChoiceString rc;
 
 {
 RadioChoiceString rc = new
 RadioChoiceString(numberRadioChoice, new
  ModelString(), NUMBERS).setSuffix();
 add(rc.setRequired(true));
 }
 
  String _numbers = rc.getModelObject();
  System.out.println(_numbers);
 
  When I submit the form I get:
  NullPointerException
 
  What am I doing wrong then?
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967576.htmlhttp://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967576.html?by-user=t
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2967607i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2967607i=2
 
 

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967607i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2967607i=4



 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967607.html
 To unsubscribe from RadioChoice - what's wrong?, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=2967576code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwyOTY3NTc2fC0xMTUwMjA4NDM=.




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-what-s-wrong-tp2967576p2967624.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Forms ajax doesn't update components models

2010-10-07 Thread Tito
It was a Wicket 1.5-M1 bug!

I made a quickstart accidentally in wicket 1.5-M2.1 and it worked.

The problem is that wicket 1.5-M2 don't have HeaderContributor anymore haha.

Well thanks for every body, I wanted to warn.
Bye

Tito

2010/10/7 Tito njyt...@gmail.com

 I made a quickstart and it works.

 Now I'm looking for the bug in my application.

 Thanks

 Tito

 2010/10/6 Tito njyt...@gmail.com

 Well thank you!!

 I'm going to see this. If I see another details or if I can solve I will
 tell you.

 Thank you very much for helping!

 Bye


 2010/10/6 vov vov...@mail.ru


 Sorry, but I'm not see the problems.
 Try to debug your isVisible method after submitting the form and find the
 place in which this code return false. I think that
 isVisibleInHierarchy()
 for your RequiredTextFieldString(patente) will have a problem
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.html
 Sent from the Users forum mailing list archive at Nabble.com.

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






Re: multiple html pages to 1 class

2010-10-07 Thread jer...@wickettraining.com

Here is a quickstart that demonstrates two ways of accomplishing this.  These
are the ways that were previously suggested on this thread.  Please open it
and try the following links, and submit the form on each to prove that the
HTML template choice is persisted even after the url becomes unusable:

http://apache-wicket.1842946.n4.nabble.com/file/n2967852/multitemplates.tar.gz
multitemplates.tar.gz 

Jeremy Thomerson
http://www.wickettraining.com
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/multiple-html-pages-to-1-class-tp2717304p2967852.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: multiple html pages to 1 class

2010-10-07 Thread Jeremy Thomerson
I forgot to include the URLs you should try in that quickstart:

http://localhost:8080/example1
http://localhost:8080/example1?template=red
http://localhost:8080/example2
http://localhost:8080/example2?template=red

Here's the link to the quickstart again:
http://apache-wicket.1842946.n4.nabble.com/file/n2967852/multitemplates.tar.gz

Best regards,

-- 
Jeremy Thomerson
http://www.wickettraining.com

On Thu, Oct 7, 2010 at 11:26 PM, jer...@wickettraining.com 
jer...@wickettraining.com wrote:


 Here is a quickstart that demonstrates two ways of accomplishing this.
  These
 are the ways that were previously suggested on this thread.  Please open it
 and try the following links, and submit the form on each to prove that the
 HTML template choice is persisted even after the url becomes unusable:


 http://apache-wicket.1842946.n4.nabble.com/file/n2967852/multitemplates.tar.gz
 multitemplates.tar.gz

 Jeremy Thomerson
 http://www.wickettraining.com
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/multiple-html-pages-to-1-class-tp2717304p2967852.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: RadioChoice - what's wrong?

2010-10-07 Thread Jeremy Thomerson
On Thu, Oct 7, 2010 at 5:04 PM, Zeldor pgronkiew...@gmail.com wrote:

 Caused by: java.lang.NullPointerException
at com.spiritia.auth.Registration$1.onSubmit(Registration.java:186)


The error is obviously at Registration.java:186 - please show us that code
if you can't figure it out.

-- 
Jeremy Thomerson
http://www.wickettraining.com