Could you post your action method code and some more of the stacktrace?
i'm missing the root cause of the facesException. there must be an
exception inside your action method.

Onur Tokan wrote:
> Thanks volker,
> 
> I've tried your solution. However I can't make it worked. I wrote the
> code in an managed bean action method. I got the following
> exception...
> =======================
> 
> exception
> 
> javax.servlet.ServletException: Error calling action method of
> component with id _form1:_0001
>       com.ias.faces.FacesServlet.service(Unknown Source)
>       
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
> 
> 
> root cause
> 
> javax.faces.FacesException: Error calling action method of component
> with id _form1:_0001
>       
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
>       javax.faces.component.UICommand.broadcast(UICommand.java:106)
>       javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
>       javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
>       
> org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
>       
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
>       com.ias.faces.FacesServlet.service(Unknown Source)
>       
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
> 
> 
> 
> 
> On 11/21/05, Volker Weber <[EMAIL PROTECTED]> wrote:
> 
>>Hi,
>>
>>you can set a custom responseWriter into the facesContext and call
>>encode methods on the component.
>>
>>like this:
>>
>>// backup the writer
>>ResponseWriter writer
>>   = (ResponseWriter) facesContext.getResponseWriter();
>>
>>// replace responseWriter and render page content
>>StringWriter content = new StringWriter();
>>ResponseWriter contentWriter = writer.cloneWithWriter(content);
>>facesContext.setResponseWriter(contentWriter);
>>
>>// encode the component
>>component.encodeBegin(facesContext);
>>component.encodeChildren(facesContext);
>>component.encodeEnd(facesContext);
>>
>>// reset the writer
>>facesContext.setResponseWriter(writer);
>>
>>// get the content from StringWriter
>>String htmlSource = content.toString();
>>
>>
>>Regards
>> Volker
>>
>>Onur Tokan wrote:
>>
>>>Sorry, I'm afraid I'm misunderstood. I looking for a method which will
>>>give me the only components and sure It's child's HTML source. This
>>>should be a String value.
>>>
>>>
>>>On 11/21/05, Andrew Robinson <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>>Yes. If you want an example, there is one at this site:
>>>>http://www.theserverside.com/articles/article.tss?l=BuildingCustomJSF
>>>>
>>>>Look for 'Building the"HelloWorld" Custom UI Component Step 1:
>>>>Creating a UIComponent Class'
>>>>
>>>>On 11/21/05, Onur Tokan <[EMAIL PROTECTED]> wrote:
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>Is it possible for a component render itself?
>>>>>
>>>>>like:
>>>>>
>>>>>public String HtmlDataTable.renderHtml()
>>>>>
>>>>>best regards...
>>>>>
>>>>
>>--
>>Don't answer to From: address!
>>Mail to this account are droped if not recieved via mailinglist.
>>To contact me direct create the mail address by
>>concatenating my forename to my senders domain.
>>
> 
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

Reply via email to