Re: static or nonstatic inner classes

2010-06-29 Thread Sigmar Muuga
Actually not. I was thinking that maybe I have missed something from the
docs. Such issues are sometimes hard to find :)

On Wed, Jun 30, 2010 at 8:59 AM, Jeremy Thomerson  wrote:

> Use the same decision making process you would for any other java class
> Do you need access to any private variables of the containing class?
>
> Jeremy Thomerson
> -- sent from my smartphone - please excuse formatting and spelling errors
>
> On Jun 30, 2010 12:56 AM, "Sigmar Muuga"  wrote:
>
> Hello,
> while designing pages for my app, I was thinking, if there is some
> difference, when I use static or nonstatic classes in my page classes?
>
> For example:
>
> public class MyPage extends Page {
>
>   some code
>  private /** Should it be static or not? */ class MyForm extends Form {
>  }
> }
>
> Best regards,
> Sigmar
>


Re: static or nonstatic inner classes

2010-06-29 Thread Jeremy Thomerson
Use the same decision making process you would for any other java class
Do you need access to any private variables of the containing class?

Jeremy Thomerson
-- sent from my smartphone - please excuse formatting and spelling errors

On Jun 30, 2010 12:56 AM, "Sigmar Muuga"  wrote:

Hello,
while designing pages for my app, I was thinking, if there is some
difference, when I use static or nonstatic classes in my page classes?

For example:

public class MyPage extends Page {

  some code
 private /** Should it be static or not? */ class MyForm extends Form {
 }
}

Best regards,
Sigmar


Re: wiQuery grid row expander

2010-06-29 Thread Ernesto Reinaldo Barreiro
John,

See [1] and in particular the answer from Cemal (the one on Jun 16...)
That might answer part of your question.

Some time ago I have started [2], the implementation there is not that
complete yet but at least it could give you a starting point. And, of
course, patches and contributions are always welcome!

Best,

Ernesto

1-http://apache-wicket.1842946.n4.nabble.com/wiQuery-components-with-server-side-state-live-demo-tc1842975.html#none
2-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/jqgrid

On Wed, Jun 30, 2010 at 6:34 AM, John Armstrong  wrote:
> Back in march there was a thread titled "wiQuery components with
> server side state - live demo"
>
> On that thread Richard Poway and I corresponded about a Grid Row Expander.
>
> I never saw the reply but in a recent google for this I can across a
> link he posted in that thread
>
> http://labs.jweekend.com/public/grid/GridRowExpanderPage
>
> This link is now password protected.
>
> Richard/anyone from jweekend : Does this link still exit?
>
> Tx!
> John-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



static or nonstatic inner classes

2010-06-29 Thread Sigmar Muuga
Hello,
while designing pages for my app, I was thinking, if there is some
difference, when I use static or nonstatic classes in my page classes?

For example:

public class MyPage extends Page {

   some code
  private /** Should it be static or not? */ class MyForm extends Form {
  }
}

Best regards,
Sigmar


wiQuery grid row expander

2010-06-29 Thread John Armstrong
Back in march there was a thread titled "wiQuery components with
server side state - live demo"

On that thread Richard Poway and I corresponded about a Grid Row Expander.

I never saw the reply but in a recent google for this I can across a
link he posted in that thread

http://labs.jweekend.com/public/grid/GridRowExpanderPage

This link is now password protected.

Richard/anyone from jweekend : Does this link still exit?

Tx!
John-

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



Re: passing a map into PageParameters

2010-06-29 Thread Igor Vaynberg
Page parameters only support strings, so you will have to encode and decode
yourself

-igor

On Jun 29, 2010 9:49 AM, "Fernando Wermus" 
wrote:

Ray,
   I haven't had any succeded either. I am working with fb rest (facebook)
which has some classes that work with json to store several kind of objects.
In my case, I need my page to be bookmarkable.

thanks anyway


On Tue, Jun 29, 2010 at 1:47 AM, Ray Weidner <
ray.weidner.develo...@gmail.com> wrote:

> I haven't...
--

Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: handling error in DataProvider

2010-06-29 Thread Igor Vaynberg
RequestCycle#onBeginRequest() may be a good place

On Jun 29, 2010 3:04 AM, "Decebal Suiu"  wrote:


Thanks again, I will try to profile my code.
Another question is where I can clean my flags with errors (I keep in
session a Map with widget's id as key and Exception as value)? I understand
that onAfterRender method is not a good candidate because it's called on
abort exception also.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/handling-error-in-DataProvider-tp2264242p2271960.html

Sent from the Wicket - User mailing list archive at Nabble.com.

---...


Re: problem with two ListChoices connected each other

2010-06-29 Thread Igor Vaynberg
See the palette component

-igor

On Jun 29, 2010 3:11 AM, "Java Programmer"  wrote:

Hello,
I need a solution if such component exists:
1) first ListChoice have categories about 1-2k options
2) second ListChoice is empty
3) there are arrows which can move elements from first to second
ListChoice, and the way back
Main problem in such scenario would be with sending lot of refreshing
data through the Ajax, because there are a lot options in fist
ListChoice,
we need something much simpler, and we cannot find, maybe something
pure JavaScript with Model connected. Do you have any idea what we can
use for this?

--
Thanks in advance,
Adrian

http://www.codeappeal.com

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


Re: extending AbstractFormValidator as a validation adapter

2010-06-29 Thread Jeremy Thomerson
If you need to validate after the data has been pushed to the model, then
just validate in the onSubmit and call error on the individual components
for the form.  Leave the form validator out of it.

On Tue, Jun 29, 2010 at 11:03 PM, Ray Weidner <
ray.weidner.develo...@gmail.com> wrote:

> Igor (or anyone else who knows the answer),
>
> There is one problem with my implementation of the FormValidator in the
> code
> that I included earlier.  It performs validation using the Form's model
> object, which is a problem because the input hasn't been mapped onto it at
> this stage of validation.
>
> What I'd like to do now is somehow perform this validation from within the
> #onSubmit call.  I don't know if this is even possible.  I am hoping that
> perhaps I could register the errors by calling error(String) as you
> mentioned, and then redirecting the form back to processing these
> validation
> errors as it normally would.
>
> Below is a simplification of the code I'd like to execute in this
> situation.
>  Note the text "// TODO: ???"  That's the part that I need to fill in,
> ideally redirecting back down the 'invalid' pathway.
>
> The HTML here is just a form with some fields and a submit button, so I'll
> omit.
>
> *public interface BusinessValidator { public ValidationResult validate
> (Record record, Action action); } public interface BusinessValidationResult
> { public boolean isValid (); public Set  getGeneralErrorMessages
> ();
> public Set  getFieldErrorFieldNames (); public Set 
> getFieldErrorMessage (String fieldName); } public interface BusinessService
> { public List  getAllActions (); public BusinessValidator
> getValidator (Action action); public void save (Record record); [lots of
> other stuff] ... } public class RecordUpdatePage extends WebPage { private
> Record theRecord = null; private Form  theForm = null; private
> BusinessService theService = null; private Action selectedAction = null;
> public RecordEditPage (BusinessService service, Record record) { theService
> = service; theRecord = record; createForm (); } public Record getRecord ()
> {
> return theRecord; } private void createForm () { theForm = new Form
> 
> ("recordUpdateForm"); theForm.setModel (new CompoundPropertyModel 
> (theRecord)); theForm.add (new DropDownChoice  ("action", new
> PropertyModel  (this, "selectedAction"), new
> LoadableDetachableModel
> > () { @Override protected List  load () { return new
> ArrayList  (theService.getAllActions ()); } }, ) ); ... [add a
> bunch
> of fields] ... theForm.add (new Button ("save")) { @Override public void
> onSubmit () { save (); } }; } private void save () { if (! validate ()) {
> //
> TODO: ??? } else { theService.save (record); setResponsePage
> (MainPage.class); } } public boolean validate () { BusinessValidator
> validator = theService.getValidator (selectedAction); Record record =
> ((Form
> ) form).getModel ().getObject (); BusinessValidation result =
> validator.validate (theRecord, selectedAction); if (result.isValid ()) {
> return true; } for (String generalErrorMessage :
> result.getGeneralErrorMessages ()) { theForm.error (generalErrorMessage); }
> Map > fieldErrorMap = result.getErrorMessageMap ();
> for
> (String fieldName : fieldErrorMap.keySet ()) { for (String
> fieldErrorMessage
> : fieldErrorMap.get (fieldName)) { Component field = theForm.get
> (fieldName); if (field != null) { field.error (fieldErrorMessage); } else {
> theForm.error (fieldErrorMessage); } } } return false; } }*
>
> On Tue, Jun 29, 2010 at 10:29 AM, Ray Weidner <
> ray.weidner.develo...@gmail.com> wrote:
>
> > Thanks, Igor, I now see the methods you are talking about, and your
> > explanation makes perfect sense.
> >
> >
> > On Tue, Jun 29, 2010 at 1:16 AM, Igor Vaynberg  >wrote:
> >
> >> On Mon, Jun 28, 2010 at 9:27 PM, Ray Weidner
> >>  wrote:
> >> > Hi all,
> >> >
> >> > The application that I'm current writing already has its own
> validation
> >> > logic, but I would like to integrate its results into the existing
> >> Wicket
> >> > form validation so as to unify the feedback.  To this end, I'm trying
> to
> >> > extend AbstractFormValidator to wrap my system's logic.
> >> >
> >> > The way my system's validation works is pretty simple and
> >> self-explanatory:
> >> >
> >> > *public interface Validator {*
> >> > * **public ValidationResult validate (Record record, Action action);*
> >> > *}*
> >> > *
> >> > *
> >> > *public interface ValidationResult {*
> >> > * **public boolean isValid ();*
> >> > *
> >> > *
> >> > * **public Set  getGeneralErrorMessages ();*
> >> > * *
> >> > * **public Set  getFieldErrorFieldNames ();*
> >> > * *
> >> > * **public Set  getFieldErrorMessages (String fieldName);*
> >> > *}*
> >> >
> >> > The ValidationResultImpl is pretty much a simple bean for setting and
> >> > getting error messages, both general, and by field.  Validator
> >> > implementations are specific to the need, and the specifics aren't
> >> important
> >> > here.
> >> >
> >> > For my a

