Re: updating a label's model with ajax

2011-05-16 Thread Martin Grigorov
Show us your code.

On Mon, May 16, 2011 at 3:58 AM, wmike1...@gmail.com wmike1...@gmail.comwrote:

 Hi all,

 I'm looking to change the model of a label when a button is clicked. As of
 now, I'm using an ajax button and doing target.addComponent(myLabel) inside
 that button's onclick method. However, the text on the page doesn't change
 when the button is clicked. This label happens to be hidable, and when i
 hide it, then reshow it, the label is redisplayed with the new model. I'm
 doing something wrong. What is going on here?

 Thanks

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/updating-a-label-s-model-with-ajax-tp3525221p3525221.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


RE: updating a label's model with ajax

2011-05-16 Thread Wilhelmsen Tor Iver
My guess: You have forgotten to call myLabel.setOutputMarkupId(true) or 
myLabel.setOutputPlaceholderTag(true) so the Ajax framework cannot find the 
element in the DOM.

mvh
- Tor Iver Wilhelmsen, Arrive AS


-Original Message-
From: wmike1...@gmail.com [mailto:wmike1...@gmail.com] 
Sent: 16. mai 2011 03:58
To: users@wicket.apache.org
Subject: updating a label's model with ajax

Hi all,

I'm looking to change the model of a label when a button is clicked. As of
now, I'm using an ajax button and doing target.addComponent(myLabel) inside
that button's onclick method. However, the text on the page doesn't change
when the button is clicked. This label happens to be hidable, and when i
hide it, then reshow it, the label is redisplayed with the new model. I'm
doing something wrong. What is going on here?

Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/updating-a-label-s-model-with-ajax-tp3525221p3525221.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 1.5 IComponentInstantiationListener VS AutolinkBookmarkablePageLink

2011-05-16 Thread nino martinez wael
Hi

Essentially I just want to hide all links leading to unauthorized pages.

I get exceptions when I do this in my AuthenticatedWebApplication,
there are no exceptions when I run the app without the part below:

protected void init() {
super.init();
getComponentInstantiationListeners().add(
new IComponentInstantiationListener() {

@Override
public void onInstantiation(Component 
arg0) {
if 
(AutolinkBookmarkablePageLink.class

.isAssignableFrom(arg0.getClass())) {

AutolinkBookmarkablePageLink link = AutolinkBookmarkablePageLink.class

.cast(arg0);
Boolean shouldRender = 
CCAdminSession
.get()

.getAuthorizationStrategy()

.isInstantiationAuthorized(

link.getPageClass());

arg0.setVisible(shouldRender);

}
}
});



Exception:

2011-05-16 08:37:03,968 ERROR
[org.apache.wicket.DefaultExceptionMapper]  - Unexpected error
occurred
org.apache.wicket.WicketRuntimeException: Exception in rendering
component: [TransparentWebMarkupContainer [Component id =
_wicket_link-8]]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2590)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1491)
at org.apache.wicket.Component.internalRender(Component.java:2394)
at org.apache.wicket.Component.render(Component.java:2322)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1425)
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1553)
at org.apache.wicket.Page.onRender(Page.java:989)
at org.apache.wicket.Component.internalRender(Component.java:2394)
at org.apache.wicket.Component.render(Component.java:2322)
at org.apache.wicket.Page.renderPage(Page.java:1120)
at 
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
at 
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:218)
at 
org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:139)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:718)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
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.headerComplete(HttpConnection.java:926)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
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)
Caused by: java.lang.NullPointerException
at 
java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
at 

RE: How to bind object in Hashset to CompoundPropertyModel expression

2011-05-16 Thread Wilhelmsen Tor Iver
 I haven't tried it and guaranteeing the ordering would need to be accounted
 for. But its a potential direction.

Another approach would be to change the Hibernate mapping from a set to a 
bag since that will map to a List on the Java side.

- Tor Iver

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



Re: moving from development to deployment mode

2011-05-16 Thread igahito
Hi Henry

I think this message displayed by another app in glassfish,don't you?
Have you tried starting to the exclusion of other apps?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/moving-from-development-to-deployment-mode-tp3495199p3525254.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: Serializing restfb DefaultFacebookclient in a wicket facebook application

2011-05-16 Thread labano10
@Sebastian, I actually used the part you
could also consider creating a new fbclient whenever you need one.  I am
using Guice but could not use request-scoped provider because the authToken
string which is needed in constructing fbClient is gotten from
pageparameters(for my case AppPage Parameters), so passing it to a provider
was tricky. 

I am happy it works, I just used methods within AppPage class which
construct and return restfb objects which means they r not part of page
state hence no serialization needed.

Thanks soo much.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Serializing-restfb-DefaultFacebookclient-in-a-wicket-facebook-application-tp3524700p3525647.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: post request with wicket

2011-05-16 Thread Hielke Hoeve
What is it exactly what you want to achieve? What is the use case? Why
would you want the browser to do a soap call? That is quite expensive as
you will need the browser to build a soap xml message and send it and
parse the soap response message. 

Hielke

-Original Message-
From: wmike1...@gmail.com [mailto:wmike1...@gmail.com] 
Sent: vrijdag 13 mei 2011 21:22
To: users@wicket.apache.org
Subject: Re: post request with wicket

just add something like this into my markup file?

# Send  

is this in keeping with wicket? I'm confused about this.

--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/post-request-with-wicket-tp35
20861p3520964.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



URL

2011-05-16 Thread Abid K.
I have a page that's mounted and when accessing the page the url is:
http://www.something.com/admin/userAdd

When posting a form the url changes to:
http://www.something.com/admin/userAdd/wicket:interface/:3:dataForm::IFormSubmitListener::

Is it possible that the url can stay clean like the first url? There
was a mention of changing the url strategy to one pass, but I was
wondering if something else could be done.

Ps. Still learning Wicket

Thanks

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



Re: URL

2011-05-16 Thread Clint Checketts
Mount it with HybridUrlCodingStrategy

On Monday, May 16, 2011, Abid K. abz...@gmail.com wrote:
 I have a page that's mounted and when accessing the page the url is:
 http://www.something.com/admin/userAdd

 When posting a form the url changes to:
 http://www.something.com/admin/userAdd/wicket:interface/:3:dataForm::IFormSubmitListener::

 Is it possible that the url can stay clean like the first url? There
 was a mention of changing the url strategy to one pass, but I was
 wondering if something else could be done.

 Ps. Still learning Wicket

 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: Form submit and nice urls

2011-05-16 Thread Peter Karich
 Anybody?

 Hi,

 when I'm doing [1] in 1.4.17 in a quickstart then I'm getting nice urls
 ala ?q=something e.g. for typing something in the textfield. The problem
 is that it prints two GET requests (why not POST + GET?):

 NOW: q = [todo] query=todo GET
 NOW:  query=null GET

 In firebug I can see POST + GET:

 POST
 http://localhost:8080/wicket1.4.17/?wicket:interface=:0:searchform::IFormSubmitListener::
 GET http://localhost:8080/wicket1.4.17/?q=test

 How can I avoid the second call of HomePage with query=null?? When I do
 setRedirect(false) after setResponsePage I don't get the nice url but it
 prints only one POST request with the correct parameter:

 NOW: q = test query=test POST

 Finally I tried to explicitely set the form method to GET:

 @Override protected String getMethod() { return METHOD_GET; }

 but then I would need to declare every url parameter as hidden field or
 can I somehow overwrite the form action with my need parameters? About a
 similar problem was blogged here [2]

 Could someone enlight me whats going wrong here?

 Regards,
 Peter.


 [1]
 public HomePage(final PageParameters parameters) {

 Form form = new Form(searchform) {
 @Override protected void onSubmit() {
 PageParameters pp = new PageParameters();
 pp.add(q, query);
 // add other params from previous request
 setResponsePage(HomePage.class, pp);
 }
 };
 add(form);
 query = parameters.getString(q);
 TextField text = new TextField(textField, new PropertyModel(this,
 query));
 form.add(text);

 logger.info(NOW:  + parameters +  query= + query +   + getMethod());

 }

 public String getMethod() {
  return ((WebRequest) getRequest()).getHttpServletRequest().getMethod();
 }


 [2]
 http://blog.solidcraft.eu/2010/10/wicket-form-submit-not-safe-for.html


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



Re: Strange error, cannot modify hierarchy

2011-05-16 Thread andrea del bene

Hi Brown,

I've never used isTransparentResolver but I know it was removed in 
wicket 1.5 because it was it was quite confusing for users:


http://apache-wicket.1842946.n4.nabble.com/remove-MarkupContainer-isTransparentResolver-td1909586.html

You can try to replace it using one of the solutions described here:

https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-MarkupContainer.isTransparentResolver%2528%2529removed


I am shooting in the dark but I thought I would post the error I am
getting.

I get this error.  Cannot modify component hierarchy after render phase
has started.  The full stack trace is at the bottom of this post.

During the form submission process (user clicks on link) then I get the
error above but ONLY when I have a dynamic component with
isTransparentResolver = true.

