problem with ChoiceRenderer

2012-05-11 Thread Michael Jaruska

Hi folks,

after hours of elaborating, searching docu and trying I'm totaly lost. My 
ChoiceRenderer is not
working.

Here is my code (not relevant code has been removed):

markup:
select id=1 wicket:id=zoznam/select

page implementation:
public class PageEshop extends PageBase{
public PageEshop(){
ChoiceRendererVyrobok renderer = new ChoiceRendererVyrobok();
ListVyrobok vyrobky = Arrays.asList(new Vyrobok(start, -Vyberte typ-), new Vyrobok(polstar, 
Polštář), new Vyrobok(deka, Deka));
Vyrobok defaultChoice = vyrobky.get(0);
DropDownChoiceVyrobok vyberVyrobku = new DropDownChoiceVyrobok(zoznam, new 
PropertyModelVyrobok(defaultChoice, kluc), vyrobky, renderer);
FormObject form = new FormObject(inputForm);
form.add(vyberVyrobku);
this.add(form);
}
}

pojo:
public class Vyrobok implements Serializable{
private String kluc;
private String hodnota;

public Vyrobok(String kluc, String hodnota){
this.kluc = kluc;
this.hodnota = hodnota;
}
//getters and setters for attributes
}

IChoiceRenderer implementation:
public class ChoiceRendererVyrobok implements IChoiceRendererVyrobok{
@Override
public Object getDisplayValue(Vyrobok vyrobok){
return vyrobok.getHodnota();
}

@Override
public String getIdValue(Vyrobok vyrobok, int index){
return vyrobok.getKluc();
}
}

When page is loaded, this error happens (not complete stack, not relevant 
removed):
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to 
cz.polstareadeky.utils.Vyrobok
at 
cz.polstareadeky.ChoiceRendererVyrobok.getIdValue(ChoiceRendererVyrobok.java:1)
at 
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:194)
at 
org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:837)

Something is wrong in ChoiceRendererVyrobok but I can't find what..

Any help is apreciated,

thanks, Michal

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



Re: Ajax Error in MSIE 8

2012-05-11 Thread Martin Grigorov
Hi,

Which version of Wicket ?
In what conditions this happen ? I.e. do you click on a link or do you
submit a form or ...

On Thu, May 10, 2012 at 11:33 PM, Richard W. Adams rwada...@up.com wrote:
 I'm getting Ajax errors that seems to occur only in Internet Explorer 8
 (same code works fine in IE9  Firefox). I'm in a corporate environment
 where IE8 support is a requirement, so wanted to see if anyone has seen
 this before  knows of a fix. The Wicket Ajax trace is below; the parser
 says it can't find the root element in the Ajax response. We've seen this
 same error on various pages, though it doesn't ALWAYS occur:


 INFO: focus removed from wicket-generated-id-18
 INFO:
 INFO: Initiating Ajax GET request on
 ?wicket:interface=:6:form:main-box:mp-form:primary-track-box:primary-icon::IBehaviorListener:1:random=0.9122150377237917
 INFO: Invoking pre-call handler(s)...
 INFO: Received ajax response (4130 characters)
 INFO:
 ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
 id=successFeedback91 ![CDATA[div id=successFeedback91
 style=display:none/div]]/componentcomponent id=infoFeedback93
![CDATA[div id=infoFeedback93
 style=display:none/div]]/componentcomponent id=errorFeedback94
![CDATA[div id=errorFeedback94
 style=display:none/div]]/componentcomponent id=warnFeedback92
![CDATA[div id=warnFeedback92
 style=display:none/div]]/componentheader-contribution
 encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org
 script type=text/javascript
 src=resources/com.uprr.enm.web.mp.behavior.MilepostReference/milepostreference.js/script

 script type=text/javascript
 src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script

 script type=text/javascript
 src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script

 script type=text/javascript
 src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script

 script type=text/javascript
 id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/
 wicketAjaxDebugEnable=true;
 /*--]^]^*//script

 /head]]/header-contributioncomponent id=primaryMpOther9c
![CDATA[input class=numeric ricInputText value=505.000
 name=main-box:mp-form:primary-track-box:primaryMpOther
 id=primaryMpOther9c maxlength=9 size=11 type=text onblur=var
 wcall=wicketAjaxPost('?wicket:interface=:6:form:main-box:mp-form:primary-track-box:primaryMpOther::IBehaviorListener:4:-1',
 wicketSerialize(Wicket.$('primaryMpOther9c')),function() {
 }.bind(this),function() { }.bind(this), function() {return
 Wicket.$('primaryMpOther9c') != null;}.bind(this)); xmlns:wicket=
 http://wicket.apache.org/]]/componentheader-contribution
 encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org
 script type=text/javascript
 id=attachChoice!--/*--![CDATA[/*!--*/
 function attachChoiceHandlers(markupId, callbackScript) {
  var inputNodes = wicketGet(markupId).getElementsByTagName('input');
  for (var i = 0 ; i  inputNodes.length ; i ++) {
  var inputNode = inputNodes[i]^;
  if (!inputNode.type) continue;
  if
 (!(inputNode.className.indexOf('wicket-'+markupId)=0)!(inputNode.id.indexOf(markupId+'-')=0))
 continue;
  var inputType = inputNode.type.toLowerCase();
  if (inputType == 'checkbox' || inputType == 'radio') {
  Wicket.Event.add(inputNode, 'click', callbackScript);
  }
  }
 }

 /*--]^]^*//script

 /head]]/header-contributioncomponent id=primaryMpSelection8f
![CDATA[span id=primaryMpSelection8f xmlns:wicket=
 http://wicket.apache.org;input
 name=main-box:mp-form:primary-track-box:primaryMpSelection type=radio
 value=0 id=primaryMpSelection8f-0/label
 for=primaryMpSelection8f-0Start (503.940)/labelbr /
 input name=main-box:mp-form:primary-track-box:primaryMpSelection
 type=radio value=1 id=primaryMpSelection8f-1/label
 for=primaryMpSelection8f-1End (538.200)/labelbr /
 input name=main-box:mp-form:primary-track-box:primaryMpSelection
 type=radio checked=checked value=2
 id=primaryMpSelection8f-2/label
 for=primaryMpSelection8f-2Other/labelbr /
 /span]]/componentevaluate![CDATA[$('#successFeedback91').trigger('ricolaFeedbackDismissed');]]/evaluateevaluate![CDATA[$('#infoFeedback93').trigger('ricolaFeedbackDismissed');]]/evaluateevaluate![CDATA[$('#errorFeedback94').trigger('ricolaFeedbackDismissed');]]/evaluateevaluate![CDATA[$('#warnFeedback92').trigger('ricolaFeedbackDismissed');]]/evaluateevaluate![CDATA[attachChoiceHandlers('primaryMpSelection8f',
 function() {var
 wcall=wicketAjaxPost('?wicket:interface=:6:form:main-box:mp-form:primary-track-box:primaryMpSelection::IActivePageBehaviorListener:0:-1wicket:ignoreIfNotActive=true',
 wicketSerializeForm(document.getElementById('primaryMpSelection8f',false)),function()
 { }.bind(this),function() { }.bind(this), function() {return
 Wicket.$('primaryMpSelection8f') !=
 null;}.bind(this));});]]/evaluate/ajax-response
 ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not
 find root ajax-response element
 INFO: Invoking post-call handler(s)...
 INFO: Invoking 

