You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Pen <du...@yahoo.com> on 2007/12/04 03:30:25 UTC

How to dynamically generate HTML page?


I am a new wicker user.  We need to construct/generate  a HTML page
dynamically at runtime from the HTML elements like image and text.  This
page only exists in memory(session/cache) and  there is no physical file. so
how to generate such page and corresponding java class. How this can be done
for static elements like image and text versus dynamically for form submit.
Also how to navigate to this newly generated html page.

~Praveen  
-- 
View this message in context: http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: How to dynamically generate HTML page?

Posted by Pen <du...@yahoo.com>.

thanks igor.. 



igor.vaynberg wrote:
> 
> see how wicketstuff-crud does it in wicket-stuff svn
> 
> -igor
> 
> 
> On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>>
>>
>> I am a new wicker user.  We need to construct/generate  a HTML page
>> dynamically at runtime from the HTML elements like image and text.  This
>> page only exists in memory(session/cache) and  there is no physical file.
>> so
>> how to generate such page and corresponding java class. How this can be
>> done
>> for static elements like image and text versus dynamically for form
>> submit.
>> Also how to navigate to this newly generated html page.
>>
>> ~Praveen
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14155610
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: IComponentResolver question

Posted by Matthijs Wensveen <m....@func.nl>.
Igor Vaynberg wrote:
> icomponentresolver does exactly what its javadoc says - match markup
> tags to components. if you want you can create those components on the
> fly - but remember that this happens at render time so it might have
> some side effects for you.
>   

The javadoc mentions "component  names", but you can create components 
based on anything of the ComponentTag.  Would "IComponentResolvers are 
responsible for mapping ComponentTags to Wicket components." be a better 
description?
Of course, you don't even have to look at the component tag to create a 
component (i.e. RandomComponentResolver) but that would be pretty useless :)

> you dont need to rewrite your panel as a component resolver and add it
> to application settings - not many global component resolvers make
> sense unless you use namespaced markup tags.
>
> instead it is most times easier to simply let your component implement
> the interface directly - it works that way too.
>   

Okay, that's good to know. I'll do that.
Do I need to add the created component to the container with 
container.autoAdd() ?

> if you want to see how it is meant to be used then simply search our
> codebase for references to it.
>   

I did do that, but I was unsure whether or not to use it myself.

Thanks for the explanation,
Matthijs
> -igor
>
> On Dec 5, 2007 7:15 AM, Matthijs Wensveen <m....@func.nl> wrote:
>   
>> Hello,
>>
>> I have developed a panel named AutoComponentPanel that automatically adds wicket components based on (dynamic) markup. Looking at IComponentResolver I noticed some similarities. Can someone explain this class and its uses to me? Is it
>> something that I should want to use for AutoComponentPanel?
>>
>> We use AutoComponentPanel as a base class for some other panels that
>> provide dynamic markup. For example transformed xml (xml -> xslt -> xhtml + wicket:id attributes).
>> Would it be better (aka the wicket-way (tm))
>> when AutoComponentPanel is re-written as an IComponentResolver that can
>> be used by the currently subclassing panels? They would then need to
>> implement IComponentResolver too but can call my rewritten
>> AutoComponentPanelAsResolverSomething in their implementing methods.
>>
>> Would this be a better way to go?
>>
>> How should this work when I add my resolver with
>> Application.getPageSettings().addComponentResolver(resolver)?
>>
>> Thanks,
>> Matthijs Wensveen
>>
>> --
>> Matthijs Wensveen
>> Func. Internet Integration
>> W http://www.func.nl
>> T +31 20 4230000
>> F +31 20 4223500
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   


-- 
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500 


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


Re: IComponentResolver question

Posted by Igor Vaynberg <ig...@gmail.com>.
icomponentresolver does exactly what its javadoc says - match markup
tags to components. if you want you can create those components on the
fly - but remember that this happens at render time so it might have
some side effects for you.

you dont need to rewrite your panel as a component resolver and add it
to application settings - not many global component resolvers make
sense unless you use namespaced markup tags.

instead it is most times easier to simply let your component implement
the interface directly - it works that way too.

if you want to see how it is meant to be used then simply search our
codebase for references to it.

-igor

On Dec 5, 2007 7:15 AM, Matthijs Wensveen <m....@func.nl> wrote:
> Hello,
>
> I have developed a panel named AutoComponentPanel that automatically adds wicket components based on (dynamic) markup. Looking at IComponentResolver I noticed some similarities. Can someone explain this class and its uses to me? Is it
> something that I should want to use for AutoComponentPanel?
>
> We use AutoComponentPanel as a base class for some other panels that
> provide dynamic markup. For example transformed xml (xml -> xslt -> xhtml + wicket:id attributes).
> Would it be better (aka the wicket-way (tm))
> when AutoComponentPanel is re-written as an IComponentResolver that can
> be used by the currently subclassing panels? They would then need to
> implement IComponentResolver too but can call my rewritten
> AutoComponentPanelAsResolverSomething in their implementing methods.
>
> Would this be a better way to go?
>
> How should this work when I add my resolver with
> Application.getPageSettings().addComponentResolver(resolver)?
>
> Thanks,
> Matthijs Wensveen
>
> --
> Matthijs Wensveen
> Func. Internet Integration
> W http://www.func.nl
> T +31 20 4230000
> F +31 20 4223500
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


IComponentResolver question

Posted by Matthijs Wensveen <m....@func.nl>.
Hello,

I have developed a panel named AutoComponentPanel that automatically adds wicket components based on (dynamic) markup. Looking at IComponentResolver I noticed some similarities. Can someone explain this class and its uses to me? Is it 
something that I should want to use for AutoComponentPanel?

We use AutoComponentPanel as a base class for some other panels that 
provide dynamic markup. For example transformed xml (xml -> xslt -> xhtml + wicket:id attributes).
Would it be better (aka the wicket-way (tm)) 
when AutoComponentPanel is re-written as an IComponentResolver that can 
be used by the currently subclassing panels? They would then need to 
implement IComponentResolver too but can call my rewritten 
AutoComponentPanelAsResolverSomething in their implementing methods.

Would this be a better way to go?

How should this work when I add my resolver with 
Application.getPageSettings().addComponentResolver(resolver)?

Thanks,
Matthijs Wensveen

-- 
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500 

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


IComponentResolver question. Was: How to dynamically generate HTML page?

Posted by Matthijs Wensveen <m....@func.nl>.
I was looking at the code of AutoComponentPanel and found similarities 
between this and IComponentResolver. AutoComponentPanel has an 
overridable getMarkupComponent(ComponentTag, MarkupStream) where 
IComponentResolver has resolve(MarkupContainer, MarkupStream, 
ComponentTag). Can someone explain this class and its uses to me? Is it 
something that I should want to use for AutoComponentPanel?

We user AutoComponentPanel as a base class for some other panels that 
provide dynamic markup. Would it be better (aka the wicket-way (tm)) 
when AutoComponentPanel is re-written as an IComponentResolver that can 
be used by the currently subclassing panels. They would then need to 
implement IComponentResolver too but can call my rewritten 
AutoComponentPanelAsResolverSomething in their implementing methods.

Would this be a better way to go?

How should this work when I add my resolver with 
Application.getPageSettings().addComponentResolver(resolver)?

Thanks,
Matthijs Wensveen

Matthijs Wensveen wrote:
> Hello Praveen,
>
> Wouter Huijnink presented something similar to what you need at the 
> wicket meetup in Amsterdam. We generate html dynamically from xml, 
> using xslt. A component called AutoComponentPanel parses the html and 
> adds components to the hierarchy accordingly. This is actually a 
> two-step process. The first step is telling wicket you want to supply 
> markup yourself instead of letting wicket read it from the 
> corresponding html file. You can do this by implementing 
> IMarkupResourceStreamProvider and if applicable also 
> IMarkupCacheKeyProvider. Then you need to parse the markup stream and 
> add components.
>
> If you're interested I can send the AutoComponentPanel code. It still 
> needs some work to make it shine, but we plan to open source it anyway 
> as part of a wicket-based QTI framework.
>
> PS. Unfortunately Wouter's slides aren't uploaded yet.
>
>
> Pen wrote:
>> thanks Johan for your reply. I did take look into your slides.
>> We can generate HTML pages, we have no issue with it. But how to display
>> this newly created HTML pages which only exists in memory, there is no
>> physical file. And also to navigate to this new HTML page.
>>
>> For example If I create a simple HTML page at runtime like below 
>> test.html.
>> How to display it and navigate to it. As it also requires corresponding
>> test.java. This is simple one. But what if we have wicket:Ids we need
>> construct the Java files with all the action listener also.
>>
>> test.html
>> <html>
>> <body>
>>    <h1>Hello world! </h1>
>> </body>
>> <html>
>>
>>
>> ~Praveen
>>
>>
>>
>> Johan Compagner wrote:
>>  
>>> Generate on one side the html by a servlet or special template
>>> generator, that reads in your db data and generate the component
>>> structure on the other side.
>>>
>>> Look at he slides i put on of the presentation that i did for the
>>> wicket user group in the netherlands
>>>
>>> 2007/12/4, Pen <du...@yahoo.com>:
>>>    
>>>> I looked into the example wicketstuff-crud, this is basically in 
>>>> memory
>>>> database with basic CRUD operation. this is not what exactly I am
>>>> looking.
>>>> Let me restate the question. We have application where in user can 
>>>> create
>>>> a
>>>> webpages using web designer by drag-n-drop where is html elements like
>>>> text,
>>>> image, selection box, combo box and save it in DB.
>>>> It will be Json format parse it to POJO and store in DB. for example
>>>> Image
>>>> object looks like this
>>>> which has got position, style, etc .
>>>> [{"position":({left:60, top:40}),
>>>> "size":({width:100,height:80}),
>>>> "positionTop":40,"positionLeft":60,"sizeWidth":100,"sizeHeight":80,
>>>> "cssClass":"",
>>>> "style":"left:60px;top:40px;width:100px;height:80px;",
>>>> ]}}]})
>>>>
>>>> Now we need to read from the DB and reconstruct the same Image 
>>>> object has
>>>> a
>>>> html page. We can construct the above object with HTML tags.
>>>> But the question is how to display this html pages, since it exists 
>>>> only
>>>> in
>>>> memory and also how to navigate to this newly created page.
>>>>
>>>> ~Praveen
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> igor.vaynberg wrote:
>>>>      
>>>>> see how wicketstuff-crud does it in wicket-stuff svn
>>>>>
>>>>> -igor
>>>>>
>>>>>
>>>>> On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>>>>>        
>>>>>> I am a new wicker user.  We need to construct/generate  a HTML page
>>>>>> dynamically at runtime from the HTML elements like image and 
>>>>>> text.           
>>>> This
>>>>      
>>>>>> page only exists in memory(session/cache) and  there is no physical
>>>>>>           
>>>> file.
>>>>      
>>>>>> so
>>>>>> how to generate such page and corresponding java class. How this can
>>>>>>           
>>>> be
>>>>      
>>>>>> done
>>>>>> for static elements like image and text versus dynamically for form
>>>>>> submit.
>>>>>> Also how to navigate to this newly generated html page.
>>>>>>
>>>>>> ~Praveen
>>>>>> -- 
>>>>>> View this message in context:
>>>>>>
>>>>>>           
>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413 
>>>>
>>>>      
>>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>           
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>         
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946 
>>>>
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
>
>


