Disabling filling form with old values on validation failure

2013-06-13 Thread Ryon Day
I have a situation where the old form values are absolutely NOT helpful in any 
way after a validation failure; I cannot find a way to prevent tapestry from 
autofilling the old form values.

Is this a possibility or am I going to have to subclass the validation tracker 
implementation to provide value clearing? I do not want to clear the whole 
tracker because I want to form to be in error, but I do not want the old input 
in the form fields.

Thanks!


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



[T5]: BUG: Proxy Situation: Tapestry 5.3.3 Not Respecting isSecure for Form Action URL

2012-08-07 Thread Ryon Day
Set-Up:
* My F5 BIG-IP set up in an SSL-offloading situation. All client communication 
to the BIG-IP is HTTPS, while the BIG-IP device communicates to Tomcat 
(Tapestry) via HTTP.
* Tapestry is running on Tomcat 6.latest in production mode.
* In the web app I have the Xebia Servlet-Extras 
(http://code.google.com/p/xebia-france/wiki/XebiaServletExtras):
  * x-forwarded-for is set using the F5 device
  * x-forwarded-proto is set using the F5 device
* Result: isSecure is true for Tapestry using the default 
"BaseURLSourceImpl" All links are sent back to the client box using https:// 
instead of http://. This works awesome! All images are loading great, and life 
is good except...

Tapestry is rendering form actions in the pages sent to the client browser with 
http:// instead of https://. Obviously this makes no sense since the 
BaseURLSource is returning https. Does Tapestry not use the BaseURLSource to 
decide the action URLs for form components? Currently, my only idea has to do 
with writing a filthy hack that adds some sort of servletrequest injection to 
my page classes and then set the "secure=" option in the form component in the 
.TML based on isSecure(). Since this is a proxy situation, I need to have 
Tapestry handle traffic via http but return action links that are https or at 
the very least, relative to the current URL.

Has anyone used Tapestry in a similar configuration before? 

P.S: There was a similar thread back in April on this list 
(http://tapestry.1045711.n5.nabble.com/URL-writing-problem-with-production-mode-true-td5628619.html)
 but the discussion sadly petered out without addressing the original issue, 
which appears to be a bug in the action URL rendering logic. I am currently 
plumbing the depths of the Tapestry code to find out exactly where this odd 
behavior comes from. I am more than happy to submit a patch if I discover what 
is up here!

Thanks for any help. I am more than happy to supply any other needed 
information. to diagnose or to submit a JIRA.

Ryon Day)

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



Secure HTTP->HTTPS redirect loses Querystring Parameters

2012-08-01 Thread Ryon Day
I am using Tapestry 5.3.3. http://servername/appname/foo?bar=baz redirects to: 
https://servername/appname/foo. 

Is there any way to fix this?


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



Help with Dynamic Number of Form Elements

2012-05-02 Thread Ryon Day
Hello all! First time poster and rest assured that I've used the search 
functionality on Nabble to see if there are similar problems to mine, and I 
haven't yet stumbled across my own use case yet (and I find that to be a huge 
surprise!).

Anyway, I want to state my problem in a precise and unambiguous manner so I can 
help you guys help me!

Problem Statement: 

 constructs to not seem to make it possible to add varied numbers of 
 elements to a form.

Use Case:
I am writing a web application that calls a SOAP service. Inside the soap 
calls, I can pick from a variable number of a certain kind of information. 
The information I am getting from SOAP is well ordered for use with  
elements. Each one has an ID and a certain amount of text associated with it. 
These are questions that the user will answer. The application must be 
configurable viz. the number of questions that will be asked the user. Each 
 element will have an  associated with it, to collect the 
user's answer to the question.

 Therefore, you can see how a fixed number of  elements is not 
feasible; Some consumers of the app will want to ask the user one question, 
some five! Therefore I need to be able to display a variable number of these 
questions on the page.

Notes:
* I am getting the questions from a SOAP service. I don't have a 
database/hibernate/JPA or anything else. Therefore all the questions for each 
"group" are in a fixed array (or ArrayList; it does not matter at all).
* The question ID is the value for each item in the  with the question 
text being the "label" I guess. Therefore, what I need to pass back is the 
question ID and the user answer for each group.

End Result Desired:
* A form, with a number of paired  elements and  elements, 
representing a questions asked of the user and their answer.
* The number of these pairs is not known until I query the SOAP service and 
receive back a response containing a number of groups, each one of which will 
be a new  element.
* Upon submitting the form, my application has 'n' number of questionID/answer 
pairs that I then respond back to the SOAP service with.

What I have Tried:

Swing and Miss:
I created a custom SelectModel for the objects that I received from the 
database. At runtime, I create one model for each group of questions I receive 
from the SOAP service. I then added each of these SelectModels to an ArrayList, 
making that ArrayList a @property in the class:

@property
private List _questionSelectModels; // This is never null; it's 
populated during onPrepareForRender();

@property 
private SelectModel _currentModel

Here is my Template:


Question: 




Result: 
Exception: Render queue error in 
BeforeRenderTemplate[Enroll:selectedquestionid]: Parameter 'model' of component 
Enroll:selectedquestionid is bound to null. This parameter is not allowed to be 
null. 


Why does confusion result on my part?
* Because I assumed Tapestry would be able to iterate through the array list

-

Questions/comments:
* I am surprised that this use case has never come up; Struts, for example, has 
a very elegant way of handling this (even though I hate everything else about 
it) 
* I know your time is valuable; I have tried to do my due diligence and have 
searched the mailing list and have come up with pretty much nothing on this.
* Is it valid to attempt to iterate through a collection of SelectModel objects?
* IS there a "best Practice" for what I'm trying to do? 
* How have others on this list handled this same use case?
* I am suspecting that I have some sort of gross conceptual error about how 
this is supposed to work, but honestly for the life of me, I don't understand 
where it is.
* I've combed the different tutorials avaialble as well.
* One possible area I can tell would go wrong is in the select box's "value"; 
obviously each  would attempt to update the same value!
   * Why is it not possible to have some sort of iterator variable to identify 
what to update? 

Please let me know if more source code form my end is needed to clarify what 
I'm doing wrong. 

Thank you so much for any help you can offer!

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