If I restructure my hierarchy such that transparentResolver is false
then I don't get the same error.   Why do you think I get the error?

...
  final WebMarkupContainer container = new WebMarkupContainer(
container ) {
public boolean isTransparentResolver() {
return false; // true causes error
}
 @Override
 public boolean isVisible() {
 return logic();
 }
 };

Cannot modify component hierarchy after render phase has started (page
version cant change then anymore)
org.apache.wicket.WicketRuntimeException: Cannot modify component
hierarchy after render phase has started (page version cant change then
anymore)
  at
org.apache.wicket.Component.checkHierarchyChange(Component.java:3598)
  at org.apache.wicket.Component.modelChanging(Component.java:2260)
  at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3124)
  at
org.apache.wicket.markup.html.form.FormComponent.updateModel(FormCompone
nt.java:1168)
  at
org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component
(Form.java:229)
  at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrde
rHelper(FormComponent.java:514)
  at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrde
rHelper(FormComponent.java:493)
  at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrde
r(FormComponent.java:465)
  at
org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModel
s(Form.java:2110)
  at
org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.j
ava:2078)
  at org.apache.wicket.markup.html.form.Form.process(Form.java:1028)
  at org.apache.wicket.markup.html.form.Form.process(Form.java:955)
  at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:920)
  at
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
177)
  at
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDef
aultAjaxBehavior.java:300)
  at
org.apache.wicket.request.target.component.listener.BehaviorRequestTarge
t.processEvents(BehaviorRequestTarget.java:142)
  at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Ab
stractRequestCycleProcessor.java:92)
  at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1250)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
  at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484
)
  at
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:
160)




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



Re: Form submit and nice urls

2011-05-16 Thread Martin Grigorov
Hi Peter,

Here is how it should work:
- Home page constructor is called initially without 'q' thus null
- the submit makes a POST call to Form.onSubmit() (the print is not called
because the page is not re-instanciated, unless it is stateless)
- onSubmit() calls setResponsePage(Class, PageParameters) which causes a
redirect to the Home page with the parameters you pass
- HomePage's ctor is called with 'q' and a value

This is how it should be! Now you take a look and tell us where are the
differences.

On Mon, May 16, 2011 at 12:41 PM, Peter Karich peat...@yahoo.de wrote:

  Anybody?

  Hi,
 
  when I'm doing [1] in 1.4.17 in a quickstart then I'm getting nice urls
  ala ?q=something e.g. for typing something in the textfield. The problem
  is that it prints two GET requests (why not POST + GET?):
 
  NOW: q = [todo] query=todo GET
  NOW:  query=null GET
 
  In firebug I can see POST + GET:
 
  POST
 
 http://localhost:8080/wicket1.4.17/?wicket:interface=:0:searchform::IFormSubmitListener
 ::
  GET http://localhost:8080/wicket1.4.17/?q=test
 
  How can I avoid the second call of HomePage with query=null?? When I do
  setRedirect(false) after setResponsePage I don't get the nice url but it
  prints only one POST request with the correct parameter:
 
  NOW: q = test query=test POST
 
  Finally I tried to explicitely set the form method to GET:
 
  @Override protected String getMethod() { return METHOD_GET; }
 
  but then I would need to declare every url parameter as hidden field or
  can I somehow overwrite the form action with my need parameters? About a
  similar problem was blogged here [2]
 
  Could someone enlight me whats going wrong here?
 
  Regards,
  Peter.
 
 
  [1]
  public HomePage(final PageParameters parameters) {
 
  Form form = new Form(searchform) {
  @Override protected void onSubmit() {
  PageParameters pp = new PageParameters();
  pp.add(q, query);
  // add other params from previous request
  setResponsePage(HomePage.class, pp);
  }
  };
  add(form);
  query = parameters.getString(q);
  TextField text = new TextField(textField, new PropertyModel(this,
  query));
  form.add(text);
 
  logger.info(NOW:  + parameters +  query= + query +   +
 getMethod());
 
  }
 
  public String getMethod() {
   return ((WebRequest) getRequest()).getHttpServletRequest().getMethod();
  }
 
 
  [2]
  http://blog.solidcraft.eu/2010/10/wicket-form-submit-not-safe-for.html


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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
 Hi Martin,

thanks for the explanation!

Why is the first call done to submit my form?

Because my app is doing an 'expensive' search query for every
instantiation,
thus I would like to trigger the search only with the necessary
submitted query.

Can I somehow distinguish a request with an empty q
and the pre-query with an empty q when submitting a form?
Or should I place my expensive operation somewhere else?

Regards,
Peter.

 Hi Peter,

 Here is how it should work:
 - Home page constructor is called initially without 'q' thus null
 - the submit makes a POST call to Form.onSubmit() (the print is not called
 because the page is not re-instanciated, unless it is stateless)
 - onSubmit() calls setResponsePage(Class, PageParameters) which causes a
 redirect to the Home page with the parameters you pass
 - HomePage's ctor is called with 'q' and a value

 This is how it should be! Now you take a look and tell us where are the
 differences.


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



Re: Form submit and nice urls

2011-05-16 Thread Martin Grigorov
I don't understand your question.

with the current code doing the POST is quite cheap. it just brings the
value for the search to form#onSubmit and makes a redirect to
HomePage(PageParameters) where you check for the existence of the 'q'
parameter and either do the heavy calculation or not.
You may also check StatelessForm and see whether it fits your needs. It will
save you the redirect.

Otherwise you can do the calculation in form#onsubmit and use
setResponsePage(new HomePage(calculationResult)) - the con here is that the
url will have ?wicket:interface=. and wont be nice looking.

On Mon, May 16, 2011 at 1:34 PM, Peter Karich peat...@yahoo.de wrote:

  Hi Martin,

 thanks for the explanation!

 Why is the first call done to submit my form?

 Because my app is doing an 'expensive' search query for every
 instantiation,
 thus I would like to trigger the search only with the necessary
 submitted query.

 Can I somehow distinguish a request with an empty q
 and the pre-query with an empty q when submitting a form?
 Or should I place my expensive operation somewhere else?

 Regards,
 Peter.

  Hi Peter,
 
  Here is how it should work:
  - Home page constructor is called initially without 'q' thus null
  - the submit makes a POST call to Form.onSubmit() (the print is not
 called
  because the page is not re-instanciated, unless it is stateless)
  - onSubmit() calls setResponsePage(Class, PageParameters) which causes a
  redirect to the Home page with the parameters you pass
  - HomePage's ctor is called with 'q' and a value
 
  This is how it should be! Now you take a look and tell us where are the
  differences.


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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
 Hi Martin,

 I don't understand your question.

sorry :(
I try to explain it again :)

When I access my app with the url
http://localhost:8080/app/?q=test
all is fine. But when I submit a new query 'todo' then wicket somehow
1. calls the submit (ok)
2. redirects to HomePage (ok)
3. *but then again wicket is doing*** another POST+GET with empty q

So 4 requests for one submit. Please also try this quickstart for
wicket 1.4.17: https://gist.github.com/974349
and see if you get the same problem.

Regards,
Peter.

**
post: onSubmit textField object:todo
GET: HomePage ctor params: q = [todo]
post: onSubmit textField object:
GET: HomePage ctor params: q = []


Re: Form submit and nice urls

2011-05-16 Thread Martin Grigorov
Please create a quickstart app (.zip, .tgz) and attach it to a ticket in our
Jira.

On Mon, May 16, 2011 at 2:33 PM, Peter Karich peat...@yahoo.de wrote:

  Hi Martin,

  I don't understand your question.

 sorry :(
 I try to explain it again :)

 When I access my app with the url
 http://localhost:8080/app/?q=test
 all is fine. But when I submit a new query 'todo' then wicket somehow
 1. calls the submit (ok)
 2. redirects to HomePage (ok)
 3. *but then again wicket is doing*** another POST+GET with empty q

 So 4 requests for one submit. Please also try this quickstart for
 wicket 1.4.17: https://gist.github.com/974349
 and see if you get the same problem.

 Regards,
 Peter.

 **
 post: onSubmit textField object:todo
 GET: HomePage ctor params: q = [todo]
 post: onSubmit textField object:
 GET: HomePage ctor params: q = []




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
 Hopefully I do not waste your time with my stupidity:

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

https://issues.apache.org/jira/secure/attachment/12479325/double-form-submit.zip


 Please create a quickstart app (.zip, .tgz) and attach it to a ticket in our
 Jira.

 On Mon, May 16, 2011 at 2:33 PM, Peter Karich peat...@yahoo.de wrote:

  Hi Martin,

 I don't understand your question.
 sorry :(
 I try to explain it again :)

 When I access my app with the url
 http://localhost:8080/app/?q=test
 all is fine. But when I submit a new query 'todo' then wicket somehow
 1. calls the submit (ok)
 2. redirects to HomePage (ok)
 3. *but then again wicket is doing*** another POST+GET with empty q

 So 4 requests for one submit. Please also try this quickstart for
 wicket 1.4.17: https://gist.github.com/974349
 and see if you get the same problem.

 Regards,
 Peter.

 **
 post: onSubmit textField object:todo
 GET: HomePage ctor params: q = [todo]
 post: onSubmit textField object:
 GET: HomePage ctor params: q = []


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



Using SigInPage with IE9

2011-05-16 Thread Zhubin Salehi
Hi,

I'm using org.apache.wicket.authroles.authentication.pages.SignInPage in my
application to provide a simple way for the users to sign in. It works
perfectly fine in FF4 but I get this error in IE9:

The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later. 




The operation completed successfully. Error processing resource
'http://192.168.30.76:8080/VDIClientHttp-0.0.1/wicket/bookm...

wicket:panel
--^

Any idea how I can fix this?

By the way I'm using Wicket 1.5 RC4.2.

Thanks,
Zhubin

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-SigInPage-with-IE9-tp3526179p3526179.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 prevent browser from caching pages

2011-05-16 Thread Martin Makundi
Hi!

We are disabling versioning and this results in problems with browsers
(chrome) which seems to load pages from cache.

We would like to add something similar as in NonCachingImage to each url.

How can this be done centrally for whole application with minimal change?

Something like:
url = url + wicket:antiCache= + System.currentTimeMillis();


**
Martin

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



Re: Using SigInPage with IE9

2011-05-16 Thread Martin Grigorov
Can be related to https://issues.apache.org/jira/browse/WICKET-3566

On Mon, May 16, 2011 at 3:09 PM, Zhubin Salehi zhooz...@yahoo.com wrote:

 Hi,

 I'm using org.apache.wicket.authroles.authentication.pages.SignInPage in my
 application to provide a simple way for the users to sign in. It works
 perfectly fine in FF4 but I get this error in IE9:

 The XML page cannot be displayed
 Cannot view XML input using XSL style sheet. Please correct the error and
 then click the Refresh button, or try again later.



 

 The operation completed successfully. Error processing resource
 'http://192.168.30.76:8080/VDIClientHttp-0.0.1/wicket/bookm...

wicket:panel
 --^

 Any idea how I can fix this?

 By the way I'm using Wicket 1.5 RC4.2.

 Thanks,
 Zhubin

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Using-SigInPage-with-IE9-tp3526179p3526179.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Using SigInPage with IE9

2011-05-16 Thread Pedro Santos
related ideed, reopening the ticket

On Mon, May 16, 2011 at 10:35 AM, Martin Grigorov mgrigo...@apache.org wrote:
 Can be related to https://issues.apache.org/jira/browse/WICKET-3566

 On Mon, May 16, 2011 at 3:09 PM, Zhubin Salehi zhooz...@yahoo.com wrote:

 Hi,

 I'm using org.apache.wicket.authroles.authentication.pages.SignInPage in my
 application to provide a simple way for the users to sign in. It works
 perfectly fine in FF4 but I get this error in IE9:

 The XML page cannot be displayed
 Cannot view XML input using XSL style sheet. Please correct the error and
 then click the Refresh button, or try again later.



 

 The operation completed successfully. Error processing resource
 'http://192.168.30.76:8080/VDIClientHttp-0.0.1/wicket/bookm...

    wicket:panel
 --^

 Any idea how I can fix this?

 By the way I'm using Wicket 1.5 RC4.2.

 Thanks,
 Zhubin

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Using-SigInPage-with-IE9-tp3526179p3526179.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/




-- 
Pedro Henrique Oliveira dos Santos

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



RE: post request with wicket

2011-05-16 Thread wmike1...@gmail.com
I'm just calling a webservice, getting some data that I want to populate some
fields on the page. The soap call as of now is on the server-side, inside an
ajaxLink's onClick() method. Seems to be working fine.

Why would building the request on the cilent be expensive? Expensive in
terms of what?

thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/post-request-with-wicket-tp3520861p3526264.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 turn off the ModificationWatcher Task?

2011-05-16 Thread eugenebalt
I recently started getting constant debug output on my console, like this:


Run the job: org.apache.wicket.util.watch.ModificationWatcher$1@11dd1
1dd
[5/16/11 10:18:34:454 EDT] 001c SystemOut O 1641041
[ModificationWatcher Task] DEBUG org.apa
che.wicket.util.thread.Task  - Finished with job:
org.apache.wicket.util.watch.ModificationWatcher$1
@11dd11dd


Does anyone know how to turn off this ModificationWatcher task? Is this an
automated debug mode?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-turn-off-the-ModificationWatcher-Task-tp3526322p3526322.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: updating a label's model with ajax

2011-05-16 Thread wmike1...@gmail.com
public class IncidentReportPanel extends Panel
{
public IncidentReportPanel(String id) {
super(id);

  final Model model = new Model(first model);
 final Label label = new Label(wicketTag, model);
 label.setOutputMarkupId(true);
 add(label);

  AjaxLink update = new AjaxLink(updateButton) {
public void onClick(AjaxRequestTarget target) {
model.setObject(new model);
label.setDefaultModel(model);
target.addComponent(label);
}
};
add(update);
 }
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/updating-a-label-s-model-with-ajax-tp3525221p3526331.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 turn off the ModificationWatcher Task?

2011-05-16 Thread Pedro Santos
Set null in application resource poll frequency.
e.g.
class Application{
  init(){
application.initApplication();
application.getResourceSettings().setResourcePollFrequency(null);
  }
}

On Mon, May 16, 2011 at 11:21 AM, eugenebalt eugeneb...@yahoo.com wrote:
 I recently started getting constant debug output on my console, like this:


 Run the job: org.apache.wicket.util.watch.ModificationWatcher$1@11dd1
 1dd
 [5/16/11 10:18:34:454 EDT] 001c SystemOut     O 1641041
 [ModificationWatcher Task] DEBUG org.apa
 che.wicket.util.thread.Task  - Finished with job:
 org.apache.wicket.util.watch.ModificationWatcher$1
 @11dd11dd


 Does anyone know how to turn off this ModificationWatcher task? Is this an
 automated debug mode?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-turn-off-the-ModificationWatcher-Task-tp3526322p3526322.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





-- 
Pedro Henrique Oliveira dos Santos

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



Re: How to turn off the ModificationWatcher Task?

2011-05-16 Thread Martin Grigorov
But before that read what it is and how to use it.
Maybe you don't want to switch it off.

On Mon, May 16, 2011 at 4:30 PM, Pedro Santos pedros...@gmail.com wrote:

 Set null in application resource poll frequency.
 e.g.
 class Application{
  init(){
application.initApplication();
application.getResourceSettings().setResourcePollFrequency(null);
   }
 }

 On Mon, May 16, 2011 at 11:21 AM, eugenebalt eugeneb...@yahoo.com wrote:
  I recently started getting constant debug output on my console, like
 this:
 
 
  Run the job: org.apache.wicket.util.watch.ModificationWatcher$1@11dd1
  1dd
  [5/16/11 10:18:34:454 EDT] 001c SystemOut O 1641041
  [ModificationWatcher Task] DEBUG org.apa
  che.wicket.util.thread.Task  - Finished with job:
  org.apache.wicket.util.watch.ModificationWatcher$1
  @11dd11dd
 
 
  Does anyone know how to turn off this ModificationWatcher task? Is this
 an
  automated debug mode?
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-turn-off-the-ModificationWatcher-Task-tp3526322p3526322.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
 
 



 --
 Pedro Henrique Oliveira dos Santos

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: How to prevent browser from caching pages

2011-05-16 Thread Pedro Santos
You can decorate applicaiton's root request mapper to set in the
anticache parameter in the mapped URL. You can also add a listener
invoking WebResponse#disableCaching for all your responses.

On Mon, May 16, 2011 at 10:20 AM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 Hi!

 We are disabling versioning and this results in problems with browsers
 (chrome) which seems to load pages from cache.

 We would like to add something similar as in NonCachingImage to each url.

 How can this be done centrally for whole application with minimal change?

 Something like:
        url = url + wicket:antiCache= + System.currentTimeMillis();


 **
 Martin

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





-- 
Pedro Henrique Oliveira dos Santos

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



Re: How to prevent browser from caching pages

2011-05-16 Thread Martin Makundi
Hi!

Sounds nice, how exactly?

**
Martin

2011/5/16 Pedro Santos pedros...@gmail.com:
 You can decorate applicaiton's root request mapper to set in the
 anticache parameter in the mapped URL. You can also add a listener
 invoking WebResponse#disableCaching for all your responses.

 On Mon, May 16, 2011 at 10:20 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Hi!

 We are disabling versioning and this results in problems with browsers
 (chrome) which seems to load pages from cache.

 We would like to add something similar as in NonCachingImage to each url.

 How can this be done centrally for whole application with minimal change?

 Something like:
        url = url + wicket:antiCache= + System.currentTimeMillis();


 **
 Martin

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





 --
 Pedro Henrique Oliveira dos Santos

