Hi again

Actually I am using an ArrayList to hold my list of objects so I
don't really have setter/getter methods that deal with arrays and
indexes.

Thanks very much for your suggestions anyway. I think I will look at
ways of stopping the use of old forms with new Sessions.

I suppose it is just a bad combination of dynamic length form fields
and Session-scope on a page that everyone seems to like to leave open
in their browsers and then try and reuse (-:




                                                                                       
                                                
                      joerg.maurer@ucp                                                 
                                                
                      morgen.com               To:      [EMAIL PROTECTED] 
                                                
                                               cc:                                     
                                                
                      30/01/2003 12:11         Subject: RE: / /OREF:CPT53E85 Re: 
Session Time-out: Form population fails               
                      PM                                                               
                                                
                      Please respond                                                   
                                                
                      to struts-user                                                   
                                                
                                                                                       
                                                
                                                                                       
                                                
                                                                                       
                                                
                                                                                       
                                                
                                                                                       
                                                




Last resort from me - Do/can you use/refactor to indexed property
like,
where upper bound = index is tested in setter and indexedProp is set
higher/lower ?!?!?!

1. indexed property

    /** Holds value of property indexedProp. */
    private int[] indexedProp = int[2000];

  /** Indexed getter for property indexedProp.
   * @param index Index of the property.
   * @return Value of the property at <CODE>index</CODE>.
   *
   */
  public int getIndexedProp(int index) {
      return this.indexedProp[index];
  }

  /** Getter for property indexedProp.
   * @return Value of property indexedProp.
   *
   */
  public int[] getIndexedProp() {
      return this.indexedProp;
  }

  /** Indexed setter for property indexedProp.
   * @param index Index of the property.
   * @param indexedProp New value of the property at
<CODE>index</CODE>.
   *
   */
  public void setIndexedProp(int index, int indexedProp) {
      this.indexedProp[index] = indexedProp;
  }

  /** Setter for property indexedProp.
   * @param indexedProp New value of property indexedProp.
   *
   */
  public void setIndexedProp(int[] indexedProp) {
      this.indexedProp = indexedProp;
  }

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 30. Jänner 2003 10:47
To: [EMAIL PROTECTED]
Subject: / /OREF:CPT53E85 Re: Session Time-out: Form population fails



Hi again. Thank you for the information/citing - very interesting and
something I will investigate further.

Maybe I am overlooking something here but I assume my problem at the
moment is I will never get to my Action to check any token after the
User submits the form.
This is because the actual population of the form bean fails as the
new Session's form bean instance does not match what is on the page.
I suppose I need some sort of check on the page before the form is
submitted and the form bean population occurs.

Or I am totally going about this the wrong way ?

thanks once again.





                      joerg.maurer@ucp

                      morgen.com               To:
[EMAIL PROTECTED]

                                               cc:

                      30/01/2003 11:35         Subject: RE: /
/OREF:CPT36578 Re: Session Time-out: Form population fails

                      AM

                      Please respond

                      to struts-user















I cite now a passage of book from Mr. Husted et al., "Struts in
action",
Manning, copyrighted ...... I hope i not get into trouble, but help
is
more valuable for me than strict law(despite i bought the book and
not
going to sell following information).Am i disclaiming in correct
way?!?!?!

I will see...

CITING BEGIN
"
Using transactional tokens
Duplicate submissions can often be a problem for web applications.
Struts supports
a strategy to prevent duplication submissions using a synchronizing
token.
Using synchronizing tokens is automatic for the Struts <html:form>
tag.
If it sees
that tokens are being used, it automatically includes the appropriate
hidden field.
On the Action side, you can enable transactional tokens by calling
saveToken(request);
anywhere in the Action's perform or execute method. On the return
trip,
to have
an Action check if a token is still good, call
boolean valid = isTokenValid(request);
If this method returns false, branch to an error page. If it returns
true, call
resetToken(request);
While participating in a transaction most often occurs with forms,
there
are also
applications for hyperlinks and other assets. Accordingly, the Struts
<html:link>
and <html:rewrite> tags provide optional support for transactions. To
include the
appropriate token in the link, set the transaction property to true.
A
tag like this:
<html:link forward="addItem" paramName="row" paramProperty="itemId"
paramId="id" transaction="true"/>
will then generate a hyperlink like this:
<a href="/gavel/do/addItem?
id=3017&amp;org.apache.struts.taglib.html.TOKEN=72da1d3fdede66c">
"
CITING END


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 30. Jänner 2003 10:23
To: [EMAIL PROTECTED]
Subject: / /OREF:CPT36578 Re: Session Time-out: Form population fails



Thanks for your reply. Please excuse my ignorance but the transaction
token in the form that you mentioned in your mail, what exactly is
this ?





                      joerg.maurer@ucp

                      morgen.com               To:
[EMAIL PROTECTED]

                                               cc:

                      30/01/2003 11:12         Subject: RE: /
/OREF:CPTF9D2A Session Time-out: Form population fails

                      AM

                      Please respond

                      to struts-user















Not sure/not tested -> hint level :

if you can use the TRANSACTION token that is activated in form +
having
a hidden field in form that sets/get corresponding token,
you might be able to test for that -> if new instance of the form is
created, token does not match -> route to other command ?!?!?

Please report on this!

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 30. Jänner 2003 09:48
To: [EMAIL PROTECTED]
Subject: / /OREF:CPTF9D2A Session Time-out: Form population fails


Hi all

I have a form and Session-scope form bean class that consists of
amongst other fields, a variable length list of data. When the form
bean is created, the list is length zero and when data has been
retrieved and displayed from the backend, the list will contains the
corresponding elements.

The form works great until the User's Session times out and the User
still have the form visible in the browser. When the User submits the
form, the original form is gone so a new instance of the form is
created (I assume) but the population of the form fails as the number
of elements in the list does not match what is currently on the form
being submitted.

The Users always end up sending an error page. Any suggestions please
to solve my messy problem ?

thanks very much
Aisling




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to