You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jeffrey Gehrung <je...@yahoo.com> on 2002/10/21 17:34:08 UTC
Using Intake - Login, File Upload, Redisplay
Three questions for those in the know:
1) Using Turbine's default Login template, I'm trying
to incorporate INTAKE processing to pre-validate its
USERNAME/PASSWORD fields prior to executing Turbine's
"LoginUser" action. Apparently the request 1)
bypasses INTAKE and 2) subsequently fails when
LoginUser finds unrecognizable fieldnames (due to my
substitution of INTAKE field names for the default
field names).
Perhaps I should be calling my own ACTION handler and
forwarding the request to "Login User" ? ...
2) Want to let user select and upload file using WEB
form. However, want to restrict user to uploading a
specific file. Can INTAKE be configured to
pre-validate the filename before it is actually
uploaded? (I'm relying on Turbine's upload service to
do the work.)
3) When validating a form with two input text fields,
if valid data is provided in first field and no data
is provided in the second field, both fields are
redisplayed empty and only the invalid field has its
corresponding error message displayed. Known bug?
Workaround for this?
TIA for any/all help !
=====
Jeff Gehrung (Sr. Programmer Analyst)
Holstein Association USA
Brattleboro VT 05302
802.451.4146
jgehrung@holstein.com
jeffgehrung@yahoo.com
I'm told "42" answers most ?s.
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Using Intake - Login, File Upload, Redisplay
Posted by Jeffrey Gehrung <je...@yahoo.com>.
Thanks, John (and others who have taken the time to responded thus far).
Regarding question 1 - INTAKE and Turbine LoginUser, guess I don't yet have a feel for where the INTAKE service processing occurs during Turbine's request handling, seems to be subseqent to Turbine's request parsing for action=LoginUser. I haven't obtained Turbine's source yet.
Regarding question 2 - Validating file names before upload, let me clarify...
Our users download a specific file, make changes, then upload the revised file (and perform this often). Though I can't _guarantee_, up-front, that they are actually uploading the same file they downloaded, I would like to prevent them from needlessly uploading an incorrect file by performing an INTAKE filename validation prior to a time-comsuming upload (many modem users). Thus, since I'm unsure of the sequence of events with regard to the mulitpart-forms upload interaction, can INTAKE perform its validation prior to the file upload process? (Probably not, since the filename and content are embedded in the same response).
If not able to use INTAKE here...
Could probably accomplish it client-side with some javascript, but...
Could try to get a handle on the input stream and parse an initial portion of the content and abort the upload, but would then forego the Turbine upload service...
Could break the process into two parts (returning a confirmation page prior to accepting the named file from the client)... Kludgey...
Could simply accept your advise, John, let them make (learn from) the mistake and parse the received content before returning an acceptance message... (I would disregard their provided name.)
Thanks. I wll be watching for any further responses to this thread as I continue reviewing messages in the archive.
John McNally <jm...@collab.net> wrote:On Mon, 2002-10-21 at 08:34, Jeffrey Gehrung wrote:
> Three questions for those in the know:
>
> 1) Using Turbine's default Login template, I'm trying
> to incorporate INTAKE processing to pre-validate its
> USERNAME/PASSWORD fields prior to executing Turbine's
> "LoginUser" action. Apparently the request 1)
> bypasses INTAKE and 2) subsequently fails when
> LoginUser finds unrecognizable fieldnames (due to my
> substitution of INTAKE field names for the default
> field names).
>
> Perhaps I should be calling my own ACTION handler and
> forwarding the request to "Login User" ? ...
>
There may be some logic that invokes the LoginUser action prior to the
normal position where actions are invoked as normally the action is
invoked after the user is verified. So using a different action is
probably not going to work. But I don't know why intake would not be
setup by the time the LoginUser action is invoked, even if its
invocation happens a bit earlier in the request request processing.
> 2) Want to let user select and upload file using WEB
> form. However, want to restrict user to uploading a
> specific file. Can INTAKE be configured to
> pre-validate the filename before it is actually
> uploaded? (I'm relying on Turbine's upload service to
> do the work.)
>
A user can name a file anything they want before uploading it, so I
don't understand what checking the filename accomplishes. It seems
similar to creating a set of radio buttons and only allowing the first
option to be valid; just make it a hidden field. Similarly in the
fileupload case, just name the file whatever you want on the server, its
name on the client is not important. You save the user from having to
rename or copy the file on his machine, just to upload the file.
john mcnally
--
To unsubscribe, e-mail:
For additional commands, e-mail:
Jeff Gehrung (Sr. Programmer Analyst)
Holstein Association USA
Brattleboro VT 05302
802.451.4146
jgehrung@holstein.com
jeffgehrung@yahoo.com
I'm told "42" answers most ?s.
---------------------------------
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
Re: Using Intake - Login, File Upload, Redisplay
Posted by John McNally <jm...@collab.net>.
On Mon, 2002-10-21 at 08:34, Jeffrey Gehrung wrote:
> Three questions for those in the know:
>
> 1) Using Turbine's default Login template, I'm trying
> to incorporate INTAKE processing to pre-validate its
> USERNAME/PASSWORD fields prior to executing Turbine's
> "LoginUser" action. Apparently the request 1)
> bypasses INTAKE and 2) subsequently fails when
> LoginUser finds unrecognizable fieldnames (due to my
> substitution of INTAKE field names for the default
> field names).
>
> Perhaps I should be calling my own ACTION handler and
> forwarding the request to "Login User" ? ...
>
There may be some logic that invokes the LoginUser action prior to the
normal position where actions are invoked as normally the action is
invoked after the user is verified. So using a different action is
probably not going to work. But I don't know why intake would not be
setup by the time the LoginUser action is invoked, even if its
invocation happens a bit earlier in the request request processing.
> 2) Want to let user select and upload file using WEB
> form. However, want to restrict user to uploading a
> specific file. Can INTAKE be configured to
> pre-validate the filename before it is actually
> uploaded? (I'm relying on Turbine's upload service to
> do the work.)
>
A user can name a file anything they want before uploading it, so I
don't understand what checking the filename accomplishes. It seems
similar to creating a set of radio buttons and only allowing the first
option to be valid; just make it a hidden field. Similarly in the
fileupload case, just name the file whatever you want on the server, its
name on the client is not important. You save the user from having to
rename or copy the file on his machine, just to upload the file.
john mcnally
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Using Intake - Login, File Upload, Redisplay
Posted by Chris K Chew <ch...@fenetics.com>.
1. I thought I have seen messages about this in the turbine-user archive,
but couldn't find any just now. You will have to use your own loginuser
action if you want to use Intake. Look at the source code to see what
"logging in" does and copy it. Or you can wrap the provided action with
your own action and set the parameters username and password before calling
the wrapped action (an action adaptor). Either way, it is a good idea to
update the login-related info in TR.props.
3. Take a look through the turbine-user archives. There are lots of
messages regarding the various features and characteristic of redisplaying
Intake form fields.
Chris
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>