 -
 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: updating a label's model with ajax

2011-05-16 Thread Martin Grigorov
Looking at this it should just work.

On Mon, May 16, 2011 at 4:25 PM, wmike1...@gmail.com wmike1...@gmail.comwrote:

 public class IncidentReportPanel extends Panel
 {
public IncidentReportPanel(String id) {
super(id);

  final Model model = new Model(first model);
 final Label label = new Label(wicketTag, model);
 label.setOutputMarkupId(true);
 add(label);

  AjaxLink update = new AjaxLink(updateButton) {
public void onClick(AjaxRequestTarget target) {
model.setObject(new model);
label.setDefaultModel(model);

no need to call that. the model is already set

target.addComponent(label);
}
};
add(update);
 }
 }

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/updating-a-label-s-model-with-ajax-tp3525221p3526331.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Ajax and IComponentResolver

2011-05-16 Thread Alexandru Artimon

Hello,

I have a custom wicket html tag that is handled by a component resolver 
to automatically generate a component for it. And these components only 
exist at the render phase and aren't stored in the page tree.


Now when Ajax is used to update a fragment of the web page, looks like 
the components for these wicket html tags were not rendered. So instead 
of getting the desired markup I get only the contents of the original 
markup.


Might this be a bug? It looks like the component resolver doesn't work 
when the response is built for the ajax update.


Any ideas/workarounds ?

Thanks again,
Alex

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



RE: How to bind object in Hashset to CompoundPropertyModel expression

2011-05-16 Thread datazuul
Thank you guys for your feedback.

First I moved to a list-mapping in hibernate, but as I am not so  
familiar with setting up indices with hibernate (or how to change  
existing schema), I secondly used bag-mapping as Wilhelmsen suggested.

On Java side I can use now an ArrayList and in Wicket frontend I can  
access it with index like memberships[0].





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-bind-object-in-Hashset-to-CompoundPropertyModel-expression-tp3521031p3526385.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 prevent browser from caching pages

2011-05-16 Thread Pedro Santos
I pasted an AnticacheDecorator here: http://pastebin.com/NDePsj0F

you can use as:
class Application {
  init(){
 setRootRequestMapper(new AnticacheDecorator(getRootRequestMapper()));
  }
}


On Mon, May 16, 2011 at 11:36 AM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 Hi!

 Sounds nice, how exactly?

 **
 Martin

 2011/5/16 Pedro Santos pedros...@gmail.com:
 You can decorate applicaiton's root request mapper to set in the
 anticache parameter in the mapped URL. You can also add a listener
 invoking WebResponse#disableCaching for all your responses.

 On Mon, May 16, 2011 at 10:20 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Hi!

 We are disabling versioning and this results in problems with browsers
 (chrome) which seems to load pages from cache.

 We would like to add something similar as in NonCachingImage to each url.

 How can this be done centrally for whole application with minimal change?

 Something like:
        url = url + wicket:antiCache= + System.currentTimeMillis();


 **
 Martin

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





 --
 Pedro Henrique Oliveira dos Santos

 -
 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

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



Re: Ajax and IComponentResolver

2011-05-16 Thread Martin Grigorov
Sounds like https://issues.apache.org/jira/browse/WICKET-3719

Can you try the patch there and give feedback ?
If it still fails then a quickstart app or a test case would help us to
improve it.

On Mon, May 16, 2011 at 4:43 PM, Alexandru Artimon 
aarti...@developmentgateway.org wrote:

 Hello,

 I have a custom wicket html tag that is handled by a component resolver to
 automatically generate a component for it. And these components only exist
 at the render phase and aren't stored in the page tree.

 Now when Ajax is used to update a fragment of the web page, looks like the
 components for these wicket html tags were not rendered. So instead of
 getting the desired markup I get only the contents of the original markup.

 Might this be a bug? It looks like the component resolver doesn't work when
 the response is built for the ajax update.

 Any ideas/workarounds ?

 Thanks again,
 Alex

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: updating a label's model with ajax

2011-05-16 Thread wmike1...@gmail.com
Problem was resolved. I had some malformed html throwing things off. Thanks
for all the replies.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/updating-a-label-s-model-with-ajax-tp3525221p3526444.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 prevent browser from caching pages

2011-05-16 Thread Martin Grigorov
Pedro is talking about 1.5, not about 1.4.9 :-)

On Mon, May 16, 2011 at 4:36 PM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Hi!

 Sounds nice, how exactly?

 **
 Martin

 2011/5/16 Pedro Santos pedros...@gmail.com:
  You can decorate applicaiton's root request mapper to set in the
  anticache parameter in the mapped URL. You can also add a listener
  invoking WebResponse#disableCaching for all your responses.
 
  On Mon, May 16, 2011 at 10:20 AM, Martin Makundi
  martin.maku...@koodaripalvelut.com wrote:
  Hi!
 
  We are disabling versioning and this results in problems with browsers
  (chrome) which seems to load pages from cache.
 
  We would like to add something similar as in NonCachingImage to each
 url.
 
  How can this be done centrally for whole application with minimal
 change?
 
  Something like:
 url = url + wicket:antiCache= + System.currentTimeMillis();
 
 
  **
  Martin
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 
  -
  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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Ajax and IComponentResolver

2011-05-16 Thread Alexandru Artimon

I can try the patch and test, but I only have the wicket 1.4.17 jars.
So can I do a code checkout from somewhere? :D
Or get a jar that has the patch in it ?


On 05/16/2011 05:50 PM, Martin Grigorov wrote:

Sounds like https://issues.apache.org/jira/browse/WICKET-3719

Can you try the patch there and give feedback ?
If it still fails then a quickstart app or a test case would help us to
improve it.

On Mon, May 16, 2011 at 4:43 PM, Alexandru Artimon
aarti...@developmentgateway.org  wrote:


Hello,

I have a custom wicket html tag that is handled by a component resolver to
automatically generate a component for it. And these components only exist
at the render phase and aren't stored in the page tree.

Now when Ajax is used to update a fragment of the web page, looks like the
components for these wicket html tags were not rendered. So instead of
getting the desired markup I get only the contents of the original markup.

Might this be a bug? It looks like the component resolver doesn't work when
the response is built for the ajax update.

Any ideas/workarounds ?

Thanks again,
Alex

-
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.5 IComponentInstantiationListener VS AutolinkBookmarkablePageLink

2011-05-16 Thread Igor Vaynberg
these reports should go into jira

-igor


On Sun, May 15, 2011 at 11:40 PM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 Hi

 Essentially I just want to hide all links leading to unauthorized pages.

 I get exceptions when I do this in my AuthenticatedWebApplication,
 there are no exceptions when I run the app without the part below:

 protected void init() {
                super.init();
                getComponentInstantiationListeners().add(
                                new IComponentInstantiationListener() {

                                        @Override
                                        public void onInstantiation(Component 
 arg0) {
                                                if 
 (AutolinkBookmarkablePageLink.class
                                                                
 .isAssignableFrom(arg0.getClass())) {
                                                        
 AutolinkBookmarkablePageLink link = AutolinkBookmarkablePageLink.class
                                                                        
 .cast(arg0);
                                                        Boolean shouldRender = 
 CCAdminSession
                                                                        .get()
                                                                        
 .getAuthorizationStrategy()
                                                                        
 .isInstantiationAuthorized(
                                                                               
          link.getPageClass());
                                                        
 arg0.setVisible(shouldRender);

                                                }
                                        }
                                });



 Exception:

 2011-05-16 08:37:03,968 ERROR
 [org.apache.wicket.DefaultExceptionMapper]  - Unexpected error
 occurred
 org.apache.wicket.WicketRuntimeException: Exception in rendering
 component: [TransparentWebMarkupContainer [Component id =
 _wicket_link-8]]
        at 
 org.apache.wicket.Component.internalRenderComponent(Component.java:2590)
        at 
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1491)
        at org.apache.wicket.Component.internalRender(Component.java:2394)
        at org.apache.wicket.Component.render(Component.java:2322)
        at 
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1425)
        at 
 org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1553)
        at org.apache.wicket.Page.onRender(Page.java:989)
        at org.apache.wicket.Component.internalRender(Component.java:2394)
        at org.apache.wicket.Component.render(Component.java:2322)
        at org.apache.wicket.Page.renderPage(Page.java:1120)
        at 
 org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
        at 
 org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:218)
        at 
 org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:139)
        at 
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:718)
        at 
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
        at 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
        at 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
        at 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
        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.headerComplete(HttpConnection.java:926)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        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)
 Caused by: 

Re: How to prevent browser from caching pages

2011-05-16 Thread Martin Makundi
Ok.. how to do the same in 1.4 ?

**
Martin

