Re: Forms require that the request method be POST and that the t:formdata query parameter have values.

2016-01-19 Thread Bob Harner
I added this solution to the FAQ:

https://tapestry.apache.org/specific-errors-faq.html

If anyone has a better solution (until TAP5-1733 is fixed), please share...
On Jan 18, 2016 5:44 PM, "Bob Harner"  wrote:

> This probably deserves to be added to Tapestry's FAQ page. It's quite
> common with Tapestry apps.
>
> If your app is on a publicly site then it is a common result of bots
> crawling your site and submitting any forms that they finds. If it isn't on
> a public site then it may be a browser (e.g. certain versions of Safari)
> submitting the form as part of its auto-complete logic or cache-ahead
> functionality. Or it could be from someone using browser developer tools to
> manually convert POST forms to GET, just to see what would happen. There
> are probably a few other causes as well.
>
> In all the scenarios I'm aware of, these errors are harmless and you
> probably don't want them logged. That's not too hard. I've used the
> solution described here with success:
>
>
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Safari-for-example-browser-history-and-form-exception-td4942074.html
>
>
> On Mon, Jan 18, 2016 at 9:46 AM, Robson Pires 
> wrote:
>
>> Hi,
>>
>> In one of my environments I am facing this problem: Forms require that the
>> request method be POST and that the t:formdata query parameter have
>> values.
>>
>> Any idea about what causes of this problem?
>>
>> Thank you,
>>
>> Rob Pi
>>
>
>


Re: Forms require that the request method be POST and that the t:formdata query parameter have values.

2016-01-18 Thread Bob Harner
This probably deserves to be added to Tapestry's FAQ page. It's quite
common with Tapestry apps.

If your app is on a publicly site then it is a common result of bots
crawling your site and submitting any forms that they finds. If it isn't on
a public site then it may be a browser (e.g. certain versions of Safari)
submitting the form as part of its auto-complete logic or cache-ahead
functionality. Or it could be from someone using browser developer tools to
manually convert POST forms to GET, just to see what would happen. There
are probably a few other causes as well.

In all the scenarios I'm aware of, these errors are harmless and you
probably don't want them logged. That's not too hard. I've used the
solution described here with success:


http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Safari-for-example-browser-history-and-form-exception-td4942074.html


On Mon, Jan 18, 2016 at 9:46 AM, Robson Pires 
wrote:

> Hi,
>
> In one of my environments I am facing this problem: Forms require that the
> request method be POST and that the t:formdata query parameter have values.
>
> Any idea about what causes of this problem?
>
> Thank you,
>
> Rob Pi
>


Re: Forms created in a loop - problem with validation

2015-07-24 Thread Lance Java
I think this is caused by the field being reused in the loop. You might
need to recordError with a FieldSnapshot.

Example here
http://t5stitch-lazan.rhcloud.com/mapbindingdemo


Re: Forms created in a loop - problem with validation

2015-07-24 Thread Geoff Callender
These examples might help...

If you’re not using AJAX then it probably makes more sense to put the Form 
around the Loop:

T5.4: 
http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/editableloop1 


http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/editableloopforupdate1
 

T5.3: 
http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/editableloop1 


http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/editableloopforupdate1
 


If you’re using AJAX, then a Form per row works well:

T5.4: 
http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/formsinaloop 

T5.3: 
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/formsinaloop 


Geoff

> On 24 Jul 2015, at 6:55 pm, Matthias Bieber  wrote:
> 
> 
> Hello,
>  
> I have a loop that creates a few forms and I have implemented the onValidate 
> method to validate the input. If an error occours in the textarea of the 
> first form, the textareas of all other forms are marked as erroneous too, 
> although the forms and textareas have different IDs. Whats wrong?
>  
> Thanks in advance.
> M.B.
>  
>  
> Source code:
>  
> Index.java:
> public class Index
> {  
> @Property
> private int[] integers= { 1, 2, 3, 4, 5 };
> 
> @Property
> private int anInteger;
> 
> public Index()
> {
> }
> }
>  
> Index.tml:
> http://tapestry.apache.org/schema/tapestry_5_3.xsd"; 
> xmlns:p="tapestry:parameter">
> 
> ${anInteger}
> 
> 
> 
>  
> MyForm.java:
> 
> public class MyForm
> {
> @Parameter(required=true)
> @Property
> private int id;
> 
> @Property
> private String text;
> 
> @InjectComponent
> private Form form;
> 
> @InjectComponent
> private TextArea textarea;
> 
> @Inject
> Logger logger;
> 
> @Inject
> Messages messages;
> 
> void onPrepareForSubmitFromForm(int id) {
> this.id = id;
> }
> public void onSuccess() {
> logger.info("onSuccess()");
> }
> 
> void onValidateFromForm() {
> logger.info("id: " + id);
> form.recordError(textarea, "Error");
> }
> 
> public String getFormId() {
> return "form_" + id;
> }
> 
> public String getTextareaId() {
> return "textarea_" + id;
> }
> 
> public String getSubmitId() {
> return "submit_" + id;
> }
> }
>  
> MyForm.tml:
>  
> http://tapestry.apache.org/schema/tapestry_5_3.xsd"; 
> xmlns:p="tapestry:parameter">
> 
>  rows="3" cols="50" />
> 
> 
> 
>  
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2015-02-20 Thread George Christman
On Fri, Feb 20, 2015 at 11:47 AM, Charles Karow  wrote:

> We got a lot of these a few months ago, and in every case they were from
> the then-current version of Chrome:
>
> Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/39.0.2171.71 Safari/537.36
>
> At the time I interviewed a few of the users, who were using the auto-fill
> feature of the browser. I never was able to determine exactly what was
> happening, and have had to set the matter aside for other priorities.
>

So I wonder if setting the autocomplete="false" would fix this for the time
being, I have also noticed on the android phones it appears to be newer
versions of chrome too. I was just taking a look at my logs and this
exception has appear 7015 times since early fall, so I find that to be a
bit alarming.


>
> On 2/20/15 11:27 AM, George Christman wrote:
>
>> Digging deeper, looking at the form src. I'm seeing the following ex
>>
>> String[] values = request.getParameters(FORM_DATA);
>>
>> if (!request.getMethod().equals("POST") || values == null)
>> throw new RuntimeException(messages.format("core-invalid-form-request",
>> FORM_DATA));
>>
>> Is there any way to know which one of these two conditions are actually
>> causing the exception? Can you still have a post while having null
>> form_data?
>>
>> On Fri, Feb 20, 2015 at 11:09 AM, George Christman <
>> gchrist...@cardaddy.com>
>> wrote:
>>
>>  I also found this article related to android. Again I'm not very familiar
>>> with this stuff, so please forgive me if it's unrelated.
>>>
>>>
>>> http://stackoverflow.com/questions/8587913/what-
>>> exactly-does-urlconnection-setdooutput-affect
>>>
>>> On Fri, Feb 20, 2015 at 11:04 AM, George Christman <
>>> gchrist...@cardaddy.com> wrote:
>>>
>>>  Some further research has turned up this


 http://stackoverflow.com/questions/8187188/android-4-0-
 ics-turning-httpurlconnection-get-requests-into-post-requests

 I also posted the following question on SO

 http://stackoverflow.com/questions/28632632/browser-
 turning-a-post-request-into-a-get?noredirect=1#comment45565655_28632632

 Someone answered with the following answer, I'm not sure if it even
 makes
 sense.

 The problem caused by address bar completion of all browsers and the
 solution is that, please add *autocomplete="false"* to all of your
 forms.




 On Fri, Feb 20, 2015 at 10:38 AM, George Christman <
 gchrist...@cardaddy.com> wrote:


> On Fri, Feb 20, 2015 at 9:31 AM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
>  On Fri, 20 Feb 2015 12:15:55 -0200, George Christman <
>> gchrist...@cardaddy.com> wrote:
>>
>>   So the question is how is the user able to force the browser to load
>>
>>> that
>>> url in the address bar, "I assuming its being loaded in the address
>>> bar"?
>>> Is there a bug in the form component or could the user have some sort
>>> of
>>> browser setting causing this. Ironically I noticed a lot of ie6 users
>>> but
>>> some android users as well which this exception. Before I block the
>>> exception from clogging up my logs, I'd like to make one last attempt
>>> at
>>> resolving it.
>>>
>>> What I'd really like to know is if the app is failing do to bad code
>>> or if the user is doing something to cause it to fail.
>>>
>>>  I'd guess this is caused by browsers misbehaving, specially after
>> the
>> IE6 info (who the hell still uses such an ancient and overall horrible
>> browser yet?). What else could turn a POST into a GET?
>>
>>  ^^ lol, great question. I think I'm going to add a js warning for
> all xp
> users to find an alternate browser. I didn't want to support old
> versions
> of ie back then and I'm deff not doing it today lol.
>
> Do you think there is a reason for a browser to do such a thing? I'm
> assuming you don't believe it's bad code, but rather the browser
> screwing
> up.
>
> Some thoughts,
>
> Relative urls shouldn't effect this right?
>
> What about long transactions? Could a user stop, double submit etc that
> could cause the browser to screw up?
>
>  --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>>
> --
> George Christman
> CEO
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>
>
>
 --
 George Christman
 CEO
 www.CarDaddy.com
 P.O. Box 735
 Johnstown, New York



>>> --
>>> George Christman
>>> CEO
>>> www.CarDaddy

Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2015-02-20 Thread Charles Karow
We got a lot of these a few months ago, and in every case they were from 
the then-current version of Chrome:


Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like 
Gecko) Chrome/39.0.2171.71 Safari/537.36


At the time I interviewed a few of the users, who were using the 
auto-fill feature of the browser. I never was able to determine exactly 
what was happening, and have had to set the matter aside for other 
priorities.


On 2/20/15 11:27 AM, George Christman wrote:

Digging deeper, looking at the form src. I'm seeing the following ex

String[] values = request.getParameters(FORM_DATA);

if (!request.getMethod().equals("POST") || values == null)
throw new RuntimeException(messages.format("core-invalid-form-request",
FORM_DATA));

Is there any way to know which one of these two conditions are actually
causing the exception? Can you still have a post while having null
form_data?

On Fri, Feb 20, 2015 at 11:09 AM, George Christman 
wrote:


I also found this article related to android. Again I'm not very familiar
with this stuff, so please forgive me if it's unrelated.


http://stackoverflow.com/questions/8587913/what-exactly-does-urlconnection-setdooutput-affect

On Fri, Feb 20, 2015 at 11:04 AM, George Christman <
gchrist...@cardaddy.com> wrote:


Some further research has turned up this


http://stackoverflow.com/questions/8187188/android-4-0-ics-turning-httpurlconnection-get-requests-into-post-requests

I also posted the following question on SO

http://stackoverflow.com/questions/28632632/browser-turning-a-post-request-into-a-get?noredirect=1#comment45565655_28632632

Someone answered with the following answer, I'm not sure if it even makes
sense.

The problem caused by address bar completion of all browsers and the
solution is that, please add *autocomplete="false"* to all of your forms.



On Fri, Feb 20, 2015 at 10:38 AM, George Christman <
gchrist...@cardaddy.com> wrote:



On Fri, Feb 20, 2015 at 9:31 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:


On Fri, 20 Feb 2015 12:15:55 -0200, George Christman <
gchrist...@cardaddy.com> wrote:

  So the question is how is the user able to force the browser to load

that
url in the address bar, "I assuming its being loaded in the address
bar"?
Is there a bug in the form component or could the user have some sort
of
browser setting causing this. Ironically I noticed a lot of ie6 users
but
some android users as well which this exception. Before I block the
exception from clogging up my logs, I'd like to make one last attempt
at
resolving it.

What I'd really like to know is if the app is failing do to bad code
or if the user is doing something to cause it to fail.


I'd guess this is caused by browsers misbehaving, specially after the
IE6 info (who the hell still uses such an ancient and overall horrible
browser yet?). What else could turn a POST into a GET?


^^ lol, great question. I think I'm going to add a js warning for all xp
users to find an alternate browser. I didn't want to support old versions
of ie back then and I'm deff not doing it today lol.

Do you think there is a reason for a browser to do such a thing? I'm
assuming you don't believe it's bad code, but rather the browser screwing
up.

Some thoughts,

Relative urls shouldn't effect this right?

What about long transactions? Could a user stop, double submit etc that
could cause the browser to screw up?


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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




--
George Christman
CEO
www.CarDaddy.com
P.O. Box 735
Johnstown, New York




--
George Christman
CEO
www.CarDaddy.com
P.O. Box 735
Johnstown, New York




--
George Christman
CEO
www.CarDaddy.com
P.O. Box 735
Johnstown, New York







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



Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2015-02-20 Thread George Christman
Digging deeper, looking at the form src. I'm seeing the following ex

String[] values = request.getParameters(FORM_DATA);

if (!request.getMethod().equals("POST") || values == null)
throw new RuntimeException(messages.format("core-invalid-form-request",
FORM_DATA));

Is there any way to know which one of these two conditions are actually
causing the exception? Can you still have a post while having null
form_data?

On Fri, Feb 20, 2015 at 11:09 AM, George Christman 
wrote:

> I also found this article related to android. Again I'm not very familiar
> with this stuff, so please forgive me if it's unrelated.
>
>
> http://stackoverflow.com/questions/8587913/what-exactly-does-urlconnection-setdooutput-affect
>
> On Fri, Feb 20, 2015 at 11:04 AM, George Christman <
> gchrist...@cardaddy.com> wrote:
>
>> Some further research has turned up this
>>
>>
>> http://stackoverflow.com/questions/8187188/android-4-0-ics-turning-httpurlconnection-get-requests-into-post-requests
>>
>> I also posted the following question on SO
>>
>> http://stackoverflow.com/questions/28632632/browser-turning-a-post-request-into-a-get?noredirect=1#comment45565655_28632632
>>
>> Someone answered with the following answer, I'm not sure if it even makes
>> sense.
>>
>> The problem caused by address bar completion of all browsers and the
>> solution is that, please add *autocomplete="false"* to all of your forms.
>>
>>
>>
>> On Fri, Feb 20, 2015 at 10:38 AM, George Christman <
>> gchrist...@cardaddy.com> wrote:
>>
>>>
>>>
>>> On Fri, Feb 20, 2015 at 9:31 AM, Thiago H de Paula Figueiredo <
>>> thiag...@gmail.com> wrote:
>>>
 On Fri, 20 Feb 2015 12:15:55 -0200, George Christman <
 gchrist...@cardaddy.com> wrote:

  So the question is how is the user able to force the browser to load
> that
> url in the address bar, "I assuming its being loaded in the address
> bar"?
> Is there a bug in the form component or could the user have some sort
> of
> browser setting causing this. Ironically I noticed a lot of ie6 users
> but
> some android users as well which this exception. Before I block the
> exception from clogging up my logs, I'd like to make one last attempt
> at
> resolving it.
>
> What I'd really like to know is if the app is failing do to bad code
> or if the user is doing something to cause it to fail.
>

 I'd guess this is caused by browsers misbehaving, specially after the
 IE6 info (who the hell still uses such an ancient and overall horrible
 browser yet?). What else could turn a POST into a GET?

>>> ^^ lol, great question. I think I'm going to add a js warning for all xp
>>> users to find an alternate browser. I didn't want to support old versions
>>> of ie back then and I'm deff not doing it today lol.
>>>
>>> Do you think there is a reason for a browser to do such a thing? I'm
>>> assuming you don't believe it's bad code, but rather the browser screwing
>>> up.
>>>
>>> Some thoughts,
>>>
>>> Relative urls shouldn't effect this right?
>>>
>>> What about long transactions? Could a user stop, double submit etc that
>>> could cause the browser to screw up?
>>>

 --
 Thiago H. de Paula Figueiredo
 Tapestry, Java and Hibernate consultant and developer
 http://machina.com.br

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


>>>
>>>
>>> --
>>> George Christman
>>> CEO
>>> www.CarDaddy.com
>>> P.O. Box 735
>>> Johnstown, New York
>>>
>>>
>>
>>
>> --
>> George Christman
>> CEO
>> www.CarDaddy.com
>> P.O. Box 735
>> Johnstown, New York
>>
>>
>
>
> --
> George Christman
> CEO
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>
>


-- 
George Christman
CEO
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2015-02-20 Thread George Christman
I also found this article related to android. Again I'm not very familiar
with this stuff, so please forgive me if it's unrelated.

http://stackoverflow.com/questions/8587913/what-exactly-does-urlconnection-setdooutput-affect

On Fri, Feb 20, 2015 at 11:04 AM, George Christman 
wrote:

> Some further research has turned up this
>
>
> http://stackoverflow.com/questions/8187188/android-4-0-ics-turning-httpurlconnection-get-requests-into-post-requests
>
> I also posted the following question on SO
>
> http://stackoverflow.com/questions/28632632/browser-turning-a-post-request-into-a-get?noredirect=1#comment45565655_28632632
>
> Someone answered with the following answer, I'm not sure if it even makes
> sense.
>
> The problem caused by address bar completion of all browsers and the
> solution is that, please add *autocomplete="false"* to all of your forms.
>
>
>
> On Fri, Feb 20, 2015 at 10:38 AM, George Christman <
> gchrist...@cardaddy.com> wrote:
>
>>
>>
>> On Fri, Feb 20, 2015 at 9:31 AM, Thiago H de Paula Figueiredo <
>> thiag...@gmail.com> wrote:
>>
>>> On Fri, 20 Feb 2015 12:15:55 -0200, George Christman <
>>> gchrist...@cardaddy.com> wrote:
>>>
>>>  So the question is how is the user able to force the browser to load
 that
 url in the address bar, "I assuming its being loaded in the address
 bar"?
 Is there a bug in the form component or could the user have some sort of
 browser setting causing this. Ironically I noticed a lot of ie6 users
 but
 some android users as well which this exception. Before I block the
 exception from clogging up my logs, I'd like to make one last attempt at
 resolving it.

 What I'd really like to know is if the app is failing do to bad code or
 if the user is doing something to cause it to fail.

>>>
>>> I'd guess this is caused by browsers misbehaving, specially after the
>>> IE6 info (who the hell still uses such an ancient and overall horrible
>>> browser yet?). What else could turn a POST into a GET?
>>>
>> ^^ lol, great question. I think I'm going to add a js warning for all xp
>> users to find an alternate browser. I didn't want to support old versions
>> of ie back then and I'm deff not doing it today lol.
>>
>> Do you think there is a reason for a browser to do such a thing? I'm
>> assuming you don't believe it's bad code, but rather the browser screwing
>> up.
>>
>> Some thoughts,
>>
>> Relative urls shouldn't effect this right?
>>
>> What about long transactions? Could a user stop, double submit etc that
>> could cause the browser to screw up?
>>
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Tapestry, Java and Hibernate consultant and developer
>>> http://machina.com.br
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
>>
>> --
>> George Christman
>> CEO
>> www.CarDaddy.com
>> P.O. Box 735
>> Johnstown, New York
>>
>>
>
>
> --
> George Christman
> CEO
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>
>


-- 
George Christman
CEO
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2015-02-20 Thread George Christman
Some further research has turned up this

http://stackoverflow.com/questions/8187188/android-4-0-ics-turning-httpurlconnection-get-requests-into-post-requests

I also posted the following question on SO
http://stackoverflow.com/questions/28632632/browser-turning-a-post-request-into-a-get?noredirect=1#comment45565655_28632632

Someone answered with the following answer, I'm not sure if it even makes
sense.

The problem caused by address bar completion of all browsers and the
solution is that, please add *autocomplete="false"* to all of your forms.



On Fri, Feb 20, 2015 at 10:38 AM, George Christman 
wrote:

>
>
> On Fri, Feb 20, 2015 at 9:31 AM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
>> On Fri, 20 Feb 2015 12:15:55 -0200, George Christman <
>> gchrist...@cardaddy.com> wrote:
>>
>>  So the question is how is the user able to force the browser to load that
>>> url in the address bar, "I assuming its being loaded in the address bar"?
>>> Is there a bug in the form component or could the user have some sort of
>>> browser setting causing this. Ironically I noticed a lot of ie6 users but
>>> some android users as well which this exception. Before I block the
>>> exception from clogging up my logs, I'd like to make one last attempt at
>>> resolving it.
>>>
>>> What I'd really like to know is if the app is failing do to bad code or
>>> if the user is doing something to cause it to fail.
>>>
>>
>> I'd guess this is caused by browsers misbehaving, specially after the IE6
>> info (who the hell still uses such an ancient and overall horrible browser
>> yet?). What else could turn a POST into a GET?
>>
> ^^ lol, great question. I think I'm going to add a js warning for all xp
> users to find an alternate browser. I didn't want to support old versions
> of ie back then and I'm deff not doing it today lol.
>
> Do you think there is a reason for a browser to do such a thing? I'm
> assuming you don't believe it's bad code, but rather the browser screwing
> up.
>
> Some thoughts,
>
> Relative urls shouldn't effect this right?
>
> What about long transactions? Could a user stop, double submit etc that
> could cause the browser to screw up?
>
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
> --
> George Christman
> CEO
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>
>


-- 
George Christman
CEO
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2015-02-20 Thread George Christman
On Fri, Feb 20, 2015 at 9:31 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Fri, 20 Feb 2015 12:15:55 -0200, George Christman <
> gchrist...@cardaddy.com> wrote:
>
>  So the question is how is the user able to force the browser to load that
>> url in the address bar, "I assuming its being loaded in the address bar"?
>> Is there a bug in the form component or could the user have some sort of
>> browser setting causing this. Ironically I noticed a lot of ie6 users but
>> some android users as well which this exception. Before I block the
>> exception from clogging up my logs, I'd like to make one last attempt at
>> resolving it.
>>
>> What I'd really like to know is if the app is failing do to bad code or
>> if the user is doing something to cause it to fail.
>>
>
> I'd guess this is caused by browsers misbehaving, specially after the IE6
> info (who the hell still uses such an ancient and overall horrible browser
> yet?). What else could turn a POST into a GET?
>
^^ lol, great question. I think I'm going to add a js warning for all xp
users to find an alternate browser. I didn't want to support old versions
of ie back then and I'm deff not doing it today lol.

Do you think there is a reason for a browser to do such a thing? I'm
assuming you don't believe it's bad code, but rather the browser screwing
up.

Some thoughts,

Relative urls shouldn't effect this right?

What about long transactions? Could a user stop, double submit etc that
could cause the browser to screw up?

>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
George Christman
CEO
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2015-02-20 Thread Thiago H de Paula Figueiredo
On Fri, 20 Feb 2015 12:15:55 -0200, George Christman  
 wrote:



So the question is how is the user able to force the browser to load that
url in the address bar, "I assuming its being loaded in the address bar"?
Is there a bug in the form component or could the user have some sort of
browser setting causing this. Ironically I noticed a lot of ie6 users but
some android users as well which this exception. Before I block the
exception from clogging up my logs, I'd like to make one last attempt at
resolving it.

What I'd really like to know is if the app is failing do to bad code or  
if the user is doing something to cause it to fail.


I'd guess this is caused by browsers misbehaving, specially after the IE6  
info (who the hell still uses such an ancient and overall horrible browser  
yet?). What else could turn a POST into a GET?


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2014-09-08 Thread Lance Java
Most likely a bot crawling your site. You may choose to suppress this
logging for crawlers. This can be done by maintaining a list of crawler
user agents and checking the user agent request header before logging.


Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2014-09-08 Thread Dmitry Gusev
Hi,

That could be an autocomplete feature of browser's address bar -- which
autocompletes form's submission URL.

Or it could be that user submits a form and it takes too long to process
it, and during that time user clicks to browser's address bar and hits
Enter (which issues HTTP GET request).


On Mon, Sep 8, 2014 at 1:17 PM, Marcel Huber  wrote:

> Hi,
>
> We use Tapestry 5.2.6 and we have this Exception quite often in our logs:
> [2014-09-07 21:18:27,951][ERROR] AppModuleBase.FFRequestExceptionHandler
> [qe-shop] Processing of request failed with uncaught exception: Forms
> require that the request method be POST and that the t:formdata query
> parameter have values.
> org.apache.tapestry5.ioc.internal.OperationException: Forms require that
> the request method be POST and that the t:formdata query parameter have
> values. [at
> classpath:ch/fashionfriends/client/http/pages/checkout/CheckoutBasket.tml,
> line 11]
> at
>
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:102)…
> …
> [2014-09-07 21:18:27,955][ERROR] layout.ExceptionReportHandler [qe-shop]
> ffReportException: [org.apache.tapestry5.ioc.internal.OperationException:
> Forms require that the request method be POST and that the t:formdata query
> parameter have values. [at
> classpath:ch/fashionfriends/client/http/pages/checkout/CheckoutBasket.tml,
> line 11]] caused by uri [/de/checkout/basket.basketform] [MUser [@7ada6333]
>  artificialId=2efaf248-1f54-4b2e-afe5-dbcdcc3c1609,
> instanceId=ClientID[748], lastInstanceUpdate=1410116735467>, firstName=,
> middleName=, lastName=, roles=null, loggedIn=false>] User-Agent
> [Mozilla/5.0 (Linux; U; Android 4.1.2; de-de; GT-I8190N Build/JZO54K)
> AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30]
> Referer [null]
>
> We can't explain, where this exception is comming from and how to fix it.
> All we know is, there are mostly Safari user and it happens on all forms
> and it's not bot problem.
>
> Does anybody have a idee what that is and what we can do to fix it?
>
> thx
>
> --
> Marcel
> owns his style.
>
> Application Engineer
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Forms require that the request method be POST

2014-06-25 Thread Dmitry Gusev
That depends on if the page containing the form and/or form handlers
@RequiresAuthentication or @RequiresUser.


On Wed, Jun 25, 2014 at 10:49 PM, George Christman 
wrote:

> Okay cool, that works too. Now if I'm setting remember me to true, should I
> still be seeing this exception?
>
>
> On Wed, Jun 25, 2014 at 2:44 PM, Dmitry Gusev 
> wrote:
>
> > It won't continue form submission, user will be redirected to the page
> with
> > empty form.
> >
> >
> > On Wed, Jun 25, 2014 at 10:31 PM, George Christman <
> > gchrist...@cardaddy.com>
> > wrote:
> >
> > > Thanks Dmitry, I'm willing to give it a shot. What outcome should I
> > expect
> > > to see from your code? Will it just bring the user back to a blank
> form,
> > or
> > > will it continue with the form submission?
> > >
> > >
> > > On Wed, Jun 25, 2014 at 1:56 PM, Dmitry Gusev 
> > > wrote:
> > >
> > > > Hi George,
> > > >
> > > > See one possible solution here:
> > > >
> > >
> >
> https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795
> > > >
> > > >
> > > > On Wed, Jun 25, 2014 at 7:36 PM, George Christman <
> > > gchrist...@cardaddy.com
> > > > >
> > > > wrote:
> > > >
> > > > > So I finally figured out how to reproduce this exception. I'm using
> > > > > Tapestry-Security and if the session times out and the user submits
> > the
> > > > > form, the page is redirected to the login page. When the user logs
> > in,
> > > it
> > > > > attempts to resubmit the form and ends with this exception. Does
> > > anybody
> > > > > know how to handle this?
> > > > >
> > > > >
> > > > > On Mon, May 19, 2014 at 10:53 PM, George Christman <
> > > > > gchrist...@cardaddy.com>
> > > > > wrote:
> > > > >
> > > > > > Thanks for the tips guys, I'll see if I can find the culprit now
> > > that I
> > > > > > know why it's happening.
> > > > > >
> > > > > >
> > > > > > On Mon, May 19, 2014 at 5:52 PM, Eugen 
> > wrote:
> > > > > >
> > > > > >> Hi, I have had this kind of exception then i tried to submit a
> > form
> > > > > >> programmatically from an Applet (HttpClient) without sending the
> > > > > >> formData field.
> > > > > >>
> > > > > >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> > > > > >> kristian.marinko...@gmail.com>:
> > > > > >> > Hi,
> > > > > >> >
> > > > > >> > check if it is the same client. i once had the same problem.
> > After
> > > > > >> several
> > > > > >> > hours of investigation it was a developer with a browser
> plugin
> > > (web
> > > > > >> > developer) which enabled converting form post requests to get
> > > > > requests.
> > > > > >> >
> > > > > >> > hope this helps.
> > > > > >> >
> > > > > >> > g,
> > > > > >> > Kris
> > > > > >> >
> > > > > >> >
> > > > > >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> > > > > >> > wrote:
> > > > > >> >
> > > > > >> >> Let me do some more homework now that I at least now how it's
> > > > thrown.
> > > > > >> >> Thanks Thiago.
> > > > > >> >>
> > > > > >> >>
> > > > > >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula
> Figueiredo
> > <
> > > > > >> >> thiag...@gmail.com> wrote:
> > > > > >> >>
> > > > > >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > > > > >> >> > gchrist...@cardaddy.com> wrote:
> > > > > >> >> >
> > > > > >> >> >  In this particular case the application sits behind a
> > firewall
> > > > > with
> > > > > >> no
> > > > > >> >> >> public access so I don't believe this is bot activity.  Do
> > you
> > > > > have
> > > > > >> any
> > > > > >> >> >> other thoughts?
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > Do you have any information on when this exception actually
> > > > > happens?
> > > > > >> >> > Otherwise, we can only guess. That exception usually
> happens
> > > > when a
> > > > > >> >> > Tapestry form URL is requested without the form fields,
> hence
> > > the
> > > > > bot
> > > > > >> >> > suspicion.
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> > --
> > > > > >> >> > Thiago H. de Paula Figueiredo
> > > > > >> >> > Tapestry, Java and Hibernate consultant and developer
> > > > > >> >> > http://machina.com.br
> > > > > >> >> >
> > > > > >> >> >
> > > > >
> -
> > > > > >> >> > To unsubscribe, e-mail:
> > users-unsubscr...@tapestry.apache.org
> > > > > >> >> > For additional commands, e-mail:
> > > users-h...@tapestry.apache.org
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >>
> > > > > >> >>
> > > > > >> >> --
> > > > > >> >> George Christman
> > > > > >> >> www.CarDaddy.com
> > > > > >> >> P.O. Box 735
> > > > > >> >> Johnstown, New York
> > > > > >> >>
> > > > > >>
> > > > > >>
> > > -
> > > > > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > > > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > > > > > --
> > > > > > George Christman
> > > > > > www.CarDaddy.com
> > > > > > 

Re: Forms require that the request method be POST

2014-06-25 Thread George Christman
Okay cool, that works too. Now if I'm setting remember me to true, should I
still be seeing this exception?


On Wed, Jun 25, 2014 at 2:44 PM, Dmitry Gusev 
wrote:

> It won't continue form submission, user will be redirected to the page with
> empty form.
>
>
> On Wed, Jun 25, 2014 at 10:31 PM, George Christman <
> gchrist...@cardaddy.com>
> wrote:
>
> > Thanks Dmitry, I'm willing to give it a shot. What outcome should I
> expect
> > to see from your code? Will it just bring the user back to a blank form,
> or
> > will it continue with the form submission?
> >
> >
> > On Wed, Jun 25, 2014 at 1:56 PM, Dmitry Gusev 
> > wrote:
> >
> > > Hi George,
> > >
> > > See one possible solution here:
> > >
> >
> https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795
> > >
> > >
> > > On Wed, Jun 25, 2014 at 7:36 PM, George Christman <
> > gchrist...@cardaddy.com
> > > >
> > > wrote:
> > >
> > > > So I finally figured out how to reproduce this exception. I'm using
> > > > Tapestry-Security and if the session times out and the user submits
> the
> > > > form, the page is redirected to the login page. When the user logs
> in,
> > it
> > > > attempts to resubmit the form and ends with this exception. Does
> > anybody
> > > > know how to handle this?
> > > >
> > > >
> > > > On Mon, May 19, 2014 at 10:53 PM, George Christman <
> > > > gchrist...@cardaddy.com>
> > > > wrote:
> > > >
> > > > > Thanks for the tips guys, I'll see if I can find the culprit now
> > that I
> > > > > know why it's happening.
> > > > >
> > > > >
> > > > > On Mon, May 19, 2014 at 5:52 PM, Eugen 
> wrote:
> > > > >
> > > > >> Hi, I have had this kind of exception then i tried to submit a
> form
> > > > >> programmatically from an Applet (HttpClient) without sending the
> > > > >> formData field.
> > > > >>
> > > > >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> > > > >> kristian.marinko...@gmail.com>:
> > > > >> > Hi,
> > > > >> >
> > > > >> > check if it is the same client. i once had the same problem.
> After
> > > > >> several
> > > > >> > hours of investigation it was a developer with a browser plugin
> > (web
> > > > >> > developer) which enabled converting form post requests to get
> > > > requests.
> > > > >> >
> > > > >> > hope this helps.
> > > > >> >
> > > > >> > g,
> > > > >> > Kris
> > > > >> >
> > > > >> >
> > > > >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> > > > >> > wrote:
> > > > >> >
> > > > >> >> Let me do some more homework now that I at least now how it's
> > > thrown.
> > > > >> >> Thanks Thiago.
> > > > >> >>
> > > > >> >>
> > > > >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo
> <
> > > > >> >> thiag...@gmail.com> wrote:
> > > > >> >>
> > > > >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > > > >> >> > gchrist...@cardaddy.com> wrote:
> > > > >> >> >
> > > > >> >> >  In this particular case the application sits behind a
> firewall
> > > > with
> > > > >> no
> > > > >> >> >> public access so I don't believe this is bot activity.  Do
> you
> > > > have
> > > > >> any
> > > > >> >> >> other thoughts?
> > > > >> >> >>
> > > > >> >> >
> > > > >> >> > Do you have any information on when this exception actually
> > > > happens?
> > > > >> >> > Otherwise, we can only guess. That exception usually happens
> > > when a
> > > > >> >> > Tapestry form URL is requested without the form fields, hence
> > the
> > > > bot
> > > > >> >> > suspicion.
> > > > >> >> >
> > > > >> >> >
> > > > >> >> > --
> > > > >> >> > Thiago H. de Paula Figueiredo
> > > > >> >> > Tapestry, Java and Hibernate consultant and developer
> > > > >> >> > http://machina.com.br
> > > > >> >> >
> > > > >> >> >
> > > > -
> > > > >> >> > To unsubscribe, e-mail:
> users-unsubscr...@tapestry.apache.org
> > > > >> >> > For additional commands, e-mail:
> > users-h...@tapestry.apache.org
> > > > >> >> >
> > > > >> >> >
> > > > >> >>
> > > > >> >>
> > > > >> >> --
> > > > >> >> George Christman
> > > > >> >> www.CarDaddy.com
> > > > >> >> P.O. Box 735
> > > > >> >> Johnstown, New York
> > > > >> >>
> > > > >>
> > > > >>
> > -
> > > > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > > --
> > > > > George Christman
> > > > > www.CarDaddy.com
> > > > > P.O. Box 735
> > > > > Johnstown, New York
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > George Christman
> > > > www.CarDaddy.com
> > > > P.O. Box 735
> > > > Johnstown, New York
> > > >
> > >
> > >
> > >
> > > --
> > > Dmitry Gusev
> > >
> > > AnjLab Team
> > > http://anjlab.com
> > >
> >
> >
> >
> > --
> > George Christman
> > www.CarDaddy.com
> > P.O. Box 735
> > Johnstown, New York
> >
>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>



-- 
George Christman
www

Re: Forms require that the request method be POST

2014-06-25 Thread Dmitry Gusev
It won't continue form submission, user will be redirected to the page with
empty form.


On Wed, Jun 25, 2014 at 10:31 PM, George Christman 
wrote:

> Thanks Dmitry, I'm willing to give it a shot. What outcome should I expect
> to see from your code? Will it just bring the user back to a blank form, or
> will it continue with the form submission?
>
>
> On Wed, Jun 25, 2014 at 1:56 PM, Dmitry Gusev 
> wrote:
>
> > Hi George,
> >
> > See one possible solution here:
> >
> https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795
> >
> >
> > On Wed, Jun 25, 2014 at 7:36 PM, George Christman <
> gchrist...@cardaddy.com
> > >
> > wrote:
> >
> > > So I finally figured out how to reproduce this exception. I'm using
> > > Tapestry-Security and if the session times out and the user submits the
> > > form, the page is redirected to the login page. When the user logs in,
> it
> > > attempts to resubmit the form and ends with this exception. Does
> anybody
> > > know how to handle this?
> > >
> > >
> > > On Mon, May 19, 2014 at 10:53 PM, George Christman <
> > > gchrist...@cardaddy.com>
> > > wrote:
> > >
> > > > Thanks for the tips guys, I'll see if I can find the culprit now
> that I
> > > > know why it's happening.
> > > >
> > > >
> > > > On Mon, May 19, 2014 at 5:52 PM, Eugen  wrote:
> > > >
> > > >> Hi, I have had this kind of exception then i tried to submit a form
> > > >> programmatically from an Applet (HttpClient) without sending the
> > > >> formData field.
> > > >>
> > > >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> > > >> kristian.marinko...@gmail.com>:
> > > >> > Hi,
> > > >> >
> > > >> > check if it is the same client. i once had the same problem. After
> > > >> several
> > > >> > hours of investigation it was a developer with a browser plugin
> (web
> > > >> > developer) which enabled converting form post requests to get
> > > requests.
> > > >> >
> > > >> > hope this helps.
> > > >> >
> > > >> > g,
> > > >> > Kris
> > > >> >
> > > >> >
> > > >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> > > >> > wrote:
> > > >> >
> > > >> >> Let me do some more homework now that I at least now how it's
> > thrown.
> > > >> >> Thanks Thiago.
> > > >> >>
> > > >> >>
> > > >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
> > > >> >> thiag...@gmail.com> wrote:
> > > >> >>
> > > >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > > >> >> > gchrist...@cardaddy.com> wrote:
> > > >> >> >
> > > >> >> >  In this particular case the application sits behind a firewall
> > > with
> > > >> no
> > > >> >> >> public access so I don't believe this is bot activity.  Do you
> > > have
> > > >> any
> > > >> >> >> other thoughts?
> > > >> >> >>
> > > >> >> >
> > > >> >> > Do you have any information on when this exception actually
> > > happens?
> > > >> >> > Otherwise, we can only guess. That exception usually happens
> > when a
> > > >> >> > Tapestry form URL is requested without the form fields, hence
> the
> > > bot
> > > >> >> > suspicion.
> > > >> >> >
> > > >> >> >
> > > >> >> > --
> > > >> >> > Thiago H. de Paula Figueiredo
> > > >> >> > Tapestry, Java and Hibernate consultant and developer
> > > >> >> > http://machina.com.br
> > > >> >> >
> > > >> >> >
> > > -
> > > >> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > >> >> > For additional commands, e-mail:
> users-h...@tapestry.apache.org
> > > >> >> >
> > > >> >> >
> > > >> >>
> > > >> >>
> > > >> >> --
> > > >> >> George Christman
> > > >> >> www.CarDaddy.com
> > > >> >> P.O. Box 735
> > > >> >> Johnstown, New York
> > > >> >>
> > > >>
> > > >>
> -
> > > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > George Christman
> > > > www.CarDaddy.com
> > > > P.O. Box 735
> > > > Johnstown, New York
> > > >
> > > >
> > >
> > >
> > > --
> > > George Christman
> > > www.CarDaddy.com
> > > P.O. Box 735
> > > Johnstown, New York
> > >
> >
> >
> >
> > --
> > Dmitry Gusev
> >
> > AnjLab Team
> > http://anjlab.com
> >
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Forms require that the request method be POST

2014-06-25 Thread George Christman
Thanks Dmitry, I'm willing to give it a shot. What outcome should I expect
to see from your code? Will it just bring the user back to a blank form, or
will it continue with the form submission?


On Wed, Jun 25, 2014 at 1:56 PM, Dmitry Gusev 
wrote:

> Hi George,
>
> See one possible solution here:
> https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795
>
>
> On Wed, Jun 25, 2014 at 7:36 PM, George Christman  >
> wrote:
>
> > So I finally figured out how to reproduce this exception. I'm using
> > Tapestry-Security and if the session times out and the user submits the
> > form, the page is redirected to the login page. When the user logs in, it
> > attempts to resubmit the form and ends with this exception. Does anybody
> > know how to handle this?
> >
> >
> > On Mon, May 19, 2014 at 10:53 PM, George Christman <
> > gchrist...@cardaddy.com>
> > wrote:
> >
> > > Thanks for the tips guys, I'll see if I can find the culprit now that I
> > > know why it's happening.
> > >
> > >
> > > On Mon, May 19, 2014 at 5:52 PM, Eugen  wrote:
> > >
> > >> Hi, I have had this kind of exception then i tried to submit a form
> > >> programmatically from an Applet (HttpClient) without sending the
> > >> formData field.
> > >>
> > >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> > >> kristian.marinko...@gmail.com>:
> > >> > Hi,
> > >> >
> > >> > check if it is the same client. i once had the same problem. After
> > >> several
> > >> > hours of investigation it was a developer with a browser plugin (web
> > >> > developer) which enabled converting form post requests to get
> > requests.
> > >> >
> > >> > hope this helps.
> > >> >
> > >> > g,
> > >> > Kris
> > >> >
> > >> >
> > >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> > >> > wrote:
> > >> >
> > >> >> Let me do some more homework now that I at least now how it's
> thrown.
> > >> >> Thanks Thiago.
> > >> >>
> > >> >>
> > >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
> > >> >> thiag...@gmail.com> wrote:
> > >> >>
> > >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > >> >> > gchrist...@cardaddy.com> wrote:
> > >> >> >
> > >> >> >  In this particular case the application sits behind a firewall
> > with
> > >> no
> > >> >> >> public access so I don't believe this is bot activity.  Do you
> > have
> > >> any
> > >> >> >> other thoughts?
> > >> >> >>
> > >> >> >
> > >> >> > Do you have any information on when this exception actually
> > happens?
> > >> >> > Otherwise, we can only guess. That exception usually happens
> when a
> > >> >> > Tapestry form URL is requested without the form fields, hence the
> > bot
> > >> >> > suspicion.
> > >> >> >
> > >> >> >
> > >> >> > --
> > >> >> > Thiago H. de Paula Figueiredo
> > >> >> > Tapestry, Java and Hibernate consultant and developer
> > >> >> > http://machina.com.br
> > >> >> >
> > >> >> >
> > -
> > >> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
> > >> >> >
> > >> >> >
> > >> >>
> > >> >>
> > >> >> --
> > >> >> George Christman
> > >> >> www.CarDaddy.com
> > >> >> P.O. Box 735
> > >> >> Johnstown, New York
> > >> >>
> > >>
> > >> -
> > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > George Christman
> > > www.CarDaddy.com
> > > P.O. Box 735
> > > Johnstown, New York
> > >
> > >
> >
> >
> > --
> > George Christman
> > www.CarDaddy.com
> > P.O. Box 735
> > Johnstown, New York
> >
>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Forms require that the request method be POST

2014-06-25 Thread Dmitry Gusev
Hi George,

See one possible solution here:
https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795


On Wed, Jun 25, 2014 at 7:36 PM, George Christman 
wrote:

> So I finally figured out how to reproduce this exception. I'm using
> Tapestry-Security and if the session times out and the user submits the
> form, the page is redirected to the login page. When the user logs in, it
> attempts to resubmit the form and ends with this exception. Does anybody
> know how to handle this?
>
>
> On Mon, May 19, 2014 at 10:53 PM, George Christman <
> gchrist...@cardaddy.com>
> wrote:
>
> > Thanks for the tips guys, I'll see if I can find the culprit now that I
> > know why it's happening.
> >
> >
> > On Mon, May 19, 2014 at 5:52 PM, Eugen  wrote:
> >
> >> Hi, I have had this kind of exception then i tried to submit a form
> >> programmatically from an Applet (HttpClient) without sending the
> >> formData field.
> >>
> >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> >> kristian.marinko...@gmail.com>:
> >> > Hi,
> >> >
> >> > check if it is the same client. i once had the same problem. After
> >> several
> >> > hours of investigation it was a developer with a browser plugin (web
> >> > developer) which enabled converting form post requests to get
> requests.
> >> >
> >> > hope this helps.
> >> >
> >> > g,
> >> > Kris
> >> >
> >> >
> >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> >> > wrote:
> >> >
> >> >> Let me do some more homework now that I at least now how it's thrown.
> >> >> Thanks Thiago.
> >> >>
> >> >>
> >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
> >> >> thiag...@gmail.com> wrote:
> >> >>
> >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> >> >> > gchrist...@cardaddy.com> wrote:
> >> >> >
> >> >> >  In this particular case the application sits behind a firewall
> with
> >> no
> >> >> >> public access so I don't believe this is bot activity.  Do you
> have
> >> any
> >> >> >> other thoughts?
> >> >> >>
> >> >> >
> >> >> > Do you have any information on when this exception actually
> happens?
> >> >> > Otherwise, we can only guess. That exception usually happens when a
> >> >> > Tapestry form URL is requested without the form fields, hence the
> bot
> >> >> > suspicion.
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Thiago H. de Paula Figueiredo
> >> >> > Tapestry, Java and Hibernate consultant and developer
> >> >> > http://machina.com.br
> >> >> >
> >> >> >
> -
> >> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >> --
> >> >> George Christman
> >> >> www.CarDaddy.com
> >> >> P.O. Box 735
> >> >> Johnstown, New York
> >> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > George Christman
> > www.CarDaddy.com
> > P.O. Box 735
> > Johnstown, New York
> >
> >
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Forms require that the request method be POST

2014-06-25 Thread George Christman
So I finally figured out how to reproduce this exception. I'm using
Tapestry-Security and if the session times out and the user submits the
form, the page is redirected to the login page. When the user logs in, it
attempts to resubmit the form and ends with this exception. Does anybody
know how to handle this?


On Mon, May 19, 2014 at 10:53 PM, George Christman 
wrote:

> Thanks for the tips guys, I'll see if I can find the culprit now that I
> know why it's happening.
>
>
> On Mon, May 19, 2014 at 5:52 PM, Eugen  wrote:
>
>> Hi, I have had this kind of exception then i tried to submit a form
>> programmatically from an Applet (HttpClient) without sending the
>> formData field.
>>
>> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
>> kristian.marinko...@gmail.com>:
>> > Hi,
>> >
>> > check if it is the same client. i once had the same problem. After
>> several
>> > hours of investigation it was a developer with a browser plugin (web
>> > developer) which enabled converting form post requests to get requests.
>> >
>> > hope this helps.
>> >
>> > g,
>> > Kris
>> >
>> >
>> > On Mon, May 19, 2014 at 5:55 PM, George Christman
>> > wrote:
>> >
>> >> Let me do some more homework now that I at least now how it's thrown.
>> >> Thanks Thiago.
>> >>
>> >>
>> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
>> >> thiag...@gmail.com> wrote:
>> >>
>> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
>> >> > gchrist...@cardaddy.com> wrote:
>> >> >
>> >> >  In this particular case the application sits behind a firewall with
>> no
>> >> >> public access so I don't believe this is bot activity.  Do you have
>> any
>> >> >> other thoughts?
>> >> >>
>> >> >
>> >> > Do you have any information on when this exception actually happens?
>> >> > Otherwise, we can only guess. That exception usually happens when a
>> >> > Tapestry form URL is requested without the form fields, hence the bot
>> >> > suspicion.
>> >> >
>> >> >
>> >> > --
>> >> > Thiago H. de Paula Figueiredo
>> >> > Tapestry, Java and Hibernate consultant and developer
>> >> > http://machina.com.br
>> >> >
>> >> > -
>> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> George Christman
>> >> www.CarDaddy.com
>> >> P.O. Box 735
>> >> Johnstown, New York
>> >>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>
>


-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Forms require that the request method be POST

2014-05-19 Thread George Christman
Thanks for the tips guys, I'll see if I can find the culprit now that I
know why it's happening.


On Mon, May 19, 2014 at 5:52 PM, Eugen  wrote:

> Hi, I have had this kind of exception then i tried to submit a form
> programmatically from an Applet (HttpClient) without sending the
> formData field.
>
> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> kristian.marinko...@gmail.com>:
> > Hi,
> >
> > check if it is the same client. i once had the same problem. After
> several
> > hours of investigation it was a developer with a browser plugin (web
> > developer) which enabled converting form post requests to get requests.
> >
> > hope this helps.
> >
> > g,
> > Kris
> >
> >
> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> > wrote:
> >
> >> Let me do some more homework now that I at least now how it's thrown.
> >> Thanks Thiago.
> >>
> >>
> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
> >> thiag...@gmail.com> wrote:
> >>
> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> >> > gchrist...@cardaddy.com> wrote:
> >> >
> >> >  In this particular case the application sits behind a firewall with
> no
> >> >> public access so I don't believe this is bot activity.  Do you have
> any
> >> >> other thoughts?
> >> >>
> >> >
> >> > Do you have any information on when this exception actually happens?
> >> > Otherwise, we can only guess. That exception usually happens when a
> >> > Tapestry form URL is requested without the form fields, hence the bot
> >> > suspicion.
> >> >
> >> >
> >> > --
> >> > Thiago H. de Paula Figueiredo
> >> > Tapestry, Java and Hibernate consultant and developer
> >> > http://machina.com.br
> >> >
> >> > -
> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >> >
> >> >
> >>
> >>
> >> --
> >> George Christman
> >> www.CarDaddy.com
> >> P.O. Box 735
> >> Johnstown, New York
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Forms require that the request method be POST

2014-05-19 Thread Eugen
Hi, I have had this kind of exception then i tried to submit a form
programmatically from an Applet (HttpClient) without sending the
formData field.

2014-05-19 22:31 GMT+02:00 Kristian Marinkovic :
> Hi,
>
> check if it is the same client. i once had the same problem. After several
> hours of investigation it was a developer with a browser plugin (web
> developer) which enabled converting form post requests to get requests.
>
> hope this helps.
>
> g,
> Kris
>
>
> On Mon, May 19, 2014 at 5:55 PM, George Christman
> wrote:
>
>> Let me do some more homework now that I at least now how it's thrown.
>> Thanks Thiago.
>>
>>
>> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
>> thiag...@gmail.com> wrote:
>>
>> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
>> > gchrist...@cardaddy.com> wrote:
>> >
>> >  In this particular case the application sits behind a firewall with no
>> >> public access so I don't believe this is bot activity.  Do you have any
>> >> other thoughts?
>> >>
>> >
>> > Do you have any information on when this exception actually happens?
>> > Otherwise, we can only guess. That exception usually happens when a
>> > Tapestry form URL is requested without the form fields, hence the bot
>> > suspicion.
>> >
>> >
>> > --
>> > Thiago H. de Paula Figueiredo
>> > Tapestry, Java and Hibernate consultant and developer
>> > http://machina.com.br
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> > For additional commands, e-mail: users-h...@tapestry.apache.org
>> >
>> >
>>
>>
>> --
>> George Christman
>> www.CarDaddy.com
>> P.O. Box 735
>> Johnstown, New York
>>

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



Re: Forms require that the request method be POST

2014-05-19 Thread Kristian Marinkovic
Hi,

check if it is the same client. i once had the same problem. After several
hours of investigation it was a developer with a browser plugin (web
developer) which enabled converting form post requests to get requests.

hope this helps.

g,
Kris


On Mon, May 19, 2014 at 5:55 PM, George Christman
wrote:

> Let me do some more homework now that I at least now how it's thrown.
> Thanks Thiago.
>
>
> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > gchrist...@cardaddy.com> wrote:
> >
> >  In this particular case the application sits behind a firewall with no
> >> public access so I don't believe this is bot activity.  Do you have any
> >> other thoughts?
> >>
> >
> > Do you have any information on when this exception actually happens?
> > Otherwise, we can only guess. That exception usually happens when a
> > Tapestry form URL is requested without the form fields, hence the bot
> > suspicion.
> >
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Tapestry, Java and Hibernate consultant and developer
> > http://machina.com.br
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>


Re: Forms require that the request method be POST

2014-05-19 Thread George Christman
Let me do some more homework now that I at least now how it's thrown.
Thanks Thiago.


On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> gchrist...@cardaddy.com> wrote:
>
>  In this particular case the application sits behind a firewall with no
>> public access so I don't believe this is bot activity.  Do you have any
>> other thoughts?
>>
>
> Do you have any information on when this exception actually happens?
> Otherwise, we can only guess. That exception usually happens when a
> Tapestry form URL is requested without the form fields, hence the bot
> suspicion.
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Forms require that the request method be POST

2014-05-19 Thread Thiago H de Paula Figueiredo
On Mon, 19 May 2014 11:44:06 -0300, George Christman  
 wrote:



In this particular case the application sits behind a firewall with no
public access so I don't believe this is bot activity.  Do you have any
other thoughts?


