[
https://issues.apache.org/jira/browse/TAPESTRY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612281#action_12612281
]
Igor Drobiazko commented on TAPESTRY-2504:
------------------------------------------
Thanks for the patch. I was also thinking about to use the MetaDataLocator
service inside TextStreamResponse.
public TextStreamResponse(MetaDataLocator locator, ComponentResources
resources, String text)
{
this.contentType =
locator.findMeta(MetaDataConstants.RESPONSE_CONTENT_TYPE, resources,
String.class);
this.encoding = locator.findMeta(MetaDataConstants.RESPONSE_ENCODING,
resources, String.class);
this.text = text;
}
This way we can reuse the metadata provided by a component in the containment
hierarchy.
Comments are welcome, please.
> Unspecified ajax stream response encoding
> -----------------------------------------
>
> Key: TAPESTRY-2504
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2504
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.13
> Environment: windows, java 1.5
> Reporter: Krzysztof Krzeminski
> Fix For: unspecified
>
> Attachments: MissingCharsetPatch.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Automcomplete response does not properly create data stream
>
> Class org.apache.tapestry5.util.TextStreamResponse:
> public InputStream getStream() throws IOException
> {
> return new ByteArrayInputStream(text.getBytes());
> }
> should be:
> public InputStream getStream() throws IOException
> {
> byte[] bytes = text.getBytes(charset);
> return new ByteArrayInputStream(bytes);
> }
> charset : class field which holds valid charset:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]