2011/5/16 Martin Grigorov mgrigo...@apache.org:
 Pedro is talking about 1.5, not about 1.4.9 :-)

 On Mon, May 16, 2011 at 4:36 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 Sounds nice, how exactly?

 **
 Martin

 2011/5/16 Pedro Santos pedros...@gmail.com:
  You can decorate applicaiton's root request mapper to set in the
  anticache parameter in the mapped URL. You can also add a listener
  invoking WebResponse#disableCaching for all your responses.
 
  On Mon, May 16, 2011 at 10:20 AM, Martin Makundi
  martin.maku...@koodaripalvelut.com wrote:
  Hi!
 
  We are disabling versioning and this results in problems with browsers
  (chrome) which seems to load pages from cache.
 
  We would like to add something similar as in NonCachingImage to each
 url.
 
  How can this be done centrally for whole application with minimal
 change?
 
  Something like:
         url = url + wicket:antiCache= + System.currentTimeMillis();
 
 
  **
  Martin
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 
  -
  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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


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



Re: Wicket 1.5 IComponentInstantiationListener VS AutolinkBookmarkablePageLink

2011-05-16 Thread Martin Grigorov
with a proper quickstart because fast check shows that
bookmarkablePageLink#getPageClass() returns null and this seems to be
impossible since there is a check for null in the constructor

On Mon, May 16, 2011 at 5:18 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 these reports should go into jira

 -igor


 On Sun, May 15, 2011 at 11:40 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
  Hi
 
  Essentially I just want to hide all links leading to unauthorized pages.
 
  I get exceptions when I do this in my AuthenticatedWebApplication,
  there are no exceptions when I run the app without the part below:
 
  protected void init() {
 super.init();
 getComponentInstantiationListeners().add(
 new IComponentInstantiationListener() {
 
 @Override
 public void
 onInstantiation(Component arg0) {
 if
 (AutolinkBookmarkablePageLink.class
 
  .isAssignableFrom(arg0.getClass())) {
 
  AutolinkBookmarkablePageLink link = AutolinkBookmarkablePageLink.class
 
  .cast(arg0);
 Boolean
 shouldRender = CCAdminSession
 
  .get()
 
  .getAuthorizationStrategy()
 
  .isInstantiationAuthorized(
 
  link.getPageClass());
 
  arg0.setVisible(shouldRender);
 
 }
 }
 });
 
 
 
  Exception:
 
  2011-05-16 08:37:03,968 ERROR
  [org.apache.wicket.DefaultExceptionMapper]  - Unexpected error
  occurred
  org.apache.wicket.WicketRuntimeException: Exception in rendering
  component: [TransparentWebMarkupContainer [Component id =
  _wicket_link-8]]
 at
 org.apache.wicket.Component.internalRenderComponent(Component.java:2590)
 at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1491)
 at org.apache.wicket.Component.internalRender(Component.java:2394)
 at org.apache.wicket.Component.render(Component.java:2322)
 at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1425)
 at
 org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1553)
 at org.apache.wicket.Page.onRender(Page.java:989)
 at org.apache.wicket.Component.internalRender(Component.java:2394)
 at org.apache.wicket.Component.render(Component.java:2322)
 at org.apache.wicket.Page.renderPage(Page.java:1120)
 at
 org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
 at
 org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:218)
 at
 org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:139)
 at
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:718)
 at
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
 at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 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.headerComplete(HttpConnection.java:926)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
 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)
  Caused by: java.lang.NullPointerException
 at
 java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
 at
 

Re: TextField not getting the value after a validation eror

2011-05-16 Thread msalman
Hi Clint:

The steps are:

1- user  opens page 
2- user submits form (without entering any value)
3- required error appears.
4- user clicks on the link to enter value and no value appears in the text
box.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TextField-not-getting-the-value-after-a-validation-eror-tp3521252p3526513.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: Ajax and IComponentResolver

2011-05-16 Thread Martin Grigorov
How to build Wicket is described at
http://wicket.apache.org/contribute/build.html
But the patch is only for 1.5. You can't use it in 1.4.

I recommend you to upgrade.

On Mon, May 16, 2011 at 5:16 PM, Alexandru Artimon 
aarti...@developmentgateway.org wrote:

 I can try the patch and test, but I only have the wicket 1.4.17 jars.
 So can I do a code checkout from somewhere? :D
 Or get a jar that has the patch in it ?



 On 05/16/2011 05:50 PM, Martin Grigorov wrote:

 Sounds like https://issues.apache.org/jira/browse/WICKET-3719

 Can you try the patch there and give feedback ?
 If it still fails then a quickstart app or a test case would help us to
 improve it.

 On Mon, May 16, 2011 at 4:43 PM, Alexandru Artimon
 aarti...@developmentgateway.org  wrote:

  Hello,

 I have a custom wicket html tag that is handled by a component resolver
 to
 automatically generate a component for it. And these components only
 exist
 at the render phase and aren't stored in the page tree.

 Now when Ajax is used to update a fragment of the web page, looks like
 the
 components for these wicket html tags were not rendered. So instead of
 getting the desired markup I get only the contents of the original
 markup.

 Might this be a bug? It looks like the component resolver doesn't work
 when
 the response is built for the ajax update.

 Any ideas/workarounds ?

 Thanks again,
 Alex

 -
 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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: TextField not getting the value after a validation eror

2011-05-16 Thread msalman
Hi Pedro:

Thanks for that. And it fixed the problem.

The onClick code is now like this:

 String guid = java.util.UUID.randomUUID().toString();  
 bean.setText(guid);
 textField.modelChanged();  
 target.addComponent(textField);



Thanks you so much.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TextField-not-getting-the-value-after-a-validation-eror-tp3521252p3526525.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 prevent browser from caching pages

2011-05-16 Thread Martin Grigorov
extend the url coding strategy you use and add the logic in its encode()
method

On Mon, May 16, 2011 at 5:18 PM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Ok.. how to do the same in 1.4 ?

 **
 Martin

 2011/5/16 Martin Grigorov mgrigo...@apache.org:
  Pedro is talking about 1.5, not about 1.4.9 :-)
 
  On Mon, May 16, 2011 at 4:36 PM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  Hi!
 
  Sounds nice, how exactly?
 
  **
  Martin
 
  2011/5/16 Pedro Santos pedros...@gmail.com:
   You can decorate applicaiton's root request mapper to set in the
   anticache parameter in the mapped URL. You can also add a listener
   invoking WebResponse#disableCaching for all your responses.
  
   On Mon, May 16, 2011 at 10:20 AM, Martin Makundi
   martin.maku...@koodaripalvelut.com wrote:
   Hi!
  
   We are disabling versioning and this results in problems with
 browsers
   (chrome) which seems to load pages from cache.
  
   We would like to add something similar as in NonCachingImage to each
  url.
  
   How can this be done centrally for whole application with minimal
  change?
  
   Something like:
  url = url + wicket:antiCache= + System.currentTimeMillis();
  
  
   **
   Martin
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
  
  
   --
   Pedro Henrique Oliveira dos Santos
  
   -
   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
 
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.com/
 

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Wicket 1.5 IComponentInstantiationListener VS AutolinkBookmarkablePageLink

2011-05-16 Thread Igor Vaynberg
i think the quickstart goes without saying... :)

-igor

On Mon, May 16, 2011 at 8:24 AM, Martin Grigorov mgrigo...@apache.org wrote:
 with a proper quickstart because fast check shows that
 bookmarkablePageLink#getPageClass() returns null and this seems to be
 impossible since there is a check for null in the constructor

 On Mon, May 16, 2011 at 5:18 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 these reports should go into jira

 -igor


 On Sun, May 15, 2011 at 11:40 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
  Hi
 
  Essentially I just want to hide all links leading to unauthorized pages.
 
  I get exceptions when I do this in my AuthenticatedWebApplication,
  there are no exceptions when I run the app without the part below:
 
  protected void init() {
                 super.init();
                 getComponentInstantiationListeners().add(
                                 new IComponentInstantiationListener() {
 
                                         @Override
                                         public void
 onInstantiation(Component arg0) {
                                                 if
 (AutolinkBookmarkablePageLink.class
 
  .isAssignableFrom(arg0.getClass())) {
 
  AutolinkBookmarkablePageLink link = AutolinkBookmarkablePageLink.class
 
  .cast(arg0);
                                                         Boolean
 shouldRender = CCAdminSession
 
  .get()
 
  .getAuthorizationStrategy()
 
  .isInstantiationAuthorized(
 
              link.getPageClass());
 
  arg0.setVisible(shouldRender);
 
                                                 }
                                         }
                                 });
 
 
 
  Exception:
 
  2011-05-16 08:37:03,968 ERROR
  [org.apache.wicket.DefaultExceptionMapper]  - Unexpected error
  occurred
  org.apache.wicket.WicketRuntimeException: Exception in rendering
  component: [TransparentWebMarkupContainer [Component id =
  _wicket_link-8]]
         at
 org.apache.wicket.Component.internalRenderComponent(Component.java:2590)
         at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1491)
         at org.apache.wicket.Component.internalRender(Component.java:2394)
         at org.apache.wicket.Component.render(Component.java:2322)
         at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1425)
         at
 org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1553)
         at org.apache.wicket.Page.onRender(Page.java:989)
         at org.apache.wicket.Component.internalRender(Component.java:2394)
         at org.apache.wicket.Component.render(Component.java:2322)
         at org.apache.wicket.Page.renderPage(Page.java:1120)
         at
 org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
         at
 org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:218)
         at
 org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:139)
         at
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:718)
         at
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
         at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
         at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
         at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)
         at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
         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.headerComplete(HttpConnection.java:926)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
         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)
  Caused by: java.lang.NullPointerException
         at
 

