Custom rendering of components for different devices

2009-03-31 Thread Subramanian Murali
Hi,
When we develop new custom components or customize existing components in
Wicket, how do we change the rendering for the components for different
devices like the way we configure a render kit for components in JSF?

Thanks,
Subbu.


Re: Custom rendering of components for different devices

2009-03-31 Thread nino martinez wael
Hi

For a component (panel page etc) you can specify a variant, you can
search the list for further information

2009/3/31 Subramanian Murali subramanian.mur...@gmail.com:
 Hi,.
 When we develop new custom components or customize existing components in
 Wicket, how do we change the rendering for the components for different
 devices like the way we configure a render kit for components in JSF?

 Thanks,
 Subbu.


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



Re: Custom rendering of components for different devices

2009-03-31 Thread Martijn Dashorst
As long as it is markup. Having a telnet component is not in scope of
wicket (but was in 2005/2006/2007 very much for JSF).

Martijn

On Tue, Mar 31, 2009 at 11:35 AM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 Hi

 For a component (panel page etc) you can specify a variant, you can
 search the list for further information

 2009/3/31 Subramanian Murali subramanian.mur...@gmail.com:
 Hi,.
 When we develop new custom components or customize existing components in
 Wicket, how do we change the rendering for the components for different
 devices like the way we configure a render kit for components in JSF?

 Thanks,
 Subbu.


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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: Custom rendering of components for different devices

2009-03-31 Thread nino martinez wael
Hehe.. Wasnt exactly thinking in those lines..

2009/3/31 Martijn Dashorst martijn.dasho...@gmail.com:
 As long as it is markup. Having a telnet component is not in scope of
 wicket (but was in 2005/2006/2007 very much for JSF).

 Martijn

 On Tue, Mar 31, 2009 at 11:35 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Hi

 For a component (panel page etc) you can specify a variant, you can
 search the list for further information

 2009/3/31 Subramanian Murali subramanian.mur...@gmail.com:
 Hi,.
 When we develop new custom components or customize existing components in
 Wicket, how do we change the rendering for the components for different
 devices like the way we configure a render kit for components in JSF?

 Thanks,
 Subbu.


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





 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.5 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



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



Re: Custom rendering

2007-10-16 Thread Swaroop Belur
I think you just have to toggle the operation (url ) and model object for
label
based on user is null or not.
Label dynamicText = new Label(lbl , new AbstractReadOnlyModel(){

  public Object getObject(){

  User u = ...;
  if(u==null){

return in order to sign in please click;
  }
 else{
 return hello   u.get_name();

  }

 }
});

Similarly for link. just change the action in onClick for example

-swaroop


On 10/16/07, Cristi Manole [EMAIL PROTECTED] wrote:

 Hello,

 I was wondering if it is possible to do custom rendering in wicket.

 What i need is something like a panel in which
 - if the user is not logged in, there will be a text with in order to
 sign
 in please click Sign in and then the link and
 - if the user is logged in, the same text component would show hello
 user, please click Sign out in order to logout and then the link.

 The point is having an anchor with different text and different target
 through code - one panel, not having two very similar panels.

 I didn't manage to get this custom functionality by having a
 wicket:id=..span wicked:id=..//a.

 Thank you.



Re: Custom rendering

2007-10-16 Thread Cristi Manole
Thank you for your reply.

The text of the label is easy to change. I cannot find a method to change
the text of the anchor. That's my problem.

Is there a way to do that?

On 10/16/07, Swaroop Belur [EMAIL PROTECTED] wrote:

 I think you just have to toggle the operation (url ) and model object for
 label
 based on user is null or not.
 Label dynamicText = new Label(lbl , new AbstractReadOnlyModel(){

   public Object getObject(){

   User u = ...;
   if(u==null){

 return in order to sign in please click;
   }
  else{
  return hello   u.get_name();

   }

 }
 });

 Similarly for link. just change the action in onClick for example

 -swaroop


 On 10/16/07, Cristi Manole [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I was wondering if it is possible to do custom rendering in wicket.
 
  What i need is something like a panel in which
  - if the user is not logged in, there will be a text with in order to
  sign
  in please click Sign in and then the link and
  - if the user is logged in, the same text component would show hello
  user, please click Sign out in order to logout and then the
 link.
 
  The point is having an anchor with different text and different target
  through code - one panel, not having two very similar panels.
 
  I didn't manage to get this custom functionality by having a
  wicket:id=..span wicked:id=..//a.
 
  Thank you.
 



Re: Custom rendering

2007-10-16 Thread Cristi Manole
This is exactly what i was missing (i tried to add them both to page):
*Link* l = new *Link*..
l.add(new *Label*..

the label is a child of link...

tks a lot Thies!

On 10/16/07, Thies Edeling [EMAIL PROTECTED] wrote:

 see the Link embedded in localized Label/Message? thread

 Cristi Manole wrote:
  Thank you for your reply.
 
  The text of the label is easy to change. I cannot find a method to
 change
  the text of the anchor. That's my problem.
 
  Is there a way to do that?
 
  On 10/16/07, Swaroop Belur [EMAIL PROTECTED] wrote:
 
  I think you just have to toggle the operation (url ) and model object
 for
  label
  based on user is null or not.
  Label dynamicText = new Label(lbl , new AbstractReadOnlyModel(){
 
public Object getObject(){
 
User u = ...;
if(u==null){
 
  return in order to sign in please click;
}
   else{
   return hello   u.get_name();
 
}
 
  }
  });
 
  Similarly for link. just change the action in onClick for example
 
  -swaroop
 
 
  On 10/16/07, Cristi Manole [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I was wondering if it is possible to do custom rendering in wicket.
 
  What i need is something like a panel in which
  - if the user is not logged in, there will be a text with in order
 to
  sign
  in please click Sign in and then the link and
  - if the user is logged in, the same text component would show hello
  user, please click Sign out in order to logout and then the
 
  link.
 
  The point is having an anchor with different text and different target
  through code - one panel, not having two very similar panels.
 
  I didn't manage to get this custom functionality by having a
  wicket:id=..span wicked:id=..//a.
 
  Thank you.
 
 
 
 


 --
 http://www.ehour.nl/
 http://blog.ehour.nl/



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Custom rendering

2007-10-15 Thread Cristi Manole
Hello,

I was wondering if it is possible to do custom rendering in wicket.

What i need is something like a panel in which
- if the user is not logged in, there will be a text with in order to sign
in please click Sign in and then the link and
- if the user is logged in, the same text component would show hello
user, please click Sign out in order to logout and then the link.

The point is having an anchor with different text and different target
through code - one panel, not having two very similar panels.

I didn't manage to get this custom functionality by having a
wicket:id=..span wicked:id=..//a.

Thank you.