You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by William Keicher <wm...@gmail.com> on 2006/09/17 18:37:32 UTC
ADF/Trinidad CoreRenderKit interferes with Shale Remoting
Hi,
I have a project which is using both trinidad and blueprints components.
The blueprints components rely upon shale remoting to serve static resources
like javascript files and images. If I place a blueprints component within
a trinidad component, I get an UnsupportedOperationException from
org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.createResponseStream().
This seems to be caused by shale trying to serve a resource using a response
stream from the CoreRenderKit.
Architecturally, I'm not sure why CoreRenderKit.createResponseStream() is
not implemented, but simply replacing it with the JSF 1.1 implementation
*seems* to fix things. Is this an appropriate fix? Why is
createResponseStream() an unsupportedoperation within adf/trinidad?
Thanks,
Bill
>>>>>>>>>>>>>>
@Override
public ResponseStream createResponseStream(OutputStream out)
{
// =-=AEW What to do here???
throw new UnsupportedOperationException();
}
<<<<<<<<<<<<<<
@Override
public ResponseStream createResponseStream(OutputStream out)
{
// =-=AEW What to do here???
//this needs to be fixed for shale-remoting
final OutputStream output = out;
return new ResponseStream() {
public void write(int b) throws IOException {
output.write(b);
}
public void write(byte b[]) throws IOException {
output.write(b);
}
public void write(byte b[], int off, int len) throws IOException {
output.write(b, off, len);
}
public void flush() throws IOException {
output.flush();
}
public void close() throws IOException {
output.close();
}
};
}
Re: ADF/Trinidad CoreRenderKit interferes with Shale Remoting
Posted by Adam Winer <aw...@gmail.com>.
Bill,
Could you submit a JIRA issue with this as a patch?
createResponseStream() isn't implemented because back
when I wrote that class, I hadn't come across any use
for ResponsStreams... no idea why Shale even bothers
using ResponseStreams instead of plain OutputStreams...
But I'd be very happy to fix this one up now!
-- Adam
On 9/17/06, William Keicher <wm...@gmail.com> wrote:
>
> Hi,
>
> I have a project which is using both trinidad and blueprints components.
> The blueprints components rely upon shale remoting to serve static
> resources
> like javascript files and images. If I place a blueprints component
> within
> a trinidad component, I get an UnsupportedOperationException from
>
> org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.createResponseStream
> ().
> This seems to be caused by shale trying to serve a resource using a
> response
> stream from the CoreRenderKit.
>
> Architecturally, I'm not sure why CoreRenderKit.createResponseStream() is
> not implemented, but simply replacing it with the JSF 1.1 implementation
> *seems* to fix things. Is this an appropriate fix? Why is
> createResponseStream() an unsupportedoperation within adf/trinidad?
>
> Thanks,
> Bill
>
> >>>>>>>>>>>>>>
> @Override
> public ResponseStream createResponseStream(OutputStream out)
> {
> // =-=AEW What to do here???
> throw new UnsupportedOperationException();
> }
> <<<<<<<<<<<<<<
> @Override
> public ResponseStream createResponseStream(OutputStream out)
> {
> // =-=AEW What to do here???
> //this needs to be fixed for shale-remoting
> final OutputStream output = out;
> return new ResponseStream() {
> public void write(int b) throws IOException {
> output.write(b);
> }
>
>
> public void write(byte b[]) throws IOException {
> output.write(b);
> }
>
>
> public void write(byte b[], int off, int len) throws IOException
> {
> output.write(b, off, len);
> }
>
>
> public void flush() throws IOException {
> output.flush();
> }
>
>
> public void close() throws IOException {
> output.close();
> }
> };
> }
>
>