Re: How to create the achor in wicket java class without using wicket id

2012-09-03 Thread Martin Grigorov
Hi,

#error() method and others (info, success, ...) accept Serializable,
so you can even do: error(new ExternalLink(someId, someUrl))
Then you need to extend FeedbackPanel and its
org.apache.wicket.markup.html.panel.FeedbackPanel#newMessageDisplayComponent()
and return directly the link.

On Mon, Sep 3, 2012 at 11:49 AM, chaitanya b
harikaareddyit...@gmail.com wrote:
 hi,
 how to create the hyper link in the error message itself... and if i click,
 it navigates to another page?

 scenario is... if user login attempts more than 5 times i am showing error
 message like
 error(your account is locked. Please contact administration.);

 I want the hyperlink only for the contact administration in the above
 message?
 how can i do that? can any one of you please help me.



 Thanks
 chaitanya



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707.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: How to create the achor in wicket java class without using wicket id

2012-09-03 Thread chaitanya b
hi,

  Thanks for replying. If i use External link i have to provide wicket:id
in corresponding html page..The error message comes dynamically based on
the condition.At that time, we get exception that is missing...


On Mon, Sep 3, 2012 at 3:24 PM, Martin Grigorov-4 [via Apache Wicket] 
ml-node+s1842946n465170...@n4.nabble.com wrote:

 Hi,

 #error() method and others (info, success, ...) accept Serializable,
 so you can even do: error(new ExternalLink(someId, someUrl))
 Then you need to extend FeedbackPanel and its
 org.apache.wicket.markup.html.panel.FeedbackPanel#newMessageDisplayComponent()

 and return directly the link.

 On Mon, Sep 3, 2012 at 11:49 AM, chaitanya b
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4651708i=0
 wrote:

  hi,
  how to create the hyper link in the error message itself... and if i
 click,
  it navigates to another page?
 
  scenario is... if user login attempts more than 5 times i am showing
 error
  message like
  error(your account is locked. Please contact administration.);
 
  I want the hyperlink only for the contact administration in the above
  message?
  how can i do that? can any one of you please help me.
 
 
 
  Thanks
  chaitanya
 
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4651708i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4651708i=2
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4651708i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4651708i=4



 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707p4651708.html
  To unsubscribe from How to create the achor in wicket java class without
 using wicket id, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4651707code=aGFyaWthYXJlZGR5aXRzbWVAZ21haWwuY29tfDQ2NTE3MDd8LTE2Mjg0MjM2NTg=
 .
 NAMLhttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707p4651709.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: How to create the achor in wicket java class without using wicket id

2012-09-03 Thread Martin Grigorov
See FeedbackPanel.java, it passes message as component id
(newMessageDisplayComponent(message, message);)

Passing a Component to error() maybe is a bad example. The idea is
that you can pass any Serializable, even a Component.
Pass your own Object and then in #newMessageDisplayComponent()
depending on this object decide which component to use.

On Mon, Sep 3, 2012 at 12:35 PM, chaitanya b
harikaareddyit...@gmail.com wrote:
 hi,

   Thanks for replying. If i use External link i have to provide wicket:id
 in corresponding html page..The error message comes dynamically based on
 the condition.At that time, we get exception that is missing...


 On Mon, Sep 3, 2012 at 3:24 PM, Martin Grigorov-4 [via Apache Wicket] 
 ml-node+s1842946n465170...@n4.nabble.com wrote:

 Hi,

 #error() method and others (info, success, ...) accept Serializable,
 so you can even do: error(new ExternalLink(someId, someUrl))
 Then you need to extend FeedbackPanel and its
 org.apache.wicket.markup.html.panel.FeedbackPanel#newMessageDisplayComponent()

 and return directly the link.

 On Mon, Sep 3, 2012 at 11:49 AM, chaitanya b
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4651708i=0
 wrote:

  hi,
  how to create the hyper link in the error message itself... and if i
 click,
  it navigates to another page?
 
  scenario is... if user login attempts more than 5 times i am showing
 error
  message like
  error(your account is locked. Please contact administration.);
 
  I want the hyperlink only for the contact administration in the above
  message?
  how can i do that? can any one of you please help me.
 
 
 
  Thanks
  chaitanya
 
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4651708i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4651708i=2
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4651708i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4651708i=4



 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707p4651708.html
  To unsubscribe from How to create the achor in wicket java class without
 using wicket id, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4651707code=aGFyaWthYXJlZGR5aXRzbWVAZ21haWwuY29tfDQ2NTE3MDd8LTE2Mjg0MjM2NTg=
 .
 NAMLhttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707p4651709.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: How to create the achor in wicket java class without using wicket id

2012-09-03 Thread chaitanya b
hi,

 How can i manipulate the wicket id ? because the error message comes
dynamically if condition is true.. thenonly the external link will be
executed..but what to do in the case of  condition fails?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707p4651711.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: How to create the achor in wicket java class without using wicket id

2012-09-03 Thread chaitanya b
I didnt get u exactly.. can you please provide me some sample example

My problem is basically, i have to generate the  link in the error message
it self when the condition is true.

i want like this  error(please  *  contact admin *);


if i click the link , it navigates to another page. (onclick functionality
will be executed)..

but i am unable to create the link in the message.






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707p4651712.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: How to create the achor in wicket java class without using wicket id

2012-09-03 Thread Martin Grigorov
class Error implements Serializable {
  String msg;
  String url;
}

class MyFeedbackPanel() {
  @Override protected Component newMessageDisplayComponent(String id,
FeedbackMessage fm) {

Serializable ser = fm.getMessage();
if (ser instanceof Error) {
  Error err = ser;
  return new ExternalLink(id, err.url).setBody(Model.of(msg))
}
else {
  return super.newMessageDisplayComponent(id, fm);
}
  }
}

error(new Error(msg, url));

On Mon, Sep 3, 2012 at 1:29 PM, chaitanya b harikaareddyit...@gmail.com wrote:
 I didnt get u exactly.. can you please provide me some sample example

 My problem is basically, i have to generate the  link in the error message
 it self when the condition is true.

 i want like this  error(please  *  contact admin *);


 if i click the link , it navigates to another page. (onclick functionality
 will be executed)..

 but i am unable to create the link in the message.






 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-create-the-achor-in-wicket-java-class-without-using-wicket-id-tp4651707p4651712.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