You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kjarbr <kj...@gmail.com> on 2012/05/15 10:36:43 UTC
How to use setMarkup
I'm trying to use setMarkup with a panel. This is from my panel's
constructor:
String panelMarkup = StringBuilder...
StringResourceStream stream = new StringResourceStream(panelMarkup,
"text/html");
MarkupResourceStream markupStream = new MarkupResourceStream(stream);
IMarkupFragment fragment = new Markup(markupStream);
setMarkup(fragment);
This throws WicketNotSerializableException: Unable to serialize class:
org.apache.wicket.markup.Markup
Does anyone know how to do this right?
Thanks.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-use-setMarkup-tp4634090.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to use setMarkup
Posted by Martin Grigorov <mg...@apache.org>.
On Wed, May 16, 2012 at 7:33 AM, kjarbr <kj...@gmail.com> wrote:
> Thanks Martin, IMarkupResourceStreamProvider and IMarkupCacheKeyProvider did
> the trick.
>
> I'm trying to reduce form boilerplate code. So I've made a general form
> component which, based on constructor values, pojo annotations and
> reflection, can create any html5 input field with or without label,
> validation, component feedbackpanel, ajax updating behavior and styling.
> I found it easier to manipulate the small amount of html required for this
> in java.
>
> And the component works by the way :)
Great! :-)
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-use-setMarkup-tp4634090p4640769.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to use setMarkup
Posted by kjarbr <kj...@gmail.com>.
Thanks Martin, IMarkupResourceStreamProvider and IMarkupCacheKeyProvider did
the trick.
I'm trying to reduce form boilerplate code. So I've made a general form
component which, based on constructor values, pojo annotations and
reflection, can create any html5 input field with or without label,
validation, component feedbackpanel, ajax updating behavior and styling.
I found it easier to manipulate the small amount of html required for this
in java.
And the component works by the way :)
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-use-setMarkup-tp4634090p4640769.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to use setMarkup
Posted by Martijn Dashorst <ma...@gmail.com>.
Why?
Martijn
On Tue, May 15, 2012 at 10:36 AM, kjarbr <kj...@gmail.com> wrote:
> I'm trying to use setMarkup with a panel. This is from my panel's
> constructor:
>
> String panelMarkup = StringBuilder...
> StringResourceStream stream = new StringResourceStream(panelMarkup,
> "text/html");
> MarkupResourceStream markupStream = new MarkupResourceStream(stream);
> IMarkupFragment fragment = new Markup(markupStream);
> setMarkup(fragment);
>
> This throws WicketNotSerializableException: Unable to serialize class:
> org.apache.wicket.markup.Markup
>
> Does anyone know how to do this right?
>
> Thanks.
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-use-setMarkup-tp4634090.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to use setMarkup
Posted by Martin Grigorov <mg...@apache.org>.
See the examples at
http://www.wicket-library.com/wicket-examples/customresourceloading/
On Tue, May 15, 2012 at 10:36 AM, kjarbr <kj...@gmail.com> wrote:
> I'm trying to use setMarkup with a panel. This is from my panel's
> constructor:
>
> String panelMarkup = StringBuilder...
> StringResourceStream stream = new StringResourceStream(panelMarkup,
> "text/html");
> MarkupResourceStream markupStream = new MarkupResourceStream(stream);
> IMarkupFragment fragment = new Markup(markupStream);
> setMarkup(fragment);
>
> This throws WicketNotSerializableException: Unable to serialize class:
> org.apache.wicket.markup.Markup
>
> Does anyone know how to do this right?
>
> Thanks.
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-use-setMarkup-tp4634090.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org