Re: problem with ChoiceRenderer

2012-05-11 Thread Sven Meier

Hi,

Vyrobok defaultChoice = vyrobky.get(0);
DropDownChoiceVyrobok vyberVyrobku =
new DropDownChoiceVyrobok(
zoznam,
new PropertyModelVyrobok(defaultChoice, kluc),
vyrobky,
renderer);

you're instructing the DropDownChoice to get its model object from your 
defaultChoice:


new PropertyModelVyrobok(defaultChoice, kluc)

This is probably not what you've intended as Kluc is a String. Something 
like the following would make more sense:


this.selectedChoice = vyrobky.get(0);

new PropertyModelVyrobok(this, selectedChoice)

Sven

On 05/11/2012 09:16 AM, Michael Jaruska wrote:

Hi folks,

after hours of elaborating, searching docu and trying I'm totaly lost. 
My ChoiceRenderer is not

working.

Here is my code (not relevant code has been removed):

markup:
select id=1 wicket:id=zoznam/select

page implementation:
public class PageEshop extends PageBase{
public PageEshop(){
ChoiceRendererVyrobok renderer = new ChoiceRendererVyrobok();
ListVyrobok vyrobky = Arrays.asList(new Vyrobok(start, 
-Vyberte typ-), new Vyrobok(polstar, Polštář), new 
Vyrobok(deka, Deka));

Vyrobok defaultChoice = vyrobky.get(0);
DropDownChoiceVyrobok vyberVyrobku = new 
DropDownChoiceVyrobok(zoznam, new 
PropertyModelVyrobok(defaultChoice, kluc), vyrobky, renderer);

FormObject form = new FormObject(inputForm);
form.add(vyberVyrobku);
this.add(form);
}
}

pojo:
public class Vyrobok implements Serializable{
private String kluc;
private String hodnota;

public Vyrobok(String kluc, String hodnota){
this.kluc = kluc;
this.hodnota = hodnota;
}
//getters and setters for attributes
}

IChoiceRenderer implementation:
public class ChoiceRendererVyrobok implements IChoiceRendererVyrobok{
@Override
public Object getDisplayValue(Vyrobok vyrobok){
return vyrobok.getHodnota();
}

@Override
public String getIdValue(Vyrobok vyrobok, int index){
return vyrobok.getKluc();
}
}

When page is loaded, this error happens (not complete stack, not 
relevant removed):
Caused by: java.lang.ClassCastException: java.lang.String cannot be 
cast to cz.polstareadeky.utils.Vyrobok
at 
cz.polstareadeky.ChoiceRendererVyrobok.getIdValue(ChoiceRendererVyrobok.java:1)
at 
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:194)
at 
org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:837)


Something is wrong in ChoiceRendererVyrobok but I can't find what..

Any help is apreciated,

thanks, Michal

-
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: Invalid URL generated when jsessionid is present

2012-05-11 Thread Martin Grigorov
On Thu, May 10, 2012 at 8:49 PM, Guillaume Smet
guillaume.s...@gmail.com wrote:
 Hi,

 Under certain circumstances when we navigate on our Wicket site,
 Wicket generates the following URL for a bookmarkable page link:
 /mount/point/.;jsessionid=C94BC23C58FD2972B34E5DE145C076BB

 The dot before the ;jsessionid= makes the mount point not recognized by 
 Wicket.

 The problem is when I click on a link pointing to the exact same page
 I'm visiting.

 Any idea on how to fix it?

Upgrade to 1.5.6.


 Thanks.

 --
 Guillaume

 -
 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: TableComponentAsXlsHandler Problem

2012-05-11 Thread khanshan
Ok, I want to ask lastly,

I dynamically generated a workbook HSSFWorkbook, 
and I want client to download that file inside of onclick method of a link.
(BytearrayResource doesnt work, it makes problem, please another soulution)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4625745.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: problem with ChoiceRenderer

2012-05-11 Thread Michael Jaruska