Re: How to prevent browser from caching pages

2011-05-16 Thread Martin Makundi
You mean here:

  protected WebResponse newWebResponse(HttpServletResponse servletResponse) {
return (getRequestCycleSettings().getBufferResponse() ? new
BufferedWebResponse(servletResponse) {
  /**
   * @see 
org.apache.wicket.protocol.http.WebResponse#encodeURL(java.lang.CharSequence)
   */
  @Override
  public CharSequence encodeURL(CharSequence url) {
return TakpSessionBase.get().isRobot() ? url : super.encodeURL(url);
  }
}: new WebResponse(servletResponse) {
  /**
   * @see 
org.apache.wicket.protocol.http.WebResponse#encodeURL(java.lang.CharSequence)
   */
  @Override
  public CharSequence encodeURL(CharSequence url) {
return TakpSessionBase.get().isRobot() ? url : super.encodeURL(url);
  }
});
  }


??

2011/5/16 Martin Grigorov mgrigo...@apache.org:
 extend the url coding strategy you use and add the logic in its encode()
 method

 On Mon, May 16, 2011 at 5:18 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Ok.. how to do the same in 1.4 ?

 **
 Martin

 2011/5/16 Martin Grigorov mgrigo...@apache.org:
  Pedro is talking about 1.5, not about 1.4.9 :-)
 
  On Mon, May 16, 2011 at 4:36 PM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  Hi!
 
  Sounds nice, how exactly?
 
  **
  Martin
 
  2011/5/16 Pedro Santos pedros...@gmail.com:
   You can decorate applicaiton's root request mapper to set in the
   anticache parameter in the mapped URL. You can also add a listener
   invoking WebResponse#disableCaching for all your responses.
  
   On Mon, May 16, 2011 at 10:20 AM, Martin Makundi
   martin.maku...@koodaripalvelut.com wrote:
   Hi!
  
   We are disabling versioning and this results in problems with
 browsers
   (chrome) which seems to load pages from cache.
  
   We would like to add something similar as in NonCachingImage to each
  url.
  
   How can this be done centrally for whole application with minimal
  change?
  
   Something like:
          url = url + wicket:antiCache= + System.currentTimeMillis();
  
  
   **
   Martin
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
  
  
   --
   Pedro Henrique Oliveira dos Santos
  
   -
   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
 
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.com/
 

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


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



Re: Sending to a new page from Iframe

2011-05-16 Thread Nelson Segura
Excellent!
thanks for the help.
-Nelson

On Fri, May 13, 2011 at 5:24 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 use an ajaxbutton/link instead
 and in response do


 target.appendjavascript(window.top.location='+urlFor(MyPage.class)+'););

 -igor


 On Fri, May 13, 2011 at 4:11 PM, Nelson Segura nsegu...@gmail.com wrote:
  I have a JSP page which has a small wicket mini page embedded in an
  IFrame.
  The small wicket page has wicket button that when preset should take the
  user to a full Wicket page.
  My problem is that when Using setResponsePage from the onclick event in
 the
  mini page, the Iframe gets refreshed.
  Instead I would like the whole JSP to be replaced by the wicket response
  page.
  Any ideas on this can be accomplished without having to rewrite the JSP
 into
  wicket (it is in the header of all JSP pages)
  and without having to rewrite the wicket code into JSP?
  -Nelson
 

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




Re: New Website up using wicket

2011-05-16 Thread Henrique Boregio
Actually, I didn't even know there was an html compressor for wicket
(I'll google it).

As for the other question, the backend runs on hibernate. Not 100%
hibernate, since I'm actually not mapping all of the relations using
hibernate.

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



MarkupNotFoundException strange behavior

2011-05-16 Thread Tito
Hi, I'm having this error:

   org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html'
for component 'com.keepcon.web.timetracking.EmployeeDedicationLoad' not
found. Enable debug messages for org.apache.wicket.util.resource to get a
list of all filenames tried.: [Page class =
com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version = 0]
Usually It's because html doesn't exist. But my application is deployed and
working. Only with one user, and only in his computer (at least for the
moment) I get this error.

Does anyone know what could be causing this selective error?

Thanks in advance

Tito


Re: MarkupNotFoundException strange behavior

2011-05-16 Thread Clint Checketts
This happens because you don't have an HTML file for your page. (Assuming
you are extending WebPage). You'll need to tell more about your setup and
when you are extending to really pinpoint the issue.

EmployeeDedicationLoad extends WebPage, right?

-Clint




On Mon, May 16, 2011 at 1:24 PM, Tito njyt...@gmail.com wrote:

 Hi, I'm having this error:

   org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html'
 for component 'com.keepcon.web.timetracking.EmployeeDedicationLoad' not
 found. Enable debug messages for org.apache.wicket.util.resource to get a
 list of all filenames tried.: [Page class =
 com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version = 0]
 Usually It's because html doesn't exist. But my application is deployed and
 working. Only with one user, and only in his computer (at least for the
 moment) I get this error.

 Does anyone know what could be causing this selective error?

 Thanks in advance

 Tito



TextField not binding PropertyModel

2011-05-16 Thread lucast
Dear Forum,
I am trying to bind the field event.title to the eventTitleTextField in a
form in the following manner:

 TextFieldString eventTitleTextField = new TextFieldString(eventTitle,
new PropertyModelString(event, title));

title is a field of event object.

When processing the form, after having filled the eventTitleTextField,
event.getTitle() returns null.
When analysing the content of the above eventTitleTextField while debugging
on Eclipse, the eventTitleTextField.data contains an instance of event
object and the title field is populated.

However, the original event.title field is still null. 
Why is it not binding the TextField to the variable? what am I missing here?

Thanks in advance,
Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TextField-not-binding-PropertyModel-tp3527074p3527074.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: MarkupNotFoundException strange behavior

2011-05-16 Thread andrea del bene
Do you mean that on another computer with the same user you don't get 
the error?
That sounds weird. Have you tried cleaning cache and temporary files on 
pc that gives error?

Hi, I'm having this error:

org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html'
for component 'com.keepcon.web.timetracking.EmployeeDedicationLoad' not
found. Enable debug messages for org.apache.wicket.util.resource to get a
list of all filenames tried.: [Page class =
com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version = 0]
Usually It's because html doesn't exist. But my application is deployed and
working. Only with one user, and only in his computer (at least for the
moment) I get this error.

Does anyone know what could be causing this selective error?

Thanks in advance

Tito




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



Re: TextField not binding PropertyModel

2011-05-16 Thread Per Newgro

Am 16.05.2011 20:48, schrieb lucast:

Dear Forum,
I am trying to bind the field event.title to the eventTitleTextField in a
form in the following manner:

  TextFieldString  eventTitleTextField = new TextFieldString(eventTitle,
new PropertyModelString(event, title));

title is a field of event object.

When processing the form, after having filled the eventTitleTextField,
event.getTitle() returns null.
When analysing the content of the above eventTitleTextField while debugging
on Eclipse, the eventTitleTextField.data contains an instance of event
object and the title field is populated.

However, the original event.title field is still null.
Why is it not binding the TextField to the variable? what am I missing here?

Thanks in advance,
Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TextField-not-binding-PropertyModel-tp3527074p3527074.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 do you assign event? Are there multiple new Event() somewhere?
I would bet that you assign data to one instance and check data in 
another one.

But we need some code here.

Cheers
Per

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



Re: Ajax and IComponentResolver

2011-05-16 Thread Alexandru Artimon
I've compiled the latest code from the wicket trunk and when plugging in 
the latest jars into our project I've seen that some changes have to be 
done in order to use wicket 1.5 (like some package names changed, can't 
find org.apache.wicket.Request).


So I was wandering how far is the 1.5 release ? Because we're usually 
including final versions in our project.


Thanks,
Alex

On 05/16/2011 06:28 PM, Martin Grigorov wrote:

How to build Wicket is described at
http://wicket.apache.org/contribute/build.html
But the patch is only for 1.5. You can't use it in 1.4.

I recommend you to upgrade.

On Mon, May 16, 2011 at 5:16 PM, Alexandru Artimon
aarti...@developmentgateway.org  wrote:


I can try the patch and test, but I only have the wicket 1.4.17 jars.
So can I do a code checkout from somewhere? :D
Or get a jar that has the patch in it ?



On 05/16/2011 05:50 PM, Martin Grigorov wrote:


Sounds like https://issues.apache.org/jira/browse/WICKET-3719

Can you try the patch there and give feedback ?
If it still fails then a quickstart app or a test case would help us to
improve it.