Do you have any information on when this exception actually happens?  
Otherwise, we can only guess. That exception usually happens when a  
Tapestry form URL is requested without the form fields, hence the bot  
suspicion.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: Forms require that the request method be POST

2014-05-19 Thread George Christman
In this particular case the application sits behind a firewall with no
public access so I don't believe this is bot activity.  Do you have any
other thoughts?
On May 19, 2014 10:00 AM, "Thiago H de Paula Figueiredo" 
wrote:

> On Mon, 19 May 2014 09:37:44 -0300, George Christman <
> gchrist...@cardaddy.com> wrote:
>
>  Hi Everyone, I'm using 5.4 and I've continued to randomly see this
>> exception popup in multiple applications. I'm wondering what it means and
>> how to fix it. Thanks.
>>
>
> Very probably bots crawling your site.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Forms require that the request method be POST

2014-05-19 Thread Thiago H de Paula Figueiredo
On Mon, 19 May 2014 09:37:44 -0300, George Christman  
 wrote:



Hi Everyone, I'm using 5.4 and I've continued to randomly see this
exception popup in multiple applications. I'm wondering what it means and
how to fix it. Thanks.


Very probably bots crawling your site.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: Forms require that the request method be POST and that the t:formdata query parameter have values.

2013-12-02 Thread Michael Gagauz
I'm sure there are GET requests from search bots. Make sure you exclude 
action/event links and form actions in robots.txt (like Disallow: 
/*?t:ac=*,

Disallow: */pagename.component:action*



02.12.2013 17:41, Ben Titmarsh пишет:

Hi Guys,

I'm getting quite a lot of these exceptions in my logs.  I've read all of the posts on 
the mailing list and it seems like the only accepted solution is to use request filtering 
to check for an exception with a message containing "Forms require that the request 
method be POST" and do a redirect.  Is this still our best option?

Secondly is this problem really only occurring due to browsers saving URLs to 
form submissions in their smart bars?  My site gets around 15k page views a day 
and in the last 24 hours I've had 284 of these.  Maybe that's about right, it 
just seems high to me!

Cheers,
Ben.



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



Re: Forms require that the request method be POST and that the t:formdata query parameter have values

2012-12-08 Thread Geoff Callender
See 
http://tapestry.1045711.n5.nabble.com/Safari-for-example-browser-history-and-form-exception-td4942074.html
 

On 08/12/2012, at 10:09 PM, Muhammad Gelbana wrote:

> I think this error occurs when you visit a similar url (through a GET
> request, just by putting the following address in the browser's address bar
> and hitting enter):
> 
> http://localhost/pagename.formid
> 
> This url is the "action" attribute value for the form element. It should be
> using within an http POST request, not a GET request.
> 
> Or may be your form's "method" attribute value is "get" ?!
> 
> On Sat, Dec 8, 2012 at 4:02 AM, TG  wrote:
> 
>> In 5.3.6, I got this error if I use a form based submission. How do I avoid
>> this? There was no such error prior to 5.3.6.
>> 
>> Thanks.
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Forms-require-that-the-request-method-be-POST-and-that-the-t-formdata-query-parameter-have-values-tp5718554.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: Forms require that the request method be POST and that the t:formdata query parameter have values

2012-12-08 Thread Muhammad Gelbana
I think this error occurs when you visit a similar url (through a GET
request, just by putting the following address in the browser's address bar
and hitting enter):

http://localhost/pagename.formid

This url is the "action" attribute value for the form element. It should be
using within an http POST request, not a GET request.

Or may be your form's "method" attribute value is "get" ?!

On Sat, Dec 8, 2012 at 4:02 AM, TG  wrote:

> In 5.3.6, I got this error if I use a form based submission. How do I avoid
> this? There was no such error prior to 5.3.6.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Forms-require-that-the-request-method-be-POST-and-that-the-t-formdata-query-parameter-have-values-tp5718554.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: Forms - BeanEditor and t:select

2012-06-01 Thread stipenovi
It seams that your *add="descriptionCreator" + * is
right way.
Now is everything OK.
Thank you very much for help and for fast replay.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Forms-tp2427184p5713583.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: Forms - BeanEditor and t:select

2012-06-01 Thread ICE Ernesto Arteaga Zavala
I do that in this way:

  















2012/6/1 stipenovi 

> Can anyone help me:
>
> I have 2 entities: Description and Person with  unidirectional ManyToOne
> mapped relationship.
> Every description must have descriptionCreator (Person).
>
> I have this code in tml:
>
>
>
> I injected SelectModelFactory, and have SelectModel as @Property in page
> class. I also created PersonValueEncoder in separate class, added it in
> appModule...
> I setupRender i setup my selectModel with
> SelectModelFactory.create(personsList, "name") and checked with
> getOptions().size() that I have 3 options (I inserted 3 Persons in
> database).
>
> When call this form, it doesnt show select component, nor label, and there
> is no exceptions. So, everything is rendered OK, except that there is no
> select component for choosing Person for Description.
>
> Thanks
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Forms-tp2427184p5713581.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
>
>


-- 
Saludos,

---
"Nada que se consiga sin pena y sin trabajo
 es verdaderamente valioso."
  Joseph Addison
---

ICE Ernesto Arteaga Zavala
Ingeniero de Desarrollo


Re: Forms - BeanEditor and t:select

2012-06-01 Thread stipenovi
Can anyone help me:

I have 2 entities: Description and Person with  unidirectional ManyToOne
mapped relationship.
Every description must have descriptionCreator (Person).

I have this code in tml:



I injected SelectModelFactory, and have SelectModel as @Property in page
class. I also created PersonValueEncoder in separate class, added it in
appModule... 
I setupRender i setup my selectModel with
SelectModelFactory.create(personsList, "name") and checked with
getOptions().size() that I have 3 options (I inserted 3 Persons in
database).

When call this form, it doesnt show select component, nor label, and there
is no exceptions. So, everything is rendered OK, except that there is no
select component for choosing Person for Description.

Thanks

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Forms-tp2427184p5713581.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: Forms and JavaScriptSupport

2012-05-18 Thread Juan Alba
That was all with my problem. Thanks Taha for all the help.

If somebody wants the code:

*Class:*
 Object onSuccess(){
   ...

 if (request.isXHR()) {
ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
@Override
public void run(JavaScriptSupport arg0) {
arg0.addScript(String.format("parent.location.reload()"));
}
});
}
 return formZone.getBody();
}

*TML:*






   


Now when it goes through onSuccess it will close the modal with the
parent.location.reload() and refresh the parent.

Regards.

P.S. My problem now is to show onValidate(). the zone is not updating.
Still searching.


On Thu, May 17, 2012 at 9:12 PM, Taha Siddiqi wrote:

> In that case you can use ajaxResponseRenderer for closing the colorbox on
> form submission and then redirect the main window in the close event of
> colorbox(using js or ajax).
>
>
> On May 18, 2012, at 12:27 AM, Juan Alba wrote:
>
> > I *need* to redirect.
> >
> > The idea is the following:
> > My page has a button to add xxx. Whe I click this, it opens the modal
> with
> > the form.
> > When I fill in the form and submit, it is redirecting to the page but in
> > the modal, I need to close the modal and redirect the "main" page.
> >
> > I am clear or is really confusing?
> >
> > Thanks!
> >
> > On Thu, May 17, 2012 at 3:51 PM, Taha Hafeez Siddiqi <
> > tawus.tapes...@gmail.com> wrote:
> >
> >> If you redirecting , no JavaScript will run.
> >>
> >> If you want colorbox to close and you stay on the same page don't
> >> redirect. If you want to redirect then why to close the colorbox.
> >>
> >> Sent from my iPhone
> >>
> >> On May 18, 2012, at 12:09 AM, Juan Alba 
> >> wrote:
> >>
> >>> Taha, thanks Again but still can't make it work.
> >>>
> >>> I have this now:
> >>> *tml:*
> >>>
> >>> 
> >>> 
> >>> 
> >>> ${message:name}
> >>> 
> >>> 
> >>> 
> >>> 
> >>>
> >>>
> >>> in the *class*
> >>>
> >>> Object onSuccess(){
> >>>
> >>>  if (request.isXHR()) {
> >>>ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> >>>@Override
> >>> public void run(JavaScriptSupport arg0) {
> >>>arg0.addScript("alert('a');");
> >>> }
> >>>});
> >>>  }
> >>> return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
> >>> }
> >>>
> >>>
> >>> But theres is no alert. The pageRenderLinkSource is redirecting fine, I
> >>> have no problems there, but is never getting to the "alert ('a')".
> >>> Debbuging I found out that it gets in the if, but is never reaching to
> >> the
> >>> arg0.addScript.
> >>>
> >>> Any idea?
> >>>
> >>> Regards and thanks in advance for your time and help!
> >>>
> >>>
> >>> On Thu, May 17, 2012 at 3:12 PM, Taha Siddiqi <
> tawus.tapes...@gmail.com
> >>> wrote:
> >>>
>  It has to be an ajax request for ajaxResponseRenderer to work.
> 
>  Also, for an ajax request if you want to redirect return an instance
> of
>  Link from the event handler.
> 
>  return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
> 
>  regards
>  Taha
> 
>  On May 17, 2012, at 11:25 PM, Juan Alba wrote:
> 
> > Taha, thanks a lot for your help but I am not sure if I am doing it
>  right.
> >
> > I added this as you told me:
> >
> > @Inject
> > private AjaxResponseRenderer ajaxResponseRenderer;
> >
> > Object onSuccess(){
> >  ...
> >   ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> > @Override
> > public void run(JavaScriptSupport arg0) {
> > arg0.addScript("jQuery.colorbox.close();");
> > }
> > });
> >   return ShowRoutePlan.class;
> >  }
> >
> > But now the error that I am having is:
> > Processing of request failed with uncaught exception: Page must be
> > specified before initializing for partial page render.
> >
> >
> > Regards!
> >
> >
> > On Thu, May 17, 2012 at 2:36 PM, Taha Siddiqi <
> >> tawus.tapes...@gmail.com
> > wrote:
> >
> >> Hi
> >>
> >> You can't use JavaScriptSupport directly from environment in action
>  phase
> >> but you can do this
> >>
> >> @Inject
> >> private AjaxResponseRenderer ajaxResponseRenderer;
> >>
> >> Object onSuccess(){
> >> ...
> >> ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> >> @Override
> >> public void run(JavaScriptSupport javaScriptSupport) {
> >> do_whatever_you_want_to_do_with_javaScriptSupport();
> >> }
> >> });
> >>
> >>
> >> }
> >>
> >>
> >> regards
> >> Taha
> >>
> >> On May 17, 2012, at 10:56 PM, Juan Alba wrote:
> >>
> >>> Hi,
> >>>
> >>> I am working with modals in my application, for this I have done my
> >> own
> >>> mixin that uses *colorbox* for the modal.
> >>>
> >>> My problem, right now is that I have a form in one of those modals
> >> that
> >> has
> >>> to red

Re: Forms and JavaScriptSupport

2012-05-17 Thread Taha Siddiqi
In that case you can use ajaxResponseRenderer for closing the colorbox on form 
submission and then redirect the main window in the close event of 
colorbox(using js or ajax).


On May 18, 2012, at 12:27 AM, Juan Alba wrote:

> I *need* to redirect.
> 
> The idea is the following:
> My page has a button to add xxx. Whe I click this, it opens the modal with
> the form.
> When I fill in the form and submit, it is redirecting to the page but in
> the modal, I need to close the modal and redirect the "main" page.
> 
> I am clear or is really confusing?
> 
> Thanks!
> 
> On Thu, May 17, 2012 at 3:51 PM, Taha Hafeez Siddiqi <
> tawus.tapes...@gmail.com> wrote:
> 
>> If you redirecting , no JavaScript will run.
>> 
>> If you want colorbox to close and you stay on the same page don't
>> redirect. If you want to redirect then why to close the colorbox.
>> 
>> Sent from my iPhone
>> 
>> On May 18, 2012, at 12:09 AM, Juan Alba 
>> wrote:
>> 
>>> Taha, thanks Again but still can't make it work.
>>> 
>>> I have this now:
>>> *tml:*
>>> 
>>> 
>>> 
>>> 
>>> ${message:name}
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> in the *class*
>>> 
>>> Object onSuccess(){
>>> 
>>>  if (request.isXHR()) {
>>>ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>>>@Override
>>> public void run(JavaScriptSupport arg0) {
>>>arg0.addScript("alert('a');");
>>> }
>>>});
>>>  }
>>> return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
>>> }
>>> 
>>> 
>>> But theres is no alert. The pageRenderLinkSource is redirecting fine, I
>>> have no problems there, but is never getting to the "alert ('a')".
>>> Debbuging I found out that it gets in the if, but is never reaching to
>> the
>>> arg0.addScript.
>>> 
>>> Any idea?
>>> 
>>> Regards and thanks in advance for your time and help!
>>> 
>>> 
>>> On Thu, May 17, 2012 at 3:12 PM, Taha Siddiqi >> wrote:
>>> 
 It has to be an ajax request for ajaxResponseRenderer to work.
 
 Also, for an ajax request if you want to redirect return an instance of
 Link from the event handler.
 
 return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
 
 regards
 Taha
 
 On May 17, 2012, at 11:25 PM, Juan Alba wrote:
 
> Taha, thanks a lot for your help but I am not sure if I am doing it
 right.
