PageTester and UploadedFile

2008-01-10 Thread Foror
As upload the file through the form when is used the PageTester? This not worked: Map fieldValues = new HashMap(); FileInputStream in = new FileInputStream(file); byte[] data = new byte[(int) file.length()]; in.read(data); fieldValues.put("avatar", new String(data)); PageTester tester = new Pa

T5: decode URL with non english symbols

2008-01-13 Thread Foror
In this method public static String urlDecode(String input) // input = "новый" (russian word) { try { return CODEC.decode(input); // return "?" after call this method } catch (DecoderException ex) { throw new RuntimeExcep

Re[2]: T5: decode URL with non english symbols

2008-01-14 Thread Foror
D> is ur page.tml using the same encoding ?? D> juz my 2c D> if so .. u may need to test ur CODEC.decode All in UTF-8 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

T5: TextStreamResponse charset

2008-01-14 Thread Foror
new TextStreamResponse("application/json;charset=UTF-8", json.toString()); In browser response header "Content-Type application/json;charset=UTF-8" but content in "windows-1251" charset (because locale="ru_RU"?). Testing on Tomcat 5.5

Re[3]: T5: decode URL with non english symbols

2008-01-14 Thread Foror
KM> have you tried this: KM> http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding It does not work. In URLCodec (commons-codec-1.3) method public String decode(String pString, String charset) throws DecoderException, UnsupportedEncodingException { if (pString == null) {

Re[4]: T5: decode URL with non english symbols

2008-01-14 Thread Foror
F> Testing in Opera9, IE6 and FireFox2 on Tomcat 5.5 Tomcat 5.5 with URIEncoding="UTF-8" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

T5: decode URL with non english symbols

2008-01-14 Thread Foror
I have changed a method public String decode(String pString, String charset) for fix problem: public String decode(String pString, String charset) throws DecoderException, UnsupportedEncodingException { if (pString == null) { return null; } Stri

Re: Antwort: Re[4]: T5: decode URL with non english symbols

2008-01-14 Thread Foror
KM> now i see what you want... it is not possible KM> you can only use ASCII characters in URLs, KM> any other character has to be encoded. Firefox URL: tag/%D0%BD%D0%BE%D0%B2%D1%8B%D0%B9+%D0%BA%D1%83 (word = "новый") After click this link, and begin tapestry debug in CODEC.codec(input) input =

T5: Some problem with prob binding

2008-01-15 Thread Foror
In the project there is a following: public interface ISimpDesc { public getId(); } public class Team implements ISimpDesc { // hibernate annotations @DocumentId @Id @MinLength(min=2) @MaxLength(max=50) @Pattern(regex="[\\w-]+") private Stri

T5: 5.0.8 snapshot java.lang.ClassNotFoundException for array

2008-01-17 Thread Foror
In 5.0.7 snapshot properties with type "String[]" normally worked, after update last revision problems have begun: java.lang.ClassNotFoundException java/lang/String[] Stack trace * java.lang.Class.forName0(Native Method) * java.lang.Class.forName(Class.java:247) * org.apa

Re: T5: Some problem with prob binding

2008-01-17 Thread Foror
I have solved a problem. In Team changed setId(String id) to setId(Object id) when ok. F> In the project there is a following: F> public interface ISimpDesc { F>public getId(); F> } F> public class Team implements ISimpDesc { F> // hibernate annotations F> @DocumentId F>

Re: T5 : tapestry-hibernate : rollback when exception was thrown

2008-01-20 Thread Foror
Try session.connection().commit(); o> Please tell me how to rollback the current transaction when a exception was o> thrown!!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

T5: Checkbox list

2008-01-28 Thread Foror
Why it does not work? Any idea how to make the checkbox list? ${value.id} --- @Persist private List test; private IChecked value; void onActivate() { if (test == null) { test = new ArrayList();

get perthread_scope service from singleton_scope service

2008-04-08 Thread Foror
// singleton public IChatCoordinator buildChatCoordinator() {...} @Scope(IOCConstants.PERTHREAD_SCOPE) public IPerthredService buildPerthreadService(@Inject IOtherPerthredService) {...} --- // singleton public class ChatCoordinator implements IChatCoordinator { // for every call this metho

T5 #TAPESTRY-2058 bug

2008-04-16 Thread Foror
Bug in 5.1 category. Please fix it in 5.0.x release. It simple: class TextStreamResponse ... + private String _charset; // charset get from _contentType(";charset=UTF-8") // or get from tapestry.response-encoding public InputStream getStream() throws IOExc

T5: How send "/" as symbol in t:ac parameter?

2008-04-28 Thread Foror
Encoding to %2F does not help. (tapestry 5.0.8) example: t:ac=catalog%2Fsomefile OnEvent("activate") RECEIVED: String[0] == "catalog"; String[1] == "somefile"; NEEDED: String[0] == "catalog/somefile" - To unsubscribe, e-mail

Re: T5: How send "/" as symbol in t:ac parameter?

2008-04-28 Thread Foror
F> t:ac=catalog%2Fsomefile Fix it :) t:ac=catalog%252Fsomefile - worked - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Encoding problem (UTF-8)

2008-04-30 Thread Foror
j> I develop in Ubuntu and changing all to UTF-8 fixed both problems, but on j> Windows dose not works with the JSONObject. The database is on UTF-8, all j> data is saved ok, the only problem I get is when returning data on a j> JSONObject. Some problem with TextStreamResponse (TAPESTRY-2058). Fix

Russian symbols problems

2007-07-07 Thread Foror
I'm using message properties files in UTF-8 with russian symbols, for T4 it's work, but T5 it's not work - russian symbols is damaged Also problem with @ApplicationState, after save state and back to form, russian as well is damaged ---

How to create my ValidationDecorator in T5?

2007-07-10 Thread Foror
Hi! How to create my ValidationDecorator in T5, with marked required fields when Form is first loaded on page? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

T5 Palette required validation problem

2007-07-10 Thread Foror
Client side validation don't working. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

T5 bad URL generation

2007-10-14 Thread Foror
Some package "pages.articles" and page "Articles.java" in this package. URL "http://localhost/articles/";. When need context test then URL "http://localhost/articles//param1"; two slashes before "param1". ^ ---

T5 URL encoder similar T4 org.apache.tapestry.engine.ServiceEncoder

2007-11-18 Thread Foror
Need URL encoding in Tapestry 5, some service for it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

T5: createActionLink, delimiter ":" and "."

2007-12-25 Thread Foror
When I call a createActionLink("send", false, 2050) in page then link is "message:send/2050". And it does not work (onSendAction(long id) is not called). In a component ActionLink link is "message.send/2050" and it works. Below a part of a code responsible for link generation. Why it is so? public

T5: jscalendar and prototype

2008-01-03 Thread Foror
jscalendar requires prototype and scriptaculo libs? If is not requires, why they appear in a web-page? public class MyPage { @Inject @Path("${tapestry.jscalendar}/skins/aqua/theme.css") private Asset themeStylesheet; @Inject @Path("${tapestry.jscalendar}/calendar_stripped.js"

T5: get tapestry event, action and params of current page request

2008-01-03 Thread Foror
How to keep a URL of current page (event, action and context) that then to repeat this request? URL: /mailmessage:trash?t:ac=400 public class MailMessage extends DefaultBase {} In DefaultBase need get ":trash" and "t:ac=400" -

T5: jscalendar and prototype

2008-01-03 Thread Foror
Addition for previous: Page not contains Form component - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Build same services with different Id (from dynamic list)

2009-02-12 Thread foror
How to create services without "static bind(ServiceBinder)" and "buildMethod" like this: AppModule { void contributeIdContainer(Configuration config) { config.add("someId-1"); config.add("someId-2"); } } InternalModule { ... ids = idContainer.getAll(); for (String

Problem with annotationProvider in ObjectProvider

2009-02-16 Thread foror
If annotation added in tapestry page it worked: public class SomePage { @Inject @SomeAnnot private TypeNotRegisteredInModuleAsService field; } annotationProvider.getAnnotation(SomeAnnot.class) != null If annotation added in tapestry service it not worked: public class SomeService { //

Re: Problem with annotationProvider in ObjectProvider

2009-02-16 Thread foror
Forget add to annotation RetentionPolicy.RUNTIME. Now is worked. If annotation added in tapestry service it not worked: - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h.

How get service by marker annotation

2009-02-27 Thread foror
I have @SomeMarker annotation: @Marker({...@somemarker}) void SomeService buildSomeService() {...} How get SomeService by his marker (in ObjectLocator I not found like method). method like this: T getService( marker, Class interface) ---