Re: extending AbstractFormValidator as a validation adapter

2010-06-29 Thread Ray Weidner
Igor (or anyone else who knows the answer),

There is one problem with my implementation of the FormValidator in the code
that I included earlier.  It performs validation using the Form's model
object, which is a problem because the input hasn't been mapped onto it at
this stage of validation.

What I'd like to do now is somehow perform this validation from within the
#onSubmit call.  I don't know if this is even possible.  I am hoping that
perhaps I could register the errors by calling error(String) as you
mentioned, and then redirecting the form back to processing these validation
errors as it normally would.

Below is a simplification of the code I'd like to execute in this situation.
 Note the text "// TODO: ???"  That's the part that I need to fill in,
ideally redirecting back down the 'invalid' pathway.

The HTML here is just a form with some fields and a submit button, so I'll
omit.

*public interface BusinessValidator { public ValidationResult validate
(Record record, Action action); } public interface BusinessValidationResult
{ public boolean isValid (); public Set  getGeneralErrorMessages ();
public Set  getFieldErrorFieldNames (); public Set 
getFieldErrorMessage (String fieldName); } public interface BusinessService
{ public List  getAllActions (); public BusinessValidator
getValidator (Action action); public void save (Record record); [lots of
other stuff] ... } public class RecordUpdatePage extends WebPage { private
Record theRecord = null; private Form  theForm = null; private
BusinessService theService = null; private Action selectedAction = null;
public RecordEditPage (BusinessService service, Record record) { theService
= service; theRecord = record; createForm (); } public Record getRecord () {
return theRecord; } private void createForm () { theForm = new Form 
("recordUpdateForm"); theForm.setModel (new CompoundPropertyModel 
(theRecord)); theForm.add (new DropDownChoice  ("action", new
PropertyModel  (this, "selectedAction"), new LoadableDetachableModel
> () { @Override protected List  load () { return new
ArrayList  (theService.getAllActions ()); } }, ) ); ... [add a bunch
of fields] ... theForm.add (new Button ("save")) { @Override public void
onSubmit () { save (); } }; } private void save () { if (! validate ()) { //
TODO: ??? } else { theService.save (record); setResponsePage
(MainPage.class); } } public boolean validate () { BusinessValidator
validator = theService.getValidator (selectedAction); Record record = ((Form
) form).getModel ().getObject (); BusinessValidation result =
validator.validate (theRecord, selectedAction); if (result.isValid ()) {
return true; } for (String generalErrorMessage :
result.getGeneralErrorMessages ()) { theForm.error (generalErrorMessage); }
Map > fieldErrorMap = result.getErrorMessageMap (); for
(String fieldName : fieldErrorMap.keySet ()) { for (String fieldErrorMessage
: fieldErrorMap.get (fieldName)) { Component field = theForm.get
(fieldName); if (field != null) { field.error (fieldErrorMessage); } else {
theForm.error (fieldErrorMessage); } } } return false; } }*

On Tue, Jun 29, 2010 at 10:29 AM, Ray Weidner <
ray.weidner.develo...@gmail.com> wrote:

> Thanks, Igor, I now see the methods you are talking about, and your
> explanation makes perfect sense.
>
>
> On Tue, Jun 29, 2010 at 1:16 AM, Igor Vaynberg wrote:
>
>> On Mon, Jun 28, 2010 at 9:27 PM, Ray Weidner
>>  wrote:
>> > Hi all,
>> >
>> > The application that I'm current writing already has its own validation
>> > logic, but I would like to integrate its results into the existing
>> Wicket
>> > form validation so as to unify the feedback.  To this end, I'm trying to
>> > extend AbstractFormValidator to wrap my system's logic.
>> >
>> > The way my system's validation works is pretty simple and
>> self-explanatory:
>> >
>> > *public interface Validator {*
>> > * **public ValidationResult validate (Record record, Action action);*
>> > *}*
>> > *
>> > *
>> > *public interface ValidationResult {*
>> > * **public boolean isValid ();*
>> > *
>> > *
>> > * **public Set  getGeneralErrorMessages ();*
>> > * *
>> > * **public Set  getFieldErrorFieldNames ();*
>> > * *
>> > * **public Set  getFieldErrorMessages (String fieldName);*
>> > *}*
>> >
>> > The ValidationResultImpl is pretty much a simple bean for setting and
>> > getting error messages, both general, and by field.  Validator
>> > implementations are specific to the need, and the specifics aren't
>> important
>> > here.
>> >
>> > For my adapter, I'm able to get to a certain point, and I'm not sure
>> what
>> > call to make next:
>> >
>> > *public class RecordFormValidator extends AbstractFormValidator {*
>> > * **private Validator validator = null;*
>> > * **private Action action = null;*
>> > * *
>> > * **public RecordFormValidator (Validator validator, Action action) {*
>> > * **this.validator = validator;*
>> > * **this.action = action;*
>> > * **}*
>> > *
>> > *
>> > * *...@override*
>> > * **public FormComponent  [] getDependentFor

Re: How to access above hierarchy in the markup

2010-06-29 Thread Jeremy Thomerson
The hierarchy must match.  If you want to use the label in the form, add it
to the form, not the panel.

On Tue, Jun 29, 2010 at 1:59 PM, Brown, Berlin [GCG-PFS] <
berlin.br...@primerica.com> wrote:

> Pseudo Code:
>
> CompoundPropertyModel labelModel = new
> CompoundPropertyModel(labelProps);
> panel.setDefaultModel(labelModel);  /* Load labels at the PANEL level */
> panel.add(new Label(label[1]));
>
> form = new Form(new CompoundPropertyModel(myObj))  /* Load data at the
> form level */
> panel.add(form);
>
> form.add(myObj.fieldName);
>
> ...
>
> Markup that will generate a error:
>
> panel.html:
>
> 
> -- I want to access
> from the labelProps (this does not work)
>   -- I want to access
> from myObj (this works)
> 
>
> ...
>
> With the current code, I can't access from the "someLabelFromPanelLevel"
> data or I will get a accessing outside of the hierarchy error message.
>
> I wish I could do the following (way to access higher up the hierarchy)
>
> Markup:
>
> panel.html:
>
> 
> -- I want to
> access from the labelProps
>   -- I want to access
> from myObj
> 
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: Model not Updating on Multiple Form Submits

2010-06-29 Thread Jeremy Thomerson
Too many variables to debug without seeing the actual code.  The best thing
for you to do would be to create a quickstart so that we could try to run
it.  Of course, most people find their problem while creating the
quickstart.

On Tue, Jun 29, 2010 at 3:56 PM, jbrookover  wrote:

>
> To clarify even further, I did try to hack it so I changed the model of the
> form directly (even though, I presume, it's all the same model propagated
> up
> and down the hierarchy).  That also did not work.  Nothing I've done will
> force the Form to take a new object before its next submission.
>
> Thanks again!
>
> Jake
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Model-not-Updating-on-Multiple-Form-Submits-tp2272644p2272646.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: how to pass parameters to javascript function?

2010-06-29 Thread Jeremy Thomerson
On Tue, Jun 29, 2010 at 9:44 PM, Gustavo Henrique wrote:

> Hi!
> I need to put in the page a javascript function with name and Id of
> customer. I'm using a label component because I don't know others
> solutions.
> Any idea?
>
> Thanks!
>


AbstractBehavior#renderHead


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


Mulitple Forms in ListView

2010-06-29 Thread TH Lim

Hi,

I have multiple forms in a ListView. So in order not to show the same error
messages in all feedback panels I use ContainerFeedbackMessageFilter to
filter the error messages. This didn't work and the warning was
"Component-targetted feedback message was left unrendered. This could be
because you are missing a FeedbackPanel on the page." because I use non-Ajax
form submit. 

However, if I switch to AjaxSubmitLink the problem was solved. It worked as
expected. My question is should I use Ajax submit with multiple forms in a
ListView? Am I missing anything here because the problem didn't surface for
a page with multiple forms using non-Ajax submit. 

Thanks

/lim/

Codes are included below.
















public MultiFormPage()
{
ListView listView = new ListView("listView",
Arrays.asList(new String[]{"a", "b"}))
{
@Override
protected void populateItem(ListItem item)
{
Form form  = new Form("form")
{
@Override
protected void onSubmit()
{

}
};
//Form form = new Form("form");
final FeedbackPanel feedback = new FeedbackPanel("feedback",
new ContainerFeedbackMessageFilter(form));
/*
form.add(new AjaxSubmitLink("submitALink")
{
@Override
protected void onSubmit(AjaxRequestTarget target,
Form form)
{
target.addComponent(feedback);
}

@Override
protected void onError(AjaxRequestTarget target, Form
form)
{
target.addComponent(feedback);
}
});
*/
form.add(new RequiredTextField("textfield", new
Model()));
form.add(feedback.setOutputMarkupId(true));
item.add(form);
}
};

add(listView);
}
}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mulitple-Forms-in-ListView-tp2272668p2272668.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



how to pass parameters to javascript function?

2010-06-29 Thread Gustavo Henrique
Hi!
I need to put in the page a javascript function with name and Id of
customer. I'm using a label component because I don't know others solutions.
Any idea?

Thanks!


Re: org.apache.wicket.WicketRuntimeException: Unable to write the response

2010-06-29 Thread tommaso

Marjin,

Thanks, I suppose that solves part of my problem. The wait is only 1 sec or 
so, so using a lazy panel is a great idea, but does not eliminate my 
underliying problem. For instance the user can still press the refresh 
button causing the same exception and the same problem (some sort of 
corruption, things do not work well anymore, for example I have various 
wicket-ids that render differently but based on the same data and some of 
those stop rendering consistent things).


As I am not familiar with wicket yet, I am struggling to understand what's 
happening under the hood. I am also not too familiar with the threading 
model. However, I am not even sure it's concurrency problem yet.


Some of those parts using the same data  that I have mentioned above are 
JFreeCharts and if I take those out, then the problem seems to go away 
completely. Even by putting a sleep 1000 in the rendering code for the list 
view (table), I cannot reproduce the problem (and not even the exception to 
be fair).


JFreeChartImage extends Image and I took the sample from 
https://cwiki.apache.org/WICKET/jfreechart-and-wicket-example.html



Thanks,

Tommy


- Original Message - 
From: "Martijn Dashorst" 

To: 
Sent: Tuesday, June 29, 2010 8:05 AM
Subject: Re: org.apache.wicket.WicketRuntimeException: Unable to write the 
response



Don't let the user wait. Use a lazy panel to render the long stuff in
the background, or if it even takes longer than that, calculate your
model data in a background thread and use a timer to poll and see if
the thread has finished, and use the result in a panel that you
replace on your page.

Martijn

On Tue, Jun 29, 2010 at 8:45 AM,   wrote:

Hello,

This is my first post. I am not a web developer, I usually develop other 
kinds of systems, but for a quick project I have to do, I looked at JSF 
and I really did not like it. Finally, I have come across wicket and it 
was love at first sight.


Now, so far everything has been straightforward, but I am now facing the 
first puzzle...


I have a page that takes a while to render and, while it's rendering, if 
the user does anything, then I get:


org.apache.wicket.WicketRuntimeException: Unable to write the response
at org.apache.wicket.Response.handleException(Response.java:286)
at org.apache.wicket.Response.write(Response.java:310)
at 
org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:160)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)

at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at 
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 etc ...
Caused by: EOFException(java.net.SocketException: Connection reset by 
peer: socket write error)
at 
org.mortbay.http.BufferedOutputStream.flush(BufferedOutputStream.java:195)
at 
org.mortbay.util.ByteBufferOutputStream.ensureSpareCapacity(ByteBufferOutputStream.java:342)
at 
org.mortbay.util.ByteBufferOutputStream.write(ByteBufferOutputStream.java:182)
at 
org.mortbay.http.BufferedOutputStream.write(BufferedOutputStream.java:135)

at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:442)
at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java:42)
at org.apache.wicket.util.io.Streams.copy(Streams.java:121)
at org.apache.wicket.util.io.Streams.copy(Streams.java:88)
at org.apache.wicket.Response.write(Response.java:306)
... 23 more

00:39:32.335 WARN!! Invalid length: Content-Length=9491 written=4096 for 
http://127.0.0.1:8081/quickstart/app/

ERROR - WicketFilter - closing the buffer error
java.lang.IllegalStateException
at 
org.mortbay.jetty.servlet.ServletHttpResponse.getWriter(ServletHttpResponse.java:540)

at org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:392)
 etc ...

Now, this would be ok, I suppose. The user clicks something while wicket 
is sending stuff and that operation has to abort. However, this except 
really corrupts things, after this exception the web page behaves very 
strangely, some of wicket:ids do not update well anymore etc...
In the book Wicket in Action it says that a page is single threaded and 
all I am doing here is using one single page, one sesion, two request, 
quickly one after the other, before the first one completes.


I am using: INFO - WebApplication - [QuickStartApplication] Started Wicket 
version 1.4.8 in development mode
And I have downlowded a hello world project (quickstart) adapted it to 
1.4.8 (generics pretty much) and not yet refactored things as I am 
concentrating on business logic for a quick prototype. Th

Re: Model not Updating on Multiple Form Submits

2010-06-29 Thread jbrookover

To clarify even further, I did try to hack it so I changed the model of the
form directly (even though, I presume, it's all the same model propagated up
and down the hierarchy).  That also did not work.  Nothing I've done will
force the Form to take a new object before its next submission.

Thanks again!

Jake
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-not-Updating-on-Multiple-Form-Submits-tp2272644p2272646.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Model not Updating on Multiple Form Submits

2010-06-29 Thread jbrookover

Hey all,

I have a component, ResponseArea, that get's a
HibernateObjectModel.  This ResponseArea then passes that same
model down to it's sub components (ResponseEditor, ResponseViewer).  

ResponseEditor passes this model further down to a Form.  I have
some jQuery script that does a timed autosave submit of this form.

When the form submits, I do this (pseudocode):

