Re: AjaxPagingNavigation change style

2010-12-14 Thread blauerberg

Ivoneta,

 MyAjaxPagingNavigator extends from my own PagingNavigator subclass. 
 But I have a problem my own class doesn't work...If I clicked to next
 page, the entire page is refresh,

because AjaxPagingNavigationBehavior call onAjaxEvent() only if Navigator
class is AjaxPagingNavigator.class.
I add 'onclick' behavior as below, it seems work fine.


@Override
protected Link? newPagingNavigationIncrementLink(String id, IPageable
pageable, int increment) {
AjaxPagingNavigationIncrementLink link = new
AjaxPagingNavigationIncrementLink(id, pageable, increment);
link.add(new MyAjaxBehavior(link, pageable, onclick) {
@Override
protected void onEvent(AjaxRequestTarget target) {

navigator.onAjaxEvent(target);
}
});
return link;
}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-change-style-tp2297188p3086566.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: [OT] Need Feedback from WicketForge users (IDEA plugin).

2010-12-14 Thread Erik van Oosten

Hi Minas,

Providing code completion for component id's would be great! In particular in 
the java code, slightly less so in markup.


Warnings for unknown component id's in java code would also be a very nice 
feature! It would probably be useful to be able to suppress the warning with a 
comment or annotation. Warnings in the markup are less useful as I often create 
components that infer their component id at run-time from another component. I'd 
hate to have warning suppressing comments in the markup.


Regards,
Erik.


PS. I don't find this OT at all! Anything that helps (many) Wicket developers, 
should be welcome on this list.



Op 13-12-10 02:36, Minas Manthos wrote:

Hi

I plan to make a core change to WicketForge plugin and need some user
feedback. So if you like please follow up to

http://groups.google.com/group/wicketforge/t/f5b0f57d184d6f0f

Since this is not directly wicket related, please do not reply here.

Thanks
Minas.


--
Sent from my SMTP compliant software
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



Re: Asynchronous File Uploads

2010-12-14 Thread exl

Thanks for the suggestion.  Since our Wicket application is presently a
singular page, I can kind of imagine how this could work assuming the
'iframe' is embedded in the outermost part of the HTML (thus lies outside of
any potential AJAX refreshes by Wicket).  It will also mean that we must
stick to this singular page (i.e. no page changes as part of the user
workflow), otherwise I can imagine the 'iframe' would be lost/reset.

So I'm guessing this is how it would work:
- have a form that submits to the separate servlet being embedded in the
hidden iframe
- the fields for that hidden iframe form correspond directly to what the
user is expected to input via a Wicket form
- upon hitting the submit button on the Wicket form, it copies all the
contents of the fields (using JS?) from the Wicket form to the hidden iframe
form
- finally we trigger the submit on the hidden iframe form using JS

It sounds like it has potential, but not as clean/quick to implement as I
was originally hoping for.  Would anyone perchance have already tried this
strategy and got it working?

Kind Regards,
Eric.

-

Eric is learning how to use Wicket and enjoying the experience so far...
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Asynchronous-File-Uploads-tp2541855p3086678.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: UrlRewrite rule and Wicket

2010-12-14 Thread Erik van Oosten

Hi Krzysztof,

Sorry to hear that, I must admit I never thought of testing this with forms. I 
just assumed that the form would have a wicket generated URL and that from that 
point on it would work the normal way.


Regards,
Erik.



Op 02-12-10 16:32, Krzysztof Kowalczyk wrote:

Thank you Erik, the idea is nice, but it does not work ;)

I wanted to implement my own ~ Root Mounting Strategy just when I've
got your email. The idea with overriding getRequestPath sounds good, I
was afraid that I will need to implement my own RequestCycle with
custom logic replacing path.startWith(mountPath()) part.

Unfortunately your solution doesn't seem to play well with forms. When
using the RootWebRequestProcessor pages using HybridUrlCodingStrategy
work on first get request, but after button submit they are redirected
to ?wicket:... page and the state of the page is lost (all values of
fields, no validation errors). I have no idea why it works like that
and does it breaks other strategies.

ps. I had to add
configuration
   webAppConfig
contextPath//contextPath
   /webAppConfig
/configuration
to the POM to make the example run properly with jetty:run. The
default configuration mount the app on /wicket-rootmount-demo so most
of the links does not work.

Regards,
Krzysztof Kowalczyk

On Wed, Dec 1, 2010 at 1:59 PM, Erik van Oostene.vanoos...@grons.nl  wrote:

You can try the approach from
http://blog.jteam.nl/2010/02/24/wicket-root-mounts/

This allows you to install a URL mounter that implements the following
interface:

interface RootMountedUrlCodingStrategy {
  boolean accepts(String rawPath);
}

Regards,
Erik.


Op 30-11-10 11:21, Krzysztof Kowalczyk wrote:

Hi,

We have existing urls in a form:

/long,and,complex,title,id/new_opinion
/long,and,complex,title,id/something

or sometimes

/long,title/id/new_opinion

The links like /long,and,complex,title are managed by fast and
scalable view, and are stateless. Now we are using Wicket in the same
war. It is mounted to /cms.

We are trying to replace forms, that are pure evil in the first
technology with wicket based forms. But we need to keep the links
untouched.

So I created  UrlRewrite (http://www.tuckey.org/urlrewrite/) rules:

urlrewrite use-query-string=true

rule
from^/(.*),(\d+)/new_opinion$/from
to/cms/new_opinion/id/$2/url/$1/to
/rule

rule
from^/(\?wicket.*)/from
to/cms/$1/to
/rule
...


I have a wicket page - that is mounted on /new_opinion with enhanced
HybridUrlCodingStrategy with:
- redirectOnBookmarkableRequest = false

First rule forwards the request to proper place. Wicket gets the
correct requestUri and all the stuff. But the rule does not work if we
have redirectOnBookmarkableRequest = true because Wicket constructs
wrong urls in ServletWebRequest.getRelativePathPrefixToWicketHandler :

if (!Strings.isEmpty(forwardUrl))
{
// If this is an error page, this will be /mount or
/?wicket:foo
relativeUrl = forwardUrl.substring(1);
relativeUrl =
relativeUrl.substring(filterPath.length());
}

before this fragment Wicket has correct link, after this we get:
g,and,complex,title,id/new_opinion, or errors (sometimes the link is
shorter and I get array index out of bounds). If method does not throw
exception it returns wrong number of ../ . Unfortunately
redirectOnBookmarkableRequest = false does not solve the problem as
the second rule catches Wicket that are redirected if they hit
bookmarkable page. So this fragment need to be fixed in order to have
working bookmarkable links with UrlRewrite.

My temporary workaround is custom delegating WebRequest with small hack:

public String getRelativePathPrefixToWicketHandler() {
HttpServletRequest httpRequest = getHttpServletRequest();

String forwardUrl =
(String)httpRequest.getAttribute(javax.servlet.forward.servlet_path);
final String filterPath =
(String)httpRequest.getAttribute(WicketFilter.FILTER_PATH_ATTR);

if (!Strings.isEmpty(forwardUrl))
{
int count = forwardUrl.split(/).length;

String string = ;

for (int i = 1; icount; i++) {
string += ../;
}

return string + filterPath;
}else {
return
wrappedReqest.getRelativePathPrefixToWicketHandler();
}
}

I guess it will not work in all cases though...

If there is a different way of doing url rewriting? If not, I consider
it a bug in Wicket.

Regards,
Krzysztof Kowalczyk


--
Sent from my SMTP compliant software
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



Re: Asynchronous File Uploads

2010-12-14 Thread robert.mcguinness

not sure if this would work, but create another pagemap for your large form
and submit to that (if you are trying to keep everything in the wicket
world).  keep the default pagemap (null) for your short lived requests.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Asynchronous-File-Uploads-tp2541855p3086723.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



How to I get an un-proxied Spring Bean ?

2010-12-14 Thread smallufo
I have a page with such definition :

public class CrudPageT extends Serializable extends WebPage
{
  public CrudPage(PageParameters pps , AbstractDaoT dao)
  {...}
}

and here is how I initialize the page :
CrudPageUser page = new CrudPageUser(pps , userDao);

the userDao is a Spring injected DAO :
@SpringBean private UserDao userDao;

And in fact , UserDao extends Abstract Dao Pattern :
public interface UserDao extends AbstractDaoUser {...}

Here comes the problem :
I want to know which type is passed to CrudPage , I use the code :

ParameterizedType genericSuperclass = (ParameterizedType)
dao.getClass().getGenericSuperclass();
this.clazz = (ClassT) genericSuperclass.getActualTypeArguments()[0];

But it throws exception :
java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

I then print the type :
System.out.println(dao.getClass() =  + dao.getClass());
System.out.println(dao.getClass().getGenericSuperclass() =  +
dao.getClass().getGenericSuperclass());

and found the dao is proxied :
dao.getClass() = class org.apache.wicket.proxy.$Proxy101
dao.getClass().getGenericSuperclass() = class java.lang.reflect.Proxy

Maybe that's why I cannot get the type ...

And ... how to solve the problem ?

Thanks a lot !


Re: How to I get an un-proxied Spring Bean ?

2010-12-14 Thread Pedro Santos
proxyClass.getSuperclass() gives you the dao type

On Tue, Dec 14, 2010 at 8:45 AM, smallufo small...@gmail.com wrote:

 I have a page with such definition :

 public class CrudPageT extends Serializable extends WebPage
 {
  public CrudPage(PageParameters pps , AbstractDaoT dao)
  {...}
 }

 and here is how I initialize the page :
 CrudPageUser page = new CrudPageUser(pps , userDao);

 the userDao is a Spring injected DAO :
 @SpringBean private UserDao userDao;

 And in fact , UserDao extends Abstract Dao Pattern :
 public interface UserDao extends AbstractDaoUser {...}

 Here comes the problem :
 I want to know which type is passed to CrudPage , I use the code :

 ParameterizedType genericSuperclass = (ParameterizedType)
 dao.getClass().getGenericSuperclass();
 this.clazz = (ClassT) genericSuperclass.getActualTypeArguments()[0];

 But it throws exception :
 java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

 I then print the type :
System.out.println(dao.getClass() =  + dao.getClass());
System.out.println(dao.getClass().getGenericSuperclass() =  +
 dao.getClass().getGenericSuperclass());

 and found the dao is proxied :
 dao.getClass() = class org.apache.wicket.proxy.$Proxy101
 dao.getClass().getGenericSuperclass() = class java.lang.reflect.Proxy

 Maybe that's why I cannot get the type ...

 And ... how to solve the problem ?

 Thanks a lot !




-- 
Pedro Henrique Oliveira dos Santos


Re: How to I get an un-proxied Spring Bean ?

2010-12-14 Thread James Carman
You could also have AbstractDao have a method like this:

public T ClassT getEntityType();

I assume you need the type in your DAO when constructing queries, so
you probably already have that set up somewhere.

On Tue, Dec 14, 2010 at 5:45 AM, smallufo small...@gmail.com wrote:
 I have a page with such definition :

 public class CrudPageT extends Serializable extends WebPage
 {
  public CrudPage(PageParameters pps , AbstractDaoT dao)
  {...}
 }

 and here is how I initialize the page :
 CrudPageUser page = new CrudPageUser(pps , userDao);

 the userDao is a Spring injected DAO :
 @SpringBean private UserDao userDao;

 And in fact , UserDao extends Abstract Dao Pattern :
 public interface UserDao extends AbstractDaoUser {...}

 Here comes the problem :
 I want to know which type is passed to CrudPage , I use the code :

 ParameterizedType genericSuperclass = (ParameterizedType)
 dao.getClass().getGenericSuperclass();
 this.clazz = (ClassT) genericSuperclass.getActualTypeArguments()[0];

 But it throws exception :
 java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

 I then print the type :
    System.out.println(dao.getClass() =  + dao.getClass());
    System.out.println(dao.getClass().getGenericSuperclass() =  +
 dao.getClass().getGenericSuperclass());

 and found the dao is proxied :
 dao.getClass() = class org.apache.wicket.proxy.$Proxy101
 dao.getClass().getGenericSuperclass() = class java.lang.reflect.Proxy

 Maybe that's why I cannot get the type ...

 And ... how to solve the problem ?

 Thanks a lot !


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



New lines are trimmed in textarea after ajaxrefresh

2010-12-14 Thread Michał Letyński

Hi.
I have TextArea component with shouldTrimInput() set to false. It has 
AjaxFormComponentUpdatingBehavior(onblur) attached for validating 
purpose. On every update it refresh itself. And after update newline 
from the begining of textarea is trimmed.
I debug wickets up to getReponse().write and everythink looks fine. 
Maybe there is a bug in java script. Is it known problem ?


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



Re: How to I get an un-proxied Spring Bean ?

2010-12-14 Thread smallufo
Hi ,
I tried :
dao.getClass() = class org.apache.wicket.proxy.$Proxy101
dao.getClass().getGenericSuperclass() = class java.lang.reflect.Proxy
dao.getClass().getSuperclass() = class java.lang.reflect.Proxy

But still unable to get the dao class

2010/12/14 Pedro Santos pedros...@gmail.com

 proxyClass.getSuperclass() gives you the dao type




Re: How to I get an un-proxied Spring Bean ?

2010-12-14 Thread Igor Vaynberg
keep calling superclass until its not a proxy

-igor

On Tue, Dec 14, 2010 at 3:28 PM, smallufo small...@gmail.com wrote:
 Hi ,
 I tried :
 dao.getClass() = class org.apache.wicket.proxy.$Proxy101
 dao.getClass().getGenericSuperclass() = class java.lang.reflect.Proxy
 dao.getClass().getSuperclass() = class java.lang.reflect.Proxy

 But still unable to get the dao class

 2010/12/14 Pedro Santos pedros...@gmail.com

 proxyClass.getSuperclass() gives you the dao type




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



Interesting Report from JRebel...

2010-12-14 Thread James Carman
We were listed behind JSF, GWT, Struts 1, Seam, and Struts 2.  But, we
beat out Grails, Stripes, and Tapestry.

http://www.zeroturnaround.com/java-ee-productivity-report-2011/

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



1.5 integer textfield

2010-12-14 Thread nino martinez wael
refreshRateModel = new ModelInteger();

refreshRateModel.setObject(coreDaoService
.getWallboardRefreshTimeInSeconds());

FormString viewerAjaxrefreshRateForm = new FormString(
viewerAjaxrefreshRateForm) {
@Override
protected void onSubmit() {
Integer newRefreshRate = refreshRateModel.getObject();
coreDaoService
.saveWallboardRefreshTimeInSeconds(newRefreshRate);
info(Stored new refresh rate);

}
};

TextFieldInteger refreshRateTextField = new TextFieldInteger(
refreshRate, refreshRateModel);
RangeValidatorInteger rangeValidator = new
RangeValidatorInteger(1,
1800);
refreshRateTextField.add(rangeValidator);
viewerAjaxrefreshRateForm.add(refreshRateTextField);
add(viewerAjaxrefreshRateForm);

when I enter a value I get this exception:

WicketMessage: Exception 'java.lang.ClassCastException:
java.lang.Integer cannot be cast to java.lang.String' occurred during
validation org.apache.wicket.validation.validator.RangeValidator on
component 5:viewerAjaxrefreshRateForm:refreshRate

 Stacktrace

Root cause:

java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.String
 at java.lang.String.compareTo(String.java:92)
 at 
org.apache.wicket.validation.validator.RangeValidator.validate(RangeValidator.java:76)
 at 
org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1445)
 at 
org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1042)
 at org.apache.wicket.markup.html.form.Form$17.validate(Form.java:1833)
 at 
org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:164)
 at 
org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:148)
 at 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:278)
 at 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:267)
 at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:249)
 at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:338)
 at 
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1041)
 at 
org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1825)
 at org.apache.wicket.markup.html.form.Form.validate(Form.java:1805)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:863)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:821)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:786)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:211)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:192)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:173)
 at 
org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:248)
 at org.apache.wicket.protocol.h


Re: 1.5 integer textfield

2010-12-14 Thread Martin Grigorov
Can you try with FormVoid instead of FormString

On Tue, Dec 14, 2010 at 4:12 PM, nino martinez wael 
nino.martinez.w...@gmail.com wrote:

refreshRateModel = new ModelInteger();

refreshRateModel.setObject(coreDaoService
.getWallboardRefreshTimeInSeconds());

FormString viewerAjaxrefreshRateForm = new FormString(
viewerAjaxrefreshRateForm) {
@Override
protected void onSubmit() {
Integer newRefreshRate = refreshRateModel.getObject();
coreDaoService
.saveWallboardRefreshTimeInSeconds(newRefreshRate);
info(Stored new refresh rate);

}
};

TextFieldInteger refreshRateTextField = new TextFieldInteger(
refreshRate, refreshRateModel);
RangeValidatorInteger rangeValidator = new
 RangeValidatorInteger(1,
1800);
refreshRateTextField.add(rangeValidator);
viewerAjaxrefreshRateForm.add(refreshRateTextField);
add(viewerAjaxrefreshRateForm);

 when I enter a value I get this exception:

 WicketMessage: Exception 'java.lang.ClassCastException:
 java.lang.Integer cannot be cast to java.lang.String' occurred during
 validation org.apache.wicket.validation.validator.RangeValidator on
 component 5:viewerAjaxrefreshRateForm:refreshRate

  Stacktrace

 Root cause:

 java.lang.ClassCastException: java.lang.Integer cannot be cast to
 java.lang.String
 at java.lang.String.compareTo(String.java:92)
 at
 org.apache.wicket.validation.validator.RangeValidator.validate(RangeValidator.java:76)
 at
 org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1445)
 at
 org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1042)
 at org.apache.wicket.markup.html.form.Form$17.validate(Form.java:1833)
 at
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:164)
 at
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:148)
 at
 org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:278)
 at
 org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:267)
 at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:249)
 at
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:338)
 at
 org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1041)
 at
 org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1825)
 at org.apache.wicket.markup.html.form.Form.validate(Form.java:1805)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:863)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:821)
 at
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:786)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:211)
 at
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:192)
 at
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:173)
 at
 org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:248)
 at org.apache.wicket.protocol.h



Re: 1.5 integer textfield

2010-12-14 Thread moèz ben rhouma
Hi all,

make sure that the type of refreshRate is Integer.

Thanks
MBR
http://javajeedevelopment.blogspot.com/2010/12/brix-cms-apache-wicket-based-cms.html

2010/12/14 Martin Grigorov mgrigo...@apache.org

 Can you try with FormVoid instead of FormString

 On Tue, Dec 14, 2010 at 4:12 PM, nino martinez wael 
 nino.martinez.w...@gmail.com wrote:

 refreshRateModel = new ModelInteger();
 
 refreshRateModel.setObject(coreDaoService
 .getWallboardRefreshTimeInSeconds());
 
 FormString viewerAjaxrefreshRateForm = new FormString(
 viewerAjaxrefreshRateForm) {
 @Override
 protected void onSubmit() {
 Integer newRefreshRate = refreshRateModel.getObject();
 coreDaoService
 
  .saveWallboardRefreshTimeInSeconds(newRefreshRate);
 info(Stored new refresh rate);
 
 }
 };
 
 TextFieldInteger refreshRateTextField = new TextFieldInteger(
 refreshRate, refreshRateModel);
 RangeValidatorInteger rangeValidator = new
  RangeValidatorInteger(1,
 1800);
 refreshRateTextField.add(rangeValidator);
 viewerAjaxrefreshRateForm.add(refreshRateTextField);
 add(viewerAjaxrefreshRateForm);
 
  when I enter a value I get this exception:
 
  WicketMessage: Exception 'java.lang.ClassCastException:
  java.lang.Integer cannot be cast to java.lang.String' occurred during
  validation org.apache.wicket.validation.validator.RangeValidator on
  component 5:viewerAjaxrefreshRateForm:refreshRate
 
   Stacktrace
 
  Root cause:
 
  java.lang.ClassCastException: java.lang.Integer cannot be cast to
  java.lang.String
  at java.lang.String.compareTo(String.java:92)
  at
 
 org.apache.wicket.validation.validator.RangeValidator.validate(RangeValidator.java:76)
  at
 
 org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1445)
  at
 
 org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1042)
  at
 org.apache.wicket.markup.html.form.Form$17.validate(Form.java:1833)
  at
 
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:164)
  at
 
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:148)
  at
  org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:278)
  at
  org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:267)
  at
 org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:249)
  at
 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:338)
  at
 
 org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1041)
  at
 
 org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1825)
  at org.apache.wicket.markup.html.form.Form.validate(Form.java:1805)
  at org.apache.wicket.markup.html.form.Form.process(Form.java:863)
  at org.apache.wicket.markup.html.form.Form.process(Form.java:821)
  at
  org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:786)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at
 
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:211)
  at
 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:192)
  at
 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:173)
  at
 
 org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:248)
  at org.apache.wicket.protocol.h
 



Re: New lines are trimmed in textarea after ajaxrefresh

2010-12-14 Thread Martin Makundi
Hmmm.. wicket trims strings anyways?

2010/12/14 Michał Letyński mletyn...@consol.pl:
 Hi.
 I have TextArea component with shouldTrimInput() set to false. It has
 AjaxFormComponentUpdatingBehavior(onblur) attached for validating purpose.
 On every update it refresh itself. And after update newline from the
 begining of textarea is trimmed.
 I debug wickets up to getReponse().write and everythink looks fine. Maybe
 there is a bug in java script. Is it known problem ?

 -
 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: 1.5 integer textfield

2010-12-14 Thread Alexander Morozov

refreshRateTextField.setType(Integer.class) should help

PS
Model class (refreshRateModel instance) does not provide type info.
Check IObjectClassAwareModel.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5-integer-textfield-tp3087246p3087489.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: Invalid html rendered with DataTable [ex. empty tfoot element]

2010-12-14 Thread Alexander Morozov

1. create patch and send it to JIRA :)
2. apply transformer behavior to a table component

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Invalid-html-rendered-with-DataTable-ex-empty-tfoot-element-tp3058934p3087508.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: 1.5 integer textfield

2010-12-14 Thread nino martinez wael
Initially it was integer then changed it to string. Will try void

On Dec 14, 2010 4:16 PM, Martin Grigorov mgrigo...@apache.org wrote:
Can you try with FormVoid instead of FormString


On Tue, Dec 14, 2010 at 4:12 PM, nino martinez wael 
nino.martinez.w...@gmail.com wrote:

 re...


Re: 1.5 integer textfield

2010-12-14 Thread nino martinez wael
Refreshrate are integer

On Dec 14, 2010 4:36 PM, moèz ben rhouma benrhouma.m...@gmail.com wrote:
 Hi all,

 make sure that the type of refreshRate is Integer.

 Thanks
 MBR