-- 
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500 


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


Re: How to dynamically generate HTML page?

Posted by vasya10 <va...@gmail.com>.
I am totally new to Wicket. I hit upon this thread while trying to look for a
solution for the exact problem described by Penn. We have an xml which
contains data and html type elements (text, radiobutton etc) which we have
to dynamically convert to a html page and bind to server side variables.
None of the solutions I looked earlier (jsp, spring etc.) really helped so I
was tempted to write my own html element classes, when I remembered reading
about Wicket sometime ago.

Its been a while since this thread was posted and are there any "clean"
solutions to this in Wicket now ? (i saw a mention of QTI framework).

Really appreciate help.


Penn wrote:
> 
> 
> thanks Matthijs,
> 
> Your understanding of the problem is correct, we are trying to generate a
> HTML pages at runtime. But the solution proposed is looks quiet
> complicated. I guess there is no easy way in Wicket to achieve this. so
> still we are not able to get the right solution yet.
> 
> I was thinking on the lines provided by you. If I can generate some
> dynamic content using
> IMarkupResourceStreamProvider.getMarkupResourceStream(), like for example
> a image tag   then how am I suppose to add this markup in the
> corresponding java class.
> 
> ~Praveen
> 
> 
> Matthijs Wensveen-2 wrote:
>> 
>> Hello Praveen,
>> 
>> Wouter Huijnink presented something similar to what you need at the 
>> wicket meetup in Amsterdam. We generate html dynamically from xml, using 
>> xslt. A component called AutoComponentPanel parses the html and adds 
>> components to the hierarchy accordingly. This is actually a two-step 
>> process. The first step is telling wicket you want to supply markup 
>> yourself instead of letting wicket read it from the corresponding html 
>> file. You can do this by implementing IMarkupResourceStreamProvider and 
>> if applicable also IMarkupCacheKeyProvider. Then you need to parse the 
>> markup stream and add components.
>> 
>> If you're interested I can send the AutoComponentPanel code. It still 
>> needs some work to make it shine, but we plan to open source it anyway 
>> as part of a wicket-based QTI framework.
>> 
>> PS. Unfortunately Wouter's slides aren't uploaded yet.
>> 
>> 
>> Pen wrote:
>>> thanks Johan for your reply. I did take look into your slides. 
>>>
>>> We can generate HTML pages, we have no issue with it. But how to display
>>> this newly created HTML pages which only exists in memory, there is no
>>> physical file. And also to navigate to this new HTML page.
>>>
>>> For example If I create a simple HTML page at runtime like below
>>> test.html.
>>> How to display it and navigate to it. As it also requires corresponding
>>> test.java. This is simple one. But what if we have wicket:Ids we need
>>> construct the Java files with all the action listener also.
>>>
>>> test.html 
>>>
>>> <html>
>>> <body>
>>>    <h1>Hello world! </h1>
>>> </body>
>>> <html>
>>>
>>>
>>> ~Praveen
>>>
>>>
>>>
>>> Johan Compagner wrote:
>>>   
>>>> Generate on one side the html by a servlet or special template
>>>> generator, that reads in your db data and generate the component
>>>> structure on the other side.
>>>>
>>>> Look at he slides i put on of the presentation that i did for the
>>>> wicket user group in the netherlands
>>>>
>>>> 2007/12/4, Pen <du...@yahoo.com>:
>>>>     
>>>>> I looked into the example wicketstuff-crud, this is basically in
>>>>> memory
>>>>> database with basic CRUD operation. this is not what exactly I am
>>>>> looking.
>>>>> Let me restate the question. We have application where in user can
>>>>> create
>>>>> a
>>>>> webpages using web designer by drag-n-drop where is html elements like
>>>>> text,
>>>>> image, selection box, combo box and save it in DB.
>>>>> It will be Json format parse it to POJO and store in DB. for example
>>>>> Image
>>>>> object looks like this
>>>>> which has got position, style, etc .
>>>>> [{"position":({left:60, top:40}),
>>>>> "size":({width:100,height:80}),
>>>>> "positionTop":40,"positionLeft":60,"sizeWidth":100,"sizeHeight":80,
>>>>> "cssClass":"",
>>>>> "style":"left:60px;top:40px;width:100px;height:80px;",
>>>>> ]}}]})
>>>>>
>>>>> Now we need to read from the DB and reconstruct the same Image object
>>>>> has
>>>>> a
>>>>> html page. We can construct the above object with HTML tags.
>>>>> But the question is how to display this html pages, since it exists
>>>>> only
>>>>> in
>>>>> memory and also how to navigate to this newly created page.
>>>>>
>>>>> ~Praveen
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> igor.vaynberg wrote:
>>>>>       
>>>>>> see how wicketstuff-crud does it in wicket-stuff svn
>>>>>>
>>>>>> -igor
>>>>>>
>>>>>>
>>>>>> On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>>>>>>         
>>>>>>> I am a new wicker user.  We need to construct/generate  a HTML page
>>>>>>> dynamically at runtime from the HTML elements like image and text. 
>>>>>>>           
>>>>> This
>>>>>       
>>>>>>> page only exists in memory(session/cache) and  there is no physical
>>>>>>>           
>>>>> file.
>>>>>       
>>>>>>> so
>>>>>>> how to generate such page and corresponding java class. How this can
>>>>>>>           
>>>>> be
>>>>>       
>>>>>>> done
>>>>>>> for static elements like image and text versus dynamically for form
>>>>>>> submit.
>>>>>>> Also how to navigate to this newly generated html page.
>>>>>>>
>>>>>>> ~Praveen
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>>
>>>>>>>           
>>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
>>>>>       
>>>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>           
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>         
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>       
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>
>>>   
>> 
>> 
>> -- 
>> Matthijs Wensveen
>> Func. Internet Integration
>> W http://www.func.nl
>> T +31 20 4230000
>> F +31 20 4223500 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-dynamically-generate-HTML-page--tp14143413p22613704.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: How to dynamically generate HTML page?

Posted by Pen <du...@yahoo.com>.

thanks Matthijs,

Your understanding of the problem is correct, we are trying to generate a
HTML pages at runtime. But the solution proposed is looks quiet complicated.
I guess there is no easy way in Wicket to achieve this. so still we are not
able to get the right solution yet.

I was thinking on the lines provided by you. If I can generate some dynamic
content using IMarkupResourceStreamProvider.getMarkupResourceStream(), like
for example a image tag   then how am I suppose to add this markup in the
corresponding java class.

~Praveen


Matthijs Wensveen-2 wrote:
> 
> Hello Praveen,
> 
> Wouter Huijnink presented something similar to what you need at the 
> wicket meetup in Amsterdam. We generate html dynamically from xml, using 
> xslt. A component called AutoComponentPanel parses the html and adds 
> components to the hierarchy accordingly. This is actually a two-step 
> process. The first step is telling wicket you want to supply markup 
> yourself instead of letting wicket read it from the corresponding html 
> file. You can do this by implementing IMarkupResourceStreamProvider and 
> if applicable also IMarkupCacheKeyProvider. Then you need to parse the 
> markup stream and add components.
> 
> If you're interested I can send the AutoComponentPanel code. It still 
> needs some work to make it shine, but we plan to open source it anyway 
> as part of a wicket-based QTI framework.
> 
> PS. Unfortunately Wouter's slides aren't uploaded yet.
> 
> 
> Pen wrote:
>> thanks Johan for your reply. I did take look into your slides. 
>>
>> We can generate HTML pages, we have no issue with it. But how to display
>> this newly created HTML pages which only exists in memory, there is no
>> physical file. And also to navigate to this new HTML page.
>>
>> For example If I create a simple HTML page at runtime like below
>> test.html.
>> How to display it and navigate to it. As it also requires corresponding
>> test.java. This is simple one. But what if we have wicket:Ids we need
>> construct the Java files with all the action listener also.
>>
>> test.html 
>>
>> <html>
>> <body>
>>    <h1>Hello world! </h1>
>> </body>
>> <html>
>>
>>
>> ~Praveen
>>
>>
>>
>> Johan Compagner wrote:
>>   
>>> Generate on one side the html by a servlet or special template
>>> generator, that reads in your db data and generate the component
>>> structure on the other side.
>>>
>>> Look at he slides i put on of the presentation that i did for the
>>> wicket user group in the netherlands
>>>
>>> 2007/12/4, Pen <du...@yahoo.com>:
>>>     
>>>> I looked into the example wicketstuff-crud, this is basically in memory
>>>> database with basic CRUD operation. this is not what exactly I am
>>>> looking.
>>>> Let me restate the question. We have application where in user can
>>>> create
>>>> a
>>>> webpages using web designer by drag-n-drop where is html elements like
>>>> text,
>>>> image, selection box, combo box and save it in DB.
>>>> It will be Json format parse it to POJO and store in DB. for example
>>>> Image
>>>> object looks like this
>>>> which has got position, style, etc .
>>>> [{"position":({left:60, top:40}),
>>>> "size":({width:100,height:80}),
>>>> "positionTop":40,"positionLeft":60,"sizeWidth":100,"sizeHeight":80,
>>>> "cssClass":"",
>>>> "style":"left:60px;top:40px;width:100px;height:80px;",
>>>> ]}}]})
>>>>
>>>> Now we need to read from the DB and reconstruct the same Image object
>>>> has
>>>> a
>>>> html page. We can construct the above object with HTML tags.
>>>> But the question is how to display this html pages, since it exists
>>>> only
>>>> in
>>>> memory and also how to navigate to this newly created page.
>>>>
>>>> ~Praveen
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> igor.vaynberg wrote:
>>>>       
>>>>> see how wicketstuff-crud does it in wicket-stuff svn
>>>>>
>>>>> -igor
>>>>>
>>>>>
>>>>> On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>>>>>         
>>>>>> I am a new wicker user.  We need to construct/generate  a HTML page
>>>>>> dynamically at runtime from the HTML elements like image and text. 
>>>>>>           
>>>> This
>>>>       
>>>>>> page only exists in memory(session/cache) and  there is no physical
>>>>>>           
>>>> file.
>>>>       
>>>>>> so
>>>>>> how to generate such page and corresponding java class. How this can
>>>>>>           
>>>> be
>>>>       
>>>>>> done
>>>>>> for static elements like image and text versus dynamically for form
>>>>>> submit.
>>>>>> Also how to navigate to this newly generated html page.
>>>>>>
>>>>>> ~Praveen
>>>>>> --
>>>>>> View this message in context:
>>>>>>
>>>>>>           
>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
>>>>       
>>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>           
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>         
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> -- 
> Matthijs Wensveen
> Func. Internet Integration
> W http://www.func.nl
> T +31 20 4230000
> F +31 20 4223500 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14179984
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: How to dynamically generate HTML page?

Posted by Matthijs Wensveen <m....@func.nl>.
Hi Praveen,

Attached is the AutoComponentPanel.java. I've just re-written it so that 
it implements IComponentResolver.
Parts of the code might be too complex and need to be refactored (some 
parts working with org.w3c.dom), but for now it works. If you have 
additions or modifications, please let me know. We plan to release this 
code anyway either as part of a Qti framework, or just this panel as 
part of some wicket-contrib  / wicketstuff project.

Matthijs

PS. Wouter has uploaded his slides to slideshare: 
http://www.slideshare.net/Func/wicket-dynamic-components

Pen wrote:
> Thanks Matthijs,
>
> I got a chance to look at Wouter Huijnink slides. This is what exactly I am
> looking. Can you please forward the AutoComponentPanel code. That would be
> great.
>
> ~Praveen
>
>
>
> Matthijs Wensveen-2 wrote:
>   
>> Hello Praveen,
>>
>> Wouter Huijnink presented something similar to what you need at the 
>> wicket meetup in Amsterdam. We generate html dynamically from xml, using 
>> xslt. A component called AutoComponentPanel parses the html and adds 
>> components to the hierarchy accordingly. This is actually a two-step 
>> process. The first step is telling wicket you want to supply markup 
>> yourself instead of letting wicket read it from the corresponding html 
>> file. You can do this by implementing IMarkupResourceStreamProvider and 
>> if applicable also IMarkupCacheKeyProvider. Then you need to parse the 
>> markup stream and add components.
>>
>> If you're interested I can send the AutoComponentPanel code. It still 
>> needs some work to make it shine, but we plan to open source it anyway 
>> as part of a wicket-based QTI framework.
>>
>> PS. Unfortunately Wouter's slides aren't uploaded yet.
>>
>>
>> Pen wrote:
>>     
>>> thanks Johan for your reply. I did take look into your slides. 
>>>
>>> We can generate HTML pages, we have no issue with it. But how to display
>>> this newly created HTML pages which only exists in memory, there is no
>>> physical file. And also to navigate to this new HTML page.
>>>
>>> For example If I create a simple HTML page at runtime like below
>>> test.html.
>>> How to display it and navigate to it. As it also requires corresponding
>>> test.java. This is simple one. But what if we have wicket:Ids we need
>>> construct the Java files with all the action listener also.
>>>
>>> test.html 
>>>
>>> <html>
>>> <body>
>>>    <h1>Hello world! </h1>
>>> </body>
>>> <html>
>>>
>>>
>>> ~Praveen
>>>
>>>
>>>
>>> Johan Compagner wrote:
>>>   
>>>       
>>>> Generate on one side the html by a servlet or special template
>>>> generator, that reads in your db data and generate the component
>>>> structure on the other side.
>>>>
>>>> Look at he slides i put on of the presentation that i did for the
>>>> wicket user group in the netherlands
>>>>
>>>> 2007/12/4, Pen <du...@yahoo.com>:
>>>>     
>>>>         
>>>>> I looked into the example wicketstuff-crud, this is basically in memory
>>>>> database with basic CRUD operation. this is not what exactly I am
>>>>> looking.
>>>>> Let me restate the question. We have application where in user can
>>>>> create
>>>>> a
>>>>> webpages using web designer by drag-n-drop where is html elements like
>>>>> text,
>>>>> image, selection box, combo box and save it in DB.
>>>>> It will be Json format parse it to POJO and store in DB. for example
>>>>> Image
>>>>> object looks like this
>>>>> which has got position, style, etc .
>>>>> [{"position":({left:60, top:40}),
>>>>> "size":({width:100,height:80}),
>>>>> "positionTop":40,"positionLeft":60,"sizeWidth":100,"sizeHeight":80,
>>>>> "cssClass":"",
>>>>> "style":"left:60px;top:40px;width:100px;height:80px;",
>>>>> ]}}]})
>>>>>
>>>>> Now we need to read from the DB and reconstruct the same Image object
>>>>> has
>>>>> a
>>>>> html page. We can construct the above object with HTML tags.
>>>>> But the question is how to display this html pages, since it exists
>>>>> only
>>>>> in
>>>>> memory and also how to navigate to this newly created page.
>>>>>
>>>>> ~Praveen
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> igor.vaynberg wrote:
>>>>>       
>>>>>           
>>>>>> see how wicketstuff-crud does it in wicket-stuff svn
>>>>>>
>>>>>> -igor
>>>>>>
>>>>>>
>>>>>> On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>>>>>>         
>>>>>>             
>>>>>>> I am a new wicker user.  We need to construct/generate  a HTML page
>>>>>>> dynamically at runtime from the HTML elements like image and text. 
>>>>>>>           
>>>>>>>               
>>>>> This
>>>>>       
>>>>>           
>>>>>>> page only exists in memory(session/cache) and  there is no physical
>>>>>>>           
>>>>>>>               
>>>>> file.
>>>>>       
>>>>>           
>>>>>>> so
>>>>>>> how to generate such page and corresponding java class. How this can
>>>>>>>           
>>>>>>>               
>>>>> be
>>>>>       
>>>>>           
>>>>>>> done
>>>>>>> for static elements like image and text versus dynamically for form
>>>>>>> submit.
>>>>>>> Also how to navigate to this newly generated html page.
>>>>>>>
>>>>>>> ~Praveen
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>>
>>>>>>>           
>>>>>>>               
>>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
>>>>>       
>>>>>           
>>>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>           
>>>>>>>               
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>         
>>>>>>             
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>       
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>> -- 
>> Matthijs Wensveen
>> Func. Internet Integration
>> W http://www.func.nl
>> T +31 20 4230000
>> F +31 20 4223500 
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>     
>
>   


-- 
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500 


Re: How to dynamically generate HTML page?

Posted by Pen <du...@yahoo.com>.

Thanks Matthijs,

I got a chance to look at Wouter Huijnink slides. This is what exactly I am
looking. Can you please forward the AutoComponentPanel code. That would be
great.

~Praveen



Matthijs Wensveen-2 wrote:
> 
> Hello Praveen,
> 
> Wouter Huijnink presented something similar to what you need at the 
> wicket meetup in Amsterdam. We generate html dynamically from xml, using 
> xslt. A component called AutoComponentPanel parses the html and adds 
> components to the hierarchy accordingly. This is actually a two-step 
> process. The first step is telling wicket you want to supply markup 
> yourself instead of letting wicket read it from the corresponding html 
> file. You can do this by implementing IMarkupResourceStreamProvider and 
> if applicable also IMarkupCacheKeyProvider. Then you need to parse the 
> markup stream and add components.
> 
> If you're interested I can send the AutoComponentPanel code. It still 
> needs some work to make it shine, but we plan to open source it anyway 
> as part of a wicket-based QTI framework.
> 
> PS. Unfortunately Wouter's slides aren't uploaded yet.
> 
> 
> Pen wrote:
>> thanks Johan for your reply. I did take look into your slides. 
>>
>> We can generate HTML pages, we have no issue with it. But how to display
>> this newly created HTML pages which only exists in memory, there is no
>> physical file. And also to navigate to this new HTML page.
>>
>> For example If I create a simple HTML page at runtime like below
>> test.html.
>> How to display it and navigate to it. As it also requires corresponding
>> test.java. This is simple one. But what if we have wicket:Ids we need
>> construct the Java files with all the action listener also.
>>
>> test.html 
>>
>> <html>
>> <body>
>>    <h1>Hello world! </h1>
>> </body>
>> <html>
>>
>>
>> ~Praveen
>>
>>
>>
>> Johan Compagner wrote:
>>   
>>> Generate on one side the html by a servlet or special template
>>> generator, that reads in your db data and generate the component
>>> structure on the other side.
>>>
>>> Look at he slides i put on of the presentation that i did for the
>>> wicket user group in the netherlands
>>>
>>> 2007/12/4, Pen <du...@yahoo.com>:
>>>     
>>>> I looked into the example wicketstuff-crud, this is basically in memory
>>>> database with basic CRUD operation. this is not what exactly I am
>>>> looking.
>>>> Let me restate the question. We have application where in user can
>>>> create
>>>> a
>>>> webpages using web designer by drag-n-drop where is html elements like
>>>> text,
>>>> image, selection box, combo box and save it in DB.
>>>> It will be Json format parse it to POJO and store in DB. for example
>>>> Image
>>>> object looks like this
>>>> which has got position, style, etc .
>>>> [{"position":({left:60, top:40}),
>>>> "size":({width:100,height:80}),
>>>> "positionTop":40,"positionLeft":60,"sizeWidth":100,"sizeHeight":80,
>>>> "cssClass":"",
>>>> "style":"left:60px;top:40px;width:100px;height:80px;",
>>>> ]}}]})
>>>>
>>>> Now we need to read from the DB and reconstruct the same Image object
>>>> has
>>>> a
>>>> html page. We can construct the above object with HTML tags.
>>>> But the question is how to display this html pages, since it exists
>>>> only
>>>> in
>>>> memory and also how to navigate to this newly created page.
>>>>
>>>> ~Praveen
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> igor.vaynberg wrote:
>>>>       
>>>>> see how wicketstuff-crud does it in wicket-stuff svn
>>>>>
>>>>> -igor
>>>>>
>>>>>
>>>>> On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>>>>>         
>>>>>> I am a new wicker user.  We need to construct/generate  a HTML page
>>>>>> dynamically at runtime from the HTML elements like image and text. 
>>>>>>           
>>>> This
>>>>       
>>>>>> page only exists in memory(session/cache) and  there is no physical
>>>>>>           
>>>> file.
>>>>       
>>>>>> so
>>>>>> how to generate such page and corresponding java class. How this can
>>>>>>           
>>>> be
>>>>       
>>>>>> done
>>>>>> for static elements like image and text versus dynamically for form
>>>>>> submit.
>>>>>> Also how to navigate to this newly generated html page.
>>>>>>
>>>>>> ~Praveen
>>>>>> --
>>>>>> View this message in context:
>>>>>>
>>>>>>           
>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
>>>>       
>>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>           
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>         
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> -- 
> Matthijs Wensveen
> Func. Internet Integration
> W http://www.func.nl
> T +31 20 4230000
> F +31 20 4223500 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14186799
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: How to dynamically generate HTML page?

