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 component uses 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
# <label wicket:id="lbl"></label>
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]