http://javajeedevelopment.blogspot.com/2010/12/brix-cms-apache-wicket-based-cms.html

 2010/12/14 Martin Grigorov mgrigo...@apache.org

 Can you try with FormVoid instead of FormString

 On Tue, Dec 14, 2010 at 4:12 PM, nino martinez wael 
 nino.martinez.w...@gmail.com wrote:

  refreshRateModel = new ModelInteger();
 
  refreshRateModel.setObject(coreDaoService
  .getWallboardRefreshTimeInSeconds());
 
  FormString viewerAjaxrefreshRateForm = new FormString(
  viewerAjaxrefreshRateForm) {
  @Override
  protected void onSubmit() {
  Integer newRefreshRate = refreshRateModel.getObject();
  coreDaoService
 
 .saveWallboardRefreshTimeInSeconds(newRefreshRate);
  info(Stored new refresh rate);
 
  }
  };
 
  TextFieldInteger refreshRateTextField = new TextFieldInteger(
  refreshRate, refreshRateModel);
  RangeValidatorInteger rangeValidator = new
  RangeValidatorInteger(1,
  1800);
  refreshRateTextField.add(rangeValidator);
  viewerAjaxrefreshRateForm.add(refreshRateTextField);
  add(viewerAjaxrefreshRateForm);
 
  when I enter a value I get this exception:
 
  WicketMessage: Exception 'java.lang.ClassCastException:
  java.lang.Integer cannot be cast to java.lang.String' occurred during
  validation org.apache.wicket.validation.validator.RangeValidator on
  component 5:viewerAjaxrefreshRateForm:refreshRate
 
  Stacktrace
 
  Root cause:
 
  java.lang.ClassCastException: java.lang.Integer cannot be cast to
  java.lang.String
  at java.lang.String.compareTo(String.java:92)
  at
 

org.apache.wicket.validation.validator.RangeValidator.validate(RangeValidator.java:76)
  at
 

org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1445)
  at
 

org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1042)
  at
 org.apache.wicket.markup.html.form.Form$17.validate(Form.java:1833)
  at
 

org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:164)
  at
 

org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:148)
  at
 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:278)
  at
 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:267)
  at
 org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:249)
  at
 

org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:338)
  at
 

org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1041)
  at
 

org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1825)
  at org.apache.wicket.markup.html.form.Form.validate(Form.java:1805)
  at org.apache.wicket.markup.html.form.Form.process(Form.java:863)
  at org.apache.wicket.markup.html.form.Form.process(Form.java:821)
  at
  org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:786)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at
 

org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:211)
  at
 

org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:192)
  at
 

org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:173)
  at
 

org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84)
  at
 

org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
  at
 

org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:248)
  at org.apache.wicket.protocol.h
 



implements ETags in my Wicket application

2010-12-14 Thread andrea.castello

Hi everybody,

I'd like to implement a mechanism of ETags in my wicket application.
What I would like to achieve is to avoid rendering of wicket model
components if it's not necessary.

In order to do this I'll keep a registry of modified elements and render
them only if they are changed.

What I'd like to know is exactly where, in the Wicket structure, the Java
model is transformed into the actual markup. 

Thank you in advance,

Andrea C.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/implements-ETags-in-my-Wicket-application-tp3087576p3087576.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



Form.isMultiPart - Visitor not checking for IFormVisitorParticipant

2010-12-14 Thread Daniel Soneira

Hi there,

In the private method Form#isMultiPart the visitor algorithm does not 
check for components that implement IFormVisitorParticipant.


Here is my use case (I've been debugging quite some time to find the 
source of recent problems I've encountered):


Within a form I have a nested In-Method PagingNavigator (with a 
read-only text field) that returns FALSE for 
IFormVisitorParticipant#processChildren.
Also the grid uses some filtering criteria that the user can change 
(some text fields - also children of the form).


Hierarchy:
--
form
 -- filter
   -- criteria-1...x
 -- grid
   -- paging-toolbar
  -- paging-navigator [IFormVisitorParticipant - processChildren() 
returns false]

 -- text-field
 -- search-button
--
When the form is submitted (via SEARCH button) the following happens:

Form#isMultiPart() tries to determine if that text field is visible in 
the hierarchy; which at some time (through recursion) asks the toolbar. 
The paging-toolbar contains the following code:


--
@Override
public boolean isVisible() {
return getDataGrid().getTotalRowCount() != 0;
}

--
This queries the data provider which at that point can not use the 
current filtering criteria - because they are not submitted yet. 
Therefore the results in the grid are wrong.
The text field is ignored for validation / updating of the model. That 
works as expected.
In my option the text-field should not be visited at all since its 
parent (navigator) specifies otherwise.


Note, that prior to wicket 1.4.12 I didn't have this problem (I was 
using 1.4.10 before where there is no check for visibleInHierarchy in 
Form#isMultiPart).
I've looked at the source code of Form#isMultiPart in 1.4.14 and 1.5.M3 
and both seem to be the same.


Should I create a JIRA issue for that (I think it's a bug) or is there 
an easy workaround that I miss?


Kind regards,
Daniel Soneira

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



Re: Invalid html rendered with DataTable [ex. empty tfoot element]

2010-12-14 Thread Martin Grigorov
Here is the patch:

diff --git
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html
b/wicket-extensions/src/main/java/org/apache/wicket/ext
index 8b3ab5b..f19673f 100644
---
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html
+++
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html
@@ -17,12 +17,16 @@
 --
 wicket:panel

+wicket:enclosure child=topToolbars
 thead
wicket:container wicket:id=topToolbars/wicket:container
 /thead
+/wicket:enclosure
+wicket:enclosure child=bottomToolbars
 tfoot
wicket:container wicket:id=bottomToolbars/wicket:container
 /tfoot
+/wicket:enclosure
 tbody wicket:id=body
tr wicket:id=rows
td wicket:id=cells
diff --git
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java
b/wicket-extensions/src/main/java/org/apache/wicket/ext
index 440c466..9cc1e50 100644
---
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java
+++
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java
@@ -455,5 +455,14 @@ public class DataTableT extends Panel implements
IPageableItems
{
super(id);
}
+
+   @Override
+   public void onConfigure()
+   {
+   super.onConfigure();
+   setVisible(iterator().hasNext());
+   }
+
+
}
 }

Please try it and if it works for you then I'll apply it.

On Tue, Dec 14, 2010 at 6:00 PM, Alexander Morozov 
alexander.v.moro...@gmail.com wrote:


 1. create patch and send it to JIRA :)
 2. apply transformer behavior to a table component

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Invalid-html-rendered-with-DataTable-ex-empty-tfoot-element-tp3058934p3087508.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: Form.isMultiPart - Visitor not checking for IFormVisitorParticipant

2010-12-14 Thread Pedro Santos
use the onConfigure to set the paging-toolbar

onConfigure(){
setVisible( getDataGrid().getTotalRowCount() != 0);
}

