Re: [Wicket-user] Looking for an example of how to create a component to generate markup

2007-05-18 Thread Igor Vaynberg

see how Label works :)

class mycomponent extends webcomponent {
oncomponenttagbody(tag) { replacecomponenttagbody(param
name='foo'bar/param); }
}

-igor


On 5/17/07, Alessandro Coelho Ribeiro [EMAIL PROTECTED]
wrote:


Hi,

I want to create 2 components in my wicket application.  The first one
would be a generic component for embedding any flash (SWF) content.  The
second component would inherit from the 1st one and would be related to
a specific flash object we need to embedd in our business application.
Unfortunately, I cannot just use a Panel or a Include, because the tags
for the flash object must be dynamically generated.  The application
needs to pass some dynamic values using flash variables.

I look forward for a very simple component that can generate markup, but
I can't find any.  Based on many different examples I've found on the
Internet, I tried a lot of things: inherit from WebComponent, inherit
from MarkupContainer, override onComponentTagBody, override on Render.
All the alternatives produce the same error:

java.lang.NullPointerException

wicket.util.string.PrependingStringBuffer.prepend(
PrependingStringBuffer.java:97)
wicket.Component.getPath(Component.java:1085)
wicket.markup.html.debug.PageView$3.component(PageView.java:126)
wicket.MarkupContainer.visitChildren(MarkupContainer.java:744)
wicket.MarkupContainer.visitChildren(MarkupContainer.java:784)
wicket.markup.html.debug.PageView.getComponentData(PageView.java:122)
wicket.markup.html.debug.PageView.init(PageView.java:80)

wicket.markup.html.pages.ExceptionErrorPage.init(ExceptionErrorPage.java
:93)

wicket.request.compound.DefaultExceptionResponseStrategy.respond(
DefaultExceptionResponseStrategy.java:96)

wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(
AbstractCompoundRequestCycleProcessor.java:76)
wicket.RequestCycle.step(RequestCycle.java:1050)
wicket.RequestCycle.steps(RequestCycle.java:1084)
wicket.RequestCycle.request(RequestCycle.java:454)
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(
ReplyHeaderFilter.java:96)


Does anyone have a simple example of how you create a simple component
to generate markup ?  An example that works, I mean...

Regards,


---
Alessandro Ribeiro
[EMAIL PROTECTED]
Software Architect
Integritas Tecnologia - Open Solutions


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Looking for an example of how to create a component to generate markup

2007-05-17 Thread Alessandro Coelho Ribeiro
Hi,

I want to create 2 components in my wicket application.  The first one 
would be a generic component for embedding any flash (SWF) content.  The 
second component would inherit from the 1st one and would be related to 
a specific flash object we need to embedd in our business application.  
Unfortunately, I cannot just use a Panel or a Include, because the tags 
for the flash object must be dynamically generated.  The application 
needs to pass some dynamic values using flash variables. 

I look forward for a very simple component that can generate markup, but 
I can't find any.  Based on many different examples I've found on the 
Internet, I tried a lot of things: inherit from WebComponent, inherit 
from MarkupContainer, override onComponentTagBody, override on Render.  
All the alternatives produce the same error:

java.lang.NullPointerException

wicket.util.string.PrependingStringBuffer.prepend(PrependingStringBuffer.java:97)
wicket.Component.getPath(Component.java:1085)
wicket.markup.html.debug.PageView$3.component(PageView.java:126)
wicket.MarkupContainer.visitChildren(MarkupContainer.java:744)
wicket.MarkupContainer.visitChildren(MarkupContainer.java:784)
wicket.markup.html.debug.PageView.getComponentData(PageView.java:122)
wicket.markup.html.debug.PageView.init(PageView.java:80)

wicket.markup.html.pages.ExceptionErrorPage.init(ExceptionErrorPage.java:93)

wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:96)

wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76)
wicket.RequestCycle.step(RequestCycle.java:1050)
wicket.RequestCycle.steps(RequestCycle.java:1084)
wicket.RequestCycle.request(RequestCycle.java:454)
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 


Does anyone have a simple example of how you create a simple component 
to generate markup ?  An example that works, I mean... 

Regards,


---
Alessandro Ribeiro
[EMAIL PROTECTED]
Software Architect
Integritas Tecnologia - Open Solutions


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user