> 
> I added this as you told me:
> 
> @Inject
> private AjaxResponseRenderer ajaxResponseRenderer;
> 
> Object onSuccess(){
>  ...
>   ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> @Override
> public void run(JavaScriptSupport arg0) {
> arg0.addScript("jQuery.colorbox.close();");
> }
> });
>   return ShowRoutePlan.class;
>  }
> 
> But now the error that I am having is:
> Processing of request failed with uncaught exception: Page must be
> specified before initializing for partial page render.
> 
> 
> Regards!
> 
> 
> On Thu, May 17, 2012 at 2:36 PM, Taha Siddiqi <
>> tawus.tapes...@gmail.com
> wrote:
> 
>> Hi
>> 
>> You can't use JavaScriptSupport directly from environment in action
 phase
>> but you can do this
>> 
>> @Inject
>> private AjaxResponseRenderer ajaxResponseRenderer;
>> 
>> Object onSuccess(){
>> ...
>> ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>> @Override
>> public void run(JavaScriptSupport javaScriptSupport) {
>> do_whatever_you_want_to_do_with_javaScriptSupport();
>> }
>> });
>> 
>> 
>> }
>> 
>> 
>> regards
>> Taha
>> 
>> On May 17, 2012, at 10:56 PM, Juan Alba wrote:
>> 
>>> Hi,
>>> 
>>> I am working with modals in my application, for this I have done my
>> own
>>> mixin that uses *colorbox* for the modal.
>>> 
>>> My problem, right now is that I have a form in one of those modals
>> that
>> has
>>> to redirect when is submited.
>>> I have two methods in the class:
>>> 
>>> @Inject
>>> private JavaScriptSupport javaScriptSupport;
>>> 
>>> void onValidateFromAddRouteForm() throws ValidationException{
>>>all the validations...
>>> }
>>> 
>>> Object onSuccess(){
>>> //Adding the script to close the modal and forwarding the
>> "parent
>>> iframe".
>>>  javaScriptSupport.addScript("jQuery.colorbox.close();");
>>> return ShowRoutePlan.class;
>>> }
>>> 
>>> When I get to the succes and want to close with the modal iframe I
>> have
>>> this run time error:
>>> No object of type
>>> org.apache.tapestry5.services.javascript.JavaScriptSupport is
>> available
>>> from the Environment.
>>> 
>>> I have read something about not being able to add javascriptSupport
>> on
>>> render methods or something like that, but I am not sure if this is
 just
>>> one of those cases where I 

Re: Forms and JavaScriptSupport

2012-05-17 Thread Juan Alba
I *need* to redirect.

The idea is the following:
My page has a button to add xxx. Whe I click this, it opens the modal with
the form.
When I fill in the form and submit, it is redirecting to the page but in
the modal, I need to close the modal and redirect the "main" page.

I am clear or is really confusing?

Thanks!

On Thu, May 17, 2012 at 3:51 PM, Taha Hafeez Siddiqi <
tawus.tapes...@gmail.com> wrote:

> If you redirecting , no JavaScript will run.
>
> If you want colorbox to close and you stay on the same page don't
> redirect. If you want to redirect then why to close the colorbox.
>
> Sent from my iPhone
>
> On May 18, 2012, at 12:09 AM, Juan Alba 
> wrote:
>
> > Taha, thanks Again but still can't make it work.
> >
> > I have this now:
> > *tml:*
> >
> > 
> > 
> > 
> > ${message:name}
> > 
> > 
> > 
> > 
> >
> >
> > in the *class*
> >
> > Object onSuccess(){
> >
> >   if (request.isXHR()) {
> > ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> > @Override
> >  public void run(JavaScriptSupport arg0) {
> > arg0.addScript("alert('a');");
> >  }
> > });
> >   }
> > return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
> > }
> >
> >
> > But theres is no alert. The pageRenderLinkSource is redirecting fine, I
> > have no problems there, but is never getting to the "alert ('a')".
> > Debbuging I found out that it gets in the if, but is never reaching to
> the
> > arg0.addScript.
> >
> > Any idea?
> >
> > Regards and thanks in advance for your time and help!
> >
> >
> > On Thu, May 17, 2012 at 3:12 PM, Taha Siddiqi  >wrote:
> >
> >> It has to be an ajax request for ajaxResponseRenderer to work.
> >>
> >> Also, for an ajax request if you want to redirect return an instance of
> >> Link from the event handler.
> >>
> >> return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
> >>
> >> regards
> >> Taha
> >>
> >> On May 17, 2012, at 11:25 PM, Juan Alba wrote:
> >>
> >>> Taha, thanks a lot for your help but I am not sure if I am doing it
> >> right.
> >>>
> >>> I added this as you told me:
> >>>
> >>> @Inject
> >>> private AjaxResponseRenderer ajaxResponseRenderer;
> >>>
> >>> Object onSuccess(){
> >>>   ...
> >>>ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> >>> @Override
> >>> public void run(JavaScriptSupport arg0) {
> >>> arg0.addScript("jQuery.colorbox.close();");
> >>> }
> >>> });
> >>>return ShowRoutePlan.class;
> >>>   }
> >>>
> >>> But now the error that I am having is:
> >>> Processing of request failed with uncaught exception: Page must be
> >>> specified before initializing for partial page render.
> >>>
> >>>
> >>> Regards!
> >>>
> >>>
> >>> On Thu, May 17, 2012 at 2:36 PM, Taha Siddiqi <
> tawus.tapes...@gmail.com
> >>> wrote:
> >>>
>  Hi
> 
>  You can't use JavaScriptSupport directly from environment in action
> >> phase
>  but you can do this
> 
>  @Inject
>  private AjaxResponseRenderer ajaxResponseRenderer;
> 
>  Object onSuccess(){
>  ...
>  ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>   @Override
>   public void run(JavaScriptSupport javaScriptSupport) {
>   do_whatever_you_want_to_do_with_javaScriptSupport();
>   }
>   });
> 
> 
>  }
> 
> 
>  regards
>  Taha
> 
>  On May 17, 2012, at 10:56 PM, Juan Alba wrote:
> 
> > Hi,
> >
> > I am working with modals in my application, for this I have done my
> own
> > mixin that uses *colorbox* for the modal.
> >
> > My problem, right now is that I have a form in one of those modals
> that
>  has
> > to redirect when is submited.
> > I have two methods in the class:
> >
> > @Inject
> > private JavaScriptSupport javaScriptSupport;
> >
> >  void onValidateFromAddRouteForm() throws ValidationException{
> > all the validations...
> >  }
> >
> >  Object onSuccess(){
> >  //Adding the script to close the modal and forwarding the
> "parent
> > iframe".
> >   javaScriptSupport.addScript("jQuery.colorbox.close();");
> >  return ShowRoutePlan.class;
> >  }
> >
> > When I get to the succes and want to close with the modal iframe I
> have
> > this run time error:
> > No object of type
> > org.apache.tapestry5.services.javascript.JavaScriptSupport is
> available
> > from the Environment.
> >
> > I have read something about not being able to add javascriptSupport
> on
> > render methods or something like that, but I am not sure if this is
> >> just
> > one of those cases where I just can't use javascriptSupport.
> > If it is, how can I add the javascript function for closing the page?
> >> Or
>  to
> > redirect the parent instead of the iframe.
> >
> >
> > Cheers and Thanks in advance!
> 
> 
>  -

Re: Forms and JavaScriptSupport

2012-05-17 Thread Taha Hafeez Siddiqi
If you redirecting , no JavaScript will run. 

If you want colorbox to close and you stay on the same page don't redirect. If 
you want to redirect then why to close the colorbox. 

Sent from my iPhone

On May 18, 2012, at 12:09 AM, Juan Alba  wrote:

> Taha, thanks Again but still can't make it work.
> 
> I have this now:
> *tml:*
> 
> 
> 
> 
> ${message:name}
> 
> 
> 
> 
> 
> 
> in the *class*
> 
> Object onSuccess(){
> 
>   if (request.isXHR()) {
> ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> @Override
>  public void run(JavaScriptSupport arg0) {
> arg0.addScript("alert('a');");
>  }
> });
>   }
> return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
> }
> 
> 
> But theres is no alert. The pageRenderLinkSource is redirecting fine, I
> have no problems there, but is never getting to the "alert ('a')".
> Debbuging I found out that it gets in the if, but is never reaching to the
> arg0.addScript.
> 
> Any idea?
> 
> Regards and thanks in advance for your time and help!
> 
> 
> On Thu, May 17, 2012 at 3:12 PM, Taha Siddiqi wrote:
> 
>> It has to be an ajax request for ajaxResponseRenderer to work.
>> 
>> Also, for an ajax request if you want to redirect return an instance of
>> Link from the event handler.
>> 
>> return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
>> 
>> regards
>> Taha
>> 
>> On May 17, 2012, at 11:25 PM, Juan Alba wrote:
>> 
>>> Taha, thanks a lot for your help but I am not sure if I am doing it
>> right.
>>> 
>>> I added this as you told me:
>>> 
>>> @Inject
>>> private AjaxResponseRenderer ajaxResponseRenderer;
>>> 
>>> Object onSuccess(){
>>>   ...
>>>ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>>> @Override
>>> public void run(JavaScriptSupport arg0) {
>>> arg0.addScript("jQuery.colorbox.close();");
>>> }
>>> });
>>>return ShowRoutePlan.class;
>>>   }
>>> 
>>> But now the error that I am having is:
>>> Processing of request failed with uncaught exception: Page must be
>>> specified before initializing for partial page render.
>>> 
>>> 
>>> Regards!
>>> 
>>> 
>>> On Thu, May 17, 2012 at 2:36 PM, Taha Siddiqi >> wrote:
>>> 
 Hi
 
 You can't use JavaScriptSupport directly from environment in action
>> phase
 but you can do this
 
 @Inject
 private AjaxResponseRenderer ajaxResponseRenderer;
 
 Object onSuccess(){
 ...
 ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
  @Override
  public void run(JavaScriptSupport javaScriptSupport) {
  do_whatever_you_want_to_do_with_javaScriptSupport();
  }
  });
 
 
 }
 
 
 regards
 Taha
 
 On May 17, 2012, at 10:56 PM, Juan Alba wrote:
 
> Hi,
> 
> I am working with modals in my application, for this I have done my own
> mixin that uses *colorbox* for the modal.
> 
> My problem, right now is that I have a form in one of those modals that
 has
> to redirect when is submited.
> I have two methods in the class:
> 
> @Inject
> private JavaScriptSupport javaScriptSupport;
> 
>  void onValidateFromAddRouteForm() throws ValidationException{
> all the validations...
>  }
> 
>  Object onSuccess(){
>  //Adding the script to close the modal and forwarding the "parent
> iframe".
>   javaScriptSupport.addScript("jQuery.colorbox.close();");
>  return ShowRoutePlan.class;
>  }
> 
> When I get to the succes and want to close with the modal iframe I have
> this run time error:
> No object of type
> org.apache.tapestry5.services.javascript.JavaScriptSupport is available
> from the Environment.
> 
> I have read something about not being able to add javascriptSupport on
> render methods or something like that, but I am not sure if this is
>> just
> one of those cases where I just can't use javascriptSupport.
> If it is, how can I add the javascript function for closing the page?
>> Or
 to
> redirect the parent instead of the iframe.
> 
> 
> Cheers and Thanks in advance!
 
 
 -
 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
>> 
>> 

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



Re: Forms and JavaScriptSupport

2012-05-17 Thread Juan Alba
Taha, thanks Again but still can't make it work.

I have this now:
*tml:*




 ${message:name}






in the *class*

Object onSuccess(){

   if (request.isXHR()) {
 ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
 @Override
  public void run(JavaScriptSupport arg0) {
 arg0.addScript("alert('a');");
  }
 });
   }
 return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
}


But theres is no alert. The pageRenderLinkSource is redirecting fine, I
have no problems there, but is never getting to the "alert ('a')".
Debbuging I found out that it gets in the if, but is never reaching to the
arg0.addScript.

Any idea?

Regards and thanks in advance for your time and help!


On Thu, May 17, 2012 at 3:12 PM, Taha Siddiqi wrote:

> It has to be an ajax request for ajaxResponseRenderer to work.
>
> Also, for an ajax request if you want to redirect return an instance of
> Link from the event handler.
>
> return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);
>
> regards
> Taha
>
> On May 17, 2012, at 11:25 PM, Juan Alba wrote:
>
> > Taha, thanks a lot for your help but I am not sure if I am doing it
> right.
> >
> > I added this as you told me:
> >
> > @Inject
> > private AjaxResponseRenderer ajaxResponseRenderer;
> >
> > Object onSuccess(){
> >...
> > ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> > @Override
> > public void run(JavaScriptSupport arg0) {
> > arg0.addScript("jQuery.colorbox.close();");
> > }
> > });
> > return ShowRoutePlan.class;
> >}
> >
> > But now the error that I am having is:
> > Processing of request failed with uncaught exception: Page must be
> > specified before initializing for partial page render.
> >
> >
> > Regards!
> >
> >
> > On Thu, May 17, 2012 at 2:36 PM, Taha Siddiqi  >wrote:
> >
> >> Hi
> >>
> >> You can't use JavaScriptSupport directly from environment in action
> phase
> >> but you can do this
> >>
> >> @Inject
> >> private AjaxResponseRenderer ajaxResponseRenderer;
> >>
> >> Object onSuccess(){
> >> ...
> >>  ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> >>   @Override
> >>   public void run(JavaScriptSupport javaScriptSupport) {
> >>   do_whatever_you_want_to_do_with_javaScriptSupport();
> >>   }
> >>   });
> >>
> >>
> >> }
> >>
> >>
> >> regards
> >> Taha
> >>
> >> On May 17, 2012, at 10:56 PM, Juan Alba wrote:
> >>
> >>> Hi,
> >>>
> >>> I am working with modals in my application, for this I have done my own
> >>> mixin that uses *colorbox* for the modal.
> >>>
> >>> My problem, right now is that I have a form in one of those modals that
> >> has
> >>> to redirect when is submited.
> >>> I have two methods in the class:
> >>>
> >>> @Inject
> >>>  private JavaScriptSupport javaScriptSupport;
> >>>
> >>>   void onValidateFromAddRouteForm() throws ValidationException{
> >>>  all the validations...
> >>>   }
> >>>
> >>>   Object onSuccess(){
> >>>   //Adding the script to close the modal and forwarding the "parent
> >>> iframe".
> >>>javaScriptSupport.addScript("jQuery.colorbox.close();");
> >>>   return ShowRoutePlan.class;
> >>>   }
> >>>
> >>> When I get to the succes and want to close with the modal iframe I have
> >>> this run time error:
> >>> No object of type
> >>> org.apache.tapestry5.services.javascript.JavaScriptSupport is available
> >>> from the Environment.
> >>>
> >>> I have read something about not being able to add javascriptSupport on
> >>> render methods or something like that, but I am not sure if this is
> just
> >>> one of those cases where I just can't use javascriptSupport.
> >>> If it is, how can I add the javascript function for closing the page?
> Or
> >> to
> >>> redirect the parent instead of the iframe.
> >>>
> >>>
> >>> Cheers and Thanks in advance!
> >>
> >>
> >> -
> >> 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: Forms and JavaScriptSupport

2012-05-17 Thread Taha Siddiqi
It has to be an ajax request for ajaxResponseRenderer to work. 

Also, for an ajax request if you want to redirect return an instance of Link 
from the event handler.

return pageRenderLinkSource.createPageRenderLink(ShowRoutePlan.class);

regards
Taha

On May 17, 2012, at 11:25 PM, Juan Alba wrote:

> Taha, thanks a lot for your help but I am not sure if I am doing it right.
> 
> I added this as you told me:
> 
> @Inject
> private AjaxResponseRenderer ajaxResponseRenderer;
> 
> Object onSuccess(){
>...
> ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
> @Override
> public void run(JavaScriptSupport arg0) {
> arg0.addScript("jQuery.colorbox.close();");
> }
> });
> return ShowRoutePlan.class;
>}
> 
> But now the error that I am having is:
> Processing of request failed with uncaught exception: Page must be
> specified before initializing for partial page render.
> 
> 
> Regards!
> 
> 
> On Thu, May 17, 2012 at 2:36 PM, Taha Siddiqi wrote:
> 
>> Hi
>> 
>> You can't use JavaScriptSupport directly from environment in action phase
>> but you can do this
>> 
>> @Inject
>> private AjaxResponseRenderer ajaxResponseRenderer;
>> 
>> Object onSuccess(){
>> ...
>>  ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>>   @Override
>>   public void run(JavaScriptSupport javaScriptSupport) {
>>   do_whatever_you_want_to_do_with_javaScriptSupport();
>>   }
>>   });
>> 
>> 
>> }
>> 
>> 
>> regards
>> Taha
>> 
>> On May 17, 2012, at 10:56 PM, Juan Alba wrote:
>> 
>>> Hi,
>>> 
>>> I am working with modals in my application, for this I have done my own
>>> mixin that uses *colorbox* for the modal.
>>> 
>>> My problem, right now is that I have a form in one of those modals that
>> has
>>> to redirect when is submited.
>>> I have two methods in the class:
>>> 
>>> @Inject
>>>  private JavaScriptSupport javaScriptSupport;
>>> 
>>>   void onValidateFromAddRouteForm() throws ValidationException{
>>>  all the validations...
>>>   }
>>> 
>>>   Object onSuccess(){
>>>   //Adding the script to close the modal and forwarding the "parent
>>> iframe".
>>>javaScriptSupport.addScript("jQuery.colorbox.close();");
>>>   return ShowRoutePlan.class;
>>>   }
>>> 
>>> When I get to the succes and want to close with the modal iframe I have
>>> this run time error:
>>> No object of type
>>> org.apache.tapestry5.services.javascript.JavaScriptSupport is available
>>> from the Environment.
>>> 
>>> I have read something about not being able to add javascriptSupport on
>>> render methods or something like that, but I am not sure if this is just
>>> one of those cases where I just can't use javascriptSupport.
>>> If it is, how can I add the javascript function for closing the page? Or
>> to
>>> redirect the parent instead of the iframe.
>>> 
>>> 
>>> Cheers and Thanks in advance!
>> 
>> 
>> -
>> 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: Forms and JavaScriptSupport

2012-05-17 Thread Juan Alba
Taha, thanks a lot for your help but I am not sure if I am doing it right.

I added this as you told me:

 @Inject
 private AjaxResponseRenderer ajaxResponseRenderer;

Object onSuccess(){
...
 ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
@Override
public void run(JavaScriptSupport arg0) {
arg0.addScript("jQuery.colorbox.close();");
}
});
 return ShowRoutePlan.class;
}

But now the error that I am having is:
Processing of request failed with uncaught exception: Page must be
specified before initializing for partial page render.


Regards!


On Thu, May 17, 2012 at 2:36 PM, Taha Siddiqi wrote:

> Hi
>
> You can't use JavaScriptSupport directly from environment in action phase
> but you can do this
>
> @Inject
> private AjaxResponseRenderer ajaxResponseRenderer;
>
> Object onSuccess(){
> ...
>   ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>@Override
>public void run(JavaScriptSupport javaScriptSupport) {
>do_whatever_you_want_to_do_with_javaScriptSupport();
>}
>});
>
>
> }
>
>
> regards
> Taha
>
> On May 17, 2012, at 10:56 PM, Juan Alba wrote:
>
> > Hi,
> >
> > I am working with modals in my application, for this I have done my own
> > mixin that uses *colorbox* for the modal.
> >
> > My problem, right now is that I have a form in one of those modals that
> has
> > to redirect when is submited.
> > I have two methods in the class:
> >
> >  @Inject
> >   private JavaScriptSupport javaScriptSupport;
> >
> >void onValidateFromAddRouteForm() throws ValidationException{
> >   all the validations...
> >}
> >
> >Object onSuccess(){
> >//Adding the script to close the modal and forwarding the "parent
> > iframe".
> > javaScriptSupport.addScript("jQuery.colorbox.close();");
> >return ShowRoutePlan.class;
> >}
> >
> > When I get to the succes and want to close with the modal iframe I have
> > this run time error:
> > No object of type
> > org.apache.tapestry5.services.javascript.JavaScriptSupport is available
> > from the Environment.
> >
> > I have read something about not being able to add javascriptSupport on
> > render methods or something like that, but I am not sure if this is just
> > one of those cases where I just can't use javascriptSupport.
> > If it is, how can I add the javascript function for closing the page? Or
> to
> > redirect the parent instead of the iframe.
> >
> >
> > Cheers and Thanks in advance!
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Forms and JavaScriptSupport

2012-05-17 Thread Taha Siddiqi
Hi

You can't use JavaScriptSupport directly from environment in action phase but 
you can do this

@Inject
private AjaxResponseRenderer ajaxResponseRenderer;

Object onSuccess(){
...
   ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
@Override
public void run(JavaScriptSupport javaScriptSupport) {
do_whatever_you_want_to_do_with_javaScriptSupport();
}
});


}


regards
Taha

On May 17, 2012, at 10:56 PM, Juan Alba wrote:

> Hi,
> 
> I am working with modals in my application, for this I have done my own
> mixin that uses *colorbox* for the modal.
> 
> My problem, right now is that I have a form in one of those modals that has
> to redirect when is submited.
> I have two methods in the class:
> 
>  @Inject
>   private JavaScriptSupport javaScriptSupport;
> 
>void onValidateFromAddRouteForm() throws ValidationException{
>   all the validations...
>}
> 
>Object onSuccess(){
>//Adding the script to close the modal and forwarding the "parent
> iframe".
> javaScriptSupport.addScript("jQuery.colorbox.close();");
>return ShowRoutePlan.class;
>}
> 
> When I get to the succes and want to close with the modal iframe I have
> this run time error:
> No object of type
> org.apache.tapestry5.services.javascript.JavaScriptSupport is available
> from the Environment.
> 
> I have read something about not being able to add javascriptSupport on
> render methods or something like that, but I am not sure if this is just
> one of those cases where I just can't use javascriptSupport.
> If it is, how can I add the javascript function for closing the page? Or to
> redirect the parent instead of the iframe.
> 
> 
> Cheers and Thanks in advance!


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



Re: Forms require that the request method be POST....

2012-03-21 Thread David Canteros
Ok, I will try it in my code.
Thanks Lenny!
--
David Germán Canteros


2012/3/20 Lenny Primak 

> I am the author of that fix and it definitely works correctly.
> It strips out the form from the request and redirects it to the page that
> the
> client was actually looking for.
>
> On Mar 20, 2012, at 9:04 AM, David Canteros wrote:
>
> > Hi guys!
> > Lately I detected a lot of this exception in the logs of my tap
> > applications... It said:
> >
> > *org.apache.tapestry5.ioc.internal.OperationException: Forms require that
> > the request method be POST and that the t:formdata query parameter have
> > values. [at context:courses/ManageCoursesPage.tml, line 8]*
> >
> > The .tml
> >
> >...
> >   
> >
> > This happens often, but not all the time... I didn't found external
> causes,
> > so i believe that are related with tapestry... I was looking for fix in
> the
> > mailing list, but only found some tricks...
> > For example
> >
> http://tapestry.1045711.n5.nabble.com/Safari-for-example-browser-history-and-form-exception-td4942074.html
> ,
> >
> > In this case, it decorates the RequestExceptionHandler and checks if the
> > exception contains the string "*Forms require that the request..*.", if
> > true then throws some kind on redirect... Can anybody say if this fix is
> > correct?? Otherwise, can anybody suggest other more clear fix, or provide
> > some context to understand the exception?
> >
> > Thanks in advance!
> > David
> >
> >
> > --
> > David Germán Canteros
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Forms require that the request method be POST....

2012-03-20 Thread Lenny Primak
I am the author of that fix and it definitely works correctly.
It strips out the form from the request and redirects it to the page that the
client was actually looking for.

On Mar 20, 2012, at 9:04 AM, David Canteros wrote:

> Hi guys!
> Lately I detected a lot of this exception in the logs of my tap
> applications... It said:
> 
> *org.apache.tapestry5.ioc.internal.OperationException: Forms require that
> the request method be POST and that the t:formdata query parameter have
> values. [at context:courses/ManageCoursesPage.tml, line 8]*
> 
> The .tml
>
>...
>   
> 
> This happens often, but not all the time... I didn't found external causes,
> so i believe that are related with tapestry... I was looking for fix in the
> mailing list, but only found some tricks...
> For example
> http://tapestry.1045711.n5.nabble.com/Safari-for-example-browser-history-and-form-exception-td4942074.html,
> 
> In this case, it decorates the RequestExceptionHandler and checks if the
> exception contains the string "*Forms require that the request..*.", if
> true then throws some kind on redirect... Can anybody say if this fix is
> correct?? Otherwise, can anybody suggest other more clear fix, or provide
> some context to understand the exception?
> 
> Thanks in advance!
> David
> 
> 
> --
> David Germán Canteros


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



Re: Forms require that the request method be POST....

2012-03-20 Thread David Canteros
 I forgot to say that I'm using tapestry 5.3.2 running on tomcat 6, and the
exceptions happens which users who use Firefox 3...

--
David Germán Canteros


2012/3/20 David Canteros 

> Hi guys!
> Lately I detected a lot of this exception in the logs of my tap
> applications... It said:
>
> *org.apache.tapestry5.ioc.internal.OperationException: Forms require that
> the request method be POST and that the t:formdata query parameter have
> values. [at context:courses/ManageCoursesPage.tml, line 8]*
>
> The .tml
> 
> ...
>
>
> This happens often, but not all the time... I didn't found external
> causes, so i believe that are related with tapestry... I was looking for
> fix in the mailing list, but only found some tricks...
> For example
> http://tapestry.1045711.n5.nabble.com/Safari-for-example-browser-history-and-form-exception-td4942074.html,
>
> In this case, it decorates the RequestExceptionHandler and checks if the
> exception contains the string "*Forms require that the request..*.", if
> true then throws some kind on redirect... Can anybody say if this fix is
> correct?? Otherwise, can anybody suggest other more clear fix, or provide
> some context to understand the exception?
>
> Thanks in advance!
> David
>
>
> --
> David Germán Canteros
>


Re: Forms plus none tapestry fields

2012-03-06 Thread Gunnar Eketrapp
Thanks for the tip!

That component looks awsame and I made a test and compare it with Erich
Hynd's multiselect which also is god.

I ran into some javascript issues in my minimal test page that I will try
to solve this evening.
It was some god old conflict between prototype / jquery but I think.
I'll get back with more info if I don't solve it.
I dont use tapestry-jquery but perhaps i should ... what does it do?
Now I just include jquery js files in my layout template.

A general question regarding js @Import ...

If using @Import how is dependencies and js include ordering handled.

I.e. AutoComplete imports tokeinput js which depends on jquery js.

  @SupportsInformalParameters
  @Import(library = "jquery.tokeninput.js", stylesheet = "token-input.css")
  public class AutoComplete extends AbstractField {
  ...

/Gunnar

-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Forms plus none tapestry fields

2012-03-05 Thread Lance Java
Taha has done a blogpost on a component that sounds like what you are
looking for.

In this blogpost (
http://tawus.wordpress.com/2011/12/28/multivalue-autocomplete-for-tapestry)
he creates a component based on this library
http://loopj.com/jquery-tokeninput/

Cheers,
Lance.

On Saturday, 3 March 2012, Thiago H. de Paula Figueiredo 
wrote:
> On Sat, 03 Mar 2012 12:32:00 -0300, Gunnar Eketrapp <
gunnar.eketr...@gmail.com> wrote:
>
>> Hi!
>
> Hi, Gunnar!
>
>> Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not
>> find a coercion from type java.lang.String to type
>> utskicket.model.entity.MemberList.
>
> I guess the problem itself is that you're putting a Loop inside a Form
without setting Loop's parameter formState to none. Another solution, maybe
closer to solving your problem, is to provide a ValueEncoder for your
MemberList class.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Forms plus none tapestry fields

2012-03-03 Thread Thiago H. de Paula Figueiredo
On Sat, 03 Mar 2012 12:32:00 -0300, Gunnar Eketrapp  
 wrote:



Hi!


Hi, Gunnar!


Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not
find a coercion from type java.lang.String to type
utskicket.model.entity.MemberList.


I guess the problem itself is that you're putting a Loop inside a Form  
without setting Loop's parameter formState to none. Another solution,  
maybe closer to solving your problem, is to provide a ValueEncoder for  
your MemberList class.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Forms

2012-02-16 Thread Thiago H. de Paula Figueiredo
On Thu, 16 Feb 2012 08:58:30 -0200, stipenovi   
wrote:



I will post here...

This is my simple code:

* t:inPlace="false" t:id="multiBeanForm"  
t:zone="editorZone">

* t:id="createForm" t:object="nodeTop"
t:zone="editorZone"
t:exclude="id, version, nodeLevel, level,
dateCreated"/>
* t:id="createDescriptionForm"
t:object="descriptionText" t:zone="editorZone" />
**
* t:type="Submit" t:id="done" value="Save"/>
**

Error is: */Form components may not be placed inside other Form  
components.


The error message describes exactly what the problem is: you can put a  
Form inside another Form. BeanEditForm uses a Form inside it. Use  
BeanEditor instead of BeanEditForm.



/*
In page class I have 3 components:
@Component(id = "createForm")
private BeanEditForm createForm;
@Component(id = "createDescriptionForm")
private BeanEditForm createDescriptionForm;
@Component(id = "multiBeanForm")
private Form multiBeanForm;

I have read one Lewis's replay where he said that is Ok to use two
BeanEditForms in one Form.


It isn't.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Forms

2012-02-16 Thread stipenovi
I will post here...

This is my simple code:

* t:inPlace="false" t:id="multiBeanForm" t:zone="editorZone">
* t:id="createForm" t:object="nodeTop"
t:zone="editorZone"
t:exclude="id, version, nodeLevel, level,
dateCreated"/>
* t:id="createDescriptionForm"
t:object="descriptionText" t:zone="editorZone" />
**
* t:type="Submit" t:id="done" value="Save"/>
**

Error is: */Form components may not be placed inside other Form components.
/*
In page class I have 3 components: 
@Component(id = "createForm")
private BeanEditForm createForm;
@Component(id = "createDescriptionForm")
private BeanEditForm createDescriptionForm;
@Component(id = "multiBeanForm")
private Form multiBeanForm;

I have read one Lewis's replay where he said that is Ok to use two
BeanEditForms in one Form.

Thanks for replay.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Forms-tp2427184p5489179.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: Forms and Grid questions ....

2010-12-28 Thread Thiago H. de Paula Figueiredo
On Tue, 28 Dec 2010 07:09:36 -0200, Gunnar Eketrapp  
 wrote:



Hi!


Hi!


My questions are:
1) How do I disable the sorting functionality of the grid.


Matheus answered that. :)


2) If I would like to suppport sorting and paging then I need some way to
first submit what's been checked.


I guess you can use some JavaScript in the paging links to do that.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Forms and Grid questions ....

2010-12-28 Thread Matheus Eduardo Machado Moreira
   Hi, Gunnar!

   I think I know how to answer your first question. I assume your are using
Tapestry 5.2.4 as I am. :-) You need to create an explicit BeanModel,
customize its sorting funcionality and provide it to your Grid component.

*Page class*

@Inject
private BeanModelSource beanModelSource;

@Inject
private Messages messages;

public BeanModel getUnsortableBeanModel() {
   BeanModel model = beanModelSource.createDisplayModel(YourModel.class,
messages);
   for (String propName : model.getPropertyNames()) {
  PropertyModel propModel = model.get(propName);
  propModel.sortable(false);
   }
}

*Page template*



   You can add a checkbox column using BeanModel.add("propertyName", null).
It will be necessary to provide a render block for it in the template
(...).

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2010/12/28 Gunnar Eketrapp 

> Hi!
>
> I am using a grid inside a form to display a list of name + checkbox.
>
> The user can then select a number of names and press OK (or cancel).
>
> My questions are:
>
> 1) How do I disable the sorting functionality of the grid.
>
> 2) If I would like to suppport sorting and paging then I need some way to
> first submit what's been checked.
>
> Or should I skip the grid !?
>
> Thanks in advance,
> Gunnar Eketrapp
>


Re: Forms

2009-01-16 Thread Sid Ferreira
I expected to see them inside the text fields
On Fri, Jan 16, 2009 at 10:45 AM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Em Fri, 16 Jan 2009 08:35:54 -0300, Sid Ferreira 
> escreveu:
>
>  I was losing the values anyway...
>>
>
> Ooops. I forgot to say that you should return null instead of this.
> And I just can't see why you say you're losing the fields values, as in no
> place in your code you print them in HTML nor the standard output.
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations


Re: Forms

2009-01-16 Thread Thiago H. de Paula Figueiredo
Em Fri, 16 Jan 2009 08:35:54 -0300, Sid Ferreira   
escreveu:



I was losing the values anyway...


Ooops. I forgot to say that you should return null instead of this.
And I just can't see why you say you're losing the fields values, as in no  
place in your code you print them in HTML nor the standard output.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Forms

2009-01-16 Thread Sid Ferreira
I was losing the values anyway...

On Fri, Jan 16, 2009 at 10:13 AM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Em Thu, 15 Jan 2009 16:58:10 -0300, Sid Ferreira 
> escreveu:
>
> Object onSuccess() {
>>  //new Exception("E..." + dsQuery).printStackTrace();
>>  return this;
>>}
>>
>
> Never return "this" in a event handler method. This leads to loss of field
> values when they are not persisted in the session.
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations


Re: Forms

2009-01-16 Thread Thiago H. de Paula Figueiredo
Em Thu, 15 Jan 2009 16:58:10 -0300, Sid Ferreira   
escreveu:



Object onSuccess() {
  //new Exception("E..." + dsQuery).printStackTrace();
  return this;
}


Never return "this" in a event handler method. This leads to loss of field  
values when they are not persisted in the session.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Forms

2009-01-16 Thread Thiago H. de Paula Figueiredo
Em Fri, 16 Jan 2009 05:59:00 -0300, Peter Stavrinides  
 escreveu:



As far as I know you can use a standard submit button.


You're absolutely correct. I *never* used the Submit component, and I'm  
writing Tapestry 5 applications since 5.0.5 (almost two years ago). :)


By the way, you don't need an onSuccess method to Tapestry update your  
objects with the values entered by the user. You use onSucess for doing a  
search or writing an object to a database, for example.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Forms

2009-01-16 Thread Peter Stavrinides
As far as I know you can use a standard submit button.

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Sid Ferreira" 
To: "Tapestry users" 
Sent: Friday, 16 January, 2009 10:46:11 AM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Forms

in the end I managed a different way:
created a pdsQuery with @Persist and onSuccess dsQuery sets pdsQuery and it
worked. But looks too lame.

In jumpstart Geoff used a common submit.

Also: is there a way to after the submit hide the Start? Keep it in
server.ext/app/ ?


On Fri, Jan 16, 2009 at 6:09 AM, Kristian Marinkovic <
kristian.marinko...@porsche.co.at> wrote:

> hi sid,
>
> you need to use a Tapestry Submit component to submit the form.
> otherwise the request wont be processed by Tapestry
>
> g,
> kris
>
>
>
>
>
> Sid Ferreira 
> 15.01.2009 20:58
> Bitte antworten an
> "Tapestry users" 
>
>
> An
> Tapestry users 
> Kopie
>
> Thema
> Forms
>
>
>
>
>
>
> Guys, Im trying to make a small search engine, but It isn't
> working.follows
> the code:
>
> TML:
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>  
>Tibox Test App
>  
>  
>
>  
>  
>
>  Allert
>  Fast Support
>
>
>  
>.lista {
>  width: 100%;
>}
>  
>  
>
>
>  
>
>
>  
>
>  
>
>
>  
>  
>
>
>
>  
> 
>
> Java:
> public class Start
> {
>@Component(id = "names")
>private Form _form;
>
>private Long cdCliente = new Long(7);
>
>@Property
>private String dsQuery;
>@Component(id = "dsQuery")
>private TextField dsQueryField;
>
>void onValidateForm() {
>  if (dsQuery == null || dsQuery.trim().equals("")) {
>_form.recordError(dsQueryField, "First Name is required.");
>  }
>}
>
>Object onSuccess() {
>  //new Exception("E..." + dsQuery).printStackTrace();
>  return this;
>}
> }
>
> It had no onSuccess, but didn't worked either.
> Im using the same Start.java as response to the form.
>
> --
> Sidney G B Ferreira
> Desenvolvedor Web - Tibox Innovations
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations

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



Re: Forms

2009-01-16 Thread Sid Ferreira
in the end I managed a different way:
created a pdsQuery with @Persist and onSuccess dsQuery sets pdsQuery and it
worked. But looks too lame.

In jumpstart Geoff used a common submit.

Also: is there a way to after the submit hide the Start? Keep it in
server.ext/app/ ?


On Fri, Jan 16, 2009 at 6:09 AM, Kristian Marinkovic <
kristian.marinko...@porsche.co.at> wrote:

> hi sid,
>
> you need to use a Tapestry Submit component to submit the form.
> otherwise the request wont be processed by Tapestry
>
> g,
> kris
>
>
>
>
>
> Sid Ferreira 
> 15.01.2009 20:58
> Bitte antworten an
> "Tapestry users" 
>
>
> An
> Tapestry users 
> Kopie
>
> Thema
> Forms
>
>
>
>
>
>
> Guys, Im trying to make a small search engine, but It isn't
> working.follows
> the code:
>
> TML:
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>  
>Tibox Test App
>  
>  
>
>  
>  
>
>  Allert
>  Fast Support
>
>
>  
>.lista {
>  width: 100%;
>}
>  
>  
>
>
>  
>
>
>  
>
>  
>
>
>  
>  
>
>
>
>  
> 
>
> Java:
> public class Start
> {
>@Component(id = "names")
>private Form _form;
>
>private Long cdCliente = new Long(7);
>
>@Property
>private String dsQuery;
>@Component(id = "dsQuery")
>private TextField dsQueryField;
>
>void onValidateForm() {
>  if (dsQuery == null || dsQuery.trim().equals("")) {
>_form.recordError(dsQueryField, "First Name is required.");
>  }
>}
>
>Object onSuccess() {
>  //new Exception("E..." + dsQuery).printStackTrace();
>  return this;
>}
> }
>
> It had no onSuccess, but didn't worked either.
> Im using the same Start.java as response to the form.
>
> --
> Sidney G B Ferreira
> Desenvolvedor Web - Tibox Innovations
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations


Re: Forms

2009-01-16 Thread Kristian Marinkovic
hi sid,

you need to use a Tapestry Submit component to submit the form.
otherwise the request wont be processed by Tapestry

g,
kris





Sid Ferreira  
15.01.2009 20:58
Bitte antworten an
"Tapestry users" 


An
Tapestry users 
Kopie

Thema
Forms






Guys, Im trying to make a small search engine, but It isn't 
working.follows
the code:

TML:
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
  
Tibox Test App
  
  

  
  

  Allert
  Fast Support


  
.lista {
  width: 100%;
}
  
  


  


  

  


  
  



  


Java:
public class Start
{
@Component(id = "names")
private Form _form;

private Long cdCliente = new Long(7);

@Property
private String dsQuery;
@Component(id = "dsQuery")
private TextField dsQueryField;

void onValidateForm() {
  if (dsQuery == null || dsQuery.trim().equals("")) {
_form.recordError(dsQueryField, "First Name is required.");
  }
}

Object onSuccess() {
  //new Exception("E..." + dsQuery).printStackTrace();
  return this;
}
}

It had no onSuccess, but didn't worked either.
Im using the same Start.java as response to the form.

-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations