• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to build CommandLink

 
deepak reads
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to build the component commandLink.I am using the code
UICommand command = new UICommand();
But when displayed,it gives me a command button.But i want a commandLink to be displayed.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use HtmlCommandLink instead.

[Edited]
UICommand is a base class for both HtmlCommandLink and HtmlCommandButton.
[ April 05, 2006: Message edited by: Adeel Ansari ]
 
deepak reads
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Adeel,do i have to something else also.Bcoz when i do
HtmlCommmandLink command = new HtmlCommandLink();

It does not show up in the screen where as if with the same code i do
UICommand command = new UIcommand();

It shows in the screen as button

Thanks,
Deepak
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check. Whether it is rendering the component or not?
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deepak, did you add any components to the htmlcommandlink ? if u dont add any Text or Image it wont get displayed in your page.

try this


here createOutputText is a private method that creates and returns HtmlOutputText and panelGrid5_2_1 is the PanelGrid to which i am adding my components.

Hope it helps.

Thanks,
Rajeev.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic