You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "andrea.castello" <a....@gmail.com> on 2010/11/19 17:33:13 UTC

MessageLabel vanished in Wicket 1.4.x

Hello all,

I've to upgrade a web application built on Wikcet 1.3.6 to wicket 1.4.13.

In my webapp I have a class which extends
WicketMessageResolver.MessageLabel.
When I updated my Maven dependency to  wicket 1.4.13 I noticed that
MessageLabel was no more in the Wicket API.

What class replaced it? And, if none replaced it, how can I rewrite my
class?

Thank you,

Andrea
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/MessageLabel-vanished-in-Wicket-1-4-x-tp3050632p3050632.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: MessageLabel vanished in Wicket 1.4.x

Posted by Igor Vaynberg <ig...@gmail.com>.
the label i showed you does what the old message label did.

-igor

On Sun, Nov 21, 2010 at 11:43 PM, andrea.castello
<a....@gmail.com> wrote:
>
> Hi Igor, thanks for your answer, but I think it doesn't fit my situation.
> To explain better, I post the code similar to the class that must be changed
> in order to be upgraded to 1.4.13.
> -------------------------------------------
>
> import org.apache.wicket.markup.resolver.WicketMessageResolver.MessageLabel;
>
> public class CMessageLabel extends MessageLabel {
>        private final IsVisibleC c;
>
>        public CMessageLabel(String arg0, String arg1, IsVisibleC c) {
>                super(arg0, arg1);
>                this.c = c;
>        }
>
>        @Override
>        public boolean isVisible() {
>                return controller.isVisible();
>        }
> }
>
> What has been done in this version of the class is to override a class that
> doesn't exist anymore and I think that just creating a new label doesn't
> resolve my problem.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/MessageLabel-vanished-in-Wicket-1-4-x-tp3050632p3053180.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
>
>

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


SV: MessageLabel vanished in Wicket 1.4.x [update]

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> What if I try to extend org.apache.wicket.markup.html.basic.Label?
> 
> Will it work when I extended MessageLabel?

Yes, except you need to be explicit about using a ResourceModel that MessageLabel did for you. If you pass in the key as before then you just use new ResourceModel(key) in the call to super().

- Tor Iver

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


Re: MessageLabel vanished in Wicket 1.4.x [update]

Posted by "andrea.castello" <a....@gmail.com>.
What if I try to extend org.apache.wicket.markup.html.basic.Label?

Will it work when I extended MessageLabel?
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/MessageLabel-vanished-in-Wicket-1-4-x-tp3050632p3053186.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: MessageLabel vanished in Wicket 1.4.x

Posted by "andrea.castello" <a....@gmail.com>.
Hi Igor, thanks for your answer, but I think it doesn't fit my situation. 
To explain better, I post the code similar to the class that must be changed
in order to be upgraded to 1.4.13.
-------------------------------------------

import org.apache.wicket.markup.resolver.WicketMessageResolver.MessageLabel;

public class CMessageLabel extends MessageLabel {
	private final IsVisibleC c;

	public CMessageLabel(String arg0, String arg1, IsVisibleC c) {
		super(arg0, arg1);
		this.c = c;
	}

	@Override
	public boolean isVisible() {
		return controller.isVisible();
	}
}

What has been done in this version of the class is to override a class that
doesn't exist anymore and I think that just creating a new label doesn't
resolve my problem.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/MessageLabel-vanished-in-Wicket-1-4-x-tp3050632p3053180.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: MessageLabel vanished in Wicket 1.4.x

Posted by Igor Vaynberg <ig...@gmail.com>.
new Label("message", new ResourceModel("key"));

-igor

On Fri, Nov 19, 2010 at 8:33 AM, andrea.castello
<a....@gmail.com> wrote:
>
> Hello all,
>
> I've to upgrade a web application built on Wikcet 1.3.6 to wicket 1.4.13.
>
> In my webapp I have a class which extends
> WicketMessageResolver.MessageLabel.
> When I updated my Maven dependency to  wicket 1.4.13 I noticed that
> MessageLabel was no more in the Wicket API.
>
> What class replaced it? And, if none replaced it, how can I rewrite my
> class?
>
> Thank you,
>
> Andrea
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/MessageLabel-vanished-in-Wicket-1-4-x-tp3050632p3050632.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
>
>

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