Re: html code in component class

2008-10-10 Thread James Carman
You can dynamically set the href (the href is obtained from an IModel)
of a link using regular ExternalLink components.

On Fri, Oct 10, 2008 at 6:49 AM, Seven Corners <[EMAIL PROTECTED]> wrote:
>
> Thank you, Serkan, for posting this solution.  It's very slick.  I have been
> wrestling with trying to figure out how to slip a link into a panel when I
> don't know until runtime what the link will be and you've just told me how
> to slip in HTML at runtime.  I love it!
>
> Shelah
>
>
> Serkan Camurcuoglu-3 wrote:
>>
>> Peter means that you can put html as the string content of a label like
>> this:
>>
>> Label l = new Label("myLabel", "Some html here");
>> l.setEscapeModelStrings(false);
>> l.setRenderBodyOnly(true);
>>
>> this way the label will display only the html that you've given..
>>
>>
>>
>> -----Original Message-
>> From: miro [mailto:[EMAIL PROTECTED]
>> Sent: Fri 10/10/2008 12:20 AM
>> To: users@wicket.apache.org
>> Subject: Re: html code in component class
>>
>>
>> here the html again
>>
>>
>>   
>>  
>>   
>>   
>>  
>>   
>> hml for repeater
>>
>>   
>>   > wicket:id="link">
>>
>> please ignore t with every tag its just to show actual html
>>
>> miro wrote:
>>>
>>> Its not just label   here is the html
>>>
>>>
>>> 
>>>  
>>>  
>>> 
>>>
>>> hml for repeater
>>>
>>>
>>>   # >> wicket:id="lbl">
>>>
>>>
>>>
>>> instead of writing the same html  at 10 paqlces  i want to write it once
>>> and reuse it in the please twell me how ?
>>>
>>>
>>>
>>> Peter Ertl-3 wrote:
>>>>
>>>> If it's just a line use Label
>>>>
>>>> Am 09.10.2008 um 21:01 schrieb miro:
>>>>
>>>>>
>>>>> Using panel I have to write a .html   file which I dont want to do
>>>>> becasue my
>>>>> html code is very little just a line   ,
>>>>> next option is Fragment but this is not clear, neither the api doc
>>>>> nor the
>>>>> wicket examples  please can you give me small example  using
>>>>> fragment   ?
>>>>>
>>>>> jwcarman wrote:
>>>>>>
>>>>>> What's wrong with using a panel?  If this is to be done in only one
>>>>>> class, have you thought about using a Fragment?
>>>>>>
>>>>>> On Thu, Oct 9, 2008 at 2:28 PM, miro <[EMAIL PROTECTED]> wrote:
>>>>>>>
>>>>>>> the label appears complex i looking for a simple solution
>>>>>>>
>>>>>>> My custom componentuses wicket components internally  here is an
>>>>>>> example
>>>>>>>
>>>>>>>   protected class CustomLinkComponent extends
>>>>>>> WebMarkupContainer  {
>>>>>>>   String displayName;
>>>>>>>   Class  clazz;
>>>>>>>   public CustomLinkComponent(String displayName, Class
>>>>>>> clazz) {
>>>>>>>   super("customlink");
>>>>>>>   this.displayName=displayName;
>>>>>>>   this.clazz=clazz;
>>>>>>>   add(getBookmarkablePageLink());
>>>>>>>   add(getDisplayNameLabel());
>>>>>>>   }
>>>>>>>   protected BookmarkablePageLink
>>>>>>> getBookmarkablePageLink(){
>>>>>>>   return new BookmarkablePageLink("link",
>>>>>>> clazz);
>>>>>>>   }
>>>>>>>   protected  Label  getDisplayNameLabel(){
>>>>>>>   return new Label("lbl",displayName);
>>>>>>>   }
&g

RE: html code in component class

2008-10-10 Thread Seven Corners

Thank you, Serkan, for posting this solution.  It's very slick.  I have been
wrestling with trying to figure out how to slip a link into a panel when I
don't know until runtime what the link will be and you've just told me how
to slip in HTML at runtime.  I love it!

Shelah


Serkan Camurcuoglu-3 wrote:
> 
> Peter means that you can put html as the string content of a label like
> this:
> 
> Label l = new Label("myLabel", "Some html here");
> l.setEscapeModelStrings(false);
> l.setRenderBodyOnly(true);
> 
> this way the label will display only the html that you've given..
> 
> 
> 
> -Original Message-
> From: miro [mailto:[EMAIL PROTECTED]
> Sent: Fri 10/10/2008 12:20 AM
> To: users@wicket.apache.org
> Subject: Re: html code in component class
>  
> 
> here the html again
> 
> 
>   
>  
>   
>   
>  
>   
> hml for repeater
> 
>   
>wicket:id="link"> 
>   
> please ignore t with every tag its just to show actual html
> 
> miro wrote:
>> 
>> Its not just label   here is the html
>> 
>>  
>> 
>>  
>>  
>> 
>>  
>> hml for repeater
>> 
>>  
>>   # > wicket:id="lbl"> 
>>  
>> 
>> 
>> instead of writing the same html  at 10 paqlces  i want to write it once
>> and reuse it in the please twell me how ?
>> 
>> 
>> 
>> Peter Ertl-3 wrote:
>>> 
>>> If it's just a line use Label
>>> 
>>> Am 09.10.2008 um 21:01 schrieb miro:
>>> 
>>>>
>>>> Using panel I have to write a .html   file which I dont want to do  
>>>> becasue my
>>>> html code is very little just a line   ,
>>>> next option is Fragment but this is not clear, neither the api doc  
>>>> nor the
>>>> wicket examples  please can you give me small example  using  
>>>> fragment   ?
>>>>
>>>> jwcarman wrote:
>>>>>
>>>>> What's wrong with using a panel?  If this is to be done in only one
>>>>> class, have you thought about using a Fragment?
>>>>>
>>>>> On Thu, Oct 9, 2008 at 2:28 PM, miro <[EMAIL PROTECTED]> wrote:
>>>>>>
>>>>>> the label appears complex i looking for a simple solution
>>>>>>
>>>>>> My custom componentuses wicket components internally  here is an
>>>>>> example
>>>>>>
>>>>>>   protected class CustomLinkComponent extends   
>>>>>> WebMarkupContainer  {
>>>>>>   String displayName;
>>>>>>   Class  clazz;
>>>>>>   public CustomLinkComponent(String displayName, Class
>>>>>> clazz) {
>>>>>>   super("customlink");
>>>>>>   this.displayName=displayName;
>>>>>>   this.clazz=clazz;
>>>>>>   add(getBookmarkablePageLink());
>>>>>>   add(getDisplayNameLabel());
>>>>>>   }
>>>>>>   protected BookmarkablePageLink   
>>>>>> getBookmarkablePageLink(){
>>>>>>   return new BookmarkablePageLink("link",  
>>>>>> clazz);
>>>>>>   }
>>>>>>   protected  Label  getDisplayNameLabel(){
>>>>>>   return new Label("lbl",displayName);
>>>>>>   }
>>>>>>
>>>>>>   }
>>>>>>
>>>>>> the html  for this is
>>>>>> # 
>>>>>>
>>>>>> so instead of writing a html page  i want my component to render  
>>>>>> this
>>>>>> html
>>>>>> and further wicket should replace the child components  link and  
>>>>>> lbl with
>

RE: html code in component class

2008-10-09 Thread Serkan Camurcuoglu
Peter means that you can put html as the string content of a label like this:

Label l = new Label("myLabel", "Some html here");
l.setEscapeModelStrings(false);
l.setRenderBodyOnly(true);

this way the label will display only the html that you've given..



-Original Message-
From: miro [mailto:[EMAIL PROTECTED]
Sent: Fri 10/10/2008 12:20 AM
To: users@wicket.apache.org
Subject: Re: html code in component class
 

here the html again



   


   

hml for repeater


 

please ignore t with every tag its just to show actual html

miro wrote:
> 
> Its not just label   here is the html
> 
>   
>  
>   
>   
>  
>   
> hml for repeater
> 
>   
>#  wicket:id="lbl"> 
>   
> 
> 
> instead of writing the same html  at 10 paqlces  i want to write it once
> and reuse it in the please twell me how ?
> 
> 
> 
> Peter Ertl-3 wrote:
>> 
>> If it's just a line use Label
>> 
>> Am 09.10.2008 um 21:01 schrieb miro:
>> 
>>>
>>> Using panel I have to write a .html   file which I dont want to do  
>>> becasue my
>>> html code is very little just a line   ,
>>> next option is Fragment but this is not clear, neither the api doc  
>>> nor the
>>> wicket examples  please can you give me small example  using  
>>> fragment   ?
>>>
>>> jwcarman wrote:
>>>>
>>>> What's wrong with using a panel?  If this is to be done in only one
>>>> class, have you thought about using a Fragment?
>>>>
>>>> On Thu, Oct 9, 2008 at 2:28 PM, miro <[EMAIL PROTECTED]> wrote:
>>>>>
>>>>> the label appears complex i looking for a simple solution
>>>>>
>>>>> My custom componentuses wicket components internally  here is an
>>>>> example
>>>>>
>>>>>   protected class CustomLinkComponent extends   
>>>>> WebMarkupContainer  {
>>>>>   String displayName;
>>>>>   Class  clazz;
>>>>>   public CustomLinkComponent(String displayName, Class
>>>>> clazz) {
>>>>>   super("customlink");
>>>>>   this.displayName=displayName;
>>>>>   this.clazz=clazz;
>>>>>   add(getBookmarkablePageLink());
>>>>>   add(getDisplayNameLabel());
>>>>>   }
>>>>>   protected BookmarkablePageLink   
>>>>> getBookmarkablePageLink(){
>>>>>   return new BookmarkablePageLink("link",  
>>>>> clazz);
>>>>>   }
>>>>>   protected  Label  getDisplayNameLabel(){
>>>>>   return new Label("lbl",displayName);
>>>>>   }
>>>>>
>>>>>   }
>>>>>
>>>>> the html  for this is
>>>>> # 
>>>>>
>>>>> so instead of writing a html page  i want my component to render  
>>>>> this
>>>>> html
>>>>> and further wicket should replace the child components  link and  
>>>>> lbl with
>>>>> actual values  ,  can I do this ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> jwcarman wrote:
>>>>>>
>>>>>> Sure.  Look at what the Label class does.  It doesn't have an HTML
>>>>>> template.
>>>>>>
>>>>>> On Thu, Oct 9, 2008 at 1:49 PM, miro <[EMAIL PROTECTED]> wrote:
>>>>>>>
>>>>>>> like I have  very little html and I dont want a write a  new .html
>>>>>>> file
>>>>>>> and
>>>>>>> just in my component i want to override some method  which  
>>>>>>> returns html
>>>>>>> as
>>>>>>> strin

Re: html code in component class

2008-10-09 Thread miro

here the html again



   


   

hml for repeater


 

please ignore t with every tag its just to show actual html

miro wrote:
> 
> Its not just label   here is the html
> 
>   
>  
>   
>   
>  
>   
> hml for repeater
> 
>   
>#  wicket:id="lbl"> 
>   
> 
> 
> instead of writing the same html  at 10 paqlces  i want to write it once
> and reuse it in the please twell me how ?
> 
> 
> 
> Peter Ertl-3 wrote:
>> 
>> If it's just a line use Label
>> 
>> Am 09.10.2008 um 21:01 schrieb miro:
>> 
>>>
>>> Using panel I have to write a .html   file which I dont want to do  
>>> becasue my
>>> html code is very little just a line   ,
>>> next option is Fragment but this is not clear, neither the api doc  
>>> nor the
>>> wicket examples  please can you give me small example  using  
>>> fragment   ?
>>>
>>> jwcarman wrote:

 What's wrong with using a panel?  If this is to be done in only one
 class, have you thought about using a Fragment?

 On Thu, Oct 9, 2008 at 2:28 PM, miro <[EMAIL PROTECTED]> wrote:
>
> the label appears complex i looking for a simple solution
>
> My custom componentuses wicket components internally  here is an
> example
>
>   protected class CustomLinkComponent extends   
> WebMarkupContainer  {
>   String displayName;
>   Class  clazz;
>   public CustomLinkComponent(String displayName, Class
> clazz) {
>   super("customlink");
>   this.displayName=displayName;
>   this.clazz=clazz;
>   add(getBookmarkablePageLink());
>   add(getDisplayNameLabel());
>   }
>   protected BookmarkablePageLink   
> getBookmarkablePageLink(){
>   return new BookmarkablePageLink("link",  
> clazz);
>   }
>   protected  Label  getDisplayNameLabel(){
>   return new Label("lbl",displayName);
>   }
>
>   }
>
> the html  for this is
> # 
>
> so instead of writing a html page  i want my component to render  
> this
> html
> and further wicket should replace the child components  link and  
> lbl with
> actual values  ,  can I do this ?
>
>
>
>
> jwcarman wrote:
>>
>> Sure.  Look at what the Label class does.  It doesn't have an HTML
>> template.
>>
>> On Thu, Oct 9, 2008 at 1:49 PM, miro <[EMAIL PROTECTED]> wrote:
>>>
>>> like I have  very little html and I dont want a write a  new .html
>>> file
>>> and
>>> just in my component i want to override some method  which  
>>> returns html
>>> as
>>> string  for the component .Is  this possible ?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 

Re: html code in component class

2008-10-09 Thread miro

Its not just label   here is the html


   


   

hml for repeater


 #  



instead of writing the same html  at 10 paqlces  i want to write it once and
reuse it in the please twell me how ?



Peter Ertl-3 wrote:
> 
> If it's just a line use Label
> 
> Am 09.10.2008 um 21:01 schrieb miro:
> 
>>
>> Using panel I have to write a .html   file which I dont want to do  
>> becasue my
>> html code is very little just a line   ,
>> next option is Fragment but this is not clear, neither the api doc  
>> nor the
>> wicket examples  please can you give me small example  using  
>> fragment   ?
>>
>> jwcarman wrote:
>>>
>>> What's wrong with using a panel?  If this is to be done in only one
>>> class, have you thought about using a Fragment?
>>>
>>> On Thu, Oct 9, 2008 at 2:28 PM, miro <[EMAIL PROTECTED]> wrote:

 the label appears complex i looking for a simple solution

 My custom componentuses wicket components internally  here is an
 example

   protected class CustomLinkComponent extends   
 WebMarkupContainer  {
   String displayName;
   Class  clazz;
   public CustomLinkComponent(String displayName, Class
 clazz) {
   super("customlink");
   this.displayName=displayName;
   this.clazz=clazz;
   add(getBookmarkablePageLink());
   add(getDisplayNameLabel());
   }
   protected BookmarkablePageLink   
 getBookmarkablePageLink(){
   return new BookmarkablePageLink("link",  
 clazz);
   }
   protected  Label  getDisplayNameLabel(){
   return new Label("lbl",displayName);
   }

   }

 the html  for this is
 # 

 so instead of writing a html page  i want my component to render  
 this
 html
 and further wicket should replace the child components  link and  
 lbl with
 actual values  ,  can I do this ?




 jwcarman wrote:
>
> Sure.  Look at what the Label class does.  It doesn't have an HTML
> template.
>
> On Thu, Oct 9, 2008 at 1:49 PM, miro <[EMAIL PROTECTED]> wrote:
>>
>> like I have  very little html and I dont want a write a  new .html
>> file
>> and
>> just in my component i want to override some method  which  
>> returns html
>> as
>> string  for the component .Is  this possible ?
>> --
>> View this message in context:
>> http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19907547.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: html code in component class

2008-10-09 Thread Peter Ertl

If it's just a line use Label

Am 09.10.2008 um 21:01 schrieb miro:



Using panel I have to write a .html   file which I dont want to do  
becasue my

html code is very little just a line   ,
next option is Fragment but this is not clear, neither the api doc  
nor the
wicket examples  please can you give me small example  using  
fragment   ?


jwcarman wrote:


What's wrong with using a panel?  If this is to be done in only one
class, have you thought about using a Fragment?

On Thu, Oct 9, 2008 at 2:28 PM, miro <[EMAIL PROTECTED]> wrote:


the label appears complex i looking for a simple solution

My custom componentuses wicket components internally  here is an
example

  protected class CustomLinkComponent extends   
WebMarkupContainer  {

  String displayName;
  Class  clazz;
  public CustomLinkComponent(String displayName, Class
clazz) {
  super("customlink");
  this.displayName=displayName;
  this.clazz=clazz;
  add(getBookmarkablePageLink());
  add(getDisplayNameLabel());
  }
  protected BookmarkablePageLink   
getBookmarkablePageLink(){
  return new BookmarkablePageLink("link",  
clazz);

  }
  protected  Label  getDisplayNameLabel(){
  return new Label("lbl",displayName);
  }

  }

the html  for this is
# 

so instead of writing a html page  i want my component to render  
this

html
and further wicket should replace the child components  link and  
lbl with

actual values  ,  can I do this ?




jwcarman wrote:


Sure.  Look at what the Label class does.  It doesn't have an HTML
template.

On Thu, Oct 9, 2008 at 1:49 PM, miro <[EMAIL PROTECTED]> wrote:


like I have  very little html and I dont want a write a  new .html
file
and
just in my component i want to override some method  which  
returns html

as
string  for the component .Is  this possible ?
--
View this message in context:
http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




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





--
View this message in context:
http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




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





--
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: html code in component class

2008-10-09 Thread miro

Using panel I have to write a .html   file which I dont want to do becasue my
html code is very little just a line   , 
next option is Fragment but this is not clear, neither the api doc nor the
wicket examples  please can you give me small example  using fragment   ?

jwcarman wrote:
> 
> What's wrong with using a panel?  If this is to be done in only one
> class, have you thought about using a Fragment?
> 
> On Thu, Oct 9, 2008 at 2:28 PM, miro <[EMAIL PROTECTED]> wrote:
>>
>> the label appears complex i looking for a simple solution
>>
>> My custom componentuses wicket components internally  here is an
>> example
>>
>>protected class CustomLinkComponent extends  WebMarkupContainer  {
>>String displayName;
>>Class  clazz;
>>public CustomLinkComponent(String displayName, Class 
>> clazz) {
>>super("customlink");
>>this.displayName=displayName;
>>this.clazz=clazz;
>>add(getBookmarkablePageLink());
>>add(getDisplayNameLabel());
>>}
>>protected BookmarkablePageLink  getBookmarkablePageLink(){
>>return new BookmarkablePageLink("link", clazz);
>>}
>>protected  Label  getDisplayNameLabel(){
>>return new Label("lbl",displayName);
>>}
>>
>>}
>>
>>  the html  for this is
>> # 
>>
>>  so instead of writing a html page  i want my component to render this
>> html
>> and further wicket should replace the child components  link and lbl with
>> actual values  ,  can I do this ?
>>
>>
>>
>>
>> jwcarman wrote:
>>>
>>> Sure.  Look at what the Label class does.  It doesn't have an HTML
>>> template.
>>>
>>> On Thu, Oct 9, 2008 at 1:49 PM, miro <[EMAIL PROTECTED]> wrote:

  like I have  very little html and I dont want a write a  new .html
 file
 and
 just in my component i want to override some method  which returns html
 as
 string  for the component .Is  this possible ?
 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: html code in component class

2008-10-09 Thread James Carman
What's wrong with using a panel?  If this is to be done in only one
class, have you thought about using a Fragment?

On Thu, Oct 9, 2008 at 2:28 PM, miro <[EMAIL PROTECTED]> wrote:
>
> the label appears complex i looking for a simple solution
>
> My custom componentuses wicket components internally  here is an example
>
>protected class CustomLinkComponent extends  WebMarkupContainer  {
>String displayName;
>Class  clazz;
>public CustomLinkComponent(String displayName, Class  clazz) {
>super("customlink");
>this.displayName=displayName;
>this.clazz=clazz;
>add(getBookmarkablePageLink());
>add(getDisplayNameLabel());
>}
>protected BookmarkablePageLink  getBookmarkablePageLink(){
>return new BookmarkablePageLink("link", clazz);
>}
>protected  Label  getDisplayNameLabel(){
>return new Label("lbl",displayName);
>}
>
>}
>
>  the html  for this is
> # 
>
>  so instead of writing a html page  i want my component to render this html
> and further wicket should replace the child components  link and lbl with
> actual values  ,  can I do this ?
>
>
>
>
> jwcarman wrote:
>>
>> Sure.  Look at what the Label class does.  It doesn't have an HTML
>> template.
>>
>> On Thu, Oct 9, 2008 at 1:49 PM, miro <[EMAIL PROTECTED]> wrote:
>>>
>>>  like I have  very little html and I dont want a write a  new .html file
>>> and
>>> just in my component i want to override some method  which returns html
>>> as
>>> string  for the component .Is  this possible ?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: html code in component class

2008-10-09 Thread miro

the label appears complex i looking for a simple solution

My custom componentuses wicket components internally  here is an example

protected class CustomLinkComponent extends  WebMarkupContainer  {
String displayName;
Class  clazz;
public CustomLinkComponent(String displayName, Class  clazz) {
super("customlink");
this.displayName=displayName;
this.clazz=clazz;
add(getBookmarkablePageLink());
add(getDisplayNameLabel());
}
protected BookmarkablePageLink  getBookmarkablePageLink(){
return new BookmarkablePageLink("link", clazz);
}
protected  Label  getDisplayNameLabel(){
return new Label("lbl",displayName);
}

}

  the html  for this is   
#  

 so instead of writing a html page  i want my component to render this html
and further wicket should replace the child components  link and lbl with
actual values  ,  can I do this ?

   


jwcarman wrote:
> 
> Sure.  Look at what the Label class does.  It doesn't have an HTML
> template.
> 
> On Thu, Oct 9, 2008 at 1:49 PM, miro <[EMAIL PROTECTED]> wrote:
>>
>>  like I have  very little html and I dont want a write a  new .html file 
>> and
>> just in my component i want to override some method  which returns html 
>> as
>> string  for the component .Is  this possible ?
>> --
>> View this message in context:
>> http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: html code in component class

2008-10-09 Thread James Carman
Sure.  Look at what the Label class does.  It doesn't have an HTML template.

On Thu, Oct 9, 2008 at 1:49 PM, miro <[EMAIL PROTECTED]> wrote:
>
>  like I have  very little html and I dont want a write a  new .html file  and
> just in my component i want to override some method  which returns html  as
> string  for the component .Is  this possible ?
> --
> View this message in context: 
> http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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