Asking for download files with non-ascii names.

2011-12-16 Thread Alexander Cherednichenko
Hello!

Faced an interesting problem, however few hours of googling and trial did
not lead to success. wicket is 1.4

The problem: I have an AjaxDownload (
https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html)
or DownloadLink (
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/link/DownloadLink.html),
both very good and cool components. Thank you the developers! I am
streaming a dynamically-generated content to the user and want them to save
it as a file. Usual implementation of both is coming down
to ResourceStreamRequestTarget, which in turn does the actual streaming and
also sets the content-disposition: attachment; filename=''.

And here the trouble starts. If we have, say, cyrillic names of the files
to present to user, they are displayed incorrectly in browser. ASCII is
okay, but as soon as it comes down to non-english, encoding is broken.
That's a good article describing problem in general -
http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http
(it
is a problem of browsers, and not Wicket). The good solution seen there is
to add content-disposition header without a filename, and make download
happen off the URL which is ending in the desired filename.

Now, the question - how do i do it in wicket? Say, I have an AjaxLink
within page, which has an AjaxDownload attached to it. AjaxDownload is an
anonymous inner class and is using some page's model to generate its data.
The callback URL of this behavior is standard and is starting with ?, e.g.
I can not add /filename.ext prior to it, it would break wicket's request
target location with 404 as a result.

The only idea I have at the moment is to mount the page with a Hybrid
coding strategy, thus the filename would then be considered just as one of
the parameters by the page, but the solution seems to be a little smelly.

Did anyone face the same problem?

Great thanks and appreciation in advance!

with kindest regards,

-- 
Alexander Cherednichenko
[ the only way out is the way up ]


Re: Regarding Stack Overflow exception

2011-12-16 Thread Martin Grigorov
Hi,

Use any pastebin service to show us the stacktrace.

On Fri, Dec 16, 2011 at 11:52 AM, smsmaddy smsd...@gmail.com wrote:
 The application which I am working is implemented using */Wicket 1.4.17/*
 framework deployed in Jetty Server. I often get */Stack Overflow/*
 exceptions which requires Server restart to fix the issue. Server restarting
 in production is a weird thing. *Please suggest to find the root cause*?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Regarding-Stack-Overflow-exception-tp4203930p4203930.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

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



Re: Asking for download files with non-ascii names.

2011-12-16 Thread Martin Grigorov
Hi,

In my app we use Wicket's Resource to upload/download files. We do it
to avoid synchronization on page access but I think you can solve your
problem with this.

Unfortunately I imagine the full solution with Wicket 1.5's
#mountResource(). See
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ for
more details.

On Thu, Dec 15, 2011 at 11:54 PM, Alexander Cherednichenko
lex...@gmail.com wrote:
 Hello!

 Faced an interesting problem, however few hours of googling and trial did
 not lead to success. wicket is 1.4

 The problem: I have an AjaxDownload (
 https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html)
 or DownloadLink (
 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/link/DownloadLink.html),
 both very good and cool components. Thank you the developers! I am
 streaming a dynamically-generated content to the user and want them to save
 it as a file. Usual implementation of both is coming down
 to ResourceStreamRequestTarget, which in turn does the actual streaming and
 also sets the content-disposition: attachment; filename=''.

 And here the trouble starts. If we have, say, cyrillic names of the files
 to present to user, they are displayed incorrectly in browser. ASCII is
 okay, but as soon as it comes down to non-english, encoding is broken.
 That's a good article describing problem in general -
 http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http
 (it
 is a problem of browsers, and not Wicket). The good solution seen there is
 to add content-disposition header without a filename, and make download
 happen off the URL which is ending in the desired filename.

 Now, the question - how do i do it in wicket? Say, I have an AjaxLink
 within page, which has an AjaxDownload attached to it. AjaxDownload is an
 anonymous inner class and is using some page's model to generate its data.
 The callback URL of this behavior is standard and is starting with ?, e.g.
 I can not add /filename.ext prior to it, it would break wicket's request
 target location with 404 as a result.

 The only idea I have at the moment is to mount the page with a Hybrid
 coding strategy, thus the filename would then be considered just as one of
 the parameters by the page, but the solution seems to be a little smelly.

 Did anyone face the same problem?

 Great thanks and appreciation in advance!

 with kindest regards,

 --
 Alexander Cherednichenko
 [ the only way out is the way up ]



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

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



Re: Auto refresh a WebPage

2011-12-16 Thread Andrea Del Bene

Hi,

excuse me but what do you mean with cursor and class Second?

but the cursor is not coming to the class Second time after 1 min..



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



Re: Auto refresh a WebPage

2011-12-16 Thread raju.ch
I mean while debugging I'm not at all getting the request to the class again

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Auto-refresh-a-WebPage-tp4203984p4204205.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: Auto refresh a WebPage

2011-12-16 Thread Andrea Del Bene
You don't see anything appening inside Wicket Ajax Debug window? No 
request is performed after one minute?

I mean while debugging I'm not at all getting the request to the class again

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Auto-refresh-a-WebPage-tp4203984p4204205.html
Sent from the Users forum mailing list archive at Nabble.com.

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






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



Re: Only the first TextField in a repetition gets correct OnChangeAjaxBehavior with 1.5.1

2011-12-16 Thread Anders Peterson

Hello again, I still have this problem... (been working on other things)

I've tracked the problem back to the request parameters simply not containing 
the expected values.


This input name seems correct since I changed the market weight attribute of 
the second instrument:

instruments:1:marketWeight

But the HashMap containing parameter values ONLY contain this:
{instruments:0:marketWeight=[17.602]}

This results in me getting null as FormComponent input.

Anyone know what I've done wrong?

/Anders


On 2011-10-13 13:46, Anders Peterson wrote:

Here the (simplified) code that creates the ListViev, TextFields and Label. 
/Anders






On 13 okt 2011, at 12:40, Anders Peterson wrote:


Hi,

Upgrading to wicket 1.5.1 from 1.4.18 my ajax updates stopped working.

I have a page with a form. Inside the form there is a repetition (ListView) 
that among other things creates a text field for each item (ListItem). Each of 
those text fields has an OnChangeAjaxBehavior set that should update a label. 
The label should continously display the total sum of the numbers in the text 
fields.

With wicket 1.4.18 (and previous versions) this worked fine.

With 1.5.1 only the first text field in the repetition gets the correct ajax behavior - 
it works the way I want it, and the way it worked with 1.4.*. The other text fields are 
dead, except for focus set/removed. While typing in any of the other text 
fields nothing is updated (the ajax debug window shows no activity). When focus is 
removed I get a NullPointerException regardless of what I've changed.

Is this a (known) bug, or is there a difference between 1.4 and 1.5 that I've 
missed?

/Anders






-
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: Internationalization on panels

2011-12-16 Thread cosmindumy
Hello again. 
I have one problem with internationalization. I want to internationalize 
the values from a drop down. But the values are not refreshed when I change
the locale. Here is the code 

subjectsMatterList.add(new SelectOption(domainVO.getId().toString(),
getString(Util.getDomainVOKey(domainVO.getId().toString();

where subject matter is the list of choices. that has a pair of id and
display value. I want the display value to be internationalized. If I eneter
this page with the locale already changed the values are translated. Any
idea how can I refresh the values when I change the locale. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Internationalization-on-panels-tp2299768p4204686.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: Internationalization on panels

2011-12-16 Thread Sven Meier

Hi,

you should delay getting the string until it's needed for rendering.

Let your drop-down iterate over your domainVOs and use a custom ChoiceRenderer to render 
the id and the i18ned value, no need for a custom SelectOption.

Sven


Am 16.12.2011 14:46, schrieb cosmindumy:

Hello again.
I have one problem with internationalization. I want to internationalize
the values from a drop down. But the values are not refreshed when I change
the locale. Here is the code

subjectsMatterList.add(new SelectOption(domainVO.getId().toString(),
getString(Util.getDomainVOKey(domainVO.getId().toString();

where subject matter is the list of choices. that has a pair of id and
display value. I want the display value to be internationalized. If I eneter
this page with the locale already changed the values are translated. Any
idea how can I refresh the values when I change the locale.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Internationalization-on-panels-tp2299768p4204686.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Internationalization on panels

2011-12-16 Thread cosmindumy
It worked. But the problem is that the drop down list is sorted. When I
change the locale it keeps the original sorting. The sorting is made
depending on locale but it doesn't change the order when I change the
locale. Only if I eneter again on this page it is sorted properly. Any idea?
I hope is clear what I mean.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Internationalization-on-panels-tp2299768p4204967.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: Internationalization on panels

2011-12-16 Thread Martin Grigorov
Use a model for the list of choices, instead of a plain List

On Fri, Dec 16, 2011 at 5:12 PM, cosmindumy cosmind...@yahoo.com wrote:
 It worked. But the problem is that the drop down list is sorted. When I
 change the locale it keeps the original sorting. The sorting is made
 depending on locale but it doesn't change the order when I change the
 locale. Only if I eneter again on this page it is sorted properly. Any idea?
 I hope is clear what I mean.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Internationalization-on-panels-tp2299768p4204967.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

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



Re: Internationalization on panels

2011-12-16 Thread cosmindumy
Can you give me a short example? I don't understand what you mean.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Internationalization-on-panels-tp2299768p4205110.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: Internationalization on panels

2011-12-16 Thread Martin Grigorov
See DropDownChoice's constructors.
Use the one that accepts a IModelList instead of List.
In #getObject() make the proper sorting.

On Fri, Dec 16, 2011 at 5:42 PM, cosmindumy cosmind...@yahoo.com wrote:
 Can you give me a short example? I don't understand what you mean.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Internationalization-on-panels-tp2299768p4205110.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

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



Re: Regarding Stack Overflow exception

2011-12-16 Thread Igor Vaynberg
pretty sure this was a bug in wicket's serialization checker that was
fixed in later versions. so either upgrade or turn off the
serialization checker.

-igor

On Fri, Dec 16, 2011 at 3:35 AM, smsmaddy smsd...@gmail.com wrote:
 Please find the stack trace as shown below:

 2011-12-16 16:44:42,308 ERROR [1932932845@qtp-511307135-7]
 [org.apache.wicket.Session] - Exception when detaching/serializing page
 java.lang.StackOverflowError
        at
 java.io.ObjectOutputStream$BlockDataOutputStream.writeBlockHeader(Unknown
 Source)
        at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown 
 Source)
        at
 java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(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.GeneratedMethodAccessor27.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.GeneratedMethodAccessor27.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.GeneratedMethodAccessor27.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.defaultWriteFields(Unknown Source)
        at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
        at org.apache.wicket.Component.writeObject(Component.java:4700)
        at sun.reflect.GeneratedMethodAccessor28.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.writeArray(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
 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:1124)
        at
 

Re: Asking for download files with non-ascii names.

2011-12-16 Thread Alexander Cherednichenko
Hi guys,

I am _really_ sorry for breaking a thread and re-posting it in a
separate, but for some reason my personal mailbox was not hit with the
answer, I only was able to find it in archives. Subscribed now.

Unfortunately, the solution proposed would not work for me. The one in
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ would
work well for files, etc, but the issue is that I have a resource,
which is generated on-the-fly using values of the component's model.
Just to give you a quick sample:


// in page ctor:


...

AJAXDownloadData download = new AjaxDownloadData() {

  @SpringBean private PDFGenerator pdfGenerator;

  public void getFileName() { return
getComponent().getModelObject().getCyrillicFileName(); }

  public void getResourceStream() { return new
ByteArrayResource(getComponent().getModelObject().getMimeType(),
pdfGenerator.generateSmall(getComponent().getModelObject())).getResourceStream();
}

} // end AjaxDownload

AjaxLinkData dloadLink = new AjaxLinkData(download) { public
void onClick(AjaxRequestTarget target)
{downloadBehavior.initiate(target);}  )

add(dloadLink);

...


The issue with this code is that it is coupled with the model. I was
also thinking of another solution:


1. Create a specific page with HybridMountParam or whatever allowing
for any number of slashes in the end (so that the filename'd be
considered just an ignored param.


2. Whenever the download behavior is needed, attach the download
behavior to this component/page, persisting models in it.

The issue with this approach is that URL mounting seems to be
performed on the page basis, and I see no way of obtaining the
reference to a new Page...


Maybe there's a way we may attach many IBehaviorListeners to the
instance of a page which would then mount under any URL we need?

Thank you - and kindest regards,

Alex.

On Thu, Dec 15, 2011 Martin Grigorov wrote:
lex...@gmail.com wrote:

Hi,

In my app we use Wicket's Resource to upload/download files. We do it
to avoid synchronization on page access but I think you can solve your
problem with this.

Unfortunately I imagine the full solution with Wicket 1.5's
#mountResource(). See
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ for
more details.

On Thu, Dec 15, 2011 at 11:54 PM, Alexander Cherednichenko
lex...@gmail.com wrote:
 Hello!

 Faced an interesting problem, however few hours of googling and trial did
 not lead to success. wicket is 1.4

 The problem: I have an AjaxDownload (
 https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html)
 or DownloadLink (
 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/link/DownloadLink.html),
 both very good and cool components. Thank you the developers! I am
 streaming a dynamically-generated content to the user and want them to save
 it as a file. Usual implementation of both is coming down
 to ResourceStreamRequestTarget, which in turn does the actual streaming and
 also sets the content-disposition: attachment; filename=''. This does not 
 work for non-ascii.



-- 
Alexander Cherednichenko

[ the only way out is the way up ]


Solved: Only the first TextField in a repetition gets correct OnChangeAjaxBehavior with 1.5.1

2011-12-16 Thread Anders Peterson

The problem was in the html file.

I used to have this:

input name=marketWeight type=text id=marketWeight size=6 maxlength=6 
wicket:id=marketWeight /


Needed to change that to:

input type=text size=6 maxlength=6 wicket:id=marketWeight /


marketWeight is the component with the ajax behaviour, and it was in a 
ListView so I had several of them.



I guess something related to replacing the name/id of a component changed from 
1.4 to 1.5.



/Anders


On 2011-12-16 14:15, Anders Peterson wrote:

Hello again, I still have this problem... (been working on other things)

I've tracked the problem back to the request parameters simply not containing 
the expected values.


This input name seems correct since I changed the market weight attribute of 
the second instrument:

instruments:1:marketWeight

But the HashMap containing parameter values ONLY contain this:
{instruments:0:marketWeight=[17.602]}

This results in me getting null as FormComponent input.

Anyone know what I've done wrong?

/Anders


On 2011-10-13 13:46, Anders Peterson wrote:
Here the (simplified) code that creates the ListViev, TextFields and Label. 
/Anders







On 13 okt 2011, at 12:40, Anders Peterson wrote:


Hi,

Upgrading to wicket 1.5.1 from 1.4.18 my ajax updates stopped working.

I have a page with a form. Inside the form there is a repetition (ListView) 
that among other things creates a text field for each item (ListItem). Each 
of those text fields has an OnChangeAjaxBehavior set that should update a 
label. The label should continously display the total sum of the numbers in 
the text fields.


With wicket 1.4.18 (and previous versions) this worked fine.

With 1.5.1 only the first text field in the repetition gets the correct ajax 
behavior - it works the way I want it, and the way it worked with 1.4.*. The 
other text fields are dead, except for focus set/removed. While typing in 
any of the other text fields nothing is updated (the ajax debug window shows 
no activity). When focus is removed I get a NullPointerException regardless 
of what I've changed.


Is this a (known) bug, or is there a difference between 1.4 and 1.5 that 
I've missed?


/Anders






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




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






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



Re: Solved: Only the first TextField in a repetition gets correct OnChangeAjaxBehavior with 1.5.1

2011-12-16 Thread Dan Retzlaff
Yes, that broke our app during migration as well. I've added a migration
wiki entry.
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-Component.getMarkupId%28%29implementationchanged


On Fri, Dec 16, 2011 at 1:51 PM, Anders Peterson ap...@optimatika.sewrote:

 The problem was in the html file.

 I used to have this:

 input name=marketWeight type=text id=marketWeight size=6
 maxlength=6 wicket:id=marketWeight /

 Needed to change that to:

 input type=text size=6 maxlength=6 wicket:id=marketWeight /


 marketWeight is the component with the ajax behaviour, and it was in a
 ListView so I had several of them.


 I guess something related to replacing the name/id of a component changed
 from 1.4 to 1.5.


 /Anders


 On 2011-12-16 14:15, Anders Peterson wrote:

 Hello again, I still have this problem... (been working on other things)

 I've tracked the problem back to the request parameters simply not
 containing the expected values.

 This input name seems correct since I changed the market weight
 attribute of the second instrument:
 instruments:1:marketWeight

 But the HashMap containing parameter values ONLY contain this:
 {instruments:0:marketWeight=[**17.602]}

 This results in me getting null as FormComponent input.

 Anyone know what I've done wrong?

 /Anders


 On 2011-10-13 13:46, Anders Peterson wrote:

 Here the (simplified) code that creates the ListViev, TextFields and
 Label. /Anders






 On 13 okt 2011, at 12:40, Anders Peterson wrote:

  Hi,

 Upgrading to wicket 1.5.1 from 1.4.18 my ajax updates stopped working.

 I have a page with a form. Inside the form there is a repetition
 (ListView) that among other things creates a text field for each item
 (ListItem). Each of those text fields has an OnChangeAjaxBehavior set that
 should update a label. The label should continously display the total sum
 of the numbers in the text fields.

 With wicket 1.4.18 (and previous versions) this worked fine.

 With 1.5.1 only the first text field in the repetition gets the correct
 ajax behavior - it works the way I want it, and the way it worked with
 1.4.*. The other text fields are dead, except for focus set/removed.
 While typing in any of the other text fields nothing is updated (the ajax
 debug window shows no activity). When focus is removed I get a
 NullPointerException regardless of what I've changed.

 Is this a (known) bug, or is there a difference between 1.4 and 1.5
 that I've missed?

 /Anders





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




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





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