Posted by Matthijs Wensveen <m....@func.nl>.
Hello Praveen,

Wouter Huijnink presented something similar to what you need at the 
wicket meetup in Amsterdam. We generate html dynamically from xml, using 
xslt. A component called AutoComponentPanel parses the html and adds 
components to the hierarchy accordingly. This is actually a two-step 
process. The first step is telling wicket you want to supply markup 
yourself instead of letting wicket read it from the corresponding html 
file. You can do this by implementing IMarkupResourceStreamProvider and 
if applicable also IMarkupCacheKeyProvider. Then you need to parse the 
markup stream and add components.

If you're interested I can send the AutoComponentPanel code. It still 
needs some work to make it shine, but we plan to open source it anyway 
as part of a wicket-based QTI framework.

PS. Unfortunately Wouter's slides aren't uploaded yet.


Pen wrote:
> thanks Johan for your reply. I did take look into your slides. 
>
> We can generate HTML pages, we have no issue with it. But how to display
> this newly created HTML pages which only exists in memory, there is no
> physical file. And also to navigate to this new HTML page.
>
> For example If I create a simple HTML page at runtime like below test.html.
> How to display it and navigate to it. As it also requires corresponding
> test.java. This is simple one. But what if we have wicket:Ids we need
> construct the Java files with all the action listener also.
>
> test.html 
>
> <html>
> <body>
>    <h1>Hello world! </h1>
> </body>
> <html>
>
>
> ~Praveen
>
>
>
> Johan Compagner wrote:
>   
>> Generate on one side the html by a servlet or special template
>> generator, that reads in your db data and generate the component
>> structure on the other side.
>>
>> Look at he slides i put on of the presentation that i did for the
>> wicket user group in the netherlands
>>
>> 2007/12/4, Pen <du...@yahoo.com>:
>>     
>>> I looked into the example wicketstuff-crud, this is basically in memory
>>> database with basic CRUD operation. this is not what exactly I am
>>> looking.
>>> Let me restate the question. We have application where in user can create
>>> a
>>> webpages using web designer by drag-n-drop where is html elements like
>>> text,
>>> image, selection box, combo box and save it in DB.
>>> It will be Json format parse it to POJO and store in DB. for example
>>> Image
>>> object looks like this
>>> which has got position, style, etc .
>>> [{"position":({left:60, top:40}),
>>> "size":({width:100,height:80}),
>>> "positionTop":40,"positionLeft":60,"sizeWidth":100,"sizeHeight":80,
>>> "cssClass":"",
>>> "style":"left:60px;top:40px;width:100px;height:80px;",
>>> ]}}]})
>>>
>>> Now we need to read from the DB and reconstruct the same Image object has
>>> a
>>> html page. We can construct the above object with HTML tags.
>>> But the question is how to display this html pages, since it exists only
>>> in
>>> memory and also how to navigate to this newly created page.
>>>
>>> ~Praveen
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:
>>>       
>>>> see how wicketstuff-crud does it in wicket-stuff svn
>>>>
>>>> -igor
>>>>
>>>>
>>>> On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>>>>         
>>>>> I am a new wicker user.  We need to construct/generate  a HTML page
>>>>> dynamically at runtime from the HTML elements like image and text. 
>>>>>           
>>> This
>>>       
>>>>> page only exists in memory(session/cache) and  there is no physical
>>>>>           
>>> file.
>>>       
>>>>> so
>>>>> how to generate such page and corresponding java class. How this can
>>>>>           
>>> be
>>>       
>>>>> done
>>>>> for static elements like image and text versus dynamically for form
>>>>> submit.
>>>>> Also how to navigate to this newly generated html page.
>>>>>
>>>>> ~Praveen
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>>           
>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
>>>       
>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>>         
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>     
>
>   


-- 
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500 


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


Re: How to dynamically generate HTML page?

Posted by Pen <du...@yahoo.com>.

thanks Johan for your reply. I did take look into your slides. 

We can generate HTML pages, we have no issue with it. But how to display
this newly created HTML pages which only exists in memory, there is no
physical file. And also to navigate to this new HTML page.

For example If I create a simple HTML page at runtime like below test.html.
How to display it and navigate to it. As it also requires corresponding
test.java. This is simple one. But what if we have wicket:Ids we need
construct the Java files with all the action listener also.

test.html 

<html>
<body>
   <h1>Hello world! </h1>
</body>
<html>


~Praveen