On Mon, May 16, 2011 at 4:43 PM, Alexandru Artimon
aarti...@developmentgateway.org   wrote:

  Hello,

I have a custom wicket html tag that is handled by a component resolver
to
automatically generate a component for it. And these components only
exist
at the render phase and aren't stored in the page tree.

Now when Ajax is used to update a fragment of the web page, looks like
the
components for these wicket html tags were not rendered. So instead of
getting the desired markup I get only the contents of the original
markup.

Might this be a bug? It looks like the component resolver doesn't work
when
the response is built for the ajax update.

Any ideas/workarounds ?

Thanks again,
Alex

-
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



PropertyModel not binding DropDownChoice

2011-05-16 Thread lucast
Dear Forum,
I have yet another question about  PropertyModel not binding to an object
field but this time using DropDownChoice.

In my form I have 
DropDownChoiceHowOftenType eventOccurHowOftenDropDownChoice = new
DropDownChoiceHowOftenType(eventOccurHowOften, new
PropertyModelHowOftenType(event, occurrHowOften),
HowOftenType.getOccurHowOftenValues(), new ChoiceRendererHowOftenType() );

occurrHowOften is a field of object event,
HowOftenType.getOccurHowOftenValues() return a list of Enum and
ChoiceRendererHowOftenType simply implements getDisplayValue and getIdValue
for IChoiceRenderer.

When processing the form, after having filled the
eventOccurHowOftenDropDownChoice, event.getOccurrHowOften returns null. 

As explained on 
http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-binding-TextField-td3527074.html
my previous post , when analysing the content of the above
eventOccurHowOftenDropDownChoice while debugging on Eclipse, the
eventOccurHowOftenDropDownChoice.data contains an instance of event object
and the occurHowOften enum field is populated.

However, the original event.occurHowOften field is still null.
Why is PropertyModel not binding the DropDownChoice to the variable? what am
I missing here? 


The interesting thing is that another field DropDownChoiceEventType
eventTypeDropDown = new DropDownChoiceEventType(eventTypeChoice,new
PropertyModelEventType(event, eventType),
Arrays.asList(EventType.values())); 
which is binding an enum field to event object is working absolutely fine.
The only difference between the two is that on this one I am not passing an
IChoiceRenderer object.

Even when I don't use the IChoiceRenderer instance on the former, the
PropertyModel is still not binding the DropDownChoice value to
event.occurHowOften variable.


These are very simple form fields and I still don't get what I'm doing
wrong. Can you spot where I am making some sort of mistake?

Thanks in advance,
Lucas


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-binding-DropDownChoice-tp3527154p3527154.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: TextField not binding PropertyModel