just now I have elaborated that this works:
DropDownChoiceVyrobok vyberVyrobku = new DropDownChoiceVyrobok(vyberVyrobku, 
new PropertyModelVyrobok(defaultChoice, null), vyrobky, renderer);
(note `null' in PropertyModel)

but strange is that I don't know why :-(



On 11.5.2012 9:36, Sven Meier wrote:

Hi,

Vyrobok defaultChoice = vyrobky.get(0);
DropDownChoiceVyrobok vyberVyrobku =
new DropDownChoiceVyrobok(
zoznam,
new PropertyModelVyrobok(defaultChoice, kluc),
vyrobky,
renderer);

you're instructing the DropDownChoice to get its model object from your 
defaultChoice:

new PropertyModelVyrobok(defaultChoice, kluc)

This is probably not what you've intended as Kluc is a String. Something like 
the following would make more sense:

this.selectedChoice = vyrobky.get(0);

new PropertyModelVyrobok(this, selectedChoice)

Sven

On 05/11/2012 09:16 AM, Michael Jaruska wrote:

Hi folks,

after hours of elaborating, searching docu and trying I'm totaly lost. My 
ChoiceRenderer is not
working.

Here is my code (not relevant code has been removed):

markup:
select id=1 wicket:id=zoznam/select

page implementation:
public class PageEshop extends PageBase{
public PageEshop(){
ChoiceRendererVyrobok renderer = new ChoiceRendererVyrobok();
ListVyrobok vyrobky = Arrays.asList(new Vyrobok(start, -Vyberte typ-), new Vyrobok(polstar, 
Polštář), new Vyrobok(deka, Deka));
Vyrobok defaultChoice = vyrobky.get(0);
DropDownChoiceVyrobok vyberVyrobku = new DropDownChoiceVyrobok(zoznam, new 
PropertyModelVyrobok(defaultChoice, kluc), vyrobky, renderer);
FormObject form = new FormObject(inputForm);
form.add(vyberVyrobku);
this.add(form);
}
}

pojo:
public class Vyrobok implements Serializable{
private String kluc;
private String hodnota;

public Vyrobok(String kluc, String hodnota){
this.kluc = kluc;
this.hodnota = hodnota;
}
//getters and setters for attributes
}

IChoiceRenderer implementation:
public class ChoiceRendererVyrobok implements IChoiceRendererVyrobok{
@Override
public Object getDisplayValue(Vyrobok vyrobok){
return vyrobok.getHodnota();
}

@Override
public String getIdValue(Vyrobok vyrobok, int index){
return vyrobok.getKluc();
}
}

When page is loaded, this error happens (not complete stack, not relevant 
removed):
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to 
cz.polstareadeky.utils.Vyrobok
at 
cz.polstareadeky.ChoiceRendererVyrobok.getIdValue(ChoiceRendererVyrobok.java:1)
at 
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:194)
at 
org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:837)

Something is wrong in ChoiceRendererVyrobok but I can't find what..

Any help is apreciated,

thanks, Michal

-
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: Customize PagingNavigator

2012-05-11 Thread vineet semwal
btw created this https://issues.apache.org/jira/browse/WICKET-4555

On Fri, May 11, 2012 at 2:32 AM, sudeivas sureshkumar@gmail.com wrote:
 Works now. Thanks

 -Suresh

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Customize-PagingNavigator-tp4624405p4624655.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




-- 
thank you,

regards,
Vineet Semwal

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



Re: TableComponentAsXlsHandler Problem

2012-05-11 Thread Girts Ziemelis
I am using ByteArrayResource and it works great (Wicket 1.5.6). It is 
not link.onClick, but may be will do?

Code:
   ByteArrayResource surveyExportXlsx = new 
ByteArrayResource(application/vnd.ms-excel) {

  private static final long serialVersionUID = 1L;
  @Override
  protected byte[] getData(Attributes attributes) {
Workbook wb =  generate your Workbook ...
ByteArrayOutputStream os = new ByteArrayOutputStream();
try {
  wb.write(os);
  return os.toByteArray();
} catch (IOException ex) {
  ...
}
  }
  @Override
  protected void setResponseHeaders(ResourceResponse data, 
Attributes attributes) {

SimpleDateFormat df = new SimpleDateFormat(.MM.dd_HHmm);
data.setFileName(SurveyExport_ + df.format(new Date()) + 
.xlsx);

data.disableCaching();
super.setResponseHeaders(data, attributes);
  }
};
add(new ResourceLink(downloadAsXlsx, surveyExportXlsx));



On 2012-05-11 10:46, khanshan wrote:

Ok, I want to ask lastly,

I dynamically generated a workbook HSSFWorkbook,
and I want client to download that file inside of onclick method of a link.
(BytearrayResource doesnt work, it makes problem, please another soulution)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4625745.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: Invalid URL generated when jsessionid is present

2012-05-11 Thread Guillaume Smet
Hi Martin,

On Fri, May 11, 2012 at 9:43 AM, Martin Grigorov mgrigo...@apache.org wrote:
 Upgrade to 1.5.6.

Oh? I haven't found any JIRA on this very subject but I might have missed it.

I usually upgrade very quickly after a release but the issue with
stateless page + feedback fixed after the release is kinda annoying
for us.

That said, I'll test 1.5.6 to see if it fixes the problem and I'll
decide what I do after that.

Thanks for your quick answer and have a nice day.

-- 
Guillaume

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



Re: Invalid URL generated when jsessionid is present

2012-05-11 Thread Martin Grigorov
On Fri, May 11, 2012 at 12:02 PM, Guillaume Smet
guillaume.s...@gmail.com wrote:
 Hi Martin,

 On Fri, May 11, 2012 at 9:43 AM, Martin Grigorov mgrigo...@apache.org wrote:
 Upgrade to 1.5.6.

 Oh? I haven't found any JIRA on this very subject but I might have missed it.

 I usually upgrade very quickly after a release but the issue with
 stateless page + feedback fixed after the release is kinda annoying
 for us.

There is a workaround for this. See the ticket for 1.5.7.


 That said, I'll test 1.5.6 to see if it fixes the problem and I'll
 decide what I do after that.

 Thanks for your quick answer and have a nice day.

 --
 Guillaume

 -
 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: problem with ChoiceRenderer

2012-05-11 Thread Andrea Del Bene

Hi,

the type of the model and of the renderer must be the same chosen for 
the  DropDownChoice (Vyrobok in your case). In the first version of your 
code this was not true for your model because it pointed to a String 
field (named kluc).
Your second version works fine because you don't provide a property 
expression to PropertyModel (is null) and doing so the property model 
considers as model object the first parameter of its constructor 
(defaultChoice in your case), which is an instance of class Vyrobok.
But at this point it does not make much sense to use a PropertyModel, 
you could substitute it with a Model class, like this:


Model.of(defaultChoice)

just now I have elaborated that this works:
DropDownChoiceVyrobok vyberVyrobku = new 
DropDownChoiceVyrobok(vyberVyrobku, new 
PropertyModelVyrobok(defaultChoice, null), vyrobky, renderer);

(note `null' in PropertyModel)

but strange is that I don't know why :-(



On 11.5.2012 9:36, Sven Meier wrote:

Hi,

Vyrobok defaultChoice = vyrobky.get(0);
DropDownChoiceVyrobok vyberVyrobku =
new DropDownChoiceVyrobok(
zoznam,
new PropertyModelVyrobok(defaultChoice, kluc),
vyrobky,
renderer);

you're instructing the DropDownChoice to get its model object from 
your defaultChoice:


new PropertyModelVyrobok(defaultChoice, kluc)

This is probably not what you've intended as Kluc is a String. 
Something like the following would make more sense:


this.selectedChoice = vyrobky.get(0);

new PropertyModelVyrobok(this, selectedChoice)

Sven

On 05/11/2012 09:16 AM, Michael Jaruska wrote:

Hi folks,

after hours of elaborating, searching docu and trying I'm totaly 
lost. My ChoiceRenderer is not

working.

Here is my code (not relevant code has been removed):

markup:
select id=1 wicket:id=zoznam/select

page implementation:
public class PageEshop extends PageBase{
public PageEshop(){
ChoiceRendererVyrobok renderer = new ChoiceRendererVyrobok();
ListVyrobok vyrobky = Arrays.asList(new Vyrobok(start, -Vyberte 
typ-), new Vyrobok(polstar, Polštář), new Vyrobok(deka, 
Deka));

Vyrobok defaultChoice = vyrobky.get(0);
DropDownChoiceVyrobok vyberVyrobku = new 
DropDownChoiceVyrobok(zoznam, new 
PropertyModelVyrobok(defaultChoice, kluc), vyrobky, renderer);

FormObject form = new FormObject(inputForm);
form.add(vyberVyrobku);
this.add(form);
}
}

pojo:
public class Vyrobok implements Serializable{
private String kluc;
private String hodnota;

public Vyrobok(String kluc, String hodnota){
this.kluc = kluc;
this.hodnota = hodnota;
}
//getters and setters for attributes
}

IChoiceRenderer implementation:
public class ChoiceRendererVyrobok implements IChoiceRendererVyrobok{
@Override
public Object getDisplayValue(Vyrobok vyrobok){
return vyrobok.getHodnota();
}

@Override
public String getIdValue(Vyrobok vyrobok, int index){
return vyrobok.getKluc();
}
}

When page is loaded, this error happens (not complete stack, not 
relevant removed):
Caused by: java.lang.ClassCastException: java.lang.String cannot be 
cast to cz.polstareadeky.utils.Vyrobok
at 
cz.polstareadeky.ChoiceRendererVyrobok.getIdValue(ChoiceRendererVyrobok.java:1)
at 
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:194)
at 
org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:837)


