[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-17 Thread [EMAIL PROTECTED]
Dustismo - yes, known problem - please open a JIRA for this as it is possible to fix IIRC View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129934#4129934 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129934

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-08 Thread JakeC
I KNEW it had to be something simple! It worked like a charm, thanks! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128029#4128029 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128029 _

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-08 Thread dustismo
Have you tried?: | String html = Renderer.instance().render(viewId); | I use it with great success, with one caveat -- it will not render custom tags that are not packaged. (see: http://jira.jboss.org/jira/browse/JBSEAM-1440). I don't think that is the taglib problem you are seeing. Go

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-08 Thread JakeC
OK, with the help of the SeamlessViewHandler at http://www.ilikespam.com/blog/faking-a-postback-with-jsf-facelets (with the addition of a call to initialize(context) at the beginning of buildView()), I have gotten much further. I believe I am actually getting to the page now, but I am getting l

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-08 Thread JakeC
OK, I think I'm getting much closer. MailComponent.encode() has the process down, but from within a UIComponent, which renders differently. However, the info from Monkey shows how to render from outside a UIComponent, and org.jboss.seam.ui.facelet.FaceletsRenderer showed how to create a Respons

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-08 Thread [EMAIL PROTECTED]
Yeah - check through the Seam source. We also have similar code in places like s:cache and p:html. Those only render fragments, but they might be helpful to round out the ideas. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127921#4127921 Reply to the pos

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-07 Thread matt.drees
You could also read through Seam's code for doing facelets-based emails. It essentially renders a facelets xhtml template to a string. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127663#4127663 Reply to the post : http://www.jboss.com/index.html?module=b

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-07 Thread monkeyden
anonymous wrote : Ahh, I see FacesContext.getCurrentInstance().getApplication().getViewHandler(). Is that what you mean? yep "JakeC" wrote : OK, I'm trying getApplication().getViewHandler(), but how do I get the rendered HTML afterward? Is that through FacesContext.getResponseStream()? As I

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-07 Thread JakeC
OK, I'm trying getApplication().getViewHandler(), but how do I get the rendered HTML afterward? Is that through FacesContext.getResponseStream()? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127633#4127633 Reply to the post : http://www.jboss.com/index.htm

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-07 Thread JakeC
Ahh, I see FacesContext.getCurrentInstance().getApplication().getViewHandler(). Is that what you mean? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127630#4127630 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127630

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-07 Thread JakeC
Hmm, I don't have getViewHander(), but getViewRoot(). This is in javax.faces.context.FacesContext, in jsf-api.jar in Seam 2.0.1.CR1. org.jboss.seam.jsf.SeamApplication has getViewHandler(), and org.jboss.seam.jsf.SeamViewHandler() has restoreView(ctx, viewId), but I don't know how to get a hand

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-07 Thread monkeyden
...and call renderView on the ViewHandler View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127614#4127614 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127614 ___ jboss-user ma

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-07 Thread monkeyden
Never tried it and not sure if it will work correctly but: FacesContext.getCurrentInstance().getViewHandler().restoreView(ctx, viewId) If it does work (fingers crossed), you'd have to ensure that the state is available for the particular viewId. View the original post : http://www.jboss.com/in

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-07 Thread JakeC
I'd rather not scrape the page. We are running behind SSL, and setting that up in HttpClient is a pain. I just want to be able to trigger a JSF Render via Java code and get the resulting HTML back. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127610#412761

[jboss-user] [JBoss Seam] - Re: How do I fetch the HTML source of a page programatically

2008-02-07 Thread monkeyden
Is this what you're looking for? http://www.thescripts.com/forum/thread721450.html View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127600#4127600 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127600 ___