Re: javascript update tag value property [OFFTOPIC?]

2007-11-21 Thread Domingo A. Rodriguez S.
Hello Victor,

Simplify. something like this should work.

Maquina.onChange event 
{
document.form1.textfield1.value=
document.form1.Maquina.options[document.form1.Maquina.selectedIndex].value;
}

Regards,
Domingo

--- victor sosa [EMAIL PROTECTED] escribió:

 
 ANY IDEAS, how to? 
 
 
 victor sosa wrote:
  
  Hi, I am trying to update a textfield when the select is changed using
  javascript event onchange, so How I can do that? Which is the best
  practices here?
  
  
  Here is my code, any Ideas?
  
  script type=text/javascript
  function getVolumenInicial() {
  var volumenInicial =
 document.getElementById('save_volumenInicial');
  var maquinaSelected =
 document.getElementById('save_maquina_codigo');
  volumenInicial.value = '%{maquinas[' +
 maquinaSelected.selectedIndex +
  '].metro}';
  }
  /script
  .
  s:select label=Maquina name=maquina.codigo list=maquinas
  onchange=getVolumenInicial();
  value=%{maquina.codigo} required=true 
  listKey=codigo
  listValue=codigo /
   
  s:textfield label=Volumen Inicial name=volumenInicial 
  value=%{venta.volumenInicial} readonly=true size=7
 maxlength=9
  /
  
  ANY IDEAS, how to?
  
  
 
 -- 
 View this message in context:

http://www.nabble.com/javascript-update-tag-value-property-tf4843331.html#a13858354
 Sent from the Struts - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



  Comparte video en la ventana de tus mensajes (y también tus fotos de 
Flickr). Usa el nuevo Yahoo! Messenger versión Beta.
http://e1.beta.messenger.yahoo.com/

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



Re: Graceful way to handle quotation marks in forms

2005-07-11 Thread Domingo A. Rodriguez S.

String value1= request.getParameter(value1).replace('\'','`');

Just replace the quotation mark for a backtick. Users will not usually
notice the change :)




 --- Walter, Matt [EMAIL PROTECTED] escribió:

 I was wondering if there was a tried and true method to handle form
 input that had been pasted from Microsoft Word which might contain
 fancy quotation marks (U+201C  U+201D aka left and right double
 quotation marks... see
 http://www.fileformat.info/info/unicode/char/201c/index.htm). Currently,
 if we get a form that has them in it, we store the data, and then when
 we display it back to the user, it renders as a question mark in the
 browser.
 
  
 
 Thanks.
 
 


__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.espanol.yahoo.com/ 

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



Re: [OT] Good luck Dream Team

2004-08-30 Thread Domingo A. Rodriguez S.
(1) USA= http://www.athens2004.com/en/OlympicMedals/medals?noc=USA
(18)Brasil= http://www.athens2004.com/en/OlympicMedals/medals?noc=BRA
(34)Jamaica= http://www.athens2004.com/en/OlympicMedals/medals?noc=JAM
(38)Argentina= http://www.athens2004.com/en/OlympicMedals/medals?noc=ARG 

Now it looks better.



 --- Lucas Gonzalez Pearson [EMAIL PROTECTED] escribió: 
 
 Uruguay = 2nd place
 Italia = 3rd place
 IRAK = 4th place
 
 BRASIL = ... OUT ? ..
 
 LOL
 
 - Original Message - 
 From: Henrique VIECILI [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Monday, August 30, 2004 3:29 PM
 Subject: Re: [OT] Good luck Dream Team
 
 
 They won once, soon they will say that Ginobili is better than Jordan
 like
 they do today, saying that Maradona is better than Pelé... The
 difference
 between the players is the same...
 
 USA = basketball
 Brazil = soccer/football
 Argentina = tango
 
 Henrique Viecili
 a brazilian guy
   - Original Message - 
   From: ksitron
   To: Struts Users Mailing List
   Sent: Friday, August 27, 2004 6:44 PM
   Subject: Re: [OT] Good luck Dream Team
 
 
   Your team won this game fair and square. I have no problem with that.
 I
   live in San Antonio, Texas
   and watch Manu all the time. He can flat out hoop. But, it's one thing
   to be proud of this accomplishment for the country of Argentina. And,
   celebrate this victory, I understand that. But, don't pound your chest
   and try to put down our guys. Especically since you played our B team.
   Had, Shaq,KG,Kobe Michael Redd,Brent Barry have gone, As well as a
   better coach.
   things may have turned out differently.
 
   PS, I'm  happy for you Argentinian guys
 
   Vic wrote:
 
Argentina is an upset winer.
The faviorites lost by a point earlier (to Argentina)
http://www.rediff.com/sports/2002/sep/09basket.htm
   
.V
   
Lucas Gonzalez Pearson wrote:
   
Hey we won!
   
Lucas
   
ps.- an argentinian guy
   
- Original Message - From: ksitron [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, August 27, 2004 5:45 PM
Subject: Re: [OT] Good luck Dream Team
   
   
   
That's Ok. You guys can talk smack now. But, I'm sure in four
 years
you'll be eating humble pie.
AGAIN.
   
Guillermo Meyer wrote:
   
   
Hey, Dream Team, Argentina wishes you good luck in bronze medal
 match!
   
Cheers.
Guillermo
Argentinian Basketball fan.
   
PD: Go Ginobili Go!!!
   

FiberTel, el nombre de la banda ancha http://www.fibertel.com.ar
   
   
   
   
 -
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]
 
  

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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



Re: html:options

2004-05-17 Thread Domingo A. Rodriguez S.

Use html:options collection=dummyList labelName=key
labelProperty=value 

Implement this javabean..

public class Row implements java.io.Serializable{ 
  Row(String key, String value){this.key=key;this.value=value;};
  private String key=;
  private String value=;
  public String getKey(){return key;};
  public String getValue(){return value;};
  public void setKey(String key){this.key= key;};
  public void setValue(String value){this.value= value;};
}

 private ArrayList dummyList() {
   ArrayList data = new ArrayList();
   for(int jk=0; jk5; jk++){
   data.add( new Row(jk+, TEXT+jk) );
   }
   return data;
 }


 --- [EMAIL PROTECTED] escribió:   
 What I have:
 
 My DB class returns me following arraylist that I store in request, Pls
 see the code below for the Structure
 
 private ArrayList dummyList() {
   ArrayList row = new ArrayList();
   ArrayList data = new ArrayList();
 
   for(int jk=0; jk5;jk++){
   row = new ArrayList();
   row.add(new Integer(jk)); 
   row.add(TEXT+jk);
   data.add(row);
   }
   return data;
 }
 Here I have an arrayList which itself has an arraylist with two elements
 
 My Problem:
 How can I iterate it to show the it in html:options ??? What name I
 will provide to iterate it to 
 Give Integer element as value field and String field as shown value
 
 Pls provide some example
 
 
 Thanks for your time..
 
 raman
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
  

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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



Re: Array (or List, or Map) Validation

2004-04-30 Thread Domingo A. Rodriguez S.

my problem..

I have a list-backed actionform...
That list can have more than one locationObject javabean...
The locationObject javabean has some fields, including an errorFormat
field..
That errorFormat field can be set using a mutator method from the javabean
called setErrorFormat(BACKGROUND:#00;COLOR:#FF;)..
I am not using the validate method of the actionForm..

my solution..
from inside an Action I do the following..

LocationObjectForm lof= (LocationObjectForm)form;
LDHelper ldh= LDHelper();
LocationObject lob= new LocationObject();
List locations= lof.getLocations();
Iterator cnt= locations.iterator();
boolean isDirty= false;
while(cnt.hasNext()){
  lob= (LocationObject)cnt.next();
  if(!ldh.validateRecord(lob.getCompareField1, lob.getCompareField2)){
  // if the record is not correct, 
  // then i set the errorformat css style
  lob.setErrorFormat(BACKGROUND:#00;COLOR:#FF;);
  isDirty= true;
  }else{
  // i dont want any error format for good records.. 
  lob.setErrorFormat();
  }

  // put the checked list back to the session
  req.getSession().setAttribute(locations, locations);

  if(isDirty){
  // forwarded to the same page or tile definition.. 
  // just to refresh and show the error style where needed..
 return map.findForward(refreshThisDefinition);
  }
  // if there is no problem then jump to the next definition or page..
   return map.findForward(nextDefinition);
}

then.. in the page where i display the records..

table
logic:iterate name=locationform property=locations id=lob indexId=cnt
%
 List locations= locationform.getLocations();
 LocationObject lob= locations.get( cnt.intValue() );
 String estilo= lob.getErrorFormat();
%
tr
td
html:text property=%=locations[+cnt+].campo1 style='%=estilo%'/
/td
td
html:text property=%=locations[+cnt+].campo2 style='%=estilo%'/
/td
td
html:text property=%=locations[+cnt+].campo3 style='%=estilo%'/
/td
/tr
/logic:iterate
/table

Using this I accomplished one of my latest tasks.. :)  I highlight the
incorrect records, so the users will see their errors easier.

Atte.
Domingo A. Rodriguez S.

 --- Niall Pemberton [EMAIL PROTECTED] escribió:  To
make this kind of feature useful there needs to be some way of
 indicating
 which occurance of the indexed property is in error. So, for example, 
 if
 you had a bunch of order beans and were validating the order value I
 would
 want to be able to output a message along the lines of...
 
Order value for order number 12345 is invalid
 or
Order value on line 5 is invalid
 
 ... where order number or line number are other properties from the bean
 being validated. Otherwise if you had 20 errors on order value then you
 just
 get 20 indetical messages along the lines of  Order value is invalid -
 which isn't very useful.
 
 I looked at trying to do this in the current validator but can't see how
 to - have a missed something or am I right and its not possible?
 
 This is an issue for me with the existing functionality where it stops
 on
 the first indexed field in error - we got round it by outputing a
 message
 which doesn't indicate which indexed occurance is in error, but by
 highlighting the field in error, which works reasonably well.
 
 That also would be another type of solution, validate all the indexed
 properties, only show one generic message but highlight all the fields
 in
 error.
 
 I'd be happy if someone would either put me right on this, or say how
 they
 dealt with this scenario.
 
 Niall
 
 
 - Original Message - 
 From: Robert Leland [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, April 30, 2004 1:12 AM
 Subject: Re: Array Validation
 
 
   -Original Message Slightly rearranged -
   From: Glenn, Scott [mailto:[EMAIL PROTECTED]
  
   If there are any Struts developers listening can you explain this ..
 is
 it a
   bug or by design?
 
  Doesn't matter. What matters is that it's not the behavior you need
 right
 ?
  If someone would like to develop and test a patch that adds an option
 to:
A) The PlugIn  XML element in the struts-config.xml
This would change the default behavior to not stop validating on
 an
error for a given module.
  or
B) The Validator.xml itself, which would require a change to the
   validator.dtd, either to:
   B1) The form definition, so the behavior could be changed on a
   per form basis.
   The Option (whenInvalid ? ) would probably have four possible
   values. [stop, inherit, all].
  stop = This is the current default behavior
  go   = This is the behavior you want, where it doesn't
 stop
 at the first error but attempts to validate all
 data.
  inherit = This would inherit the behavior from the parent
 form.
This assumes using Validator 1.2 which has a
validator form inheritance.
  module