Johan Compagner wrote:
> 
> Generate on one side the html by a servlet or special template
> generator, that reads in your db data and generate the component
> structure on the other side.
> 
> Look at he slides i put on of the presentation that i did for the
> wicket user group in the netherlands
> 
> 2007/12/4, Pen <du...@yahoo.com>:
>>
>>
>> I looked into the example wicketstuff-crud, this is basically in memory
>> database with basic CRUD operation. this is not what exactly I am
>> looking.
>> Let me restate the question. We have application where in user can create
>> a
>> webpages using web designer by drag-n-drop where is html elements like
>> text,
>> image, selection box, combo box and save it in DB.
>> It will be Json format parse it to POJO and store in DB. for example
>> Image
>> object looks like this
>> which has got position, style, etc .
>> [{"position":({left:60, top:40}),
>> "size":({width:100,height:80}),
>> "positionTop":40,"positionLeft":60,"sizeWidth":100,"sizeHeight":80,
>> "cssClass":"",
>> "style":"left:60px;top:40px;width:100px;height:80px;",
>> ]}}]})
>>
>> Now we need to read from the DB and reconstruct the same Image object has
>> a
>> html page. We can construct the above object with HTML tags.
>> But the question is how to display this html pages, since it exists only
>> in
>> memory and also how to navigate to this newly created page.
>>
>> ~Praveen
>>
>>
>>
>>
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > see how wicketstuff-crud does it in wicket-stuff svn
>> >
>> > -igor
>> >
>> >
>> > On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>> >>
>> >>
>> >> I am a new wicker user.  We need to construct/generate  a HTML page
>> >> dynamically at runtime from the HTML elements like image and text. 
>> This
>> >> page only exists in memory(session/cache) and  there is no physical
>> file.
>> >> so
>> >> how to generate such page and corresponding java class. How this can
>> be
>> >> done
>> >> for static elements like image and text versus dynamically for form
>> >> submit.
>> >> Also how to navigate to this newly generated html page.
>> >>
>> >> ~Praveen
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14158861
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: How to dynamically generate HTML page?

Posted by Johan Compagner <jc...@gmail.com>.
Generate on one side the html by a servlet or special template
generator, that reads in your db data and generate the component
structure on the other side.

Look at he slides i put on of the presentation that i did for the
wicket user group in the netherlands

2007/12/4, Pen <du...@yahoo.com>:
>
>
> I looked into the example wicketstuff-crud, this is basically in memory
> database with basic CRUD operation. this is not what exactly I am looking.
> Let me restate the question. We have application where in user can create a
> webpages using web designer by drag-n-drop where is html elements like text,
> image, selection box, combo box and save it in DB.
> It will be Json format parse it to POJO and store in DB. for example Image
> object looks like this
> which has got position, style, etc .
> [{"position":({left:60, top:40}),
> "size":({width:100,height:80}),
> "positionTop":40,"positionLeft":60,"sizeWidth":100,"sizeHeight":80,
> "cssClass":"",
> "style":"left:60px;top:40px;width:100px;height:80px;",
> ]}}]})
>
> Now we need to read from the DB and reconstruct the same Image object has a
> html page. We can construct the above object with HTML tags.
> But the question is how to display this html pages, since it exists only in
> memory and also how to navigate to this newly created page.
>
> ~Praveen
>
>
>
>
>
>
>
> igor.vaynberg wrote:
> >
> > see how wicketstuff-crud does it in wicket-stuff svn
> >
> > -igor
> >
> >
> > On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
> >>
> >>
> >> I am a new wicker user.  We need to construct/generate  a HTML page
> >> dynamically at runtime from the HTML elements like image and text.  This
> >> page only exists in memory(session/cache) and  there is no physical file.
> >> so
> >> how to generate such page and corresponding java class. How this can be
> >> done
> >> for static elements like image and text versus dynamically for form
> >> submit.
> >> Also how to navigate to this newly generated html page.
> >>
> >> ~Praveen
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: How to dynamically generate HTML page?

Posted by Pen <du...@yahoo.com>.

I looked into the example wicketstuff-crud, this is basically in memory
database with basic CRUD operation. this is not what exactly I am looking. 
Let me restate the question. We have application where in user can create a
webpages using web designer by drag-n-drop where is html elements like text,
image, selection box, combo box and save it in DB. 
It will be Json format parse it to POJO and store in DB. for example Image
object looks like this
which has got position, style, etc .
[{"position":({left:60, top:40}),
"size":({width:100,height:80}),
"positionTop":40,"positionLeft":60,"sizeWidth":100,"sizeHeight":80,
"cssClass":"",
"style":"left:60px;top:40px;width:100px;height:80px;",
]}}]})

Now we need to read from the DB and reconstruct the same Image object has a
html page. We can construct the above object with HTML tags.
But the question is how to display this html pages, since it exists only in
memory and also how to navigate to this newly created page. 

~Praveen







igor.vaynberg wrote:
> 
> see how wicketstuff-crud does it in wicket-stuff svn
> 
> -igor
> 
> 
> On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>>
>>
>> I am a new wicker user.  We need to construct/generate  a HTML page
>> dynamically at runtime from the HTML elements like image and text.  This
>> page only exists in memory(session/cache) and  there is no physical file.
>> so
>> how to generate such page and corresponding java class. How this can be
>> done
>> for static elements like image and text versus dynamically for form
>> submit.
>> Also how to navigate to this newly generated html page.
>>
>> ~Praveen
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: How to dynamically generate HTML page?

Posted by Igor Vaynberg <ig...@gmail.com>.
see how wicketstuff-crud does it in wicket-stuff svn

-igor


On Dec 3, 2007 6:30 PM, Pen <du...@yahoo.com> wrote:
>
>
> I am a new wicker user.  We need to construct/generate  a HTML page
> dynamically at runtime from the HTML elements like image and text.  This
> page only exists in memory(session/cache) and  there is no physical file. so
> how to generate such page and corresponding java class. How this can be done
> for static elements like image and text versus dynamically for form submit.
> Also how to navigate to this newly generated html page.
>
> ~Praveen
> --
> View this message in context: http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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