Re: Stateful StatelessForm works most of the time. How to make it crash?

2014-10-20 Thread pureza
Sorry, I can't. It is way too much code and, as I said, I can't reproduce the
issue, so if I simplify the code it might go away.

I was just wondering if there is a simple way to make a
stateful-StatelessForm to produce the wrong behavior.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateful-StatelessForm-works-most-of-the-time-How-to-make-it-crash-tp4667977p4667988.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: Handling page refresh or redirect when the server reboots

2014-10-20 Thread msalman
Sebastian, thanks for your response and idea.


Taking your idea  myproject.zip
http://apache-wicket.1842946.n4.nabble.com/file/n4667990/myproject.zip  I
am trying to use the following javascript code in wicket: 



Http.Get = function(theUrl)
{
var xmlHttp = null;
try
{
xmlHttp = new XMLHttpRequest();
return xmlHttp.open(GET, theUrl, true );
xmlHttp.send();
return xmlHttp.statusText;
//return xmlHttp.responseText;
}
catch (error)
{
return 'error in my code: ' + error;
}
}


The above code is called via:

add(new AjaxLink(link)
{


@Override
public void onClick(AjaxRequestTarget target) 
{
target.add(testLabel);  
}


@Override
protected IAjaxCallDecorator getAjaxCallDecorator()
{
return new IAjaxCallDecorator()
{
private static final long 
serialVersionUID = 1L;

public CharSequence decorateScript(
Component component,
CharSequence script) 
{
return 
document.getElementById('testlabel').innerHTML = 'plain '  +
Http.Get('http://www.cnn.com') ; + script;
}


public CharSequence 
decorateOnSuccessScript(
Component component, 
CharSequence script) 
{
return 
document.getElementById('testlabel').innerHTML = 'on success '
+ Http.Get('http://www.cnn.com') ; + script;
}


public CharSequence 
decorateOnFailureScript(
Component component, 
CharSequence script) 
{
return 
document.getElementById('testlabel').innerHTML = 'on Failure '
+  Http.Get('http://www.cnn.com') ; + script;
}
};
}

});


The problem is that when I use it in wicket the xmlHttp.statusText or
xmlHttp.responseText returns nothing.  
Can any one please tell me what I might be doing wrong? 
Does the code or calling it even makes sense?

I am attaching  quickstart project.  Please see:
com.mytest.javascript.*


Thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handling-page-refresh-or-redirect-when-the-server-reboots-tp4667465p4667990.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