Response newR = new Response();
newR.setData(Form.this.get("dataField").getDefaultModelObjectAsString();
saveResponse(Form.this.getModelObject(), newR);

The last step of the saveResponse(Response oldR, Response newR) method does
some processing, comparing the two versions of the response, and finally
calls:  

ResponseEditor.this.setDefaultModelObjet(newR);

Now, I expect this effect to propagate up to the parent ResponseArea and
down to the Form to be ready for the next AutoSave.  The problem is this:

At some point in the processing, the Form seems to clone the model and never
gets the new object - it retains the original object as its model object. 
So instead of this behavior

1st Autosave Execute: saveResponse(original, respond1)
2nd Autosave Execute: saveResponse(respond1, respond2)
3rd Autosave Execute: saveResponse(respond2, respond3)

I get this:

1st Autosave Execute: saveResponse(original, respond1)
2nd Autosave Execute: saveResponse(original, respond2)
3rd Autosave Execute: saveResponse(original, respond3)

Since my form would like to see progressive changes, this doesn't work.

Thoughts?

I sense IComponentInheritedModel is involved, but I'm surprised that this
isn't a native behavior.  It also seems to work in every other case - so why
not now?

Thanks!

Jake

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-not-Updating-on-Multiple-Form-Submits-tp2272644p2272644.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Testing CheckBox.onSelectionChanged(Object newSelection) using FormTester

2010-06-29 Thread Ernesto Reinaldo Barreiro
Isn't CheckBox using JavaScript, executed on the client, to generate
the "onclick" callback? See CheckBox.onComponentTag... e.g.

tag.put("onclick", "window.location.href='" + url +
(url.toString().indexOf('?') > -1 ? 
"&" : "?") + getInputName() +
"=' + this.checked;");
Ernesto


On Tue, Jun 29, 2010 at 10:00 PM, Michael Small
 wrote:
>
> I'm currently trying to test my implementation of
> CheckBox.onSelectionChanged(Object newSelection) ... I've created my
> CheckBox as follows ...
>
> item.add(new CheckBox("checkBoxId") // note that model object comes thru
> compound property model
> {
>   �...@override
>    protected void onSelectionChanged(final Object newSelection)
>    {
>        // my implementation code is here
>    }
>
>   �...@override
>    protected boolean wantOnSelectionChangedNotifications()
>    {
>        return(true);
>    }
> });
>
> In my test, however, I can't seem to get the onSelectionChanged to fire ...
>
> formTester.setValue("checkBoxId", true);
>
> I would assume that call would result in my onSelectionChanged method being
> invoked, but that is not the case.  Any ideas?
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Testing-CheckBox-onSelectionChanged-Object-newSelection-using-FormTester-tp2272641p2272641.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: @SpringBean not working for IModel implementations?

2010-06-29 Thread david_

Thanks, I'll give it a try!

2010/6/29 Ernesto Reinaldo Barreiro-4 [via Apache Wicket] <
ml-node+2272202-1574848512-232...@n4.nabble.com
>

> I think component instantiation listener will only scan wicket
> components. Just try
>
> InjectorHolder.getInjector().inject(this);
>
> on constructor of the model to get your dependencies injected.
>
> Best,
>
> Ernesto
>
>
> On Tue, Jun 29, 2010 at 3:30 PM, David Meulemans
> <[hidden email] >
> wrote:
>
> > Hi
> >
> > I've got an implementation of the IModel interface and I want to inject a
>
> > Spring bean in it.
> >
> > In the method public String getObject(); this object is null.
> >
> > Is it impossible to inject Spring beans with @SpringBean?
> >
> > thx in advance!
> >
> > David
> >
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>
>
> --
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/SpringBean-not-working-for-IModel-implementations-tp2272189p2272202.html
> To start a new topic under Wicket - User, email
> ml-node+1842947-1066186228-232...@n4.nabble.com
> To unsubscribe from Wicket - User, click 
> here.
>
>
>

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SpringBean-not-working-for-IModel-implementations-tp2272189p2272642.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Testing CheckBox.onSelectionChanged(Object newSelection) using FormTester

2010-06-29 Thread Michael Small

I'm currently trying to test my implementation of
CheckBox.onSelectionChanged(Object newSelection) ... I've created my
CheckBox as follows ...

item.add(new CheckBox("checkBoxId") // note that model object comes thru
compound property model
{
@Override
protected void onSelectionChanged(final Object newSelection)
{
// my implementation code is here
}

@Override
protected boolean wantOnSelectionChangedNotifications()
{
return(true);
}
});

In my test, however, I can't seem to get the onSelectionChanged to fire ...

formTester.setValue("checkBoxId", true);

I would assume that call would result in my onSelectionChanged method being
invoked, but that is not the case.  Any ideas?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Testing-CheckBox-onSelectionChanged-Object-newSelection-using-FormTester-tp2272641p2272641.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Delete page map on close browser window

2010-06-29 Thread Branislav Kalas

On 06/29/2010 09:03 PM, Branislav Kalas wrote:

On 06/29/2010 08:48 PM, Branislav Kalas wrote:

On 06/29/2010 11:38 AM, Branislav Kalas wrote:
Hi, in my apllication,users can open items from menu in new  
tabs/windows.

When user opens item in new window system creates new page map for it.
When user close window, pagemap is still in session.
Is it somehow posibble to delete page map when user close browser 
window?

Thanks.

I temporaly removed this functionality, but when i print out 
"Session.get().getPageMaps().size()",

i get "19" right after sign in to apllication.
In glassfish monitor under list of sessions i see this freaky output:

504ddfc199b98146581148039b0d:{wicket:wicket.DipexISApplication:m:wicket-33=[PageMap 
name=wicket-33], 
wicket:wicket.DipexISApplication:m:wicket-32=[PageMap 
name=wicket-32], 
wicket:wicket.DipexISApplication:m:wicket-35=[PageMap 
name=wicket-35], 
wicket:wicket.DipexISApplication:m:wicket-34=[PageMap 
name=wicket-34], 
wicket:wicket.DipexISApplication:m:wicket-37=[PageMap 
name=wicket-37], 
wicket:wicket.DipexISApplication:m:wicket-36=[PageMap 
name=wicket-36], 
wicket:wicket.DipexISApplication:m:wicket-39=[PageMap 
name=wicket-39], 
wicket:wicket.DipexISApplication:m:wicket-38=[PageMap 
name=wicket-38], 
wicket:wicket.DipexISApplication:m:wicket-31=[PageMap 
name=wicket-31], 
wicket:wicket.DipexISApplication:m:wicket-30=[PageMap 
name=wicket-30], 
wicket:wicket.DipexISApplication:m:wicket-29=[PageMap 
name=wicket-29], wicket:wicket.DipexISApplication:m:null=[PageMap 
name=null], wicket:wicket.DipexISApplication:m:wicket-4=[PageMap 
name=wicket-4], wicket:wicket.DipexISApplication:m:wicket-24=[PageMap 
name=wicket-24], 
wicket:wicket.DipexISApplication:m:wicket-23=[PageMap 
name=wicket-23], wicket:wicket.DipexISApplication:m:wicket-3=[PageMap 
name=wicket-3], wicket:wicket.DipexISApplication:m:wicket-22=[PageMap 
name=wicket-22], wicket:wicket.DipexISApplication:m:wicket-2=[PageMap 
name=wicket-2], wicket:wicket.DipexISApplication:m:wicket-21=[PageMap 
name=wicket-21], wicket:wicket.DipexISApplication:m:wicket-1=[PageMap 
name=wicket-1], wicket:wicket.DipexISApplication:m:wicket-8=[PageMap 
name=wicket-8], wicket:wicket.DipexISApplication:m:wicket-28=[PageMap 
name=wicket-28], wicket:wicket.DipexISApplication:m:wicket-7=[PageMap 
name=wicket-7], wicket:wicket.DipexISApplication:m:wicket-27=[PageMap 
name=wicket-27], wicket:wicket.DipexISApplication:m:wicket-6=[PageMap 
name=wicket-6], wicket:wicket.DipexISApplication:m:wicket-26=[PageMap 
name=wicket-26], wicket:wicket.DipexISApplication:m:wicket-5=[PageMap 
name=wicket-5], wicket:wicket.DipexISApplication:m:wicket-25=[PageMap 
name=wicket-25], 
wicket:wicket.DipexISApplication:m:wicket-20=[PageMap 
name=wicket-20], wicket:wicket.DipexISApplication:m:wicket-0=[PageMap 
name=wicket-0], wicket:wicket.DipexISApplication:m:wicket-18=[PageMap 
name=wicket-18], 
wicket:wicket.DipexISApplication:m:wicket-19=[PageMap 
name=wicket-19], 
wicket:wicket.DipexISApplication:m:wicket-50=[PageMap 
name=wicket-50], 
wicket:wicket.DipexISApplication:m:wicket-15=[PageMap 
name=wicket-15], 
wicket:wicket.DipexISApplication:m:wicket-51=[PageMap 
name=wicket-51], 
wicket:wicket.DipexISApplication:m:wicket-14=[PageMap 
name=wicket-14], 
wicket:wicket.DipexISApplication:m:wicket-52=[PageMap 
name=wicket-52], 
wicket:wicket.DipexISApplication:m:wicket-17=[PageMap 
name=wicket-17], 
wicket:wicket.DipexISApplication:m:wicket-53=[PageMap 
name=wicket-53], 
wicket:wicket.DipexISApplication:m:wicket-16=[PageMap 
name=wicket-16], wicket:wicket.DipexISApplication:session=sysadm; , 
wicket:wicket.DipexISApplication:m:wicket-11=[PageMap 
name=wicket-11], 
wicket:wicket.DipexISApplication:m:wicket-10=[PageMap 
name=wicket-10], 
wicket:wicket.DipexISApplication:m:wicket-13=[PageMap 
name=wicket-13], wicket:wicket.DipexISApplication:m:wicket-9=[PageMap 
name=wicket-9], wicket:wicket.DipexISApplication:m:wicket-12=[PageMap 
name=wicket-12], 
Wicket:sessionunbindinglistener-wicket.dipexisapplication=org.apache.wicket.protocol.http.abstracthttpsessionstore$sessionbindingliste...@18b1f95, 
wicket:wicket.DipexISApplication:m:wicket-41=[PageMap 
name=wicket-41], 
wicket:wicket.DipexISApplication:m:wicket-42=[PageMap 
name=wicket-42], 
wicket:wicket.DipexISApplication:m:wicket-40=[PageMap 
name=wicket-40], 
wicket:wicket.DipexISApplication:m:wicket-49=[PageMap 
name=wicket-49], 
wicket:wicket.DipexISApplication:m:wicket-47=[PageMap 
name=wicket-47], 
wicket:wicket.DipexISApplication:m:wicket-48=[PageMap 
name=wicket-48], 
wicket:wicket.DipexISApplication:m:wicket-45=[PageMap 
name=wicket-45], 
wicket:wicket.DipexISApplication:m:wicket-46=[PageMap 
name=wicket-46], 
wicket:wicket.DipexISApplication:m:wicket-43=[PageMap 
name=wicket-43], 
wicket:wicket.DipexISApplication:m:wicket-44=[PageMap 
name=wicket-44]}, 
50463537d1a470bc5ef5a7117f35:{wicket:wicket.DipexISApplication:m:wicket-15=[PageMap 
name=wicket-15], wicket:wicket.DipexISApplication:m:wicket-4=[PageMap 

Re: Delete page map on close browser window

2010-06-29 Thread Branislav Kalas

On 06/29/2010 08:48 PM, Branislav Kalas wrote:

On 06/29/2010 11:38 AM, Branislav Kalas wrote:
Hi, in my apllication,users can open items from menu in new  
tabs/windows.

When user opens item in new window system creates new page map for it.
When user close window, pagemap is still in session.
Is it somehow posibble to delete page map when user close browser 
window?

Thanks.

I temporaly removed this functionality, but when i print out 
"Session.get().getPageMaps().size()",

i get "19" right after sign in to apllication.
In glassfish monitor under list of sessions i see this freaky output:

504ddfc199b98146581148039b0d:{wicket:wicket.DipexISApplication:m:wicket-33=[PageMap 
name=wicket-33], wicket:wicket.DipexISApplication:m:wicket-32=[PageMap 
name=wicket-32], wicket:wicket.DipexISApplication:m:wicket-35=[PageMap 
name=wicket-35], wicket:wicket.DipexISApplication:m:wicket-34=[PageMap 
name=wicket-34], wicket:wicket.DipexISApplication:m:wicket-37=[PageMap 
name=wicket-37], wicket:wicket.DipexISApplication:m:wicket-36=[PageMap 
name=wicket-36], wicket:wicket.DipexISApplication:m:wicket-39=[PageMap 
name=wicket-39], wicket:wicket.DipexISApplication:m:wicket-38=[PageMap 
name=wicket-38], wicket:wicket.DipexISApplication:m:wicket-31=[PageMap 
name=wicket-31], wicket:wicket.DipexISApplication:m:wicket-30=[PageMap 
name=wicket-30], wicket:wicket.DipexISApplication:m:wicket-29=[PageMap 
name=wicket-29], wicket:wicket.DipexISApplication:m:null=[PageMap 
name=null], wicket:wicket.DipexISApplication:m:wicket-4=[PageMap 
name=wicket-4], wicket:wicket.DipexISApplication:m:wicket-24=[PageMap 
name=wicket-24], wicket:wicket.DipexISApplication:m:wicket-23=[PageMap 
name=wicket-23], wicket:wicket.DipexISApplication:m:wicket-3=[PageMap 
name=wicket-3], wicket:wicket.DipexISApplication:m:wicket-22=[PageMap 
name=wicket-22], wicket:wicket.DipexISApplication:m:wicket-2=[PageMap 
name=wicket-2], wicket:wicket.DipexISApplication:m:wicket-21=[PageMap 
name=wicket-21], wicket:wicket.DipexISApplication:m:wicket-1=[PageMap 
name=wicket-1], wicket:wicket.DipexISApplication:m:wicket-8=[PageMap 
name=wicket-8], wicket:wicket.DipexISApplication:m:wicket-28=[PageMap 
name=wicket-28], wicket:wicket.DipexISApplication:m:wicket-7=[PageMap 
name=wicket-7], wicket:wicket.DipexISApplication:m:wicket-27=[PageMap 
name=wicket-27], wicket:wicket.DipexISApplication:m:wicket-6=[PageMap 
name=wicket-6], wicket:wicket.DipexISApplication:m:wicket-26=[PageMap 
name=wicket-26], wicket:wicket.DipexISApplication:m:wicket-5=[PageMap 
name=wicket-5], wicket:wicket.DipexISApplication:m:wicket-25=[PageMap 
name=wicket-25], wicket:wicket.DipexISApplication:m:wicket-20=[PageMap 
name=wicket-20], wicket:wicket.DipexISApplication:m:wicket-0=[PageMap 
name=wicket-0], wicket:wicket.DipexISApplication:m:wicket-18=[PageMap 
name=wicket-18], wicket:wicket.DipexISApplication:m:wicket-19=[PageMap 
name=wicket-19], wicket:wicket.DipexISApplication:m:wicket-50=[PageMap 
name=wicket-50], wicket:wicket.DipexISApplication:m:wicket-15=[PageMap 
name=wicket-15], wicket:wicket.DipexISApplication:m:wicket-51=[PageMap 
name=wicket-51], wicket:wicket.DipexISApplication:m:wicket-14=[PageMap 
name=wicket-14], wicket:wicket.DipexISApplication:m:wicket-52=[PageMap 
name=wicket-52], wicket:wicket.DipexISApplication:m:wicket-17=[PageMap 
name=wicket-17], wicket:wicket.DipexISApplication:m:wicket-53=[PageMap 
name=wicket-53], wicket:wicket.DipexISApplication:m:wicket-16=[PageMap 
name=wicket-16], wicket:wicket.DipexISApplication:session=sysadm; , 
wicket:wicket.DipexISApplication:m:wicket-11=[PageMap name=wicket-11], 
wicket:wicket.DipexISApplication:m:wicket-10=[PageMap name=wicket-10], 
wicket:wicket.DipexISApplication:m:wicket-13=[PageMap name=wicket-13], 
wicket:wicket.DipexISApplication:m:wicket-9=[PageMap name=wicket-9], 
wicket:wicket.DipexISApplication:m:wicket-12=[PageMap name=wicket-12], 
Wicket:sessionunbindinglistener-wicket.dipexisapplication=org.apache.wicket.protocol.http.abstracthttpsessionstore$sessionbindingliste...@18b1f95, 
wicket:wicket.DipexISApplication:m:wicket-41=[PageMap name=wicket-41], 
wicket:wicket.DipexISApplication:m:wicket-42=[PageMap name=wicket-42], 
wicket:wicket.DipexISApplication:m:wicket-40=[PageMap name=wicket-40], 
wicket:wicket.DipexISApplication:m:wicket-49=[PageMap name=wicket-49], 
wicket:wicket.DipexISApplication:m:wicket-47=[PageMap name=wicket-47], 
wicket:wicket.DipexISApplication:m:wicket-48=[PageMap name=wicket-48], 
wicket:wicket.DipexISApplication:m:wicket-45=[PageMap name=wicket-45], 
wicket:wicket.DipexISApplication:m:wicket-46=[PageMap name=wicket-46], 
wicket:wicket.DipexISApplication:m:wicket-43=[PageMap name=wicket-43], 
wicket:wicket.DipexISApplication:m:wicket-44=[PageMap 
name=wicket-44]}, 
50463537d1a470bc5ef5a7117f35:{wicket:wicket.DipexISApplication:m:wicket-15=[PageMap 
name=wicket-15], wicket:wicket.DipexISApplication:m:wicket-4=[PageMap 
name=wicket-4], wicket:wicket.DipexISApplication:m:wicket-3=[PageMap 
name=wicke

How to access above hierarchy in the markup

2010-06-29 Thread Brown, Berlin [GCG-PFS]
Pseudo Code:

CompoundPropertyModel labelModel = new
CompoundPropertyModel(labelProps);
panel.setDefaultModel(labelModel);  /* Load labels at the PANEL level */
panel.add(new Label(label[1]));

form = new Form(new CompoundPropertyModel(myObj))  /* Load data at the
form level */
panel.add(form);

form.add(myObj.fieldName);

...

Markup that will generate a error:

panel.html:


 -- I want to access
from the labelProps (this does not work)
   -- I want to access
from myObj (this works)


...

With the current code, I can't access from the "someLabelFromPanelLevel"
data or I will get a accessing outside of the hierarchy error message.

I wish I could do the following (way to access higher up the hierarchy)

Markup:

panel.html:


 -- I want to
access from the labelProps
   -- I want to access
from myObj



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



Re: Delete page map on close browser window

2010-06-29 Thread Branislav Kalas

On 06/29/2010 11:38 AM, Branislav Kalas wrote:
Hi, in my apllication,users can open items from menu in new  
tabs/windows.

When user opens item in new window system creates new page map for it.
When user close window, pagemap is still in session.
Is it somehow posibble to delete page map when user close browser window?
Thanks.

I temporaly removed this functionality, but when i print out 
"Session.get().getPageMaps().size()",

i get "19" right after sign in to apllication.
In glassfish monitor under list of sessions i see this freaky output:

504ddfc199b98146581148039b0d:{wicket:wicket.DipexISApplication:m:wicket-33=[PageMap 
name=wicket-33], wicket:wicket.DipexISApplication:m:wicket-32=[PageMap 
name=wicket-32], wicket:wicket.DipexISApplication:m:wicket-35=[PageMap 
name=wicket-35], wicket:wicket.DipexISApplication:m:wicket-34=[PageMap 
name=wicket-34], wicket:wicket.DipexISApplication:m:wicket-37=[PageMap 
name=wicket-37], wicket:wicket.DipexISApplication:m:wicket-36=[PageMap 
name=wicket-36], wicket:wicket.DipexISApplication:m:wicket-39=[PageMap 
name=wicket-39], wicket:wicket.DipexISApplication:m:wicket-38=[PageMap 
name=wicket-38], wicket:wicket.DipexISApplication:m:wicket-31=[PageMap 
name=wicket-31], wicket:wicket.DipexISApplication:m:wicket-30=[PageMap 
name=wicket-30], wicket:wicket.DipexISApplication:m:wicket-29=[PageMap 
name=wicket-29], wicket:wicket.DipexISApplication:m:null=[PageMap 
name=null], wicket:wicket.DipexISApplication:m:wicket-4=[PageMap 
name=wicket-4], wicket:wicket.DipexISApplication:m:wicket-24=[PageMap 
name=wicket-24], wicket:wicket.DipexISApplication:m:wicket-23=[PageMap 
name=wicket-23], wicket:wicket.DipexISApplication:m:wicket-3=[PageMap 
name=wicket-3], wicket:wicket.DipexISApplication:m:wicket-22=[PageMap 
name=wicket-22], wicket:wicket.DipexISApplication:m:wicket-2=[PageMap 
name=wicket-2], wicket:wicket.DipexISApplication:m:wicket-21=[PageMap 
name=wicket-21], wicket:wicket.DipexISApplication:m:wicket-1=[PageMap 
name=wicket-1], wicket:wicket.DipexISApplication:m:wicket-8=[PageMap 
name=wicket-8], wicket:wicket.DipexISApplication:m:wicket-28=[PageMap 
name=wicket-28], wicket:wicket.DipexISApplication:m:wicket-7=[PageMap 
name=wicket-7], wicket:wicket.DipexISApplication:m:wicket-27=[PageMap 
name=wicket-27], wicket:wicket.DipexISApplication:m:wicket-6=[PageMap 
name=wicket-6], wicket:wicket.DipexISApplication:m:wicket-26=[PageMap 
name=wicket-26], wicket:wicket.DipexISApplication:m:wicket-5=[PageMap 
name=wicket-5], wicket:wicket.DipexISApplication:m:wicket-25=[PageMap 
name=wicket-25], wicket:wicket.DipexISApplication:m:wicket-20=[PageMap 
name=wicket-20], wicket:wicket.DipexISApplication:m:wicket-0=[PageMap 
name=wicket-0], wicket:wicket.DipexISApplication:m:wicket-18=[PageMap 
name=wicket-18], wicket:wicket.DipexISApplication:m:wicket-19=[PageMap 
name=wicket-19], wicket:wicket.DipexISApplication:m:wicket-50=[PageMap 
name=wicket-50], wicket:wicket.DipexISApplication:m:wicket-15=[PageMap 
name=wicket-15], wicket:wicket.DipexISApplication:m:wicket-51=[PageMap 
name=wicket-51], wicket:wicket.DipexISApplication:m:wicket-14=[PageMap 
name=wicket-14], wicket:wicket.DipexISApplication:m:wicket-52=[PageMap 
name=wicket-52], wicket:wicket.DipexISApplication:m:wicket-17=[PageMap 
name=wicket-17], wicket:wicket.DipexISApplication:m:wicket-53=[PageMap 
name=wicket-53], wicket:wicket.DipexISApplication:m:wicket-16=[PageMap 
name=wicket-16], wicket:wicket.DipexISApplication:session=sysadm; , 
wicket:wicket.DipexISApplication:m:wicket-11=[PageMap name=wicket-11], 
wicket:wicket.DipexISApplication:m:wicket-10=[PageMap name=wicket-10], 
wicket:wicket.DipexISApplication:m:wicket-13=[PageMap name=wicket-13], 
wicket:wicket.DipexISApplication:m:wicket-9=[PageMap name=wicket-9], 
wicket:wicket.DipexISApplication:m:wicket-12=[PageMap name=wicket-12], 
Wicket:sessionunbindinglistener-wicket.dipexisapplication=org.apache.wicket.protocol.http.abstracthttpsessionstore$sessionbindingliste...@18b1f95, 
wicket:wicket.DipexISApplication:m:wicket-41=[PageMap name=wicket-41], 
wicket:wicket.DipexISApplication:m:wicket-42=[PageMap name=wicket-42], 
wicket:wicket.DipexISApplication:m:wicket-40=[PageMap name=wicket-40], 
wicket:wicket.DipexISApplication:m:wicket-49=[PageMap name=wicket-49], 
wicket:wicket.DipexISApplication:m:wicket-47=[PageMap name=wicket-47], 
wicket:wicket.DipexISApplication:m:wicket-48=[PageMap name=wicket-48], 
wicket:wicket.DipexISApplication:m:wicket-45=[PageMap name=wicket-45], 
wicket:wicket.DipexISApplication:m:wicket-46=[PageMap name=wicket-46], 
wicket:wicket.DipexISApplication:m:wicket-43=[PageMap name=wicket-43], 
wicket:wicket.DipexISApplication:m:wicket-44=[PageMap name=wicket-44]}, 
50463537d1a470bc5ef5a7117f35:{wicket:wicket.DipexISApplication:m:wicket-15=[PageMap 
name=wicket-15], wicket:wicket.DipexISApplication:m:wicket-4=[PageMap 
name=wicket-4], wicket:wicket.DipexISApplication:m:wicket-3=[PageMap 
name=wicket-3], wicket:wicket.DipexISApplication:m:wicket-14=

Re: Pagination in wicket, DataTable, DataView or DataGrid

2010-06-29 Thread adp

You are right, sorry, thanks.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pagination-in-wicket-DataTable-DataView-or-DataGrid-tp2272370p2272561.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Pagination in wicket, DataTable, DataView or DataGrid

2010-06-29 Thread Jeremy Thomerson
There's not a link that I sent you.  I meant try using the DefaultDataTable.
 Look at how it does pagination.

On Tue, Jun 29, 2010 at 11:41 AM, adp  wrote:

>
> friend, I can not see the information you sent me the link does not open.
> The problem is that I must carry large amounts of data, and I can not do in
> memory, which is why I must find a way to do pagination with either a
> DataTable, DataView or DataGrid. Thanks for responding.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Pagination-in-wicket-DataTable-DataView-or-DataGrid-tp2272370p2272445.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: Pagination in wicket, DataTable, DataView or DataGrid

2010-06-29 Thread adp

Thank you for responding, I'm coming to see the link you sent me.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pagination-in-wicket-DataTable-DataView-or-DataGrid-tp2272370p2272428.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Pagination in wicket, DataTable, DataView or DataGrid

2010-06-29 Thread adp

friend, I can not see the information you sent me the link does not open.
The problem is that I must carry large amounts of data, and I can not do in
memory, which is why I must find a way to do pagination with either a
DataTable, DataView or DataGrid. Thanks for responding.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pagination-in-wicket-DataTable-DataView-or-DataGrid-tp2272370p2272445.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: question about adding "synchronized" on mountsOnPath at WebRequestCodingStrategy

2010-06-29 Thread Igor Vaynberg
optimized, try with latest branch build.

-igor

On Tue, Jun 29, 2010 at 7:18 AM, dannyboy  wrote:
>
> Dear Igor,
>
> We are experiencing serious synchronization problems here.
> I have added a screenshot of our yourkit.
>
> It the same with all blocked threads.
>
> If you need more proof/information please let me know.
>
> Info of our system:
>
> Description: Solaris 10
> Vendor : Sun Microsystems
> Vendor Version : 10
> CPU Speed : 64 @ 1167 MHz (1x64)
> OS Version : 5.10
> RAM : 32640 MB
> Architecture : sparc
>
> 32-bit version java 6 sun 1.6.0_16
> Tomcat 6
>
> http://apache-wicket.1842946.n4.nabble.com/file/n2272250/Screenshot-Bootstrap-2010-06-29-1.snapshot_%5B-home-dbollaer-Snapshots%5D_-_YourKit_Java_Profiler_9.0.5.png
>
> Kind Regards,
>
> Danny
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/question-about-adding-synchronized-on-mountsOnPath-at-WebRequestCodingStrategy-tp1878901p2272250.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: passing a map into PageParameters

2010-06-29 Thread Fernando Wermus
Ray,
I haven't had any succeded either. I am working with fb rest (facebook)
which has some classes that work with json to store several kind of objects.
In my case, I need my page to be bookmarkable.

thanks anyway

On Tue, Jun 29, 2010 at 1:47 AM, Ray Weidner <
ray.weidner.develo...@gmail.com> wrote:

> I haven't had any success storing anything other than Strings in
> PageParameters objects.  It makes sense, since these are supposed to
> represent bookmarkable (i.e. GET) parameters.  If you're hoping to throw
> arbitrary Maps into a PageParameters, you're going to be disappointed.  But
> if you have an idea what kind of data is going to be in the Map (especially
> if you're using generics, unlike your example), then you can write a pair
> of
> methods to translate between Map and String for this purpose.
>
> I'm not sure what limitations on characters that you might run into due to
> the fact that they have to be embedded in a URL, so you have to try it out.
>  However, I wouldn't be surprised if Wicket escapes everything cleanly,
> meaning that you don't have to worry about such things.
>
> Of course, you don't have to embed your Map within a PageParameters if the
> page that you want to go to doesn't need to be bookmarkable.  In that case,
> just pass your Map to the destination page object through a constructor of
> your design, and call #setResponsePage on the page object.
>
>
> On Mon, Jun 28, 2010 at 3:23 PM, Fernando Wermus
> wrote:
>
> > This is not what I want to achieve.
> >
> > I need to pass a map of  parameters as just an entry into PageParameters
> > and
> > other entries too.
> >
> > For instance,
> >
> >
> > Map swfParameters=new HashMap();
> > swfParameteres.put("a", "1");
> > swfParameteres.put("b", "2");
> >
> > PageParameters p=new PageParameters();
> > p.put("swfParameters", swfParameters);
> > p.put("other", "other");
> >
> > On Mon, Jun 28, 2010 at 4:15 PM, jammyjohn 
> wrote:
> >
> > >
> > > PageParameters parameters = new PageParameters(swfParameters);
> > >
> > > This is how the hashmap is constructed in PageParameters..
> > >
> > > Thanks,
> > > J
> > > --
> > > View this message in context:
> > >
> >
> http://apache-wicket.1842946.n4.nabble.com/passing-a-map-into-PageParameters-tp2271341p2271351.html
> > > Sent from the Wicket - User mailing list archive at Nabble.com.
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Re-rendering javascript in behavior

2010-06-29 Thread Jeremy Thomerson
Of course, you'll still have the issue that you are using a single global
variable for multiple things on the page.

On Tue, Jun 29, 2010 at 10:24 AM, Igor Vaynberg wrote:

> the javascript contributions are filtered by the id given in the
> second parameter, in your case:  "pdcJS". since your ids are constant
> only the first contribution makes it.
>
> using UUID.random() will fix it it as far as header contributions go.
>
> -igor
>
> On Tue, Jun 29, 2010 at 7:45 AM, Muro Copenhagen 
> wrote:
> > Hi,
> >
> > I have a small behavior that prevents doubleclick on buttons.
> >
> > It is added to Modal popups on a page. The problem i have is that if the
> > Modal window appears twice on a page,
> > the javascript variable value of the first popup is used.
> >
> > This is because i am using: response.renderJavascript(...); which is only
> > rendered once.
> >
> > How can i force rerendering of the javascript, or is there any other way
> of
> > achieving defaulting the javascript variable,
> > for each modal window on my page?
> >
> >
> > This is how it my behavior looks:
> >
> > public class PreventDoubleClickBehavior extends AbstractBehavior {
> >
> >private String submitScript = "if(submitting) {this.disabled = true;
> > return false;} else {submitting = true;}";
> >
> >@Override
> >public void renderHead(IHeaderResponse response) {
> >response.renderJavascript("var submitting = false;", "pdcJS");
> >}
> >
> >@Override
> >public void onComponentTag(Component component, ComponentTag tag) {
> >IValueMap valueMap = tag.getAttributes();
> >CharSequence oldOnclickFunctions =
> > valueMap.getCharSequence("onclick");
> >if (oldOnclickFunctions == null) {
> >oldOnclickFunctions = "";
> >}
> >tag.put("onclick", submitScript + oldOnclickFunctions);
> >}
> > }
> >
> > Thanks in advance...
> >
> > Muro
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: Pagination in wicket, DataTable, DataView or DataGrid

2010-06-29 Thread Jeremy Thomerson
Yes.  See DefaultDataTable.

On Tue, Jun 29, 2010 at 10:41 AM, adp  wrote:

>
> Friends, you can do with dataTable pagination, DataView or DataGrid with
> wicket?
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Pagination-in-wicket-DataTable-DataView-or-DataGrid-tp2272370p2272370.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: ListChoice - generics for model defined wrong

2010-06-29 Thread James Carman
ListChoice doesn't allow you to choose multiple.  You want ListMultipleChoice.

On Tue, Jun 29, 2010 at 8:29 AM, Douglas Ferguson
 wrote:
> I was just attempt to use the ListChoice and it seems to me that the 
> constructor signatures are wrong.
>
> The model for this should be List not List, otherwise you 
> can't select more than one item (T), which is the point..
>
> D/
> -
> 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



Pagination in wicket, DataTable, DataView or DataGrid

2010-06-29 Thread adp

Friends, you can do with dataTable pagination, DataView or DataGrid with
wicket?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pagination-in-wicket-DataTable-DataView-or-DataGrid-tp2272370p2272370.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Best practice: AJAX and how to implement state indicator image?

2010-06-29 Thread Igor Vaynberg
the resourcereference you give your image can serve different images
based on some condition.

-igor

On Tue, Jun 29, 2010 at 7:47 AM, Erich W Schreiner  wrote:
> Dear all,
>
> I am trying to find the best way to implement a state indicator that shows
> different images. The state of the model object can be changed by the user,
> resulting in  an AJAX update being sent the server and a re-rendering of the
> model object, which should show the correct state image then.
>
> Currently I am adding an Image for each state and override their isVisible()
> method to have only one image shown. Is there any way to do this using a 
> single
> Image component and some dynamic way of looking up the image to render?
>
> Related to this is the problem of showing a set of Ajax-enabled icon buttons,
> again with their visibility depending on the model state and themselves
> influencing this state. I would like to merge these buttons into a single one
> (e.g. for setting a boolean to true / false and showing a checkbox checked /
> unchecked).
>
> TIA & best regards,
> Erich

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



Re: Re-rendering javascript in behavior

2010-06-29 Thread Igor Vaynberg
the javascript contributions are filtered by the id given in the
second parameter, in your case:  "pdcJS". since your ids are constant
only the first contribution makes it.

using UUID.random() will fix it it as far as header contributions go.

-igor

On Tue, Jun 29, 2010 at 7:45 AM, Muro Copenhagen  wrote:
> Hi,
>
> I have a small behavior that prevents doubleclick on buttons.
>
> It is added to Modal popups on a page. The problem i have is that if the
> Modal window appears twice on a page,
> the javascript variable value of the first popup is used.
>
> This is because i am using: response.renderJavascript(...); which is only
> rendered once.
>
> How can i force rerendering of the javascript, or is there any other way of
> achieving defaulting the javascript variable,
> for each modal window on my page?
>
>
> This is how it my behavior looks:
>
> public class PreventDoubleClickBehavior extends AbstractBehavior {
>
>    private String submitScript = "if(submitting) {this.disabled = true;
> return false;} else {submitting = true;}";
>
>   �...@override
>    public void renderHead(IHeaderResponse response) {
>        response.renderJavascript("var submitting = false;", "pdcJS");
>    }
>
>   �...@override
>    public void onComponentTag(Component component, ComponentTag tag) {
>        IValueMap valueMap = tag.getAttributes();
>        CharSequence oldOnclickFunctions =
> valueMap.getCharSequence("onclick");
>        if (oldOnclickFunctions == null) {
>            oldOnclickFunctions = "";
>        }
>        tag.put("onclick", submitScript + oldOnclickFunctions);
>    }
> }
>
> Thanks in advance...
>
> Muro
>

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



Best practice: AJAX and how to implement state indicator image?

2010-06-29 Thread Erich W Schreiner
Dear all,

I am trying to find the best way to implement a state indicator that shows 
different images. The state of the model object can be changed by the user, 
resulting in  an AJAX update being sent the server and a re-rendering of the 
model object, which should show the correct state image then.

Currently I am adding an Image for each state and override their isVisible() 
method to have only one image shown. Is there any way to do this using a single 
Image component and some dynamic way of looking up the image to render?

Related to this is the problem of showing a set of Ajax-enabled icon buttons, 
again with their visibility depending on the model state and themselves 
influencing this state. I would like to merge these buttons into a single one 
(e.g. for setting a boolean to true / false and showing a checkbox checked / 
unchecked).

TIA & best regards,
Erich

Re-rendering javascript in behavior

2010-06-29 Thread Muro Copenhagen
Hi,

I have a small behavior that prevents doubleclick on buttons.

It is added to Modal popups on a page. The problem i have is that if the
Modal window appears twice on a page,
the javascript variable value of the first popup is used.

This is because i am using: response.renderJavascript(...); which is only
rendered once.

How can i force rerendering of the javascript, or is there any other way of
achieving defaulting the javascript variable,
for each modal window on my page?


This is how it my behavior looks:

public class PreventDoubleClickBehavior extends AbstractBehavior {

private String submitScript = "if(submitting) {this.disabled = true;
return false;} else {submitting = true;}";

@Override
public void renderHead(IHeaderResponse response) {
response.renderJavascript("var submitting = false;", "pdcJS");
}

@Override
public void onComponentTag(Component component, ComponentTag tag) {
IValueMap valueMap = tag.getAttributes();
CharSequence oldOnclickFunctions =
valueMap.getCharSequence("onclick");
if (oldOnclickFunctions == null) {
oldOnclickFunctions = "";
}
tag.put("onclick", submitScript + oldOnclickFunctions);
}
}

Thanks in advance...

Muro


Re: extending AbstractFormValidator as a validation adapter

2010-06-29 Thread Ray Weidner
Thanks, Igor, I now see the methods you are talking about, and your
explanation makes perfect sense.


On Tue, Jun 29, 2010 at 1:16 AM, Igor Vaynberg wrote:

> On Mon, Jun 28, 2010 at 9:27 PM, Ray Weidner
>  wrote:
> > Hi all,
> >
> > The application that I'm current writing already has its own validation
> > logic, but I would like to integrate its results into the existing Wicket
> > form validation so as to unify the feedback.  To this end, I'm trying to
> > extend AbstractFormValidator to wrap my system's logic.
> >
> > The way my system's validation works is pretty simple and
> self-explanatory:
> >
> > *public interface Validator {*
> > * **public ValidationResult validate (Record record, Action action);*
> > *}*
> > *
> > *
> > *public interface ValidationResult {*
> > * **public boolean isValid ();*
> > *
> > *
> > * **public Set  getGeneralErrorMessages ();*
> > * *
> > * **public Set  getFieldErrorFieldNames ();*
> > * *
> > * **public Set  getFieldErrorMessages (String fieldName);*
> > *}*
> >
> > The ValidationResultImpl is pretty much a simple bean for setting and
> > getting error messages, both general, and by field.  Validator
> > implementations are specific to the need, and the specifics aren't
> important
> > here.
> >
> > For my adapter, I'm able to get to a certain point, and I'm not sure what
> > call to make next:
> >
> > *public class RecordFormValidator extends AbstractFormValidator {*
> > * **private Validator validator = null;*
> > * **private Action action = null;*
> > * *
> > * **public RecordFormValidator (Validator validator, Action action) {*
> > * **this.validator = validator;*
> > * **this.action = action;*
> > * **}*
> > *
> > *
> > * *...@override*
> > * **public FormComponent  [] getDependentFormComponents () {*
> > * **return new FormComponent [0];*
> > * **}*
> > *
> > *
> > * *...@override*
> > * **public void validate (Form  arg0) {*
> > * **Record record = ((Form ) arg0).getModel ().getObject ();*
> > * **Validation result = validator.validate (record, action);*
> > * *
> > * **for (String generalErrorMessage : result.getGeneralErrorMessages ())
> {*
> > * **// TODO: ???*
> > * **}*
> > * **for (String fieldName : result.getFieldErrorFieldNames ()) {*
> > * **for (String fieldErrorMessage : result.getFieldErrorMessages
> (fieldName))
> > {*
> > * **// TODO: ???*
> > * **}*
> > * **}*
> > * **}*
> > *}*
> > *
> > *
> > In examples I see online, validation errors seem to be registered by
> calls
> > of the #error method.  It seems like I should be doing that here, too,
> but
> > what I don't know is:
> >
> >   - Which object's #error method should be called?  The validator's?  The
> >   FormComponent corresponding to the field in question?  I want
> field-specific
> >   errors appropriately associated with their fields, so I can use filters
> for
> >   field-specific feedback, etc.
>
> if you want formcomponent specific errors then you have to map the
> errors from your business logic to the wicket components and call
> error on them.
>
> >   - I already have my actual error strings, so how do I skip around the
> >   resource logic to just set the error message?
>
> there is error(IValidationError) but there is also error(String), call
> the latter.
>
> >   - What should I do with my "generalErrorMessages," which aren't tied to
> >   any specific field?
>
> i usually report these kinds of errors on the form itself and have a
> special feedbackpanel that filters those.
>
> -igor
>
> >
> > Any help would be appreciated, thanks!
> >
> > Ray Weidner
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: question about adding "synchronized" on mountsOnPath at WebRequestCodingStrategy

2010-06-29 Thread dannyboy

Dear Igor,

We are experiencing serious synchronization problems here.
I have added a screenshot of our yourkit.

It the same with all blocked threads.

If you need more proof/information please let me know.

Info of our system:
 
Description: Solaris 10 
Vendor : Sun Microsystems
Vendor Version : 10
CPU Speed : 64 @ 1167 MHz (1x64)
OS Version : 5.10
RAM : 32640 MB   
Architecture : sparc

32-bit version java 6 sun 1.6.0_16
Tomcat 6

http://apache-wicket.1842946.n4.nabble.com/file/n2272250/Screenshot-Bootstrap-2010-06-29-1.snapshot_%5B-home-dbollaer-Snapshots%5D_-_YourKit_Java_Profiler_9.0.5.png
 

Kind Regards,

Danny
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/question-about-adding-synchronized-on-mountsOnPath-at-WebRequestCodingStrategy-tp1878901p2272250.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: to datatable

2010-06-29 Thread vov

columns.add(new AbstractColumn(new Model())
{
  @Override
  public void populateItem(Item> cellItem, String
componentId, IModel rowModel)
  {
cellItem.add(new TestPanel(componentId));
  }
});
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-panel-to-datatable-tp2272180p2272241.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



ListChoice - generics for model defined wrong

2010-06-29 Thread Douglas Ferguson
I was just attempt to use the ListChoice and it seems to me that the 
constructor signatures are wrong.

The model for this should be List not List, otherwise you can't 
select more than one item (T), which is the point..

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



Re: @SpringBean not working for IModel implementations?

2010-06-29 Thread Ernesto Reinaldo Barreiro
I think component instantiation listener will only scan wicket
components. Just try

InjectorHolder.getInjector().inject(this);

on constructor of the model to get your dependencies injected.

Best,

Ernesto


On Tue, Jun 29, 2010 at 3:30 PM, David Meulemans
 wrote:
> Hi
>
> I've got an implementation of the IModel interface and I want to inject a
> Spring bean in it.
>
> In the method public String getObject(); this object is null.
>
> Is it impossible to inject Spring beans with @SpringBean?
>
> thx in advance!
>
> David
>

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



Re: @SpringBean not working for IModel implementations?

2010-06-29 Thread James Carman
Try using

InjectorHolder.getInjector().inject(this);

inside your model implementation's constructor.

On Tue, Jun 29, 2010 at 9:30 AM, David Meulemans
 wrote:
> Hi
>
> I've got an implementation of the IModel interface and I want to inject a
> Spring bean in it.
>
> In the method public String getObject(); this object is null.
>
> Is it impossible to inject Spring beans with @SpringBean?
>
> thx in advance!
>
> David
>

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



@SpringBean not working for IModel implementations?

2010-06-29 Thread David Meulemans
Hi

I've got an implementation of the IModel interface and I want to inject a
Spring bean in it.

In the method public String getObject(); this object is null.

Is it impossible to inject Spring beans with @SpringBean?

thx in advance!

David


to datatable

2010-06-29 Thread midikem

hi! 

I am wondering how to add a  to a datatable.
works to add my panel likte this add(new TestPanel("test")); 
But how do i add it as an iterating panel in the datatable.

My datatable looks like this
List> columns = new ArrayList>();
columns.add(newPropertyColumn(new
StringResourceModel("test",this,null), null, "test"));
add(new DefaultDataTable("dataTable", columns, provider, 30));

and html:

[dataTable]

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-panel-to-datatable-tp2272180p2272180.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



java.util.ConcurrentModificationException from DefaultObjectStreamFactory

2010-06-29 Thread Michał Letyński

Hi.
I got such error today Long time ago i had similar problem but with 
ClassCastException while deserialization. It was because i kept 
references from one page inside another. Nowdays i dont have such 
navigation, im using:

RequestCycle.get().setResponsePage(xxxPage.class)

Any ideas ? Hints ? Unfortunetly i dont know how to reproduce it. I got 
it only one time ;/


20-Apr-2010 16:52:15 ERROR [ory$DefaultObjectStreamFactory] error 
writing object [Page class = com.xxx.client.webapp.pages.xxxPage, id = 
25, version = 1, ajax = 0]: null

java.util.ConcurrentModificationException
   at java.util.ArrayList.writeObject(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.writeObject(Unknown Source)
   at java.util.ArrayList.writeObject(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
   at 
org.apache.wicket.protocol.http.pagestore.AbstractPageStore$PageSerializer.serializePage(AbstractPageStore.java:321)

   at org.apache.wicket.Page.writePageObject(Page.java:1385)
   at org.apache.wicket.Component.writeObject(Component.java:4434)
   at sun.reflect.GeneratedMethodAccessor204.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.writeObject(Unknown Source)
   at 
org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:121)

   at java.io.ObjectOutputStream.writeObject(Unknown Source)
   at 
org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1120)
   at 
org.apache.wicket.protocol.http.pagestore.AbstractPageStore$PageSerializer.getPageReplacementObject(AbstractPageStore.java:285)

   at org.apache.wicket.Page.writeReplace(Page.java:1363)
   at sun.reflect.GeneratedMethodAccessor455.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteReplace(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.writeArray(Unknown Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
   at org.apa

Re: OutOfMemoryError with lots of unit tests

2010-06-29 Thread Swanthe Lindgren

Thank you, it works

//Swanthe

On 2010-06-28 11:14, Major Péter wrote:

Hi,

Try something like this:

 org.apache.maven.plugins
 maven-surefire-plugin
 true
 
 false
 once
 -Xmx512m -XX:MaxPermSize=256m
 


maybe check out the perTest forkMode.

Regards,
Peter

2010-06-28 11:08 keltezéssel, Swanthe Lindgren írta:
   

Hello
Has someone got any good tips about performing lots of render tests? We
are using TestNG and maven/surefire test runner which results in
OutOfMemoryError for our about 500 tests, where each test tries to
render a page or panel. After a bit of redesigning our test classes and
call WicketTester.destroy()  after each test, we were able to run about
50 more tests, but now we are back at OutOfMemoryError.

//Swanthe
 

-
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



problem with two ListChoices connected each other

2010-06-29 Thread Java Programmer
Hello,
I need a solution if such component exists:
1) first ListChoice have categories about 1-2k options
2) second ListChoice is empty
3) there are arrows which can move elements from first to second
ListChoice, and the way back
Main problem in such scenario would be with sending lot of refreshing
data through the Ajax, because there are a lot options in fist
ListChoice,
we need something much simpler, and we cannot find, maybe something
pure JavaScript with Model connected. Do you have any idea what we can
use for this?

--
Thanks in advance,
Adrian

http://www.codeappeal.com

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



Re: handling error in DataProvider

2010-06-29 Thread Decebal Suiu

Thanks again, I will try to profile my code. 
Another question is where I can clean my flags with errors (I keep in
session a Map with widget's id as key and Exception as value)? I understand
that onAfterRender method is not a good candidate because it's called on
abort exception also.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/handling-error-in-DataProvider-tp2264242p2271960.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Delete page map on close browser window

2010-06-29 Thread Branislav Kalas

Hi, in my apllication,users can open items from menu in new  tabs/windows.
When user opens item in new window system creates new page map for it.
When user close window, pagemap is still in session.
Is it somehow posibble to delete page map when user close browser window?
Thanks.


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



Re: Reading cookies on first/each request

2010-06-29 Thread Bilgin Ibryam
Thanks guys. This will solve my problem.

Bilgin

On Tue, Jun 29, 2010 at 6:10 AM, Igor Vaynberg wrote:

> alternatively requestcycle#onbeginrequest() is also a good place
>
> -igor
>
> On Mon, Jun 28, 2010 at 7:05 AM, M. Hammer  wrote:
> > Quoting Bilgin Ibryam :
> >>
> >> I want to implement "Remember me" functionality  by storing the
> encrypted
> >> and base64 encoded username in a cookie.
> >> Then I'd like to check for the cookie on the very first request (or
> every
> >> request) to the application.
> >
> > Hi,
> >
> > I do this in the newSession() method of my Application subclass. This
> method
> > is called for the first request of a user, and possible for subsequent
> > requests if the requested page is stateless. If a cookie is found, I copy
> > the contents to the user's session and use it from there.
> > You have to cast Request and Response to WebRequest and WebResponse, and
> you
> > can use getCookie() and addCookie(), respectively.
> >
> > Regards,
> >  Moritz
> >
> >
> > -
> > 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
>
>


Asynchronous tree

2010-06-29 Thread Bilgin Ibryam
Hi,

Is there any wicket tree component which loads its children nodes
asynchronously ie after expanding a branch - children are loaded with ajax?
I need this in order to prevent the long initial delay, caused by loading
all the nodes.
In the examples I saw, all the child nodes were loaded at the beginning.

Bilgin Ibryam


Re: org.apache.wicket.WicketRuntimeException: Unable to write the response

2010-06-29 Thread Martijn Dashorst
Don't let the user wait. Use a lazy panel to render the long stuff in
the background, or if it even takes longer than that, calculate your
model data in a background thread and use a timer to poll and see if
the thread has finished, and use the result in a panel that you
replace on your page.

Martijn

On Tue, Jun 29, 2010 at 8:45 AM,   wrote:
> Hello,
>
> This is my first post. I am not a web developer, I usually develop other 
> kinds of systems, but for a quick project I have to do, I looked at JSF and I 
> really did not like it. Finally, I have come across wicket and it was love at 
> first sight.
>
> Now, so far everything has been straightforward, but I am now facing the 
> first puzzle...
>
> I have a page that takes a while to render and, while it's rendering, if the 
> user does anything, then I get:
>
> org.apache.wicket.WicketRuntimeException: Unable to write the response
>  at org.apache.wicket.Response.handleException(Response.java:286)
>  at org.apache.wicket.Response.write(Response.java:310)
>  at 
> org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:160)
>  at 
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
>  at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
>  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
>  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
>  at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>  at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
>  at 
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>  etc ...
> Caused by: EOFException(java.net.SocketException: Connection reset by peer: 
> socket write error)
>  at org.mortbay.http.BufferedOutputStream.flush(BufferedOutputStream.java:195)
>  at 
> org.mortbay.util.ByteBufferOutputStream.ensureSpareCapacity(ByteBufferOutputStream.java:342)
>  at 
> org.mortbay.util.ByteBufferOutputStream.write(ByteBufferOutputStream.java:182)
>  at org.mortbay.http.BufferedOutputStream.write(BufferedOutputStream.java:135)
>  at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:442)
>  at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java:42)
>  at org.apache.wicket.util.io.Streams.copy(Streams.java:121)
>  at org.apache.wicket.util.io.Streams.copy(Streams.java:88)
>  at org.apache.wicket.Response.write(Response.java:306)
>  ... 23 more
>
> 00:39:32.335 WARN!! Invalid length: Content-Length=9491 written=4096 for 
> http://127.0.0.1:8081/quickstart/app/
> ERROR - WicketFilter               - closing the buffer error
> java.lang.IllegalStateException
>  at 
> org.mortbay.jetty.servlet.ServletHttpResponse.getWriter(ServletHttpResponse.java:540)
>  at org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:392)
>  etc ...
>
> Now, this would be ok, I suppose. The user clicks something while wicket is 
> sending stuff and that operation has to abort. However, this except really 
> corrupts things, after this exception the web page behaves very strangely, 
> some of wicket:ids do not update well anymore etc...
> In the book Wicket in Action it says that a page is single threaded and all I 
> am doing here is using one single page, one sesion, two request, quickly one 
> after the other, before the first one completes.
>
> I am using: INFO  - WebApplication             - [QuickStartApplication] 
> Started Wicket version 1.4.8 in development mode
> And I have downlowded a hello world project (quickstart) adapted it to 1.4.8 
> (generics pretty much) and not yet refactored things as I am concentrating on 
> business logic for a quick prototype. The webserver is jetty.
>
> Ok, sorry for the long post, and I hope someone of you will be able to give 
> me a couple of hints/tips (tried to google it, but did not find much).
>
>
> Thanks,
>
> Tommy
>
>
>



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

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