Something is wrong in ChoiceRendererVyrobok but I can't find what..

Any help is apreciated,

thanks, Michal

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




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



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




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



1.5 migration and border magic

2012-05-11 Thread Girts Ziemelis
I was using border in 1.4 to dynamically add different borders to the 
page (like - for printing, popup, plain, with header/ footer etc based 
on page parameters and some other criteria) and really liked this method 
in 1.4. Seems that 1.5 makes this  approach clumsy :( Now I must 
override the page.add method and do some magic to decide where I am 
adding the component, etc. I got it to work (pretty sure I am not 
covering all cases ) , then realized, that in  WicketTester also now all 
the component paths must be prefixed with the border:border_body 
string which is rather ugly :(


Is there a better way to implement this (instead of borders)? It just 
does not feel right - most of the changes in 1.5 made my code cleaner, 
but this one feels like a hack ... :(


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



Re: 1.5 migration and border magic

2012-05-11 Thread Martin Grigorov
Hi,

It is not very clear to me what exactly is clumsy.
Can you explain in more details how it got worse. Show some code maybe.

On Fri, May 11, 2012 at 2:20 PM, Girts Ziemelis
girts.zieme...@gmail.com wrote:
 I was using border in 1.4 to dynamically add different borders to the page
 (like - for printing, popup, plain, with header/ footer etc based on page
 parameters and some other criteria) and really liked this method in 1.4.
 Seems that 1.5 makes this  approach clumsy :( Now I must override the
 page.add method and do some magic to decide where I am adding the component,
 etc. I got it to work (pretty sure I am not covering all cases ) , then
 realized, that in  WicketTester also now all the component paths must be
 prefixed with the border:border_body string which is rather ugly :(

 Is there a better way to implement this (instead of borders)? It just does
 not feel right - most of the changes in 1.5 made my code cleaner, but this
 one feels like a hack ... :(

 -
 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: Ajax Error in MSIE 8

2012-05-11 Thread Richard W. Adams
Sorry. Should have provided more details:

Wicket Version: 1.4.20

Operating System: Windows XP

Scenario: Users clicks an icon with an Ajax onclick event. In the event 
handler on the server, we copy the value of one String variable to another 
String variable in the model, then we call AjaxRequestTarget.addComponent 
twice, to update (1) the receiving text field, and (2) an associated radio 
button.
__

There are three kinds of lies: lies, damn lies, and statistics.
Benjamin Disraeli

Then there was the man who drowned crossing a stream with an average 
depth of six inches.
W. I. E. Gates




From:   Martin Grigorov mgrigo...@apache.org
To: users@wicket.apache.org
Date:   05/11/2012 02:26 AM
Subject:Re: Ajax Error in MSIE 8



Hi,

Which version of Wicket ?
In what conditions this happen ? I.e. do you click on a link or do you
submit a form or ...

On Thu, May 10, 2012 at 11:33 PM, Richard W. Adams rwada...@up.com 
wrote:
 I'm getting Ajax errors that seems to occur only in Internet Explorer 8
 (same code works fine in IE9  Firefox). I'm in a corporate environment
 where IE8 support is a requirement, so wanted to see if anyone has seen
 this before  knows of a fix. The Wicket Ajax trace is below; the parser
 says it can't find the root element in the Ajax response. We've seen 
this
 same error on various pages, though it doesn't ALWAYS occur:


 INFO: focus removed from wicket-generated-id-18
 INFO:
 INFO: Initiating Ajax GET request on
 
?wicket:interface=:6:form:main-box:mp-form:primary-track-box:primary-icon::IBehaviorListener:1:random=0.9122150377237917
 INFO: Invoking pre-call handler(s)...
 INFO: Received ajax response (4130 characters)
 INFO:
 ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
 id=successFeedback91 ![CDATA[div id=successFeedback91
 style=display:none/div]]/componentcomponent id=infoFeedback93
![CDATA[div id=infoFeedback93
 style=display:none/div]]/componentcomponent 
id=errorFeedback94
![CDATA[div id=errorFeedback94
 style=display:none/div]]/componentcomponent id=warnFeedback92
![CDATA[div id=warnFeedback92
 style=display:none/div]]/componentheader-contribution
 encoding=wicket1 ![CDATA[head xmlns:wicket=
http://wicket.apache.org
 script type=text/javascript
 
src=resources/com.uprr.enm.web.mp.behavior.MilepostReference/milepostreference.js/script

 script type=text/javascript
 
src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script

 script type=text/javascript
 
src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script

 script type=text/javascript
 
src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script

 script type=text/javascript
 id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/
 wicketAjaxDebugEnable=true;
 /*--]^]^*//script

 /head]]/header-contributioncomponent id=primaryMpOther9c
![CDATA[input class=numeric ricInputText value=505.000
 name=main-box:mp-form:primary-track-box:primaryMpOther
 id=primaryMpOther9c maxlength=9 size=11 type=text onblur=var
 
wcall=wicketAjaxPost('?wicket:interface=:6:form:main-box:mp-form:primary-track-box:primaryMpOther::IBehaviorListener:4:-1',
 wicketSerialize(Wicket.$('primaryMpOther9c')),function() {
 }.bind(this),function() { }.bind(this), function() {return
 Wicket.$('primaryMpOther9c') != null;}.bind(this)); xmlns:wicket=
 http://wicket.apache.org/]]/componentheader-contribution
 encoding=wicket1 ![CDATA[head xmlns:wicket=
http://wicket.apache.org
 script type=text/javascript
 id=attachChoice!--/*--![CDATA[/*!--*/
 function attachChoiceHandlers(markupId, callbackScript) {
  var inputNodes = wicketGet(markupId).getElementsByTagName('input');
  for (var i = 0 ; i  inputNodes.length ; i ++) {
  var inputNode = inputNodes[i]^;
  if (!inputNode.type) continue;
  if
 
(!(inputNode.className.indexOf('wicket-'+markupId)=0)!(inputNode.id.indexOf(markupId+'-')=0))
 continue;
  var inputType = inputNode.type.toLowerCase();
  if (inputType == 'checkbox' || inputType == 'radio') {
  Wicket.Event.add(inputNode, 'click', callbackScript);
  }
  }
 }

 /*--]^]^*//script

 /head]]/header-contributioncomponent id=primaryMpSelection8f
![CDATA[span id=primaryMpSelection8f xmlns:wicket=
 http://wicket.apache.org;input
 name=main-box:mp-form:primary-track-box:primaryMpSelection 
type=radio
 value=0 id=primaryMpSelection8f-0/label
 for=primaryMpSelection8f-0Start (503.940)/labelbr /
 input name=main-box:mp-form:primary-track-box:primaryMpSelection
 type=radio value=1 id=primaryMpSelection8f-1/label
 for=primaryMpSelection8f-1End (538.200)/labelbr /
 input name=main-box:mp-form:primary-track-box:primaryMpSelection
 type=radio checked=checked value=2
 id=primaryMpSelection8f-2/label
 for=primaryMpSelection8f-2Other/labelbr /
 

Re: Ajax Error in MSIE 8

2012-05-11 Thread Martin Grigorov
Don't see anything suspicious.
You'll have to debug what happens in wicket-ajax.js ...

On Fri, May 11, 2012 at 3:07 PM, Richard W. Adams rwada...@up.com wrote:
 Sorry. Should have provided more details:

 Wicket Version: 1.4.20

 Operating System: Windows XP

 Scenario: Users clicks an icon with an Ajax onclick event. In the event
 handler on the server, we copy the value of one String variable to another
 String variable in the model, then we call AjaxRequestTarget.addComponent
 twice, to update (1) the receiving text field, and (2) an associated radio
 button.
 __

 There are three kinds of lies: lies, damn lies, and statistics.
 Benjamin Disraeli

 Then there was the man who drowned crossing a stream with an average
 depth of six inches.
 W. I. E. Gates




 From:   Martin Grigorov mgrigo...@apache.org
 To:     users@wicket.apache.org
 Date:   05/11/2012 02:26 AM
 Subject:        Re: Ajax Error in MSIE 8



 Hi,

 Which version of Wicket ?
 In what conditions this happen ? I.e. do you click on a link or do you
 submit a form or ...

 On Thu, May 10, 2012 at 11:33 PM, Richard W. Adams rwada...@up.com
 wrote:
 I'm getting Ajax errors that seems to occur only in Internet Explorer 8
 (same code works fine in IE9  Firefox). I'm in a corporate environment
 where IE8 support is a requirement, so wanted to see if anyone has seen
 this before  knows of a fix. The Wicket Ajax trace is below; the parser
 says it can't find the root element in the Ajax response. We've seen
 this
 same error on various pages, though it doesn't ALWAYS occur:


 INFO: focus removed from wicket-generated-id-18
 INFO:
 INFO: Initiating Ajax GET request on

 ?wicket:interface=:6:form:main-box:mp-form:primary-track-box:primary-icon::IBehaviorListener:1:random=0.9122150377237917
 INFO: Invoking pre-call handler(s)...
 INFO: Received ajax response (4130 characters)
 INFO:
 ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
 id=successFeedback91 ![CDATA[div id=successFeedback91
 style=display:none/div]]/componentcomponent id=infoFeedback93
![CDATA[div id=infoFeedback93
 style=display:none/div]]/componentcomponent
 id=errorFeedback94
![CDATA[div id=errorFeedback94
 style=display:none/div]]/componentcomponent id=warnFeedback92
![CDATA[div id=warnFeedback92
 style=display:none/div]]/componentheader-contribution
 encoding=wicket1 ![CDATA[head xmlns:wicket=
 http://wicket.apache.org
 script type=text/javascript

 src=resources/com.uprr.enm.web.mp.behavior.MilepostReference/milepostreference.js/script

 script type=text/javascript

 src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script

 script type=text/javascript

 src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script

 script type=text/javascript

 src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script

 script type=text/javascript
 id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/
 wicketAjaxDebugEnable=true;
 /*--]^]^*//script

 /head]]/header-contributioncomponent id=primaryMpOther9c
![CDATA[input class=numeric ricInputText value=505.000
 name=main-box:mp-form:primary-track-box:primaryMpOther
 id=primaryMpOther9c maxlength=9 size=11 type=text onblur=var

 wcall=wicketAjaxPost('?wicket:interface=:6:form:main-box:mp-form:primary-track-box:primaryMpOther::IBehaviorListener:4:-1',
 wicketSerialize(Wicket.$('primaryMpOther9c')),function() {
 }.bind(this),function() { }.bind(this), function() {return
 Wicket.$('primaryMpOther9c') != null;}.bind(this)); xmlns:wicket=
 http://wicket.apache.org/]]/componentheader-contribution
 encoding=wicket1 ![CDATA[head xmlns:wicket=
 http://wicket.apache.org
 script type=text/javascript
 id=attachChoice!--/*--![CDATA[/*!--*/
 function attachChoiceHandlers(markupId, callbackScript) {
  var inputNodes = wicketGet(markupId).getElementsByTagName('input');
  for (var i = 0 ; i  inputNodes.length ; i ++) {
  var inputNode = inputNodes[i]^;
  if (!inputNode.type) continue;
  if

 (!(inputNode.className.indexOf('wicket-'+markupId)=0)!(inputNode.id.indexOf(markupId+'-')=0))
 continue;
  var inputType = inputNode.type.toLowerCase();
  if (inputType == 'checkbox' || inputType == 'radio') {
  Wicket.Event.add(inputNode, 'click', callbackScript);
  }
  }
 }

 /*--]^]^*//script

 /head]]/header-contributioncomponent id=primaryMpSelection8f
![CDATA[span id=primaryMpSelection8f xmlns:wicket=
 http://wicket.apache.org;input
 name=main-box:mp-form:primary-track-box:primaryMpSelection
 type=radio
 value=0 id=primaryMpSelection8f-0/label
 for=primaryMpSelection8f-0Start (503.940)/labelbr /
 input name=main-box:mp-form:primary-track-box:primaryMpSelection
 type=radio value=1 id=primaryMpSelection8f-1/label
 for=primaryMpSelection8f-1End (538.200)/labelbr /
 input name=main-box:mp-form:primary-track-box:primaryMpSelection
 type=radio checked=checked value=2
 id=primaryMpSelection8f-2/label
 for=primaryMpSelection8f-2Other/labelbr /

 

Re: Two YUI DatePickers - use first date as basis for second date

2012-05-11 Thread vp143
Thanks for your answer.
I was hoping that there might something in Wicket.

I did look at the YUI docs but so far cant find exactly what I need to do.
It seems like I need to add a listener which calls a JS method which I think
I have understood but cant work out what is required to change the minimum
date.

Regards
Vishal


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Two-YUI-DatePickers-use-first-date-as-basis-for-second-date-tp4623018p4626281.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: Two YUI DatePickers - use first date as basis for second date

2012-05-11 Thread Martin Grigorov
Hi,

Wicket just wraps the JS component. I.e. you can set your settings in
Java and Wicket will serialize them to JSON which YUI Calendar will
use to configure itself.
But if you can set the needed property in pure JavaScript then it will
be faster because there wont be an Ajax roundtrip to the server.
See http://developer.yahoo.com/yui/calendar/ and search for 'mindate' setting

On Fri, May 11, 2012 at 3:34 PM, vp143 vishal.po...@cipriati.co.uk wrote:
 Thanks for your answer.
 I was hoping that there might something in Wicket.

 I did look at the YUI docs but so far cant find exactly what I need to do.
 It seems like I need to add a listener which calls a JS method which I think
 I have understood but cant work out what is required to change the minimum
 date.

 Regards
 Vishal


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Two-YUI-DatePickers-use-first-date-as-basis-for-second-date-tp4623018p4626281.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: 1.5 migration and border magic

2012-05-11 Thread Girts Ziemelis
It is worse, because now I need to write a code, which previously  I 
got for free in 1.4  :D  and by clumsy I meant my attempt of 
implementing this functionality  ;)


Now my superclass base page add method looks like this :(
  @Override
  public MarkupContainer add(Component... childs) {
for (Component component : childs) {
  // If border has not been created yet or component is being added 
to page header call super.add

  if (border == null || component.getId().startsWith(_header)) {
super.add(component);
  } else {
border.add(component);
  }
}
return this;
  }

Obviously  there are several problems with my code:
1.I assume _header is staff added to page header? Can I identify it 
differently, not by string _header? instanceof HtmlHeaderContainer?

2. is it sufficient to just override the add?
3. Checking that border has been added in a base class will not always 
work - I would have to come up with some generic way to decide which 
component goes into border and witch in a base class. Can I use page and 
border getAssociatedMarkup().find(wicketId) and decide based on 
checking, if specified wicked id is in a base class/border?


Would it be better to implement IComponentResolver? I tried this first 
(using modified TransparentWebMarkupContainer as an example), but it 
caused problems with not found markup for many Fragments and 
ModalWindows. (possibly related to 
https://issues.apache.org/jira/browse/WICKET-4545 ?)


I also do not like the extra path border:border_body now to be added 
in wicket tester asserts, but I can see the logic requiring this... :(




On 2012-05-11 14:30, Martin Grigorov wrote:

Hi,

It is not very clear to me what exactly is clumsy.
Can you explain in more details how it got worse. Show some code maybe.

On Fri, May 11, 2012 at 2:20 PM, Girts Ziemelis
girts.zieme...@gmail.com  wrote:

I was using border in 1.4 to dynamically add different borders to the page
(like - for printing, popup, plain, with header/ footer etc based on page
parameters and some other criteria) and really liked this method in 1.4.
Seems that 1.5 makes this  approach clumsy :( Now I must override the
page.add method and do some magic to decide where I am adding the component,
etc. I got it to work (pretty sure I am not covering all cases ) , then
realized, that in  WicketTester also now all the component paths must be
prefixed with the border:border_body string which is rather ugly :(

Is there a better way to implement this (instead of borders)? It just does
not feel right - most of the changes in 1.5 made my code cleaner, but this
one feels like a hack ... :(

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






Re: Ajax Error in MSIE 8

2012-05-11 Thread Richard W. Adams
We dug into wicket-ajax.js using this version of MSIE 8:



We discovered the problem occurs in this code:



Wicket.Ajax.Request.prototype = {


// Method that processes the request states
stateChangeCallback: function() { 

.

if (status == 200 || status == ) { // as stupid 
as it seems, IE7 sets status to  on ok
// response came without error
var responseAsText = t.responseText;


// parse the response if the callback 
needs a DOM tree
if (this.parseResponse == true) {
var xmldoc; 
if (typeof
(window.XMLHttpRequest) != undefined  typeof(DOMParser) != undefined
) { var parser = new DOMParser();
xmldoc = 
parser.parseFromString(responseAsText, text/xml);  
} else if 
(window.ActiveXObject) {
xmldoc = 
t.responseXML;
}
// invoke the loaded 
callback with an xml document
this
.loadedCallback(xmldoc); 
} else {
// invoke the loaded 
callback with raw string
this
.loadedCallback(responseAsText);
} 
if (this.suppressDone == false)
this.done();
}


The offending code is:

   xmldoc = t.responseXML;

Looking at the contents of t (a transport object), the 
transport.responseText field is set to the expected xml message, but 
transport.responseXML is empty and has no XML message.  Unfortunately, we 
could not see where transport.responseXML variable should have been set.

Does IE8 have known ajax bugs? Or is there a configuration setting we 
should be using to make this work? Or something else? We're willing to dig 
into the script more, but don't know where to look, as the Ajax processing 
is asynchronous  we can't simply step through the code execution.





From:   Martin Grigorov mgrigo...@apache.org
To: users@wicket.apache.org
Date:   05/11/2012 07:26 AM
Subject:Re: Ajax Error in MSIE 8



Don't see anything suspicious.
You'll have to debug what happens in wicket-ajax.js ...

On Fri, May 11, 2012 at 3:07 PM, Richard W. Adams rwada...@up.com wrote:
 Sorry. Should have provided more details:

 Wicket Version: 1.4.20

 Operating System: Windows XP

 Scenario: Users clicks an icon with an Ajax onclick event. In the event
 handler on the server, we copy the value of one String variable to 
another
 String variable in the model, then we call 
AjaxRequestTarget.addComponent
 twice, to update (1) the receiving text field, and (2) an associated 
radio
 button.
 __

 There are three kinds of lies: lies, damn lies, and statistics.
 Benjamin Disraeli

 Then there was the man who drowned crossing a stream with an average
 depth of six inches.
 W. I. E. Gates




 From:   Martin Grigorov mgrigo...@apache.org
 To: users@wicket.apache.org
 Date:   05/11/2012 02:26 AM
 Subject:Re: Ajax Error in MSIE 8



 Hi,

 Which version of Wicket ?
 In what conditions this happen ? I.e. do you click on a link or do you
 submit a form or ...

 On Thu, May 10, 2012 at 11:33 PM, Richard W. Adams rwada...@up.com
 wrote:
 I'm getting Ajax errors that seems to occur only in Internet Explorer 8
 (same code works fine in IE9  Firefox). I'm in a corporate environment
 where IE8 support is a requirement, so wanted to see if anyone has seen
 this before  knows of a fix. The Wicket Ajax trace is below; the 
parser
 says it can't find the root element in the Ajax response. We've seen
 this
 same error on various pages, though it doesn't ALWAYS occur:


 INFO: focus removed from wicket-generated-id-18
 INFO:
 INFO: Initiating Ajax GET request on

 
?wicket:interface=:6:form:main-box:mp-form:primary-track-box:primary-icon::IBehaviorListener:1:random=0.9122150377237917
 INFO: Invoking pre-call handler(s)...
 INFO: Received ajax response (4130 characters)
 INFO:
 ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
 id=successFeedback91 ![CDATA[div id=successFeedback91
 style=display:none/div]]/componentcomponent 
id=infoFeedback93
![CDATA[div id=infoFeedback93
 style=display:none/div]]/componentcomponent
 id=errorFeedback94
![CDATA[div id=errorFeedback94
 style=display:none/div]]/componentcomponent 
id=warnFeedback92
![CDATA[div id=warnFeedback92
 style=display:none/div]]/componentheader-contribution
 encoding=wicket1 

Re: Ajax Error in MSIE 8

2012-05-11 Thread Martin Grigorov
I'm not sure why this fails for you. And why it fails only from time to
time.
But looking at this Javascript code I think it can be improved.
File a ticket with a failing test case if possible.

On Fri, May 11, 2012 at 5:46 PM, Richard W. Adams rwada...@up.com wrote:

 We dug into wicket-ajax.js using this version of MSIE 8:



 We discovered the problem occurs in this code:



 *Wicket.Ajax.Request.prototype = {*

 **
 *// Method that processes the request states*
 *stateChangeCallback: function() {*

 *.*

 *if (status == 200 || status == ) { // as
 stupid as it seems, IE7 sets status to  on ok*
 *// response came without error*
 *var responseAsText = t.responseText;*
 **

 *// parse the response if the callback
 needs a DOM tree*
 *if (this.parseResponse == true) {*
 *var xmldoc;
*
 *if
 (typeof(window.XMLHttpRequest) != undefined  typeof(DOMParser) !=
 undefined) {
var parser = new DOMParser();*
 *xmldoc =
 parser.parseFromString(responseAsText, text/xml);
*
 *} else if
 (window.ActiveXObject) {*
 *xmldoc =
 t.responseXML;*
 *}*
 *// invoke the loaded
 callback with an xml document*
 *
 this.loadedCallback(xmldoc); *
 *} else {*
 *// invoke the loaded
 callback with raw string*
 *
 this.loadedCallback(responseAsText);*
 *}*
 *if (this.suppressDone == false)*
 *this.done();*
 *}*


 The offending code is:

 *   xmldoc = t.responseXML;*

 Looking at the contents of t (a transport object), the*transport.responseText
 * field is set to the expected xml message, but* transport.responseXML*is 
 empty and has no XML message.  Unfortunately, we could not see where
 transport.responseXML variable should have been set.

 Does IE8 have known ajax bugs? Or is there a configuration setting we
 should be using to make this work? Or something else? We're willing to dig
 into the script more, but don't know where to look, as the Ajax processing
 is asynchronous  we can't simply step through the code execution.






 From:Martin Grigorov mgrigo...@apache.org
 To:users@wicket.apache.org
 Date:05/11/2012 07:26 AM

 Subject:Re: Ajax Error in MSIE 8
 --



 Don't see anything suspicious.
 You'll have to debug what happens in wicket-ajax.js ...

 On Fri, May 11, 2012 at 3:07 PM, Richard W. Adams rwada...@up.com wrote:
  Sorry. Should have provided more details:
 
  Wicket Version: 1.4.20
 
  Operating System: Windows XP
 
  Scenario: Users clicks an icon with an Ajax onclick event. In the event
  handler on the server, we copy the value of one String variable to
 another
  String variable in the model, then we call AjaxRequestTarget.addComponent
  twice, to update (1) the receiving text field, and (2) an associated
 radio
  button.
  __
 
  There are three kinds of lies: lies, damn lies, and statistics.
  Benjamin Disraeli
 
  Then there was the man who drowned crossing a stream with an average
  depth of six inches.
  W. I. E. Gates
 
 
 
 
  From:   Martin Grigorov mgrigo...@apache.org
  To: users@wicket.apache.org
  Date:   05/11/2012 02:26 AM
  Subject:Re: Ajax Error in MSIE 8
 
 
 
  Hi,
 
  Which version of Wicket ?
  In what conditions this happen ? I.e. do you click on a link or do you
  submit a form or ...
 
  On Thu, May 10, 2012 at 11:33 PM, Richard W. Adams rwada...@up.com
  wrote:
  I'm getting Ajax errors that seems to occur only in Internet Explorer 8
  (same code works fine in IE9  Firefox). I'm in a corporate environment
  where IE8 support is a requirement, so wanted to see if anyone has seen
  this before  knows of a fix. The Wicket Ajax trace is below; the parser
  says it can't find the root element in the Ajax response. We've seen
  this
  same error on various pages, though it doesn't ALWAYS occur:
 
 
  INFO: focus removed from wicket-generated-id-18
  INFO:
  INFO: Initiating Ajax GET request on
 
 
 ?wicket:interface=:6:form:main-box:mp-form:primary-track-box:primary-icon::IBehaviorListener:1:random=0.9122150377237917
  INFO: Invoking pre-call handler(s)...
  INFO: Received ajax response (4130 characters)
  INFO:
  ?xml version=1.0 

Re: Ajax Error in MSIE 8

2012-05-11 Thread Richard W. Adams
I just found a key difference between the IE8  IE9 behaviors in this 
code:

   f (typeof(window.XMLHttpRequest) != undefined  typeof(DOMParser) != 
undefined) { 
var parser = new DOMParser();
xmldoc = parser.parseFromString(responseAsText, text/xml);   
   } else if (window.ActiveXObject) {
xmldoc = t.responseXML;
   }

On our desktops, IE9 always goes into the first part of the if block, but 
IE8 always goes into the second part (after the elseif). Based on Google 
checks, it appears this might be due to browser security settings. Do you 
know if any special settings are required to make IE8 work correctly?



From:   Martin Grigorov mgrigo...@apache.org
To: users@wicket.apache.org
Date:   05/11/2012 09:56 AM
Subject:Re: Ajax Error in MSIE 8



I'm not sure why this fails for you. And why it fails only from time to
time.
But looking at this Javascript code I think it can be improved.
File a ticket with a failing test case if possible.

On Fri, May 11, 2012 at 5:46 PM, Richard W. Adams rwada...@up.com wrote:

 We dug into wicket-ajax.js using this version of MSIE 8:



 We discovered the problem occurs in this code:



 *Wicket.Ajax.Request.prototype = {*

 **
 *// Method that processes the request states*
 *stateChangeCallback: function() {*

 *.*

 *if (status == 200 || status == ) { // as
 stupid as it seems, IE7 sets status to  on ok*
 *// response came without error*
 *var responseAsText = t.responseText;*
 **

 *// parse the response if the callback
 needs a DOM tree*
 *if (this.parseResponse == true) {*
 *var xmldoc;
*
 *if
 (typeof(window.XMLHttpRequest) != undefined  typeof(DOMParser) !=
 undefined) {
var parser = new DOMParser();*
 *xmldoc =
 parser.parseFromString(responseAsText, text/xml);
*
 *} else if
 (window.ActiveXObject) {*
 *xmldoc =
 t.responseXML;*
 *}*
 *// invoke the loaded
 callback with an xml document*
 *
 this.loadedCallback(xmldoc); *
 *} else {*
 *// invoke the loaded
 callback with raw string*
 *
 this.loadedCallback(responseAsText);*
 *}*
 *if (this.suppressDone == 
false)*
 *this.done();*
 *}*


 The offending code is:

 *   xmldoc = t.responseXML;*

 Looking at the contents of t (a transport object), 
the*transport.responseText
 * field is set to the expected xml message, but* 
transport.responseXML*is empty and has no XML message.  Unfortunately, we 
could not see where
 transport.responseXML variable should have been set.

 Does IE8 have known ajax bugs? Or is there a configuration setting we
 should be using to make this work? Or something else? We're willing to 
dig
 into the script more, but don't know where to look, as the Ajax 
processing
 is asynchronous  we can't simply step through the code execution.






 From:Martin Grigorov mgrigo...@apache.org
 To:users@wicket.apache.org
 Date:05/11/2012 07:26 AM

 Subject:Re: Ajax Error in MSIE 8
 --



 Don't see anything suspicious.
 You'll have to debug what happens in wicket-ajax.js ...

 On Fri, May 11, 2012 at 3:07 PM, Richard W. Adams rwada...@up.com 
wrote:
  Sorry. Should have provided more details:
 
  Wicket Version: 1.4.20
 
  Operating System: Windows XP
 
  Scenario: Users clicks an icon with an Ajax onclick event. In the 
event
  handler on the server, we copy the value of one String variable to
 another
  String variable in the model, then we call 
AjaxRequestTarget.addComponent
  twice, to update (1) the receiving text field, and (2) an associated
 radio
  button.
  __
 
  There are three kinds of lies: lies, damn lies, and statistics.
  Benjamin Disraeli
 
  Then there was the man who drowned crossing a stream with an average
  depth of six inches.
  W. I. E. Gates
 
 
 
 
  From:   Martin Grigorov mgrigo...@apache.org
  To: users@wicket.apache.org
  Date:   05/11/2012 02:26 AM
  Subject:Re: Ajax Error in MSIE 8
 
 
 
  Hi,
 
  Which version of Wicket ?
  In what conditions this happen ? I.e. do you click on a link or do you
  submit a form or ...
 
  On Thu, May 10, 2012 at 11:33 PM, Richard W. Adams 

Re: Ajax Error in MSIE 8

2012-05-11 Thread Martin Grigorov
On Fri, May 11, 2012 at 7:46 PM, Richard W. Adams rwada...@up.com wrote:
 I just found a key difference between the IE8  IE9 behaviors in this
 code:

   f (typeof(window.XMLHttpRequest) != undefined  typeof(DOMParser) !=
 undefined) {
        var parser = new DOMParser();
        xmldoc = parser.parseFromString(responseAsText, text/xml);
   } else if (window.ActiveXObject) {
        xmldoc = t.responseXML;
   }

 On our desktops, IE9 always goes into the first part of the if block, but
 IE8 always goes into the second part (after the elseif). Based on Google
 checks, it appears this might be due to browser security settings. Do you
 know if any special settings are required to make IE8 work correctly?


The reason is that IE9 is the first that has native window.XMLHttpRequest.
Before that it was an ActiveX object.



 From:   Martin Grigorov mgrigo...@apache.org
 To:     users@wicket.apache.org
 Date:   05/11/2012 09:56 AM
 Subject:        Re: Ajax Error in MSIE 8



 I'm not sure why this fails for you. And why it fails only from time to
 time.
 But looking at this Javascript code I think it can be improved.
 File a ticket with a failing test case if possible.

 On Fri, May 11, 2012 at 5:46 PM, Richard W. Adams rwada...@up.com wrote:

 We dug into wicket-ajax.js using this version of MSIE 8:



 We discovered the problem occurs in this code:



 *Wicket.Ajax.Request.prototype = {*

 **
 *        // Method that processes the request states*
 *        stateChangeCallback: function() {        *

 *.*

 *                        if (status == 200 || status == ) { // as
 stupid as it seems, IE7 sets status to  on ok*
 *                                // response came without error*
 *                                var responseAsText = t.responseText;*
 **

 *                                // parse the response if the callback
 needs a DOM tree*
 *                                if (this.parseResponse == true) {*
 *                                                var xmldoc;
    *
 *                                                if
 (typeof(window.XMLHttpRequest) != undefined  typeof(DOMParser) !=
 undefined) {
                    var parser = new DOMParser();*
 *                                                        xmldoc =
 parser.parseFromString(responseAsText, text/xml);
                        *
 *                                                } else if
 (window.ActiveXObject) {*
 *                                                        xmldoc =
 t.responseXML;*
 *                                                }*
 *                                                // invoke the loaded
 callback with an xml document*
 *
 this.loadedCallback(xmldoc); *
 *                                        } else {*
 *                                                // invoke the loaded
 callback with raw string*
 *
 this.loadedCallback(responseAsText);*
 *                                        }                        *
 *                                        if (this.suppressDone ==
 false)*
 *                                                this.done();*
 *                                }*


 The offending code is:

 *   xmldoc = t.responseXML;*

 Looking at the contents of t (a transport object),
 the*transport.responseText
 * field is set to the expected xml message, but*
 transport.responseXML*is empty and has no XML message.  Unfortunately, we
 could not see where
 transport.responseXML variable should have been set.

 Does IE8 have known ajax bugs? Or is there a configuration setting we
 should be using to make this work? Or something else? We're willing to
 dig
 into the script more, but don't know where to look, as the Ajax
 processing
 is asynchronous  we can't simply step through the code execution.






 From:        Martin Grigorov mgrigo...@apache.org
 To:        users@wicket.apache.org
 Date:        05/11/2012 07:26 AM

 Subject:        Re: Ajax Error in MSIE 8
 --



 Don't see anything suspicious.
 You'll have to debug what happens in wicket-ajax.js ...

 On Fri, May 11, 2012 at 3:07 PM, Richard W. Adams rwada...@up.com
 wrote:
  Sorry. Should have provided more details:
 
  Wicket Version: 1.4.20
 
  Operating System: Windows XP
 
  Scenario: Users clicks an icon with an Ajax onclick event. In the
 event
  handler on the server, we copy the value of one String variable to
 another
  String variable in the model, then we call
 AjaxRequestTarget.addComponent
  twice, to update (1) the receiving text field, and (2) an associated
 radio
  button.
  __
 
  There are three kinds of lies: lies, damn lies, and statistics.
  Benjamin Disraeli
 
  Then there was the man who drowned crossing a stream with an average
  depth of six inches.
  W. I. E. Gates
 
 
 
 
  From:   Martin Grigorov mgrigo...@apache.org
  To:     users@wicket.apache.org
  Date:   05/11/2012 02:26 AM
  Subject:        Re: Ajax Error in MSIE 8
 
 
 

Re: Invalid URL generated when jsessionid is present

2012-05-11 Thread Guillaume Smet
On Fri, May 11, 2012 at 11:05 AM, Martin Grigorov mgrigo...@apache.org wrote:
 There is a workaround for this. See the ticket for 1.5.7.

Thanks for the pointer.

I can confirm that the problem is fixed in 1.5.6.

Thanks.

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