Form data preloading

2004-01-08 Thread Patrice Sicaud
Before I go half-cock about this, I was curious about the cleaner way to
preload a form.
For example, prior to authenticating users who forgot their user id, I need
to retrieve (from the database) the list of possible secret questions that
will be used to validate their responses (secret answer). So... what do I
do? provide an action without corresponding presentation layer element?
May be an FindForwardAction? Or is it preferable to chain 2 actions. I have
read somewhere that the latter was not recommended. May be, it makes no
difference???
Any pointer would be appreciated...
Thx
Patrice 

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

Re: Passing parameter in a pop up window

2003-01-29 Thread Patrice
I think you can use use the  tag with target="_blank".

Hope it helps
  Patrice

- Original Message - 
From: "Ritesh Singhal" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 3:09 PM
Subject: Passing parameter in a pop up window


> Hi All,
> 
> I have a requirement of passing a parameter in a popup window. I have
> link on some jsp page, on clicking of that link it should open a new
> window. Now in this window I want pass a parameter also as part of query
> string. I don't think you can do it using html:link. Please help me if
> anyone of you know the solution.
> 
> Regards
> Ritesh
> 
> -
> 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]




Re: what does RT Expr mean

2003-01-29 Thread Patrice
It means "Run time expressions": the content is evaluated at the run time
(so, you can have a dynamic value for the tag's attribute value).
For example:
<% string foo = "foo"; %>


Hope it helps
Patrice

- Original Message -
From: "Sundar Narasimhan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 3:26 PM
Subject: what does RT Expr mean


> In the bottom of the documentation on the attributes of several tags I
> see [RT Expr].. what does that mean? Is it documented anywhere?
>
> Thanks.
>
> -
> 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]




Re: tomcat's container based authentication and struts

2002-12-18 Thread Patrice
I think that if you use the  tag, Struts will always interpret it
as an action.
If it is just for the focus attribute, you can implement your own javascript
function to place the focus on the element you want:


Username: 
Password:  Max Cooper wrote:
> > Just write out a regular HTML form:
> >
> > 
> > Username: 
> > Password:  . Any idea? Is it a bug in struts that my action is changed
from
> j_security_check to /j_security_check.do?
>
> cu,
> boris
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: bean:messages tag

2002-12-17 Thread Patrice
Tags are interprated after scriplets, that's why you can't use tags inside
scriplets.
In struts 1.1, you can do:

<% int i = Integer.parseInt(aKey); %>

Hope it helps
Patrice

- Original Message -
From: "Richmond Te" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 5:59 AM
Subject: bean:messages tag


> i am using  fine
> but i need to assign that key value to my jsp
> scriptlet something like ie.
> <%
> String aKey = "";
> int i = Integer.parseInt(aKey);
> %>
>
> but the "aKey" contains the text " key='form.maxNumber'/>" instead of the value it
> represents when declared outside a scriptlet..
>
> thanks
> richmond
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Struts design: All actions in one ActionClass

2002-12-11 Thread Patrice
For me, it's easy to maintain seperate actions.
If you want to group different actions in one Action class, you might use a
DispatchAction with a method for each process.

Hope it helps

Patrice

- Original Message -
From: "Jordan Thomas" <[EMAIL PROTECTED]>
To: "Struts-User" <[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 7:05 PM
Subject: Struts design: All actions in one ActionClass


> Hi,
>
> What is the best way to design my application? Is it better to
>
> a) Put all my actions for a particluar area (i.e. creating, editing and
> deleting user accounts) in one Action class
>
> or
>
> b) Use a seperate action class for every action in my application
>
> or
>
> c) Put all of the actions for a particular workflow in a single Action
> class.
>
> I am looking to have an application that is easy to maintain and flexible.
> Suggestions/Advice would be most appreciated.
>
> thanks
>
> Jordan
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: html:form relative action howto?

2002-12-06 Thread Patrice
Perhaps I'm misunderstanding you, but I think you can do:



Hope it helps
Patrice

- Original Message -
From: "Pablo Casado" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 04, 2002 4:42 PM
Subject: html:form relative action howto?


hello,

how do I do the following,

--struts config--

 


 


--myjsp.jsp --


so the possible values in the html:form action can be /x/y/myaction or
/a/b/myaction

Thanks.
- Pablo.








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus Database: 238 - Release Date: 11/25/2002


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




Re: select box doesn't call set method in form bean when nothing is selected

2002-12-03 Thread Patrice
I think you can clear the value of the property in the reset() method of your form 
bean.

Best regards
Patrice
  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, December 03, 2002 10:00 PM
  Subject: select box doesn't call set method in form bean when nothing is selected


  I have a multiple select box on my jsp (html:select).  When the user selects an item 
from the list, our form bean picks up that fact just fine.  However, if the user then 
un-selects that item (ctrl-click) so there is nothing selected in the box, the set 
method for that box doesn't get called so it 'remembers' that last value the user 
selected.

  So, the question:  when a user de-selects everything from a multiple select box, how 
can struts know to clear the form bean variable since the html form is no longer 
sending data corresponding to that variable?

  Thank you,
  GlenR



--


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


Re: Struts Form Beans & Value Objects

2002-12-02 Thread Patrice
I think you can place the VO in your form bean, and have text fields to
update the different properties.
For example, if you have a property "header" that contains your HeaderVO:


After submission, the VO in the form bean will contain the data entered by
the user, without additional code.

Hope it helps
Patrice


- Original Message -
From: "Pat Quinn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 7:08 PM
Subject: Struts Form Beans & Value Objects


> I have an EJB which returns me a HeaderVO (Value Object) inside this VO I
> have an Array List of LineVO's. As you'd except all my Value objects are
> Serializable. Ok now i want to display this data to my client so I will
have
> a header html table and a lines html table. My header and lines both
contain
> text fields to allow for client updates.
>
> Here's where i'm seeking some assistance: should I * Extract the data from
> my headerVO and insert it into a FormBean and then store my linesVO data
as
> a 2Dimensional Array in my form bean.
>
> Is there a better way to do this without writing extra code to deal with
> conversion between VO's and a Form Bean i.e. can i store the value objects
> instead a form bean but yet allow for user updates to the data.
>
> Your ideas and suggestions would be gratefully appreciated.
>
>
>
>
>
>
>
> _
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Search Results Forms

2002-12-02 Thread Patrice
I think you can use the  tag.
If you have a property "myArray" in your ActionForm, corresponding to an
array of String:




...

After submission, the array will contain only values corresponding to the
checked checkboxes ("1", "2"...).
The values corresponding to non-checked selectboxes will not appear.
Don't forget to setting the corresponding array to zero length in the
reset() method.

Hope it helps
Patrice

- Original Message -
From: "Wendy Cameron" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 3:16 AM
Subject: Search Results Forms


> Has anyone come up with a good way to do checkbox form process with
Scrolling search results?
>
> Basically you have a list of search results each with a check box next to
it.  You also have scrolling pages, so you have Page 1 | 2 | 3 links etc.
>
> If you use the checkbox with the same name, this can be easily picked up
in your form bean etc, however if the user scrolls back and forth through
the result checking and unchecking items, this could lead to problems with
elements having been checked add, but later they were unchecked etc, and you
wouldnt know.
>
> I think you could possible work it by numbering the checkbox name.
However you lose your ability to automatically populate a form bean.
> Where the ideal situation is an array 0..n-1 where n is the length, with a
set of values, checked if the checkbox was checked and null if it was not or
an array of booleans.
>
> Has anyone found a nice way to solve this little picadello
>
> Regards Wendy
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




Re: Comparing Bean Properties

2002-11-29 Thread Patrice
Hi Vinh,

You can use a scripting variable: if you want compare the property1 of bean1
with the property2 of bean2:



...


Hope it helps.
Patrice

- Original Message -
From: "Vinh Tran" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 29, 2002 7:08 PM
Subject: Comparing Bean Properties


> Anyone know how to do comparisons on 2 bean properties? Logic tags allow
me
> to compare 1 property to a constant but not another bean property.  Any
> ideas?
>
> Vinh
>


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




Re: display error message including dynamic data

2002-11-28 Thread Patrice
Hi Cathy,

You can use 4 dynamic data at the maximum, in an error message. The values
can be defined in the ActionError constructor:
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.myError",
dynamicValue1, dynamicValue2, dynamicValue3, dynamicValue4));

and in you resources file:
error.myError=blah blah {0} blah blah {1} {2} blah{3}

{0}, {1}, {2} and {3} will be replaced with the contents of dynamicValue1,
dynamicValue2, dynamicValue3, and dynamicValue4.

Best regards
Patrice

- Original Message -
From: "Cathy Osekizoglu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 28, 2002 9:10 PM
Subject: Re: display error message including dynamic data


>
> Hi, Patrice:
> That works. Thank you so much!
> One more question. If I have two or more dynamic data which I want to
display them in the error message. How can I achieve that using the above
approach?
> Thank you.
> Cathy
>
>  Patrice <[EMAIL PROTECTED]> wrote:Hi,
>
> You can specify dynamic data in your errors like this:
> errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.amount",
> dynamicAmount));
> where dynamicAmount contains the amount you want to display in your error
> message.
>
> In your ApplicationResource.properties:
> error.amount=you can't retrieve more that {0} dollars
>
> {0} will be replaced by the content of dynamicAmount.
>
> Hope it helps
> Patrice
>
> - Original Message -
> From: "Cathy Osekizoglu"
> To: "Struts Users Mailing List"
> Sent: Thursday, November 28, 2002 8:12 PM
> Subject: display error message including dynamic data
>
>
> >
> > Hi:
> > According to the result from my action class, I need to display message
to
> user using the dynamic data.
> > This is what I am doing: In my action class, I got the result that user
> can only retrieve maximum 50 dollars from his credit card. When user try
to
> retrieve more than 50 dollars, I want to display the error message: " you
> can't retrieve more that 50 dollars". (50 is dynamic data here). In my
> action class, I have errors.add(ActionErrors.GLOBAL_ERROR, new
> ActionError("error.amount")); in my Jsp, I have . How can I
> achieve it in ApplicationResource.properties?(I am using struts1.1-b2).
> > Thank you very much for your reply
> >
> >
> >
> > -
> > Post your free ad now! Yahoo! Canada Personals
> >
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> -
> Post your free ad now! Yahoo! Canada Personals
>


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




Re: display error message including dynamic data

2002-11-28 Thread Patrice
Hi,

You can specify dynamic data in your errors like this:
errors.add(ActionErrors.GLOBAL_ERROR,  new ActionError("error.amount",
dynamicAmount));
where dynamicAmount contains the amount you want to display in your error
message.

In your ApplicationResource.properties:
error.amount=you can't retrieve more that {0} dollars

{0} will be replaced by the content of dynamicAmount.

Hope it helps
Patrice

- Original Message -
From: "Cathy Osekizoglu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 28, 2002 8:12 PM
Subject: display error message including dynamic data


>
> Hi:
> According to the result from my action class, I need to display message to
user using the dynamic data.
> This is what I am doing: In my action class, I got the result that user
can only retrieve maximum 50 dollars from his credit card. When user try to
retrieve more than 50 dollars, I want to display the error message: " you
can't retrieve more that 50 dollars". (50 is dynamic data here). In my
action class, I have errors.add(ActionErrors.GLOBAL_ERROR,  new
ActionError("error.amount")); in my Jsp, I have . How can I
achieve it in ApplicationResource.properties?(I am using struts1.1-b2).
> Thank you very much for your reply
>
>
>
> -
> Post your free ad now! Yahoo! Canada Personals
>


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




Re: generate from javascript locally

2002-11-28 Thread Patrice
I think you should use the  to display your options: generate
the collection, and place it as request attribute in an action. So,
everywhere you want to
display the options:

  


Hope it helps
Patrice

- Original Message -
From: "Sarath Chandra M" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 28, 2002 3:37 PM
Subject: generate  from javascript locally


> Dear group,
> I have a some jsp pages which have the same dropdown lists
> ( tags)
> like country lists, etc. Instead of generating them at serverside
> everytime,
> I would like to hav them stored in a javascript file and built
> on-the-fly
> whenever the page is served to the client.
> Can anybody suggest a better way to do this type of list generation.
>
> tia
> sarath
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Quick Question: rtexprvalue for onclick event in

2002-11-28 Thread Patrice
All the attribute content must be in <%= ... %>: you can define a scripting
variable like this:

<% String onclick = "updateAchor('" +
(String)pageContext.getAttribute("attributeId") + "', this.form)"; %>


Hope it helps
Patrice

- Original Message -
From: "Affan Qureshi" <[EMAIL PROTECTED]>
To: "struts-user" <[EMAIL PROTECTED]>
Sent: Thursday, November 28, 2002 7:42 AM
Subject: Quick Question: rtexprvalue for onclick event in 


> I want to use a nested bean property in the onclick attribute of the
> nested:submit. Since i cannot refer to bean properties in onClick
> attributes, I declared a pageContext variable using nested:define. Then I
> used that variable in the onclick attribute.
>
> I want to accomplish this:
> ', this.form)">
> Add Params
> 
>
> But I get te following error:
> [ServletException in:/webpages/editSpecs.jsp]
> /webpages/editSpecs.jsp(58,176) jsp.error.attribute.noequal'
>
> I think i cannot give both a <%= %> and a String in the attribute value as
I
> have done above. But if I remove the String so that my code becomes:
> onclick="<%= (String)pageContext.getAttribute("attributeId")%>", it woks
> correctly. Is there a work around for this?
> Thanks
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: validate() is working !!!!! Thanks Patrice!

2002-11-27 Thread Patrice
Hi,

Struts will use the form name defined in your struts-config.xml file, for
the action:
For example:


...



If you put ,
it will be replaced with 

So, your link will be:


Best regards
Patrice

- Original Message -
From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 6:53 PM
Subject: Re: validate() is working ! Thanks Patrice!


>
> Thanks a lot, Patrice. It works now!
>
> Now I need to solve another question: how can I define the form name on
> form without use name="TheForm" on ? I need this to use a
> link likes [Submit]. Do
> you know how to solve that? Anyone kowns?
> Thanks a lot, again!
>
> Patrice wrote:
> >
> > I suppose that's because you have declared a name in your 
tag
> > that is not corresponds to those on the struts-config.xml file.
> > The attributes "type" and "name" of the  tag are deprecated
in
> > Struts 1.1.
> >
> > Try to replace:
> > 
> >
> > with:
> > 
> >
> > Regards
> > Patrice
> >
> > - Original Message -
> > From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 27, 2002 5:36 PM
> > Subject: validate() almost working.
> >
> > > My code is aslmost working
> > > Validation and messages are ok. Now I need to solve one more
> > > problem
> > > When these validate function returns some errors, and forward back to
> > > form,jsp, the fields are empty. Follow I put the code, the page and
the
> > > struts-config. Whats wrong?
> > >
> > > struts-config BEGIN-
> > >
> > > 
> > >
> > >   > > path="/UserForm"
> > > type="UserFormAction"
> > > name="UserForm"
> > > scope="request"
> > > input="/groups/user_form.jsp">
> > > 
> > >
> > >
> > > struts-config END-
> > >
> > > Jsp BEGIN-
> > > 
> > > 
> > > 
> > > Usename:
> > > Password:
> > > Retype:
> > > [Cancela]  > > href='javascript:TheForm.submit();'>[Adiciona]
> > > 
> > > 
> > > 
> > > Jsp END---
> > >
> > >
> > >
> > > Code BEGIN
> > > public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> > > request) {
> > >
> > > ActionErrors errors = new ActionErrors();
> > >
> > > servlet.log("Validating UserForm");
> > >
> > > if ((username == null) || (username.length() < 1))
> > > errors.add("username", new
> > > ActionError("errors.nousername"));
> > >
> > > if ((password == null) || (password.length() < 1))
> > >        errors.add("password", new
> > > ActionError("errors.nopassword"));
> > >
> > >
> > > if ( !password.equals(again))
> > >errors.add("passwordagain",new
> > > ActionError("errors.passwordnotmatch"));
> > >
> > > return errors;
> > >
> > >
> > > }
> > >
> > >
> > > Code END------
> > >
> > > Patrice wrote:
> > > >
> > > > I don't see anything wrong...
> > > > All I know is that empty String is returned when the key on an
> > ActionError
> > > > is not present in the default application resource files (defined in
> > > > web.xml).
> > >
> > > Yes. I make some confusion and has 2 application.properties on the
> > > structure. Thanks for the tip.
> > >
> > > > Best regards
> > > > Patrice
> > > >
> > > > - Original Message -
> > > > From: "Jim Bruno Goldberg" <[EMAIL PR

Re: checking a empty list

2002-11-27 Thread Patrice
Try this:



...


Best regads
Patrice

- Original Message -
From: "Hirschmann, Bernhard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 6:04 PM
Subject: checking a empty list


>
> Hi group!
>
> I wonder if it's possible with a logic tag, to check if a List in a form
is
> empty.
>
> This doesn't work, it just checks if the attachmentsList is null:
> 
>
> Regards,
> Bernhard
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: validate() almost working.....

2002-11-27 Thread Patrice
I suppose that's because you have declared a name in your  tag
that is not corresponds to those on the struts-config.xml file.
The attributes "type" and "name" of the  tag are deprecated in
Struts 1.1.

Try to replace:


with:


Regards
Patrice

- Original Message -
From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 5:36 PM
Subject: validate() almost working.


> My code is aslmost working
> Validation and messages are ok. Now I need to solve one more
> problem
> When these validate function returns some errors, and forward back to
> form,jsp, the fields are empty. Follow I put the code, the page and the
> struts-config. Whats wrong?
>
> struts-config BEGIN-
>
> 
>
>   path="/UserForm"
> type="UserFormAction"
> name="UserForm"
> scope="request"
> input="/groups/user_form.jsp">
> 
>
>
> struts-config END-
>
> Jsp BEGIN-
> 
> 
> 
> Usename:
> Password:
> Retype:
> [Cancela]  href='javascript:TheForm.submit();'>[Adiciona]
> 
> 
> 
> Jsp END---
>
>
>
> Code BEGIN
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> request) {
>
> ActionErrors errors = new ActionErrors();
>
> servlet.log("Validating UserForm");
>
> if ((username == null) || (username.length() < 1))
> errors.add("username", new
> ActionError("errors.nousername"));
>
> if ((password == null) || (password.length() < 1))
>errors.add("password", new
> ActionError("errors.nopassword"));
>
>
> if ( !password.equals(again))
>errors.add("passwordagain",new
> ActionError("errors.passwordnotmatch"));
>
> return errors;
>
>
> }
>
>
> Code END------
>
> Patrice wrote:
> >
> > I don't see anything wrong...
> > All I know is that empty String is returned when the key on an
ActionError
> > is not present in the default application resource files (defined in
> > web.xml).
>
> Yes. I make some confusion and has 2 application.properties on the
> structure. Thanks for the tip.
>
> > Best regards
> > Patrice
> >
> > - Original Message -
> > From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 27, 2002 12:44 PM
> > Subject: Re: perform() or execute()? (Mistery)
> >
> > >
> > > I check that an all is ok.
> > > On the truth, the method is executed and the variables checked, the
> > > errors "listed" on the original form , but they is empty strings
> > > (?!?!?!?!) I just dont understand
> > >
> > > Patrice wrote:
> > > >
> > > > Perhaps I miss something, but I don't see any problem in your code.
> > > > Check that form implement ActionForm (and not ValidatorForm) to
execute
> > > > correctly the validate() method.
> > > > Check also that you don't forget the  tag on your JSP.
> > > >
> > > > Hope it helps
> > > > Patrice
> > > >
> > > > - Original Message -
> > > > From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, November 26, 2002 9:40 PM
> > > > Subject: Re: perform() or execute()?
> > > >
> > > > >
> > > > > I try it again, from the beginning and now this works. I don know
what
> > > > > I do before but I am happy now. Thanks for David and Patrice to
help
> > me.
> > > > > Now I have a new (and diferent) problem. I construct the follow
> > > > > validate() in a ActionForm class:
> > > > >
> > > > >
> > > > > CODE BEGIN--

Re: perform() or execute()? (Mistery)

2002-11-27 Thread Patrice
I don't see anything wrong...
All I know is that empty String is returned when the key on an ActionError
is not present in the default application resource files (defined in
web.xml).

Best regards
Patrice

- Original Message -
From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 12:44 PM
Subject: Re: perform() or execute()? (Mistery)


>
> I check that an all is ok.
> On the truth, the method is executed and the variables checked, the
> errors "listed" on the original form , but they is empty strings
> (?!?!?!?!) I just dont understand
>
> Patrice wrote:
> >
> > Perhaps I miss something, but I don't see any problem in your code.
> > Check that form implement ActionForm (and not ValidatorForm) to execute
> > correctly the validate() method.
> > Check also that you don't forget the  tag on your JSP.
> >
> > Hope it helps
> > Patrice
> >
> > - Original Message -
> > From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 26, 2002 9:40 PM
> > Subject: Re: perform() or execute()?
> >
> > >
> > > I try it again, from the beginning and now this works. I don know what
> > > I do before but I am happy now. Thanks for David and Patrice to help
me.
> > > Now I have a new (and diferent) problem. I construct the follow
> > > validate() in a ActionForm class:
> > >
> > >
> > > CODE BEGIN---
> > >
> > > public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> > > request) {
> > >
> > > ActionErrors errors = new ActionErrors();
> > >
> > > if ((username == null) || (username.length() < 1))
> > > errors.add("username", new ActionError("errors.nousername"));
> > >
> > > if ((password == null) || (username.length() < 1))
> > > errors.add("password", new
> > > ActionError("errors.nopassword"));
> > >
> > > if ( !password.equals(again))
> > > errors.add("passwordagain",new
> > > ActionError("errors.passwordnotmatch"));
> > >
> > > return errors;
> > > }
> > >
> > > CODE
END
> > >
> > > ...and I have the follow entrys on my message resource file:
> > >
> > > FILE BEGIN
> > > (application.properties)--
> > >
> > > # -- standard errors --
> > > errors.nousername=O campo username deve ser preenchido
> > > errors.nopassword=O campo senha deve ser preenchido
> > > errors.passwordnotmatch=As senhas digitadas devem ser iguais
> > > errors.header=
> > > errors.prefix=
> > > errors.suffix=
> > > errors.footer=
> > > # -- validator --
> > > errors.invalid={0} is invalid.
> > > errors.maxlength={0} can not be greater than {1} characters.
> > > errors.minlength={0} can not be less than {1} characters.
> > > --
> > >
> > >  The behavior on form looks like OK, but the messages (inside the
> > >  and ) are empty. No errors, behavior ok but empty Strings.
> > > Please, can someone help to me again? Thanks a lot.
> > >
> > >
> > >
> > > Patrice wrote:
> > > >
> > > > - Original Message -
> > > > From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, November 26, 2002 6:27 PM
> > > > Subject: perform() or execute()?
> > > >
> > > > > Hi, people!
> > > > >
> > > > > I am trying to develop a little system in struts for 3 weeks now
and I
> > > > > can't solve some (very basic) problems. I try read the
documentations,
> > > > > but some I can resolve anyway. Please, I need some help!
> > > > > My questions:
> > > > >
> > > > > 1. When I try to use the execute() in a Action, the method is nota
> > > > > called. When I try with perform() works fine, but I known this is
> > > > > deprecaced. (I try struts 1.0.2 and now struts 1.1 - same
result).
> &g

Re: perform() or execute()?

2002-11-27 Thread Patrice
Perhaps I miss something, but I don't see any problem in your code.
Check that form implement ActionForm (and not ValidatorForm) to execute
correctly the validate() method.
Check also that you don't forget the  tag on your JSP.

Hope it helps
Patrice

- Original Message -
From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 9:40 PM
Subject: Re: perform() or execute()?


>
> I try it again, from the beginning and now this works. I don know what
> I do before but I am happy now. Thanks for David and Patrice to help me.
> Now I have a new (and diferent) problem. I construct the follow
> validate() in a ActionForm class:
>
>
> CODE BEGIN---
>
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> request) {
>
> ActionErrors errors = new ActionErrors();
>
> if ((username == null) || (username.length() < 1))
> errors.add("username", new ActionError("errors.nousername"));
>
> if ((password == null) || (username.length() < 1))
> errors.add("password", new
> ActionError("errors.nopassword"));
>
> if ( !password.equals(again))
> errors.add("passwordagain",new
> ActionError("errors.passwordnotmatch"));
>
> return errors;
> }
>
> CODE END
>
> ...and I have the follow entrys on my message resource file:
>
> FILE BEGIN
> (application.properties)--
>
> # -- standard errors --
> errors.nousername=O campo username deve ser preenchido
> errors.nopassword=O campo senha deve ser preenchido
> errors.passwordnotmatch=As senhas digitadas devem ser iguais
> errors.header=
> errors.prefix=
> errors.suffix=
> errors.footer=
> # -- validator --
> errors.invalid={0} is invalid.
> errors.maxlength={0} can not be greater than {1} characters.
> errors.minlength={0} can not be less than {1} characters.
> ------
>
>  The behavior on form looks like OK, but the messages (inside the
>  and ) are empty. No errors, behavior ok but empty Strings.
> Please, can someone help to me again? Thanks a lot.
>
>
>
> Patrice wrote:
> >
> > - Original Message -
> > From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 26, 2002 6:27 PM
> > Subject: perform() or execute()?
> >
> > > Hi, people!
> > >
> > > I am trying to develop a little system in struts for 3 weeks now and I
> > > can't solve some (very basic) problems. I try read the documentations,
> > > but some I can resolve anyway. Please, I need some help!
> > > My questions:
> > >
> > > 1. When I try to use the execute() in a Action, the method is nota
> > > called. When I try with perform() works fine, but I known this is
> > > deprecaced. (I try struts 1.0.2 and now struts 1.1 - same result).
> >
> > The  method has been deprecated since struts 1.1: so it can't work in
struts
> > 1.0.2
> >
> > > 2. I try to prepopulate a form (request scope) and does not works. I
> > > try to set: request.setAttribute("myfield","myvalue"), and nothing.
> >
> > To populate a form from an action, you need to cast the ActionForm
passed as
> > parameter to the perform (or execute) method of your action and then,
set
> > the different properties to the appropriate values:
> > for example:
> >
> > MyForm myForm = (MyForm) form;
> > myForm.setMyField("myValue");
> >
> > > 3. To prepopulate a Form, I must to call a Action, prepopulate a bean
> > > and then call a Form? That right?
> >
> > I don't know what you mean with "call a Form".
> > You just need to set the properties of the form with the values you want
> > Then, the taglib will display the values in the field of the form, on
your
> > JSP.
> >
> > >
> > > Please, I need some help. Thanks to all.
> > >
> >
> > Hope it helps
> > Patrice
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
> --
> CUL8R,[]s
> Jim Bruno Goldberg
> http://www.prosites.com.br
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: perform() or execute()?

2002-11-26 Thread Patrice

- Original Message -
From: "Jim Bruno Goldberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 6:27 PM
Subject: perform() or execute()?


> Hi, people!
>
> I am trying to develop a little system in struts for 3 weeks now and I
> can't solve some (very basic) problems. I try read the documentations,
> but some I can resolve anyway. Please, I need some help!
> My questions:
>
> 1. When I try to use the execute() in a Action, the method is nota
> called. When I try with perform() works fine, but I known this is
> deprecaced. (I try struts 1.0.2 and now struts 1.1 - same result).

The  method has been deprecated since struts 1.1: so it can't work in struts
1.0.2

> 2. I try to prepopulate a form (request scope) and does not works. I
> try to set: request.setAttribute("myfield","myvalue"), and nothing.

To populate a form from an action, you need to cast the ActionForm passed as
parameter to the perform (or execute) method of your action and then, set
the different properties to the appropriate values:
for example:

MyForm myForm = (MyForm) form;
myForm.setMyField("myValue");

> 3. To prepopulate a Form, I must to call a Action, prepopulate a bean
> and then call a Form? That right?

I don't know what you mean with "call a Form".
You just need to set the properties of the form with the values you want
Then, the taglib will display the values in the field of the form, on your
JSP.

>
> Please, I need some help. Thanks to all.
>

Hope it helps
Patrice


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




Re: make a call to external applications

2002-11-26 Thread Patrice
You can use the  tag:


  


  


Best Regards
Patrice

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 5:34 PM
Subject: make a call to external applications


> hi all,
>
> I have several struts applications that I would like to call mainly
> from a portal that users can access after a successful login.
>
> I do do it like the fragment code below.
>
> li>http://localhost:8080/intranetMailAdmin/listMailsToSend.do";
> >
> http://localhost:8080/intranetVL/listParamVL.do";> key="libelle.application.vl"/>
>
> How could I avoid hard coding these calls?
>
> Thankx in advance
>
> Meissa
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: set a html:checkbox checked

2002-11-26 Thread Patrice
If only one catalogBuyerIDType can be selected, the easiest way is to use
radio buttons instead of check boxes.
In your form, the attribute corresponding to the radio buttons can be a
simple String (and not an array of Strings) because only one value can be
selected at once.

So, in your initialization action:
...
CatalogProfileDataForm catalogProfileDataForm = (CatalogProfileDataForm)
form;
catalogProfileDataForm.setCatalogBuyerIDType("99");
...

and in your JSP:



The radio button with value="99" will be selected into the JSP, and after
submission of the form, the property catalogBuyerIDType will contain the
value that corresponds to the selected radio button.

Best regards
Patrice


- Original Message -
From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 1:28 PM
Subject: RE: set a html:checkbox checked


> Hallo Patrice,
>
> thank you,thank you,thank you,thank you,thank you,thank you,thank you
>
> for the solution. this works excellent.
>
> But, is there somethink like  for the  tag.
> Because  seems to create only checkbox-inputs.
>
> again thx alot
> -Original Message-
> From: Patrice [mailto:[EMAIL PROTECTED]]
> Sent: Dienstag, 26. November 2002 12:27
> To: Struts Users Mailing List
> Subject: Re: set a html:checkbox checked
>
>
> As I said, I think the  tag should be an alternative to
your
> javascript initialization:
>
> If I anderstand, you have some checkboxes "catalogBuyerIDType" whith
> different values, and you want check one on your JSP (corresponding to the
> property "catalogBuyerIDType" of the "CatalogProfileDataForm").
>
> The catalogBuyerIDType should be an array of String: you just need to put
> the values corresponding to the checkboxes you need to check in your JSP:
> for example, if you want to check only the property corresponding to the
> "99" value: your initialization action should do this:
> ...
> CatalogProfileDataForm catalogProfileDataForm = (CatalogProfileDataForm)
> form;
> // array containing the initial values
> String[] foo = new String[1];
> foo[0] = "99";
> catalogProfileDataForm.setCatalogBuyerIDType(foo);
> ...
>
>
> In your jsp, put your multibox like this:
>
> 
> 
> ...
>
>
> Only those that are contained in the array (corresponding to the property
> catalogBuyerIDType) will be checked in the JSP, and after submission of
the
> form, the array will contain all the values that corresponds to the
checked
> select boxes.
>
> Best regards
> Patrice
>
> - Original Message -
> From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 26, 2002 12:00 PM
> Subject: RE: set a html:checkbox checked
>
>
> > Thank all the people for response.
> >
> > i have done it this way:
> >
> >  property="catalogBuyerIDType" value="">
> >   var catalogBuyerIDType = " property="catalogBuyerIDType"/>" ;
> >   for(var loop=0;loop < self.document.forms[
> "catalogprofiledataForm" ].elements[ "catalogBuyerIDType" ].length;
loop++ )
> >   {
> > if (
>
self.document.forms["catalogprofiledataForm"].elements["catalogBuyerIDType"]
> [loop].value == catalogBuyerIDType )
> > {
> >   self.document.forms[ "catalogprofiledataForm" ].elements[
> "catalogBuyerIDType" ][ loop ].checked = true ;
> >   break;
> > }
> >   }
> > 
> >
> > But in my opinion MVC seems to be not well implementet in STRUTS.
> > Because i have controller logic in my preantation layer (View).
> >
> > Georg
> >
> > -Original Message-
> > From: Patrice [mailto:[EMAIL PROTECTED]]
> > Sent: Dienstag, 26. November 2002 11:48
> > To: Struts Users Mailing List
> > Subject: Re: set a html:checkbox checked
> >
> >
> > Hi Georg,
> >
> > If you wish to utilize String value other than "true", "yes", or
"on"...,
> > you can use the  tag.
> >
> > Best regards
> > Patrice
> >
> > - Original Message -
> > From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 26, 2002 9:25 AM
> > Subject: RE: set a html:checkbox checked
> >
> >
> > > Sorry, if i use this i get an NoSuchMethod Error.
> > >
> > > But, 

Re: set a html:checkbox checked

2002-11-26 Thread Patrice
As I said, I think the  tag should be an alternative to your
javascript initialization:

If I anderstand, you have some checkboxes "catalogBuyerIDType" whith
different values, and you want check one on your JSP (corresponding to the
property "catalogBuyerIDType" of the "CatalogProfileDataForm").

The catalogBuyerIDType should be an array of String: you just need to put
the values corresponding to the checkboxes you need to check in your JSP:
for example, if you want to check only the property corresponding to the
"99" value: your initialization action should do this:
...
CatalogProfileDataForm catalogProfileDataForm = (CatalogProfileDataForm)
form;
// array containing the initial values
String[] foo = new String[1];
foo[0] = "99";
catalogProfileDataForm.setCatalogBuyerIDType(foo);
...


In your jsp, put your multibox like this:



...


Only those that are contained in the array (corresponding to the property
catalogBuyerIDType) will be checked in the JSP, and after submission of the
form, the array will contain all the values that corresponds to the checked
select boxes.

Best regards
Patrice

- Original Message -
From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 12:00 PM
Subject: RE: set a html:checkbox checked


> Thank all the people for response.
>
> i have done it this way:
>
> 
>   var catalogBuyerIDType = "" ;
>   for(var loop=0;loop < self.document.forms[
"catalogprofiledataForm" ].elements[ "catalogBuyerIDType" ].length; loop++ )
>   {
> if (
self.document.forms["catalogprofiledataForm"].elements["catalogBuyerIDType"]
[loop].value == catalogBuyerIDType )
> {
>   self.document.forms[ "catalogprofiledataForm" ].elements[
"catalogBuyerIDType" ][ loop ].checked = true ;
>   break;
> }
>   }
> 
>
> But in my opinion MVC seems to be not well implementet in STRUTS.
> Because i have controller logic in my preantation layer (View).
>
> Georg
>
> -Original Message-
> From: Patrice [mailto:[EMAIL PROTECTED]]
> Sent: Dienstag, 26. November 2002 11:48
> To: Struts Users Mailing List
> Subject: Re: set a html:checkbox checked
>
>
> Hi Georg,
>
> If you wish to utilize String value other than "true", "yes", or "on"...,
> you can use the  tag.
>
> Best regards
> Patrice
>
> - Original Message -
> From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 26, 2002 9:25 AM
> Subject: RE: set a html:checkbox checked
>
>
> > Sorry, if i use this i get an NoSuchMethod Error.
> >
> > But, even it schould work, how could i set the value other than "on"
> "true" or "false"
> > _AND_ the checkbox checked?
> >
> > in html like this
> >
> > 
> >
> > thx in advance
> >
> > -Original Message-
> > From: Patrice [mailto:[EMAIL PROTECTED]]
> > Sent: Montag, 25. November 2002 19:52
> > To: Struts Users Mailing List
> > Subject: Re: set a html:checkbox checked
> >
> >
> > I think you should set the property of the form in an action, that will
> > forward to your JSP.
> > In this action, set the property corresponding to your check box at
true:
> >
> > MyForm myForm = (MyForm) form;
> > if (tablecolumn.value == 1) {
> > myForm.setCheckboxProperty = true;
> > }
> >
> > Then, the check box corresponding to CheckBoxProperty will be checked on
> the
> > JSP.
> >
> > Hope it helps
> > Patrice
> >
> >
> >
> > - Original Message -
> > From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Sent: Monday, November 25, 2002 5:44 PM
> > Subject: RE: set a html:checkbox checked
> >
> >
> > > The poblem is not to post back, the problem ist to populate the
checkbox
> > checked.
> > >
> > > I would like to set the checked attribut dynamically.
> > >
> > > something like :
> > > if tablecolumn.value == 1 then checkbox = checked
> > >
> > > any idea
> > > thx georg M.
> > >
> > >
> > > Don't use the struts tag.  The struts checkbox tag assumes all
> > > checkboxes are off.  Use something like
> > >
> > > 
> > >
> > > As long as yo

Re: set a html:checkbox checked

2002-11-26 Thread Patrice
Hi Georg,

If you wish to utilize String value other than "true", "yes", or "on"...,
you can use the  tag.

Best regards
Patrice

- Original Message -
From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 9:25 AM
Subject: RE: set a html:checkbox checked


> Sorry, if i use this i get an NoSuchMethod Error.
>
> But, even it schould work, how could i set the value other than "on"
"true" or "false"
> _AND_ the checkbox checked?
>
> in html like this
>
> 
>
> thx in advance
>
> -Original Message-
> From: Patrice [mailto:[EMAIL PROTECTED]]
> Sent: Montag, 25. November 2002 19:52
> To: Struts Users Mailing List
> Subject: Re: set a html:checkbox checked
>
>
> I think you should set the property of the form in an action, that will
> forward to your JSP.
> In this action, set the property corresponding to your check box at true:
>
> MyForm myForm = (MyForm) form;
> if (tablecolumn.value == 1) {
> myForm.setCheckboxProperty = true;
> }
>
> Then, the check box corresponding to CheckBoxProperty will be checked on
the
> JSP.
>
> Hope it helps
> Patrice
>
>
>
> - Original Message -
> From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Monday, November 25, 2002 5:44 PM
> Subject: RE: set a html:checkbox checked
>
>
> > The poblem is not to post back, the problem ist to populate the checkbox
> checked.
> >
> > I would like to set the checked attribut dynamically.
> >
> > something like :
> > if tablecolumn.value == 1 then checkbox = checked
> >
> > any idea
> > thx georg M.
> >
> >
> > Don't use the struts tag.  The struts checkbox tag assumes all
> > checkboxes are off.  Use something like
> >
> > 
> >
> > As long as you use the name which corresponds to the form bean property
> > struts will correctly link the data back to your form.  Hope this helps.
> >
> > Edgar
> >
> > -Original Message-
> > From: Mouratidis, Georg [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 25, 2002 11:25 AM
> > To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
> > Subject: RE: set a html:checkbox checked
> >
> >
> > Hi, Oliver
> >
> > did you get any response. i'm looking for the same.
> > could you send me your solution please?
> >
> > thx
> >
> > Georg M.
> >
> > -Original Message-
> > From: Oliver Kersten [mailto:[EMAIL PROTECTED]]
> > Sent: Donnerstag, 21. November 2002 17:34
> > To: [EMAIL PROTECTED]
> > Subject: set a html:checkbox checked
> >
> >
> > Hi,
> >
> > how can I set a checkbox checked during creation in the JSP. In HTML I
> > would do it like this:
> >
> >   
> >
> > But I can't find that for the struts tag:
> >
> >   check it
> >
> > And can I use the value "true" to set a checkbox checked. I get only a
> > "true" from my bean and not a "checked" or something else.
> >
> > ciao Oliver.
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




Re: How can I use for properties such as isKnown() ?

2002-11-26 Thread Patrice
x.isKnown() seems to return a boolean, so, I think you can do this:


...



Hope it helps
Patrice


- Original Message -
From: "Zsolt Koppany" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 9:46 PM
Subject: How can I use  for properties such as isKnown() ?


> Hi,
>
> is it possible to use  for properties such as isKnown()? I
would
> like to rewrite the code as follows:
> <% is (x.isKnown()) { %>
> 
> <% } %>
>
> Zsolt
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




Re: Nested Iterate Tag and indexId problem

2002-11-25 Thread Patrice
I don't know nested tags on version 1.02 of Struts, and perhaps it's a
stupid question, but are you sure that it is possible to use scriplet values
on the onchange parameter of the tag: is  set to "true" for
this attribute, on the .tld file of the taglib ?

Patrice

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 9:11 PM
Subject: Nested Iterate Tag and indexId problem


> Nested tags were available as a separate download prior to 1.1.  I have
> been using them quite succesfully up until now.
>
> What I really need to do is this
>
> I have several rows of data which are editable in individual text boxes.
> For each row I have a checkbox.
>
> When the user makes a change in any of the rows I need to set the check
> box to selected.
>
> The probblem is that I am unable to get the nested:text onchange event to
> evaluate a run time expression.  It just dumps my code out as it.
>
> So this...
>
> 
>
> results in html something like this...
>
> 
>
> instead of
>
> onchange="makeEditDirty('a','b','0');" />
>
> I need to be able to pass in the row number to this script method.
>
> Regards.
>
> David
>


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




Re: set a html:checkbox checked

2002-11-25 Thread Patrice
I think you should set the property of the form in an action, that will
forward to your JSP.
In this action, set the property corresponding to your check box at true:

MyForm myForm = (MyForm) form;
if (tablecolumn.value == 1) {
myForm.setCheckboxProperty = true;
}

Then, the check box corresponding to CheckBoxProperty will be checked on the
JSP.

Hope it helps
Patrice



- Original Message -
From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 5:44 PM
Subject: RE: set a html:checkbox checked


> The poblem is not to post back, the problem ist to populate the checkbox
checked.
>
> I would like to set the checked attribut dynamically.
>
> something like :
> if tablecolumn.value == 1 then checkbox = checked
>
> any idea
> thx georg M.
>
>
> Don't use the struts tag.  The struts checkbox tag assumes all
> checkboxes are off.  Use something like
>
> 
>
> As long as you use the name which corresponds to the form bean property
> struts will correctly link the data back to your form.  Hope this helps.
>
> Edgar
>
> -Original Message-
> From: Mouratidis, Georg [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 11:25 AM
> To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
> Subject: RE: set a html:checkbox checked
>
>
> Hi, Oliver
>
> did you get any response. i'm looking for the same.
> could you send me your solution please?
>
> thx
>
> Georg M.
>
> -Original Message-
> From: Oliver Kersten [mailto:[EMAIL PROTECTED]]
> Sent: Donnerstag, 21. November 2002 17:34
> To: [EMAIL PROTECTED]
> Subject: set a html:checkbox checked
>
>
> Hi,
>
> how can I set a checkbox checked during creation in the JSP. In HTML I
> would do it like this:
>
>   
>
> But I can't find that for the struts tag:
>
>   check it
>
> And can I use the value "true" to set a checkbox checked. I get only a
> "true" from my bean and not a "checked" or something else.
>
> ciao Oliver.
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




Re:

2002-11-25 Thread Patrice
You can't use tags in tags: try this:




Hope it helps
Patrice

- Original Message -
From: "Shryock, Chad" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 7:22 PM
Subject:  Hello,
>
> I have a page that has a large form. I need to be able to make some fields
> read-only dynamically for some views of the table. I tried  property="userID" readonly=" property="userReadOnlyState"/>"/>.
>
> Thanks,
> Chad Shryock.
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Nested Iterate Tag and indexId problem

2002-11-25 Thread Patrice
Perhaps I made a mistake, but nested tags are available since Struts 1.1: I
think they are not available on Struts 1.02.

Best regards
  Patrice

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 6:33 PM
Subject: Nested Iterate Tag and indexId problem


> I am using the nested tags with Struts 1.02.
>
> I want to be able to dynamically set a call to a javascript function.  I
> want to pass in the row number to the function.
>
> I currently have
>
>
>  type="abbott.ai.tcgm.entities.AsrTran" indexId="idx">
> 
> 
>  size="1" styleClass="maintWidth1"
>  onchange="makeEditDirty('hideOnEdit','showOnEdit',' scope="page" />');"
> onkeyup="return autoTab(this, 1, event);"
> />
> 
> 
> 
>
> This does not work.
>
>
> I have also tried
>
>  type="abbott.ai.tcgm.entities.AsrTran" indexId="idx">
> 
> 
>  size="1" styleClass="maintWidth1"
>  onchange="makeEditDirty('hideOnEdit','showOnEdit','<%="idx"%>');"
> onkeyup="return autoTab(this, 1, event);"
> />
> 
> 
> 
>
> It does not work either.
>
> It is looking to me like a bug with the nested tags.  They sure have been
> very useful.  I would hate to change all the code back at this point.
>
> Why can I use a regular jsp <%=idx%> to get the value of the indexId from
> the iterate tag?
>
> Thanks.
>


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




Re: Problem with pre-select html:select Tag

2002-11-22 Thread Patrice
I'm searching, but I don't see what's wrong...
A stupid question: you don't remove the form from the request (or the
session) in your action, or do something like setSelectCmp("") ?


- Original Message -
From: "Yann Verlynde" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 5:56 PM
Subject: Re: Problem with pre-select html:select Tag


> Patrice,
>
> I have a form Class and an Action class. My action class access to a
> database and get back the content of the second list (which is calculated
by
> the value clicked on the first list) . I have the second list in my JSP
but
> the first is not positionned on the user's choice.
>
> Thanks in advance
> Yann
> - Original Message -
> From: "Patrice" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, November 22, 2002 5:48 PM
> Subject: Re: Problem with pre-select html:select Tag
>
>
> > Yann,
> >
> > I've got another question: the form action is a struts action that
> > calculates the content of the second list, isn't it ?
> >
> >
> > - Original Message -
> > From: "Yann Verlynde" <[EMAIL PROTECTED]>
> > To: "Struts" <[EMAIL PROTECTED]>
> > Sent: Friday, November 22, 2002 5:15 PM
> > Subject: Problem with pre-select html:select Tag
> >
> >
> > > Hello,
> > >
> > > I have already read a lot of posts to implements that but I don't
> > > understand.
> > >
> > > Process: When the user select a value on the combo select, the page
> > refresh
> > > and fill a new select tag by a content which depend on the value
> selected
> > by
> > > the user.  The second select tag is well filled but the first is not
pre
> > > select on the value clicked by the user.
> > >
> > > I don't understand why my select tag doesn't pre-select the good
value.
> My
> > > form class is in session scope and when I test my value it seems that
it
> > has
> > > the good value.
> > > Does anyone can help me please?
> > >
> > > <%=request.getParameter("selectCMP")%>
> > > 
> > >   
> > > Choisissez votre Cadre Emploi
> > >   
> > >> property="CMP_ID"/>
> > > 
> > >
> > > Thanks in advance
> > >
> > > Yann VERLYNDE
> > > Ingénieur d'Etudes
> > > Oxade Ingénierie
> > > 13, Place Kossuth
> > > 75009 PARIS
> > >
> > > Tel  : 01 42 82 99 38
> > > Fax : 01 42 82 99 35
> > > www.oxade.com
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Problem with pre-select html:select Tag

2002-11-22 Thread Patrice
Yann,

I've got another question: the form action is a struts action that
calculates the content of the second list, isn't it ?


- Original Message -
From: "Yann Verlynde" <[EMAIL PROTECTED]>
To: "Struts" <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 5:15 PM
Subject: Problem with pre-select html:select Tag


> Hello,
>
> I have already read a lot of posts to implements that but I don't
> understand.
>
> Process: When the user select a value on the combo select, the page
refresh
> and fill a new select tag by a content which depend on the value selected
by
> the user.  The second select tag is well filled but the first is not pre
> select on the value clicked by the user.
>
> I don't understand why my select tag doesn't pre-select the good value. My
> form class is in session scope and when I test my value it seems that it
has
> the good value.
> Does anyone can help me please?
>
> <%=request.getParameter("selectCMP")%>
> 
>   
> Choisissez votre Cadre Emploi
>   
>   
> 
>
> Thanks in advance
>
> Yann VERLYNDE
> Ingénieur d'Etudes
> Oxade Ingénierie
> 13, Place Kossuth
> 75009 PARIS
>
> Tel  : 01 42 82 99 38
> Fax : 01 42 82 99 35
> www.oxade.com
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Problem with pre-select html:select Tag

2002-11-22 Thread Patrice
Hi Yann,

Should I know what is in your javascript function choix(this) ?

Patrice

- Original Message -
From: "Yann Verlynde" <[EMAIL PROTECTED]>
To: "Struts" <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 5:15 PM
Subject: Problem with pre-select html:select Tag


> Hello,
>
> I have already read a lot of posts to implements that but I don't
> understand.
>
> Process: When the user select a value on the combo select, the page
refresh
> and fill a new select tag by a content which depend on the value selected
by
> the user.  The second select tag is well filled but the first is not pre
> select on the value clicked by the user.
>
> I don't understand why my select tag doesn't pre-select the good value. My
> form class is in session scope and when I test my value it seems that it
has
> the good value.
> Does anyone can help me please?
>
> <%=request.getParameter("selectCMP")%>
> 
>   
> Choisissez votre Cadre Emploi
>   
>   
> 
>
> Thanks in advance
>
> Yann VERLYNDE
> Ingénieur d'Etudes
> Oxade Ingénierie
> 13, Place Kossuth
> 75009 PARIS
>
> Tel  : 01 42 82 99 38
> Fax : 01 42 82 99 35
> www.oxade.com
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Réf. : Re: Réf. : Re: imge submit tag error

2002-11-22 Thread Patrice
oops, I made a mistake... that was a  tag instead of a  tag !


  


So, it is strange that it works with an image tag: I think it is not working
with all web browsers.

Sorry
Patrice

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 3:59 PM
Subject: Réf. : Re: Réf. : Re: imge submit tag error


>
> Patrice,
> I've tried your suggestion and it works well !
>
> I didn't know is was possible to nest image tag inside link tag.
>
> thank you very much.
>
> Meissa
>
>
>
>
> "Patrice" <[EMAIL PROTECTED]> on 22/11/2002 15:37:46
>
> Veuillez répondre à "Struts Users Mailing List"
><[EMAIL PROTECTED]>
>
> Pour : "Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc :
> Objet : Re: Réf. : Re: imge submit tag error
>
>
> The  render an input tag of type "image". The action that will
> be performed is those defined in the .
> If you want to call dirrectly an action, without sumit a form, I suggest
> you
> to use a simple link:
>
> 
>"Supprimer" border="0"/>
> 
>
> Best Regards
> Patrice
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, November 22, 2002 3:29 PM
> Subject: Réf. : Re: imge submit tag error
>
>
> >
> > If I specify only src, which attribute do I use to tell the action to
> > perform ?
> >
> >
> >
> >
> >
> >
> > "Patrice" <[EMAIL PROTECTED]> on 22/11/2002 15:17:19
> >
> > Veuillez répondre à "Struts Users Mailing List"
> ><[EMAIL PROTECTED]>
> >
> > Pour : "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > cc :
> > Objet : Re: imge submit tag error
> >
> >
> > You must specify only src or only page, but not both.
> >
> > Best regards
> > Patrice
> >
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, November 22, 2002 3:00 PM
> > Subject: imge submit tag error
> >
> >
> > > hi all,
> > >
> > > I've a problem when I try to use the image tag.
> > >
> > > I do use it like this
> > >
> > >  > > "Supprimer" border="0"/>
> > >
> > > The following ServletException is raised
> > >
> > > javax.servlet.ServletException: You must specify exactly one of src,
> > > srcKey, page, or pageKey
> > >
> > > And I don't have any exception when I remove the page attribute.
> > >
> > > It seems like I'm using it wrongly.
> > >
> > > can someone tells me what I've missed.
> > >
> > > thanks
> > >
> > > Meissa
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:   <
> > mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <
> > mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




Re: Réf. : Re: imge submit tag error

2002-11-22 Thread Patrice
The  render an input tag of type "image". The action that will
be performed is those defined in the .
If you want to call dirrectly an action, without sumit a form, I suggest you
to use a simple link:


  


Best Regards
Patrice

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 3:29 PM
Subject: Réf. : Re: imge submit tag error


>
> If I specify only src, which attribute do I use to tell the action to
> perform ?
>
>
>
>
>
>
> "Patrice" <[EMAIL PROTECTED]> on 22/11/2002 15:17:19
>
> Veuillez répondre à "Struts Users Mailing List"
><[EMAIL PROTECTED]>
>
> Pour : "Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc :
> Objet : Re: imge submit tag error
>
>
> You must specify only src or only page, but not both.
>
> Best regards
> Patrice
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, November 22, 2002 3:00 PM
> Subject: imge submit tag error
>
>
> > hi all,
> >
> > I've a problem when I try to use the image tag.
> >
> > I do use it like this
> >
> >  > "Supprimer" border="0"/>
> >
> > The following ServletException is raised
> >
> > javax.servlet.ServletException: You must specify exactly one of src,
> > srcKey, page, or pageKey
> >
> > And I don't have any exception when I remove the page attribute.
> >
> > It seems like I'm using it wrongly.
> >
> > can someone tells me what I've missed.
> >
> > thanks
> >
> > Meissa
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




Re: imge submit tag error

2002-11-22 Thread Patrice
You must specify only src or only page, but not both.

Best regards
Patrice

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 3:00 PM
Subject: imge submit tag error


> hi all,
>
> I've a problem when I try to use the image tag.
>
> I do use it like this
>
>  "Supprimer" border="0"/>
>
> The following ServletException is raised
>
> javax.servlet.ServletException: You must specify exactly one of src,
> srcKey, page, or pageKey
>
> And I don't have any exception when I remove the page attribute.
>
> It seems like I'm using it wrongly.
>
> can someone tells me what I've missed.
>
> thanks
>
> Meissa
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Index Based Names in Iterate Tag

2002-11-21 Thread Patrice
I think that you can use a scriplet to define the property name:

<% String property = null; %>


<% property = "select" + index; %>

    


Hope it helps
   Patrice

- Original Message -
From: "Cohan, Sean" <[EMAIL PROTECTED]>
To: "Struts (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 2:44 PM
Subject: Index Based Names in Iterate Tag


> I want to present a collection of beans using the  tag.
One
> of the fields in the collection is another collection of beans.  This
second
> collection of beans I want presented in an html select object.  In my
Action
> Class, I'd like to iterate through the first collection creating http
> request attributes, each one containing an instance of the second
> collection.  Something like this:
>
> List list = (List) getList();
> Iterator it = list.iterator();
>
> for (i=1; it.hasNext(), i++) {
>   MyBean myBean = (MyBean) it.next();
>   request.setAttribute ("select"+ i, (List) myBean.getOtherList());
> }
>
> I want to use the  tag to populate the select objects.  The
> collection parameter of  will have to the name of the
> attributes created above (i.e., "select1", "select2", "select3",...)
>
> How can I create the collection name in each  tag in the
jsp?
> Can I use the indexId of the Iterate tag somehow to create it?  For
example,
> something like:
>
>   
>   
> 
>   
>  
> labelProperty="description" />
>  
>   
> 
>   
>   
>
> I know my use of indexOf can't be right.  I'm just trying to show the idea
> of what I'm trying to do.
>
>
> Thanks.
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Cancel button with Javascript validation

2002-11-04 Thread Patrice Thiebaud
In a page with Javascript validation, I use the html:cancel tag.

When I click on the Cancel button, the Javascript form validation function 
is called and an error message is displayed if I didn't enter valid 
information for the different fields of the form. So the cancellation is 
not taken into account.
What can I do to bypass the Javascript validation when the Cancel button is 
clicked ?

Thanks in advance.

--
Patrice Thiebaud - Presales Senior Consultant
BEA Systems - France
Tour Manhattan
6 place de l'Iris
92095 PARIS La Défense Cédex
Tel: 33 1 41 45 70 27 Mobile: 06 08 05 95 95
--




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>