Re: T5: passing a form in the URL?

2009-03-09 Thread Christian Edward Gruber
Technically, you should be able to use the normal encoding of the form  
tag.


http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4

What I don't know is whether T5 will consume it.

Christian

On Mar 9, 2009, at 8:45 PM, Angelo Chen wrote:



question is, can we tell t:form to use GET instead of POST?


starbuxman wrote:


if  it were possible  -cant speak with authority  as i am not using
tap 5 - it would take the form of support for changing the method  
attr

to 'get' on  the form component.

On 3/9/09, Angelo Chen  wrote:


Hi,

I have a page which has a form like this:



   
   


in the onSuccess event I'm doing:

@InjectPage
   private ShowResults showResults;

Object onSuccessFromSearch() {
  showResults.setlst(lst);
  return searchResults;
}

Instead of InjectPage, is there a way to push the form to  
ShowResults in

the
URL, something like what Google is doing:

http://www.google.com/search?hl=en&q=Tapestry&btnG=Google+Search&meta=

Thanks,
--
View this message in context:
http://www.nabble.com/T5%3A-passing-a-form-in-the-URL--tp22412124p22412124.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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





--
Joshua Long
http://www.joshlong.com/

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





--
View this message in context: 
http://www.nabble.com/T5%3A-passing-a-form-in-the-URL--tp22412124p22425882.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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




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



Re: T5: passing a form in the URL?

2009-03-09 Thread Angelo Chen

question is, can we tell t:form to use GET instead of POST?


starbuxman wrote:
> 
> if  it were possible  -cant speak with authority  as i am not using
> tap 5 - it would take the form of support for changing the method attr
> to 'get' on  the form component.
> 
> On 3/9/09, Angelo Chen  wrote:
>>
>> Hi,
>>
>> I have a page which has a form like this:
>>
>> 
>>  > t:value="category" />
>> 
>> 
>> 
>>
>> in the onSuccess event I'm doing:
>>
>>  @InjectPage
>> private ShowResults showResults;
>>
>>  Object onSuccessFromSearch() {
>>showResults.setlst(lst);
>>return searchResults;
>>  }
>>
>> Instead of InjectPage, is there a way to push the form to ShowResults in
>> the
>> URL, something like what Google is doing:
>>
>> http://www.google.com/search?hl=en&q=Tapestry&btnG=Google+Search&meta=
>>
>> Thanks,
>> --
>> View this message in context:
>> http://www.nabble.com/T5%3A-passing-a-form-in-the-URL--tp22412124p22412124.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> 
> -- 
> Joshua Long
> http://www.joshlong.com/
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-passing-a-form-in-the-URL--tp22412124p22425882.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: passing a form in the URL?

2009-03-09 Thread Josh Long
if  it were possible  -cant speak with authority  as i am not using
tap 5 - it would take the form of support for changing the method attr
to 'get' on  the form component.

On 3/9/09, Angelo Chen  wrote:
>
> Hi,
>
> I have a page which has a form like this:
>
> 
>t:value="category" />
> 
> 
> 
>
> in the onSuccess event I'm doing:
>
>   @InjectPage
> private ShowResults showResults;
>
>   Object onSuccessFromSearch() {
>showResults.setlst(lst);
>return searchResults;
>   }
>
> Instead of InjectPage, is there a way to push the form to ShowResults in the
> URL, something like what Google is doing:
>
> http://www.google.com/search?hl=en&q=Tapestry&btnG=Google+Search&meta=
>
> Thanks,
> --
> View this message in context:
> http://www.nabble.com/T5%3A-passing-a-form-in-the-URL--tp22412124p22412124.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Joshua Long
http://www.joshlong.com/

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



Re: T5: passing a form in the URL?

2009-03-09 Thread Christian Edward Gruber
Whether or not you can do this, I would be very very careful about  
where you do this.  Passing form data on the url is one of the easier  
entry-points to a cross-site request forgery (CSRF) attack.  While for  
something like a search (or any read-only operation) this isn't an  
issue, but if you are changing state, especially users' state, such as  
their contact e-mail address or password, this is how request pages  
get hijacked. Just a point to keep in mind.  CSRF isn't impossible  
with a form post, but it's slightly harder to execute.


Christian.

On Mar 9, 2009, at 8:22 AM,  wrote:



Hi,

I have a page which has a form like this:



   
   


in the onSuccess event I'm doing:

@InjectPage
   private ShowResults showResults;

Object onSuccessFromSearch() {
  showResults.setlst(lst);
  return searchResults;
}

Instead of InjectPage, is there a way to push the form to  
ShowResults in the

URL, something like what Google is doing:

http://www.google.com/search?hl=en&q=Tapestry&btnG=Google+Search&meta=

Thanks,
--
View this message in context: 
http://www.nabble.com/T5%3A-passing-a-form-in-the-URL--tp22412124p22412124.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Christian Edward Gruber
christianedwardgru...@gmail.com




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



Re: T5: passing a form in the URL?

2009-03-09 Thread Thiago H. de Paula Figueiredo
On Mon, Mar 9, 2009 at 9:22 AM, Angelo Chen  wrote:
> Instead of InjectPage, is there a way to push the form to ShowResults in the
> URL, something like what Google is doing:
> http://www.google.com/search?hl=en&q=Tapestry&btnG=Google+Search&meta=

Not automatically. Tapestry always uses POST to submit values, while
Google search uses GET. On the other hand, you can use onPassivate()
in SearchResults to return something similar:
/searchresults/category/1/name/anything. If you want it for
bookmarkability or SEO issues, it solves your problem.

-- 
Thiago

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