You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2006/11/01 12:07:51 UTC

shale-282 - character encoding problem with remoting/ajax

I am using german umlauts - the messages in the bundles are encoded in
java unicode notation, works fine for all Message things.
Now using remoting - its broken.
With or without the patch, if i use "text/html" as content type and now
the "ü" is encoded like "&amp;uuml;" it gets not printed, instead the
"&amp;uuml;" is shown.

Used the ajax library the docs used too - some hints about the encoding
problem?

Torsten

Re: shale-282 - character encoding problem with remoting/ajax

Posted by Craig McClanahan <cr...@apache.org>.
On 12/19/06, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
>
> Works now - don't really know wheres the error was, but once i've did
> the html encoding by myself and the write it out.
> Removing this, i really love to debug things ;-), and write the string
> like it should appear did the work, don't know anymore why i did the
> escaping once by myself.
>
> So forget about this - works fine now using latest svn remoting +
> prototype 1.4.0 library.


I'm glad it works now.  If you picked up a fairly recent nightly build, then
you got the benefit of a bugfix for this that I checked in in mid-November,
based on a proposed patch from Shinsuke Sugaya.

Torsten


Craig


Am Freitag, den 15.12.2006, 16:06 +0100 schrieb Torsten Krah:
> > Any hints about this - using latest trunk and the problem is still
> > there  :(
> >
> > Am Mittwoch, den 01.11.2006, 12:07 +0100 schrieb Torsten Krah:
> > > I am using german umlauts - the messages in the bundles are encoded in
> > > java unicode notation, works fine for all Message things.
> > > Now using remoting - its broken.
> > > With or without the patch, if i use "text/html" as content type and
> now
> > > the "ü" is encoded like "&amp;uuml;" it gets not printed, instead the
> > > "&amp;uuml;" is shown.
> > >
> > > Used the ajax library the docs used too - some hints about the
> encoding
> > > problem?
> > >
> > > Torsten
>
>
>

Re: shale-282 - character encoding problem with remoting/ajax

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Works now - don't really know wheres the error was, but once i've did
the html encoding by myself and the write it out.
Removing this, i really love to debug things ;-), and write the string
like it should appear did the work, don't know anymore why i did the
escaping once by myself.

So forget about this - works fine now using latest svn remoting +
prototype 1.4.0 library.

Torsten

Am Freitag, den 15.12.2006, 16:06 +0100 schrieb Torsten Krah:
> Any hints about this - using latest trunk and the problem is still
> there  :(
> 
> Am Mittwoch, den 01.11.2006, 12:07 +0100 schrieb Torsten Krah:
> > I am using german umlauts - the messages in the bundles are encoded in
> > java unicode notation, works fine for all Message things.
> > Now using remoting - its broken.
> > With or without the patch, if i use "text/html" as content type and now
> > the "ü" is encoded like "&amp;uuml;" it gets not printed, instead the
> > "&amp;uuml;" is shown.
> > 
> > Used the ajax library the docs used too - some hints about the encoding
> > problem?
> > 
> > Torsten

Re: shale-282 - character encoding problem with remoting/ajax

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Any hints about this - using latest trunk and the problem is still
there  :(

Am Mittwoch, den 01.11.2006, 12:07 +0100 schrieb Torsten Krah:
> I am using german umlauts - the messages in the bundles are encoded in
> java unicode notation, works fine for all Message things.
> Now using remoting - its broken.
> With or without the patch, if i use "text/html" as content type and now
> the "ü" is encoded like "&amp;uuml;" it gets not printed, instead the
> "&amp;uuml;" is shown.
> 
> Used the ajax library the docs used too - some hints about the encoding
> problem?
> 
> Torsten

Re: New to shale and jsf

Posted by Craig McClanahan <cr...@apache.org>.
On 11/1/06, Jonathan Smith <sm...@hotmail.com> wrote:
>
>
> Hi I am new to shale and JSFI was wondering if there was a shale example
> in
> which a list get iterated through and displayed. like a list of employees
> or
> items in a store, something like that. Or if there is a JSF or shale
> component that can display a list or objects. Like if you have a list of
> employee objects and each employee has a name, and personel info. any help
> or examples are warmly welcome.


The most likely suspect component :-) for you is the Data Table component
(<h:dataTable> if you are using JSP).  You can see this used, among other
places, in the"shale-mailreader"  example apps ... on the
registration.jsppage, the set of subscriptions for a logged in user is
listed in such at
table.

Version 1.0.3 is available at http://people.apache.org/dist/shale/v1.0.3/ or
you can grab the latest nightly builds (
http://people.apache.org/builds/shale/nightly/).

Craig



_________________________________________________________________
> Try the next generation of search with Windows Live Search today!
>
> http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&source=hmtagline
>
>

Re: Question about prerenderer?

Posted by Jonathan Smith <sm...@hotmail.com>.
here is the page

<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<div class="portletbox">
						<h3>
							Debug
						</h3>


	<h:dataTable  value="#{mvportal.contacts}" var="contact" 
rowClasses="odd,even" cellspacing="0" >
		<h:column>

			<f:facet name="header">
				<h:outputText value="Name" />
			</f:facet>
			<h:outputText  id="displayName" value="#{contact.displayName}"  />
		</h:column>

		<h:column>
			<f:facet name="header">
				<h:outputText value="Office" />
			</f:facet>
			<h:outputText id="OfficeName" value="#{contact.office.name}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="EXT" />
			</f:facet>
			<h:outputText id="extensio" value="#{contact.extension}"/>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Email" />
			</f:facet>
			<h:outputText id="email" value="#{contact.email}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="IM" />
			</f:facet>
			<h:outputText id="im" value="#{contact.imUsername}"/>
		</h:column>
	</h:dataTable>


</div>


when it is rendered the data table is above the div and the h3 is inside the 
div.






>From: "Craig McClanahan" <cr...@apache.org>
>Reply-To: user@shale.apache.org
>To: user@shale.apache.org
>Subject: Re: Question about prerenderer?
>Date: Wed, 1 Nov 2006 12:48:48 -0800
>
>On 11/1/06, Jonathan Smith <sm...@hotmail.com> wrote:
>>
>>I am having trouble where everytime i put something that is set by the
>>prerender inside of a <div> it always renders outside the <div>. How do
>>you
>>get something that is set by a prerender such as a timestamp or a
>>datatable
>>that uses a prerendered list to render in the <div>?
>
>
>What exactly does your JSP source page look like?  If you're using JSF
>1.1(very likely), then you are probably running into the fact that
>there are
>some interoperability issues trying to mix components and template text.
>Seeing what your page looks like will make it possible to offer some
>specific suggestions.
>
>Craig
>
>
>_________________________________________________________________
>>Get today's hot entertainment gossip
>>http://movies.msn.com/movies/hotgossip?icid=T002MSN03A07001
>>
>>

_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial! 
http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail


Re: Question about prerenderer?

Posted by Craig McClanahan <cr...@apache.org>.
On 11/1/06, Jonathan Smith <sm...@hotmail.com> wrote:
>
> I am having trouble where everytime i put something that is set by the
> prerender inside of a <div> it always renders outside the <div>. How do
> you
> get something that is set by a prerender such as a timestamp or a
> datatable
> that uses a prerendered list to render in the <div>?


What exactly does your JSP source page look like?  If you're using JSF
1.1(very likely), then you are probably running into the fact that
there are
some interoperability issues trying to mix components and template text.
Seeing what your page looks like will make it possible to offer some
specific suggestions.

Craig


_________________________________________________________________
> Get today's hot entertainment gossip
> http://movies.msn.com/movies/hotgossip?icid=T002MSN03A07001
>
>

Question about prerenderer?

Posted by Jonathan Smith <sm...@hotmail.com>.
I am having trouble where everytime i put something that is set by the 
prerender inside of a <div> it always renders outside the <div>. How do you 
get something that is set by a prerender such as a timestamp or a datatable 
that uses a prerendered list to render in the <div>?

_________________________________________________________________
Get today's hot entertainment gossip  
http://movies.msn.com/movies/hotgossip?icid=T002MSN03A07001


Re: New to shale and jsf

Posted by Matthias Wessendorf <ma...@apache.org>.
Jonathan-

the Shale framework is more an extension of JSF. JSF++ I'd like to call it :)

The best is the ViewController, check the use case for that. Also
sweet is the remoting, the tiger and the testing-support. Dialog is
also in there. Enable you to do *wizards* based on a xml conf.

(these things I used; I can't speak about Clay for instance)

One last thing. even you don't need ajax(shale remoting), dialogs,
tests or Java5 annot@itions or test. but you really want
ViewController ;)

-M

On 11/1/06, Jonathan Smith <sm...@hotmail.com> wrote:
>
> Hi I am new to shale and JSFI was wondering if there was a shale example in
> which a list get iterated through and displayed. like a list of employees or
> items in a store, something like that. Or if there is a JSF or shale
> component that can display a list or objects. Like if you have a list of
> employee objects and each employee has a name, and personel info. any help
> or examples are warmly welcome.
>
> _________________________________________________________________
> Try the next generation of search with Windows Live Search today!
> http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&source=hmtagline
>
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: shale-282 - character encoding problem with remoting/ajax

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
No i am using clay.

Torsten

Am Mittwoch, den 01.11.2006, 15:06 +0100 schrieb Randahl Fink Isaksen:
> You would not happen to be using facelets would you?
> 
> Randahl
> 
> Torsten Krah wrote:
> > I am using german umlauts - the messages in the bundles are encoded in
> > java unicode notation, works fine for all Message things.
> > Now using remoting - its broken.
> > With or without the patch, if i use "text/html" as content type and now
> > the "ü" is encoded like "&amp;uuml;" it gets not printed, instead the
> > "&amp;uuml;" is shown.
> >
> > Used the ajax library the docs used too - some hints about the encoding
> > problem?
> >
> > Torsten
> >   
> 

SV: New to shale and jsf

Posted by Hermod Opstvedt <he...@opstvedt.com>.
Hi

Take a look at the tomahawk datalist component:
http://myfaces.apache.org/tomahawk/dataList.html

or the extended datatable:
http://myfaces.apache.org/tomahawk/extDataTable.html

Hermod


-----Opprinnelig melding-----
Fra: Jonathan Smith [mailto:smithtown33@hotmail.com] 
Sendt: 1. november 2006 18:03
Til: user@shale.apache.org
Emne: New to shale and jsf


Hi I am new to shale and JSFI was wondering if there was a shale example in 
which a list get iterated through and displayed. like a list of employees or

items in a store, something like that. Or if there is a JSF or shale 
component that can display a list or objects. Like if you have a list of 
employee objects and each employee has a name, and personel info. any help 
or examples are warmly welcome.

_________________________________________________________________
Try the next generation of search with Windows Live Search today!  
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&source=h
mtagline


New to shale and jsf

Posted by Jonathan Smith <sm...@hotmail.com>.
Hi I am new to shale and JSFI was wondering if there was a shale example in 
which a list get iterated through and displayed. like a list of employees or 
items in a store, something like that. Or if there is a JSF or shale 
component that can display a list or objects. Like if you have a list of 
employee objects and each employee has a name, and personel info. any help 
or examples are warmly welcome.

_________________________________________________________________
Try the next generation of search with Windows Live Search today!  
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&source=hmtagline


Re: shale-282 - character encoding problem with remoting/ajax

Posted by Randahl Fink Isaksen <ra...@rockit.dk>.
You would not happen to be using facelets would you?

Randahl

Torsten Krah wrote:
> I am using german umlauts - the messages in the bundles are encoded in
> java unicode notation, works fine for all Message things.
> Now using remoting - its broken.
> With or without the patch, if i use "text/html" as content type and now
> the "ü" is encoded like "&amp;uuml;" it gets not printed, instead the
> "&amp;uuml;" is shown.
>
> Used the ajax library the docs used too - some hints about the encoding
> problem?
>
> Torsten
>