You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dmitry <wi...@inbox.ru> on 2008/02/11 15:49:19 UTC
stateless Image
How I can create a stateless org.apache.wicket.markup.html.image.Image?
I thought that just calling new Image("id") will do the job, however getStatelessHint() returns false.
It looks like a bug in LocalizedImageResource#isStateless().
I guess it should be
return resourceReference == null;
wicket-1.3.0
test case
import junit.framework.Assert;import junit.framework.TestCase;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.util.tester.WicketTester;
public class ImageTest extends TestCase {
public void testStateless() {
WicketTester wt = new WicketTester();
final Image i = new Image("5");
wt.startComponent(i);
Assert.assertTrue(i.isStateless());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: stateless Image
Posted by Igor Vaynberg <ig...@gmail.com>.
please file a jira issue
-igor
On Feb 11, 2008 6:49 AM, Dmitry <wi...@inbox.ru> wrote:
> How I can create a stateless org.apache.wicket.markup.html.image.Image?
> I thought that just calling new Image("id") will do the job, however getStatelessHint() returns false.
> It looks like a bug in LocalizedImageResource#isStateless().
>
> I guess it should be
> return resourceReference == null;
>
>
> wicket-1.3.0
> test case
>
> import junit.framework.Assert;import junit.framework.TestCase;
> import org.apache.wicket.markup.html.image.Image;
> import org.apache.wicket.util.tester.WicketTester;
> public class ImageTest extends TestCase {
> public void testStateless() {
> WicketTester wt = new WicketTester();
> final Image i = new Image("5");
> wt.startComponent(i);
> Assert.assertTrue(i.isStateless());
> }
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org