On Tue, Dec 14, 2010 at 3:39 PM, Daniel Soneira
daniel.sone...@joyn-it.atwrote:

 Hi there,

 In the private method Form#isMultiPart the visitor algorithm does not check
 for components that implement IFormVisitorParticipant.

 Here is my use case (I've been debugging quite some time to find the source
 of recent problems I've encountered):

 Within a form I have a nested In-Method PagingNavigator (with a read-only
 text field) that returns FALSE for IFormVisitorParticipant#processChildren.
 Also the grid uses some filtering criteria that the user can change (some
 text fields - also children of the form).

 Hierarchy:

 --
 form
  -- filter
   -- criteria-1...x
  -- grid
   -- paging-toolbar
  -- paging-navigator [IFormVisitorParticipant - processChildren()
 returns false]
 -- text-field
  -- search-button

 --
 When the form is submitted (via SEARCH button) the following happens:

 Form#isMultiPart() tries to determine if that text field is visible in the
 hierarchy; which at some time (through recursion) asks the toolbar. The
 paging-toolbar contains the following code:


 --
@Override
public boolean isVisible() {
return getDataGrid().getTotalRowCount() != 0;
}


 --
 This queries the data provider which at that point can not use the current
 filtering criteria - because they are not submitted yet. Therefore the
 results in the grid are wrong.
 The text field is ignored for validation / updating of the model. That
 works as expected.
 In my option the text-field should not be visited at all since its parent
 (navigator) specifies otherwise.

 Note, that prior to wicket 1.4.12 I didn't have this problem (I was using
 1.4.10 before where there is no check for visibleInHierarchy in
 Form#isMultiPart).
 I've looked at the source code of Form#isMultiPart in 1.4.14 and 1.5.M3 and
 both seem to be the same.

 Should I create a JIRA issue for that (I think it's a bug) or is there an
 easy workaround that I miss?

 Kind regards,
 Daniel Soneira

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




-- 
Pedro Henrique Oliveira dos Santos


Re: Form.isMultiPart - Visitor not checking for IFormVisitorParticipant

2010-12-14 Thread Daniel Soneira

PagingToolbar is not my code.
It's a class of inmethod-grid (wicketstuff project). So I have no 
influence on that. That's what I would do if it _was_ my code though ;)
Maybe inmethod-grid adapts the new onConfigure / onInitialize methods. 
I'm currently using 1.4.1 which I _think_ is the latest official release.


On 14.12.2010 18:52, Pedro Santos wrote:

use the onConfigure to set the paging-toolbar

onConfigure(){
setVisible( getDataGrid().getTotalRowCount() != 0);
}

On Tue, Dec 14, 2010 at 3:39 PM, Daniel Soneira
daniel.sone...@joyn-it.atwrote:


Hi there,

In the private method Form#isMultiPart the visitor algorithm does not check
for components that implement IFormVisitorParticipant.

Here is my use case (I've been debugging quite some time to find the source
of recent problems I've encountered):

Within a form I have a nested In-Method PagingNavigator (with a read-only
text field) that returns FALSE for IFormVisitorParticipant#processChildren.
Also the grid uses some filtering criteria that the user can change (some
text fields - also children of the form).

Hierarchy:

--
form
  -- filter
   -- criteria-1...x
  -- grid
   -- paging-toolbar
  -- paging-navigator [IFormVisitorParticipant -  processChildren()
returns false]
 -- text-field
  -- search-button

--
When the form is submitted (via SEARCH button) the following happens:

Form#isMultiPart() tries to determine if that text field is visible in the
hierarchy; which at some time (through recursion) asks the toolbar. The
paging-toolbar contains the following code:


--
@Override
public boolean isVisible() {
return getDataGrid().getTotalRowCount() != 0;
}


--
This queries the data provider which at that point can not use the current
filtering criteria - because they are not submitted yet. Therefore the
results in the grid are wrong.
The text field is ignored for validation / updating of the model. That
works as expected.
In my option the text-field should not be visited at all since its parent
(navigator) specifies otherwise.

Note, that prior to wicket 1.4.12 I didn't have this problem (I was using
1.4.10 before where there is no check for visibleInHierarchy in
Form#isMultiPart).
I've looked at the source code of Form#isMultiPart in 1.4.14 and 1.5.M3 and
both seem to be the same.

Should I create a JIRA issue for that (I think it's a bug) or is there an
easy workaround that I miss?

Kind regards,
Daniel Soneira

-
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: Form.isMultiPart - Visitor not checking for IFormVisitorParticipant

2010-12-14 Thread Pedro Santos
ops, I miss that, can u send a quickstart? The last version is 1.4.14, you
can use

dependency
groupIdorg.wicketstuff/groupId
artifactIdinmethod-grid/artifactId
version1.4.14/version
/dependency



On Tue, Dec 14, 2010 at 4:12 PM, Daniel Soneira
daniel.sone...@joyn-it.atwrote:

 PagingToolbar is not my code.
 It's a class of inmethod-grid (wicketstuff project). So I have no influence
 on that. That's what I would do if it _was_ my code though ;)
 Maybe inmethod-grid adapts the new onConfigure / onInitialize methods. I'm
 currently using 1.4.1 which I _think_ is the latest official release.


 On 14.12.2010 18:52, Pedro Santos wrote:

 use the onConfigure to set the paging-toolbar

 onConfigure(){
 setVisible( getDataGrid().getTotalRowCount() != 0);
 }

 On Tue, Dec 14, 2010 at 3:39 PM, Daniel Soneira
 daniel.sone...@joyn-it.atwrote:

  Hi there,

 In the private method Form#isMultiPart the visitor algorithm does not
 check
 for components that implement IFormVisitorParticipant.

 Here is my use case (I've been debugging quite some time to find the
 source
 of recent problems I've encountered):

 Within a form I have a nested In-Method PagingNavigator (with a read-only
 text field) that returns FALSE for
 IFormVisitorParticipant#processChildren.
 Also the grid uses some filtering criteria that the user can change (some
 text fields - also children of the form).

 Hierarchy:


 --
 form
  -- filter
   -- criteria-1...x
  -- grid
   -- paging-toolbar
  -- paging-navigator [IFormVisitorParticipant -  processChildren()
 returns false]
 -- text-field
  -- search-button


 --
 When the form is submitted (via SEARCH button) the following happens:

 Form#isMultiPart() tries to determine if that text field is visible in
 the
 hierarchy; which at some time (through recursion) asks the toolbar. The
 paging-toolbar contains the following code:



 --
@Override
public boolean isVisible() {
return getDataGrid().getTotalRowCount() != 0;
}



 --
 This queries the data provider which at that point can not use the
 current
 filtering criteria - because they are not submitted yet. Therefore the
 results in the grid are wrong.
 The text field is ignored for validation / updating of the model. That
 works as expected.
 In my option the text-field should not be visited at all since its parent
 (navigator) specifies otherwise.

 Note, that prior to wicket 1.4.12 I didn't have this problem (I was using
 1.4.10 before where there is no check for visibleInHierarchy in
 Form#isMultiPart).
 I've looked at the source code of Form#isMultiPart in 1.4.14 and 1.5.M3
 and
 both seem to be the same.

 Should I create a JIRA issue for that (I think it's a bug) or is there an
 easy workaround that I miss?

 Kind regards,
 Daniel Soneira

 -
 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




-- 
Pedro Henrique Oliveira dos Santos


Re: Form.isMultiPart - Visitor not checking for IFormVisitorParticipant

2010-12-14 Thread Daniel Soneira

I'll try to put a quickstart together tomorrow.

I'm not really using maven in my tool chain (ant guy) so I get the 
binary releases from here:


http://wicketstuff.org/maven/repository/

On 14.12.2010 19:21, Pedro Santos wrote:

ops, I miss that, can u send a quickstart? The last version is 1.4.14, you
can use

dependency
 groupIdorg.wicketstuff/groupId
 artifactIdinmethod-grid/artifactId
 version1.4.14/version
/dependency



On Tue, Dec 14, 2010 at 4:12 PM, Daniel Soneira
daniel.sone...@joyn-it.atwrote:


PagingToolbar is not my code.
It's a class of inmethod-grid (wicketstuff project). So I have no influence
on that. That's what I would do if it _was_ my code though ;)
Maybe inmethod-grid adapts the new onConfigure / onInitialize methods. I'm
currently using 1.4.1 which I _think_ is the latest official release.


On 14.12.2010 18:52, Pedro Santos wrote:


use the onConfigure to set the paging-toolbar

onConfigure(){
setVisible( getDataGrid().getTotalRowCount() != 0);
}

On Tue, Dec 14, 2010 at 3:39 PM, Daniel Soneira
daniel.sone...@joyn-it.atwrote:

  Hi there,

In the private method Form#isMultiPart the visitor algorithm does not
check
for components that implement IFormVisitorParticipant.

Here is my use case (I've been debugging quite some time to find the
source
of recent problems I've encountered):

Within a form I have a nested In-Method PagingNavigator (with a read-only
text field) that returns FALSE for
IFormVisitorParticipant#processChildren.
Also the grid uses some filtering criteria that the user can change (some
text fields - also children of the form).

Hierarchy:


--
form
  -- filter
   -- criteria-1...x
  -- grid
   -- paging-toolbar
  -- paging-navigator [IFormVisitorParticipant -   processChildren()
returns false]
 -- text-field
  -- search-button


--
When the form is submitted (via SEARCH button) the following happens:

Form#isMultiPart() tries to determine if that text field is visible in
the
hierarchy; which at some time (through recursion) asks the toolbar. The
paging-toolbar contains the following code:



--
@Override
public boolean isVisible() {
return getDataGrid().getTotalRowCount() != 0;
}



--
This queries the data provider which at that point can not use the
current
filtering criteria - because they are not submitted yet. Therefore the
results in the grid are wrong.
The text field is ignored for validation / updating of the model. That
works as expected.
In my option the text-field should not be visited at all since its parent
(navigator) specifies otherwise.

Note, that prior to wicket 1.4.12 I didn't have this problem (I was using
1.4.10 before where there is no check for visibleInHierarchy in
Form#isMultiPart).
I've looked at the source code of Form#isMultiPart in 1.4.14 and 1.5.M3
and
both seem to be the same.

Should I create a JIRA issue for that (I think it's a bug) or is there an
easy workaround that I miss?

Kind regards,
Daniel Soneira

-
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: Form.isMultiPart - Visitor not checking for IFormVisitorParticipant

2010-12-14 Thread Pedro Santos
you can get the jar at:
http://repo1.maven.org/maven2/org/wicketstuff/inmethod-grid/1.4.14/

On Tue, Dec 14, 2010 at 4:37 PM, Daniel Soneira
daniel.sone...@joyn-it.atwrote:

 I'll try to put a quickstart together tomorrow.

 I'm not really using maven in my tool chain (ant guy) so I get the binary
 releases from here:

 http://wicketstuff.org/maven/repository/


 On 14.12.2010 19:21, Pedro Santos wrote:

 ops, I miss that, can u send a quickstart? The last version is 1.4.14, you
 can use

 dependency
 groupIdorg.wicketstuff/groupId
 artifactIdinmethod-grid/artifactId
 version1.4.14/version
 /dependency



 On Tue, Dec 14, 2010 at 4:12 PM, Daniel Soneira
 daniel.sone...@joyn-it.atwrote:

  PagingToolbar is not my code.
 It's a class of inmethod-grid (wicketstuff project). So I have no
 influence
 on that. That's what I would do if it _was_ my code though ;)
 Maybe inmethod-grid adapts the new onConfigure / onInitialize methods.
 I'm
 currently using 1.4.1 which I _think_ is the latest official release.


 On 14.12.2010 18:52, Pedro Santos wrote:

  use the onConfigure to set the paging-toolbar

 onConfigure(){
 setVisible( getDataGrid().getTotalRowCount() != 0);
 }

 On Tue, Dec 14, 2010 at 3:39 PM, Daniel Soneira
 daniel.sone...@joyn-it.atwrote:

  Hi there,

 In the private method Form#isMultiPart the visitor algorithm does not
 check
 for components that implement IFormVisitorParticipant.

 Here is my use case (I've been debugging quite some time to find the
 source
 of recent problems I've encountered):

 Within a form I have a nested In-Method PagingNavigator (with a
 read-only
 text field) that returns FALSE for
 IFormVisitorParticipant#processChildren.
 Also the grid uses some filtering criteria that the user can change
 (some
 text fields - also children of the form).

 Hierarchy:



 --
 form
  -- filter
   -- criteria-1...x
  -- grid
   -- paging-toolbar
  -- paging-navigator [IFormVisitorParticipant -
 processChildren()
 returns false]
 -- text-field
  -- search-button



 --
 When the form is submitted (via SEARCH button) the following happens:

 Form#isMultiPart() tries to determine if that text field is visible in
 the
 hierarchy; which at some time (through recursion) asks the toolbar. The
 paging-toolbar contains the following code:




 --
@Override
public boolean isVisible() {
return getDataGrid().getTotalRowCount() != 0;
}




 --
 This queries the data provider which at that point can not use the
 current
 filtering criteria - because they are not submitted yet. Therefore the
 results in the grid are wrong.
 The text field is ignored for validation / updating of the model. That
 works as expected.
 In my option the text-field should not be visited at all since its
 parent
 (navigator) specifies otherwise.

 Note, that prior to wicket 1.4.12 I didn't have this problem (I was
 using
 1.4.10 before where there is no check for visibleInHierarchy in
 Form#isMultiPart).
 I've looked at the source code of Form#isMultiPart in 1.4.14 and 1.5.M3
 and
 both seem to be the same.

 Should I create a JIRA issue for that (I think it's a bug) or is there
 an
 easy workaround that I miss?

 Kind regards,
 Daniel Soneira

 -
 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




-- 
Pedro Henrique Oliveira dos Santos


Re: How to listen for CHILD ajax form submits

2010-12-14 Thread guydog28

Anyone?  Abstract:  I have extended WiQuery Dialog with our own custom
dialog.  I want the MyDialog to know if any child components are a Form,
being submitted via AJAX (AjaxFormSubmitBehavior).  I need access to the
AjaxRequestTarget created by that ajax form submit so I can append
javascript to it or add components.  I'm really hoping someone has a
suggestion that I missed.  This is a major blocker for us right now.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-listen-for-CHILD-ajax-form-submits-tp3086439p3087882.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: Interesting Report from JRebel...

2010-12-14 Thread Eelco Hillenius
More shocking to me is that so little bit know about Guice (well, this
actually is also my experience interviewing potential job candidates).
People are really missing something good.

Eelco

On Tue, Dec 14, 2010 at 6:33 AM, James Carman
ja...@carmanconsulting.com wrote:
 We were listed behind JSF, GWT, Struts 1, Seam, and Struts 2.  But, we
 beat out Grails, Stripes, and Tapestry.

 http://www.zeroturnaround.com/java-ee-productivity-report-2011/

 -
 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: Form.isMultiPart - Visitor not checking for IFormVisitorParticipant

2010-12-14 Thread Pedro Santos
I changed the PagingToolbar to set the visibility at onConfigure to avoid
early initialize the QueryResult.
You can test on the next snapshot from now at
http://oss.sonatype.org/content/repositories/snapshots/org/wicketstuff/inmethod-grid/1.4.15-SNAPSHOT/

On Tue, Dec 14, 2010 at 4:40 PM, Pedro Santos pedros...@gmail.com wrote:

 you can get the jar at:
 http://repo1.maven.org/maven2/org/wicketstuff/inmethod-grid/1.4.14/


 On Tue, Dec 14, 2010 at 4:37 PM, Daniel Soneira daniel.sone...@joyn-it.at
  wrote:

 I'll try to put a quickstart together tomorrow.

 I'm not really using maven in my tool chain (ant guy) so I get the binary
 releases from here:

 http://wicketstuff.org/maven/repository/


 On 14.12.2010 19:21, Pedro Santos wrote:

 ops, I miss that, can u send a quickstart? The last version is 1.4.14,
 you
 can use

 dependency
 groupIdorg.wicketstuff/groupId
 artifactIdinmethod-grid/artifactId
 version1.4.14/version
 /dependency



 On Tue, Dec 14, 2010 at 4:12 PM, Daniel Soneira
 daniel.sone...@joyn-it.atwrote:

  PagingToolbar is not my code.
 It's a class of inmethod-grid (wicketstuff project). So I have no
 influence
 on that. That's what I would do if it _was_ my code though ;)
 Maybe inmethod-grid adapts the new onConfigure / onInitialize methods.
 I'm
 currently using 1.4.1 which I _think_ is the latest official release.


 On 14.12.2010 18:52, Pedro Santos wrote:

  use the onConfigure to set the paging-toolbar

 onConfigure(){
 setVisible( getDataGrid().getTotalRowCount() != 0);
 }

 On Tue, Dec 14, 2010 at 3:39 PM, Daniel Soneira
 daniel.sone...@joyn-it.atwrote:

  Hi there,

 In the private method Form#isMultiPart the visitor algorithm does not
 check
 for components that implement IFormVisitorParticipant.

 Here is my use case (I've been debugging quite some time to find the
 source
 of recent problems I've encountered):

 Within a form I have a nested In-Method PagingNavigator (with a
 read-only
 text field) that returns FALSE for
 IFormVisitorParticipant#processChildren.
 Also the grid uses some filtering criteria that the user can change
 (some
 text fields - also children of the form).

 Hierarchy:



 --
 form
  -- filter
   -- criteria-1...x
  -- grid
   -- paging-toolbar
  -- paging-navigator [IFormVisitorParticipant -
 processChildren()
 returns false]
 -- text-field
  -- search-button



 --
 When the form is submitted (via SEARCH button) the following happens:

 Form#isMultiPart() tries to determine if that text field is visible in
 the
 hierarchy; which at some time (through recursion) asks the toolbar.
 The
 paging-toolbar contains the following code:




 --
@Override
public boolean isVisible() {
return getDataGrid().getTotalRowCount() != 0;
}




 --
 This queries the data provider which at that point can not use the
 current
 filtering criteria - because they are not submitted yet. Therefore the
 results in the grid are wrong.
 The text field is ignored for validation / updating of the model. That
 works as expected.
 In my option the text-field should not be visited at all since its
 parent
 (navigator) specifies otherwise.

 Note, that prior to wicket 1.4.12 I didn't have this problem (I was
 using
 1.4.10 before where there is no check for visibleInHierarchy in
 Form#isMultiPart).
 I've looked at the source code of Form#isMultiPart in 1.4.14 and
 1.5.M3
 and
 both seem to be the same.

 Should I create a JIRA issue for that (I think it's a bug) or is there
 an
 easy workaround that I miss?

 Kind regards,
 Daniel Soneira

 -
 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




 --
 Pedro Henrique Oliveira dos Santos




-- 
Pedro Henrique Oliveira dos Santos


donot show busy indicator for lAjaxaLazyLoading

2010-12-14 Thread fachhoch

I added this simple  java script to showLoading ,


function wicketGlobalPreCallHandler() {
  //alert('Before ajax call');
  jQuery('#page').showLoading(
{
'addClass': 'loading-indicator-bars'

}
  );
  
}
function wicketGlobalPostCallHandler() {
  //alert('ajax response ready');
  jQuery('#page').hideLoading();
}
function wicketGlobalFailureHandler() {
  //alert('connection error');
  jQuery('#page').hideLoading();
}



I am using jquery   to showLoading , this works well , I need this
showLoading to appear only for user initiated ajax requests that is when
user clicks on a link  or submits a form etc and not in cases where
Ajaxlazyloading component  is loading or ajaxtimercomponent  is updating  or
a wicket-push request is updating some component etc ,Please suggest me is
there any  way I can identify that the ajaxrequest is for lazyloading or
timer or wicket-push and not user initiated in the method  
function wicketGlobalPreCallHandler()  so that I will not call  
jQuery('#page').showLoading 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/donot-show-busy-indicator-for-lAjaxaLazyLoading-tp3088009p3088009.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



Detach() explanation

2010-12-14 Thread kumar

Hi everyone,

can I get an example how to implement the detach() method ? can someone
please post a detailed example ?
why and in which cases implementing detach() is important ?

thanks. 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Detach-explanation-tp3083568p3083568.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: resource for href=...

2010-12-14 Thread Zilvinas Vilutis
If you would open this http://pastebin.com/XCpcgLzC once again and
look at the getImageUrl() method - you'll find your answer.

Regards


Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



2010/12/14 Ladislav DANKO em...@1ac0.net:
 The question is how to convert file path (photos/img01.jpg) into
 wicket url (resources/eu.test.PhotoRepeater/photos/img01.jpg)?

 Constructor for Image do this when I call Image(image, path)
 but not so for Link.

 I check link you provide for me but not found the answer :-(



 -Original Message-
 From: Zilvinas Vilutis [mailto:cika...@gmail.com]
 Sent: Tuesday, December 14, 2010 1:42 AM
 To: users@wicket.apache.org
 Subject: Re: resource for href=...

 Why don't you just check-out the source code of wicket lightbox:
 http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuf
 f-lightbox
 to check how it's done there once you decided to write your own one...

 Regards

 Žilvinas Vilutis

 Mobile:   (+370) 652 38353
 E-mail:   cika...@gmail.com



 2010/12/13 Ladislav DANKO em...@1ac0.net:
  It is link for lightbox so it will know where the image for
 display is.
 
  Laco
 
 
  -Original Message-
  From: jcar...@carmanconsulting.com
  [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman
  Sent: Monday, December 13, 2010 2:24 PM
  To: users@wicket.apache.org
  Subject: Re: resource for href=...
 
  What do you want it to do when you click it?
 
  2010/12/13 Ladislav DANKO em...@1ac0.net:
   No, I don't need to download it, what I need is right
 path in href
   attribute in anchor html tag as is in img html tag (created
  as new Image).
  
  
   -Original Message-
   From: jcar...@carmanconsulting.com
   [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman
   Sent: Monday, December 13, 2010 12:13 AM
   To: users@wicket.apache.org
   Subject: Re: resource for href=...
  
   You want it to download the image?  Try DownloadLink.
  
   On Sun, Dec 12, 2010 at 6:02 PM, Ladislav DANKO em...@1ac0.net
   wrote:
Hi guys,
   
another question -have code (PhotoRepeater extends
 Panel, view
is
RepeatingView):
...
String compID = view.newChildId(); PhotoRepeater
 clickableImg =
new PhotoRepeater(compID); clickableImg.add(new
ExternalLink(fotoPath, path).add(new Image(image,
 path)));
view.add(clickableImg);
  this.add(view); ..
   
and markup:
wicket:panel
       a wicket:id=fotoPath title=
 rel=lightbox[svatebni]
href=#
               img wicket:id=image width=90px
  border=2px /
       /a
/wicket:panel
   
It works, but in final markup there is:
a href=photo/01_sv_76.jpg rel=lightbox[test] title=
       img border=2px width=90px
   
  src=resources/eu.testApp.MyPagePhotoRepeater/phfoto/01_sv_76.jpg/

/a
   
so image is shown (right path to image resource) but not
  clickable
(wrong path). I'm using ExternalLink in wrong way but I
   don't know the
right way. Can you help me gyus, please?
   
Laco
   
   
   
  
 
 -
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
 
 
 
 
 
 -
  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: Invoke Validators manually, in arbitrary places (e.g. Ajax)

2010-12-14 Thread Zilvinas Vilutis
That was accurate :)

Thank you!

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Mon, Dec 13, 2010 at 10:02 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 formcomponent.validate()

 -igor

 On Mon, Dec 13, 2010 at 6:56 PM, Zilvinas Vilutis cika...@gmail.com wrote:
 That's probably already popular topic, but I'll ask that question
 again ( please point me to the existing thread if you're aware of this
 question )

 Is there any way to validate only one form component at a time and
 return the results to UI ( ajax )?

 Thank you!

 Žilvinas Vilutis

 Mobile:   (+370) 652 38353
 E-mail:   cika...@gmail.com



 On Mon, Dec 13, 2010 at 9:36 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 after you call it call form.haserrors() or form.isvalid() or something 
 similar

 -igor

 On Mon, Dec 13, 2010 at 6:29 PM, eugenebalt eugeneb...@yahoo.com wrote:

 Thanks Igor. That method is a void. Is it possible to get some kind of a
 boolean result from form.validate() to indicate success/failure?
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Invoke-Validators-manually-in-arbitrary-places-e-g-Ajax-tp3085646p3085680.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



 -
 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



maybe this authorization strategy helps someone

2010-12-14 Thread Jim Pinkham
I needed to authorize some pages not just by annotation but also based on
PageParameters.

I came up with this:

App.init()


((CompoundAuthorizationStrategy)getSecuritySettings().getAuthorizationStrategy())
.add(new RequiresRolesUnlessAdminAuthorizationStrategy(new
Roles(ADMIN)));

public interface IRequiresRole
{
Roles requiresRoles();
}

public class ProfilePage extends MyWebPage implements IRequiresRole
{
private String id;
public ProfilePage(PageParameters p) {
id = p.get(id).toString();
}
public Roles requiresRoles() {
return new Roles(id);   // I'm just using the id as a role for
testing but you can lookup your object and see what roles it needs here
}
}

And the fun one:

public class RequiresRolesUnlessAdminAuthorizationStrategy implements
IAuthorizationStrategy {

private Roles alwaysAllow;

public RequiresRolesUnlessAdminAuthorizationStrategy(Roles alwaysAllow)
{
this.alwaysAllow = alwaysAllow;
}

public boolean isActionAuthorized(Component component, Action action) {
if (component instanceof IRequiresRole)
{
Roles r = ((IRequiresRole) component).requiresRoles();
return AuthenticatedWebSession.get().isSignedIn() 
(
AuthenticatedWebSession.get().getRoles().hasAllRoles(r)
||
(alwaysAllow != null 
AuthenticatedWebSession.get().getRoles().hasAnyRole(alwaysAllow))
);
}
return true;
}

public T extends IRequestableComponent boolean
isInstantiationAuthorized(
ClassT componentClass) {
return true;
}
}

So if you are ADMIN you can do anything, otherwise you need whatever role
corresponds to object identified by the PageParameter id.

Am I re-inventing someone's wheel here, or does this sound good?

Thanks,
-- Jim.


Re: [OT] Plugin WicketForge 0.8.1 available for IDEA 9+

2010-12-14 Thread Brian Topping
I was finally able to download the new version of WicketForge today (along with 
some other plugins) since IntelliJ recently updated their caches.

Minas, the results are beautiful.  ~minas++ !!!

:B

On Dec 1, 2010, at 5:59 PM, Minas Manthos wrote:

 
 Thanks guys! I'm glad you like it... It's nice to get some positive
 feedback... :-)
 
 PS: ok, next time i will post it as [ANN] ;-)
 
 -- 
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/OT-Plugin-WicketForge-0-8-1-available-for-IDEA-9-tp3066018p3068223.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



how to validate a ListView?

2010-12-14 Thread rolandpeng

Hi,
I've a Listview and the content of list is selected by a modal window.
The content of list should be validate to be required.
I've tried to create a custom validator , but I have no idea how to bind the
validator to the Listview.
Is it possible to validate the Listview as required before on submit?

Any adivce would be appreciated.Thank you.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-validate-a-ListView-tp3088381p3088381.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 validate a ListView?

2010-12-14 Thread Alexander Morozov

You cant add IValidator to a ListView because it is not a FormComponent. You
can:
1. check ListView.getList() within Form.onSubmit() and call form.error(...)
if list is empty
2. create a form validator based on AbstractFormValidator and add it to the
form component

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-validate-a-ListView-tp3088381p3088394.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: [OT] Plugin WicketForge 0.8.1 available for IDEA 9+

2010-12-14 Thread Nick Heudecker
He's really been doing a great job with it.

On Tue, Dec 14, 2010 at 6:49 PM, Brian Topping topp...@codehaus.org wrote:

 I was finally able to download the new version of WicketForge today (along
 with some other plugins) since IntelliJ recently updated their caches.

 Minas, the results are beautiful.  ~minas++ !!!

 :B

 On Dec 1, 2010, at 5:59 PM, Minas Manthos wrote:

 
  Thanks guys! I'm glad you like it... It's nice to get some positive
  feedback... :-)
 
  PS: ok, next time i will post it as [ANN] ;-)
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/OT-Plugin-WicketForge-0-8-1-available-for-IDEA-9-tp3066018p3068223.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




wicket global call handlers

2010-12-14 Thread fachhoch

I am using wicket call handlers   to  identify when   ajax request started ,
ended, failed etc.
Please tell me if it is possible to get more information about the ajax
request like componenet which made ajaxreqest or anything about the
component   its class, its attributes  etc?



function wicketGlobalPreCallHandler() {
  
  
}
function wicketGlobalPostCallHandler() {
  
}
function wicketGlobalFailureHandler() {
  
}

 


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-global-call-handlers-tp3088445p3088445.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: [OT] Plugin WicketForge 0.8.1 available for IDEA 9+

2010-12-14 Thread Brian Topping
Well, he couldn't have done it without you.  Cheers to both of you guys :-)

On Dec 14, 2010, at 11:22 PM, Nick Heudecker wrote:

 He's really been doing a great job with it.
 
 On Tue, Dec 14, 2010 at 6:49 PM, Brian Topping topp...@codehaus.org wrote:
 
 I was finally able to download the new version of WicketForge today (along
 with some other plugins) since IntelliJ recently updated their caches.
 
 Minas, the results are beautiful.  ~minas++ !!!
 
 :B
 
 On Dec 1, 2010, at 5:59 PM, Minas Manthos wrote:
 
 
 Thanks guys! I'm glad you like it... It's nice to get some positive
 feedback... :-)
 
 PS: ok, next time i will post it as [ANN] ;-)
 
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/OT-Plugin-WicketForge-0-8-1-available-for-IDEA-9-tp3066018p3068223.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
 
 


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



Re: 1.5 integer textfield

2010-12-14 Thread nino martinez wael
same result :

private void addViewerAjaxrefreshRateForm() {

refreshRateModel = new ModelInteger();

refreshRateModel.setObject(coreDaoService
.getWallboardRefreshTimeInSeconds());

FormVoid viewerAjaxrefreshRateForm = new FormVoid(
viewerAjaxrefreshRateForm) {
@Override
protected void onSubmit() {
Integer newRefreshRate = refreshRateModel.getObject();
coreDaoService
.saveWallboardRefreshTimeInSeconds(newRefreshRate);
info(Stored new refresh rate);

}
};

TextFieldInteger refreshRateTextField = new TextFieldInteger(
refreshRate, refreshRateModel);
RangeValidatorInteger rangeValidator = new RangeValidatorInteger(1,
1800);
refreshRateTextField.add(rangeValidator);
viewerAjaxrefreshRateForm.add(refreshRateTextField);
add(viewerAjaxrefreshRateForm);

}
full stack:

Root cause:

java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.String
 at java.lang.String.compareTo(String.java:92)
 at 
org.apache.wicket.validation.validator.RangeValidator.validate(RangeValidator.java:76)
 at 
org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1445)
 at 
org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1042)
 at org.apache.wicket.markup.html.form.Form$17.validate(Form.java:1833)
 at 
org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:164)
 at 
org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:148)
 at 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:278)
 at 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:267)
 at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:249)
 at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:338)
 at 
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1041)
 at 
org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1825)
 at org.apache.wicket.markup.html.form.Form.validate(Form.java:1805)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:863)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:821)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:786)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:211)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:192)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:173)
 at 
org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:248)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:131)
 at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:184)
 at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at 
com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141)
 at 
com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29)
 at 
com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155)
 at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
 at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
 at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 at org.mortbay.jetty.Server.handle(Server.java:326)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
 at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
 at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
 at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Complete stack:

org.apache.wicket.WicketRuntimeException: Exception
'java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.String' occurred during validation
org.apache.wicket.validation.validator.RangeValidator on