You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sandor Irlanda <sa...@tigra.hu> on 2007/07/16 15:11:23 UTC

Encoding and Upload component

Hi,

We are using T5.0.5.
According to the infos found in this list we managed to use UTF8
encoding in our pages. But since we added the first Upload component to
the form the submitted values are scrambled again.
Is it a known bug?

Do you know a workaround?

Thanx in advance

Sandor Irlanda



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Encoding and Upload component

Posted by Steven Coco <co...@stevencoco.com>.
Hi.

I'm sorry, but don't have any solutions for you.

I also don't know if there's been an issue filed on this.

What my response to that posting was about, was to check the actual HTML 
generated by Tapestry. Doug posted that it seemed the browsers were posting 
bad data; but certain things in the HTML spec allow surprising behaviors. --- 
And so, if you do check the HTML, and see what Tapestry is getting back, it 
might be that the browser is sending something legal, given the exact headers 
and markup it is in fact receiving.

Especially since Tapestry 5's HTML generation is still in a bit of limbo.

Good luck.

Ciao.
-Steev Coco.


On Mon July 16 2007 9:31:49 am you wrote:
> I'm terribly sorry this was already asked by Doug Hauge.
>
> Actually, I could not really get the point in the answer from Steven.
> Do I need to specify some additional meta tags? Plus an informal
> parameter to the form component?
>
> Doug, is it working for you now?
>
> On Mon, 2007-07-16 at 15:11 +0200, Sandor Irlanda wrote:
> > Hi,
> >
> > We are using T5.0.5.
> > According to the infos found in this list we managed to use UTF8
> > encoding in our pages. But since we added the first Upload component to
> > the form the submitted values are scrambled again.
> > Is it a known bug?
> >
> > Do you know a workaround?
> >
> > Thanx in advance
> >
> > Sandor Irlanda
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Encoding and Upload component

Posted by Sandor Irlanda <sa...@tigra.hu>.
I'm terribly sorry this was already asked by Doug Hauge.

Actually, I could not really get the point in the answer from Steven.
Do I need to specify some additional meta tags? Plus an informal
parameter to the form component?

Doug, is it working for you now?

On Mon, 2007-07-16 at 15:11 +0200, Sandor Irlanda wrote:
> Hi,
> 
> We are using T5.0.5.
> According to the infos found in this list we managed to use UTF8
> encoding in our pages. But since we added the first Upload component to
> the form the submitted values are scrambled again.
> Is it a known bug?
> 
> Do you know a workaround?
> 
> Thanx in advance
> 
> Sandor Irlanda
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


tacos:Tree

Posted by Peter Schröder <Pe...@freenet-ag.de>.
hi,

it took me some hours to figure out, why i could not get the tree component to work properly. the component did not update the tree on any action.

i looked over some examples (i think the example provided with old tacos-version is way overloaded) and finally got a copy of andhots example working (http://andyhot.di.uoa.gr/blojsom/blog/default/java/2006/08/17/Tapestry-Building-Trees-with-Tacos-and-Annotations.html)

the only thing i did wrong was not to provide the right type of KeyProvider for my TreeContent. this is not obvious, cause this parameter is optional...

finally, this is my very simple demo-component:

html:

<div jwcid="@tacos:Tree" contentProvider="ognl:contentProvider" keyProvider="ognl:keyProvider" value="ognl:current" >
   <span jwcid="@Insert" value="ognl:current" />
</div>

java:

	public abstract File getCurrent();

	public ITreeContentProvider getContentProvider() {
		return new FileTreeProvider();
	}

	public IKeyProvider getKeyProvider() {
		return new IKeyProvider() {
			public Serializable getKey(Object obj) {
				return (File) obj;
			}
		};
	}

public class FileTreeProvider implements ITreeContentProvider {

	public Collection getChildren(Object obj) {
		File f = (File) obj;
		File[] list = f.listFiles();
		return Arrays.asList(list);
	}

	public Object getParent(Object obj) {
		File f = (File) obj;
		return f.getParentFile();
	}

	public boolean hasChildren(Object obj) {
		File f = (File) obj;
		return f.listFiles() != null;
	}

	public List getElements() {
		File f = new File("/");
		File[] list = f.listFiles();
		return Arrays.asList(list);
	}
}

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org