2011-05-16 Thread lucast
Hi Per,
You are spot on! Thanks.
I'm creating a add/edit form and what I was initialising the event object in
two places:
public class CreateEvent extends Panel {

private Event event = new Event();
...
...
   public GenericEventCreatePanel(String id, Long eventId){
super(id, new LoadableEventModel(eventId));
Event eventFromDB = (Event) this.getDefaultModel().getObject();
if ( eventFromDB == null ){
event = new Event(EventDetailValues);
}else{
event = eventFromDB;
}



I will modify it so that event object is initialized once and if it is an
event for edit (LoadableEventModel finds the event in DB), then I will copy
each field individually.

Thanks for your help.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-binding-TextField-tp3527074p3527217.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 binding DropDownChoice

2011-05-16 Thread andrea del bene

Hi lucast,

it would help watching source code of event's class to figure out what's 
wrong

Dear Forum,
I have yet another question about  PropertyModel not binding to an object
field but this time using DropDownChoice.

In my form I have
DropDownChoiceHowOftenType  eventOccurHowOftenDropDownChoice = new
DropDownChoiceHowOftenType(eventOccurHowOften, new
PropertyModelHowOftenType(event, occurrHowOften),
HowOftenType.getOccurHowOftenValues(), new ChoiceRendererHowOftenType() );

occurrHowOften is a field of object event,
HowOftenType.getOccurHowOftenValues() return a list of Enum and
ChoiceRendererHowOftenType simply implements getDisplayValue and getIdValue
for IChoiceRenderer.

When processing the form, after having filled the
eventOccurHowOftenDropDownChoice, event.getOccurrHowOften returns null.

As explained on
http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-binding-TextField-td3527074.html
my previous post , when analysing the content of the above
eventOccurHowOftenDropDownChoice while debugging on Eclipse, the
eventOccurHowOftenDropDownChoice.data contains an instance of event object
and the occurHowOften enum field is populated.

However, the original event.occurHowOften field is still null.
Why is PropertyModel not binding the DropDownChoice to the variable? what am
I missing here?


The interesting thing is that another field DropDownChoiceEventType
eventTypeDropDown = new DropDownChoiceEventType(eventTypeChoice,new
PropertyModelEventType(event, eventType),
Arrays.asList(EventType.values()));
which is binding an enum field to event object is working absolutely fine.
The only difference between the two is that on this one I am not passing an
IChoiceRenderer object.

Even when I don't use the IChoiceRenderer instance on the former, the
PropertyModel is still not binding the DropDownChoice value to
event.occurHowOften variable.


These are very simple form fields and I still don't get what I'm doing
wrong. Can you spot where I am making some sort of mistake?

Thanks in advance,
Lucas


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-binding-DropDownChoice-tp3527154p3527154.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



DataTable and FilterToolbar

2011-05-16 Thread Tom Eicher


Hi, I guess no reply means it's not a simple FAQ ;-)

So to start it easy:

If I have a DataTable, with a FilterToolbar, and
a TextFilteredPropertyColumn, how is the
TextFilteredPropertyColumn supposed to submit, i.e.
apply it's input for filtering.

Pressing ENTER will only work if there is not other
text input on the form / on the page.

Cheers, Tom.


Tom Eicher schrieb:

Hello,

(I have been unable to locate a current and working
wicketstuff mailing list, so I am sending to
wicket mailing list instead. I searched for quite
some time. This is really confusing with the old
SF list still accepting subscribe requests etc etc)

We are using wicket, wicketstuff and a colletion of
wicket best pratices found on the net. Thus, we use
DataTable with sorting and filtering.

This works great, but I noticed a few days ago, that as
soon as you have 2 or more TextFilteredPropertyColumn
in your FilterToolbar, the browser will not submit the
form upon pressing enter.

Of course this is standard behaviour for a browser, but
there must be a solution for this situation, must it not ?

I found the Form.setDefaultButton(), but this requires an
explicit (and visible) defaultSubmittingComponent, which I
don't have or want.

I also found the GoFilter / GoAndClearFilter, but these seem
to me to be for usage within a form, but not within a DataTable
FilterToolbar. (potentially, every column is occupied by a
filter - where would I put the GoFilter ?)

To submit the filters, probably some JavaScript magic is
required, BUT - the Javascript is (already) in the
Form.appendDefaultButtonField() / .onComponentTagBody(),
at least partially, is it not ?

To make it worse, we have a SubmittingOrderByLink as found
on the net, which has another funky javascript submit
magic like

protected final String getTriggerJavaScript() {
if (getForm() != null) {
// find the root form - the one we are really going to submit
Form? root = getForm().getRootForm();
StringBuffer sb = new StringBuffer(100);
sb.append(var e=document.getElementById(');
sb.append(root.getHiddenFieldId());
sb.append('); e.name=\');
sb.append(getInputName());
sb.append('; e.value='x';);
sb.append(var f=document.getElementById(');
sb.append(root.getMarkupId());
sb.append('););
if (getForm() != root) {
sb.append(var ff=document.getElementById(');
sb.append(getForm().getMarkupId());
sb.append('););
} else {
sb.append(var ff=f;);
}
sb.append(if (ff.onsubmit != undefined) { if (ff.onsubmit()==false)
return false; });
sb.append(f.submit();e.value='';e.name='';return false;);
return sb.toString();
} else {
return null;
}
}

Actually, I should not add a 3rd magic submit solution to the page,
should I ? I'm not happy with all that, and very confused.
I hope you can point me in the right direction.

Thanks in advance,
Cheers, Tom.


PS: I could not find a single place of Documentation for DataTable
 related. If there were a definite correct place in the wiki, I would
add some findings and examples later...



-
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: DataTable and FilterToolbar

2011-05-16 Thread Igor Vaynberg
there is a GoAndClearFilter which can submit the search form afair

-igor

On Mon, May 16, 2011 at 12:55 PM, Tom Eicher r...@teicher.net wrote:

 Hi, I guess no reply means it's not a simple FAQ ;-)

 So to start it easy:

 If I have a DataTable, with a FilterToolbar, and
 a TextFilteredPropertyColumn, how is the
 TextFilteredPropertyColumn supposed to submit, i.e.
 apply it's input for filtering.

 Pressing ENTER will only work if there is not other
 text input on the form / on the page.

 Cheers, Tom.


 Tom Eicher schrieb:

 Hello,

 (I have been unable to locate a current and working
 wicketstuff mailing list, so I am sending to
 wicket mailing list instead. I searched for quite
 some time. This is really confusing with the old
 SF list still accepting subscribe requests etc etc)

 We are using wicket, wicketstuff and a colletion of
 wicket best pratices found on the net. Thus, we use
 DataTable with sorting and filtering.

 This works great, but I noticed a few days ago, that as
 soon as you have 2 or more TextFilteredPropertyColumn
 in your FilterToolbar, the browser will not submit the
 form upon pressing enter.

 Of course this is standard behaviour for a browser, but
 there must be a solution for this situation, must it not ?

 I found the Form.setDefaultButton(), but this requires an
 explicit (and visible) defaultSubmittingComponent, which I
 don't have or want.

 I also found the GoFilter / GoAndClearFilter, but these seem
 to me to be for usage within a form, but not within a DataTable
 FilterToolbar. (potentially, every column is occupied by a
 filter - where would I put the GoFilter ?)

 To submit the filters, probably some JavaScript magic is
 required, BUT - the Javascript is (already) in the
 Form.appendDefaultButtonField() / .onComponentTagBody(),
 at least partially, is it not ?

 To make it worse, we have a SubmittingOrderByLink as found
 on the net, which has another funky javascript submit
 magic like

 protected final String getTriggerJavaScript() {
 if (getForm() != null) {
 // find the root form - the one we are really going to submit
 Form? root = getForm().getRootForm();
 StringBuffer sb = new StringBuffer(100);
 sb.append(var e=document.getElementById(');
 sb.append(root.getHiddenFieldId());
 sb.append('); e.name=\');
 sb.append(getInputName());
 sb.append('; e.value='x';);
 sb.append(var f=document.getElementById(');
 sb.append(root.getMarkupId());
 sb.append('););
 if (getForm() != root) {
 sb.append(var ff=document.getElementById(');
 sb.append(getForm().getMarkupId());
 sb.append('););
 } else {
 sb.append(var ff=f;);
 }
 sb.append(if (ff.onsubmit != undefined) { if (ff.onsubmit()==false)
 return false; });
 sb.append(f.submit();e.value='';e.name='';return false;);
 return sb.toString();
 } else {
 return null;
 }
 }

 Actually, I should not add a 3rd magic submit solution to the page,
 should I ? I'm not happy with all that, and very confused.
 I hope you can point me in the right direction.

 Thanks in advance,
 Cheers, Tom.


 PS: I could not find a single place of Documentation for DataTable
  related. If there were a definite correct place in the wiki, I would
 add some findings and examples later...



 -
 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



FormComponent convertInput for children FormComponets

2011-05-16 Thread Clint Checketts
  I have a FormComponentPanel that contains multiple child formcomponent.
The purpose of this panel is to be able to add in several cihldren
dynamically. The end model is supposed to be the list from all the children
component. I get the value in my convertInput() method by iterating over all
the children components, calling each one's getConvertedInput()

Here's the problem, the child component's values haven't convertedTheir
input at that point, so i call 'validate()' on each one to trigger that
coversion.  Is that the right way to approach this? Am i causing
unneeded/duplicate processing?
.

protected void convertInput() {
  final ArrayListT convertedInputList = new ArrayListT();
  inForm.visitFormComponents(new IVisitor() {
   public Object formComponent(IFormVisitorParticipant formComponent) {
if (formComponent instanceof FormComponent?) {
 FormComponentT fc = (FormComponentT) formComponent;
 *fc.validate();
* T convertedInput =  *fc.getConvertedInput();
* if(null != convertedInput){
  convertedInputList.add(convertedInput);
 }
}
return Component.IVisitor.CONTINUE_TRAVERSAL;
   }
  });
  setConvertedInput(convertedInputList);
 }

 Thanks,

-Clint


Re: New Website up using wicket

2011-05-16 Thread James Carman
On Mon, May 16, 2011 at 1:03 PM, Henrique Boregio hbore...@gmail.com wrote:
 As for the other question, the backend runs on hibernate. Not 100%
 hibernate, since I'm actually not mapping all of the relations using
 hibernate.


Why not?  Was there a performance issue?

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



Re: PropertyModel not binding DropDownChoice

2011-05-16 Thread Clint Checketts
If the ChoiceRenderer ID isn't unique or it has trouble matching it with the
selected value, you could get this problem.

On Mon, May 16, 2011 at 2:21 PM, lucast lucastol...@hotmail.com wrote:

 Dear Forum,
 I have yet another question about  PropertyModel not binding to an object
 field but this time using DropDownChoice.

 In my form I have
 DropDownChoiceHowOftenType eventOccurHowOftenDropDownChoice = new
 DropDownChoiceHowOftenType(eventOccurHowOften, new
 PropertyModelHowOftenType(event, occurrHowOften),
 HowOftenType.getOccurHowOftenValues(), new ChoiceRendererHowOftenType() );

 occurrHowOften is a field of object event,
 HowOftenType.getOccurHowOftenValues() return a list of Enum and
 ChoiceRendererHowOftenType simply implements getDisplayValue and getIdValue
 for IChoiceRenderer.

 When processing the form, after having filled the
 eventOccurHowOftenDropDownChoice, event.getOccurrHowOften returns null.

 As explained on

 http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-binding-TextField-td3527074.html
 my previous post , when analysing the content of the above
 eventOccurHowOftenDropDownChoice while debugging on Eclipse, the
 eventOccurHowOftenDropDownChoice.data contains an instance of event object
 and the occurHowOften enum field is populated.

 However, the original event.occurHowOften field is still null.
 Why is PropertyModel not binding the DropDownChoice to the variable? what
 am
 I missing here?


 The interesting thing is that another field DropDownChoiceEventType
 eventTypeDropDown = new DropDownChoiceEventType(eventTypeChoice,new
 PropertyModelEventType(event, eventType),
 Arrays.asList(EventType.values()));
 which is binding an enum field to event object is working absolutely fine.
 The only difference between the two is that on this one I am not passing an
 IChoiceRenderer object.

 Even when I don't use the IChoiceRenderer instance on the former, the
 PropertyModel is still not binding the DropDownChoice value to
 event.occurHowOften variable.


 These are very simple form fields and I still don't get what I'm doing
 wrong. Can you spot where I am making some sort of mistake?

 Thanks in advance,
 Lucas


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-binding-DropDownChoice-tp3527154p3527154.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 binding DropDownChoice

2011-05-16 Thread James Carman
Lucas,

Check out the EnumDropDownChoice from Wicketopia...

http://wicketopia.svn.sourceforge.net/viewvc/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/component/choice/EnumDropDownChoice.java?revision=140view=markup
http://wicketopia.svn.sourceforge.net/viewvc/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/renderer/EnumChoiceRenderer.java?revision=140view=markup



On Mon, May 16, 2011 at 6:33 PM, Clint Checketts checke...@gmail.com wrote:
 If the ChoiceRenderer ID isn't unique or it has trouble matching it with the
 selected value, you could get this problem.

 On Mon, May 16, 2011 at 2:21 PM, lucast lucastol...@hotmail.com wrote:

 Dear Forum,
 I have yet another question about  PropertyModel not binding to an object
 field but this time using DropDownChoice.

 In my form I have
 DropDownChoiceHowOftenType eventOccurHowOftenDropDownChoice = new
 DropDownChoiceHowOftenType(eventOccurHowOften, new
 PropertyModelHowOftenType(event, occurrHowOften),
 HowOftenType.getOccurHowOftenValues(), new ChoiceRendererHowOftenType() );

 occurrHowOften is a field of object event,
 HowOftenType.getOccurHowOftenValues() return a list of Enum and
 ChoiceRendererHowOftenType simply implements getDisplayValue and getIdValue
 for IChoiceRenderer.

 When processing the form, after having filled the
 eventOccurHowOftenDropDownChoice, event.getOccurrHowOften returns null.

 As explained on

 http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-binding-TextField-td3527074.html
 my previous post , when analysing the content of the above
 eventOccurHowOftenDropDownChoice while debugging on Eclipse, the
 eventOccurHowOftenDropDownChoice.data contains an instance of event object
 and the occurHowOften enum field is populated.

 However, the original event.occurHowOften field is still null.
 Why is PropertyModel not binding the DropDownChoice to the variable? what
 am
 I missing here?


 The interesting thing is that another field DropDownChoiceEventType
 eventTypeDropDown = new DropDownChoiceEventType(eventTypeChoice,new
 PropertyModelEventType(event, eventType),
 Arrays.asList(EventType.values()));
 which is binding an enum field to event object is working absolutely fine.
 The only difference between the two is that on this one I am not passing an
 IChoiceRenderer object.

 Even when I don't use the IChoiceRenderer instance on the former, the
 PropertyModel is still not binding the DropDownChoice value to
 event.occurHowOften variable.


 These are very simple form fields and I still don't get what I'm doing
 wrong. Can you spot where I am making some sort of mistake?

 Thanks in advance,
 Lucas


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-binding-DropDownChoice-tp3527154p3527154.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