GeeCON Prague 2014*
The moose likes Struts and the fly likes Retrieve value from Action to a sj:textfield using sj:select Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Retrieve value from Action to a sj:textfield using sj:select" Watch "Retrieve value from Action to a sj:textfield using sj:select" New topic
Author

Retrieve value from Action to a sj:textfield using sj:select

Giovanni Pelissoni
Greenhorn

Joined: Oct 15, 2012
Posts: 2
Hi folks, i'm new in forum and did search this question, this is the problem



There is 2 selects on my jsp pages, and they are working properly, when i change the first the second is filled ok, and when I change the second select my sj:textfield is filled with the following:


{"cobrancaTipo":"TRIMESTRAL","codCliente":null,"listaClientes":null,"listaProcessos":null,"selecaoCliente":"4","selecaoProcesso":"2","tipoCobranca":{"codigoCobranca":2,"descricaoCobranca":"TRIMESTRAL","historicotaxa":null,"taxaJuros":30.0,"vlmoraDiaria":1.0}}

and I would like fill this textfield with only TRIMESTRAL


here are my codes





Here I my Action



Someone know how can I solve this?
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi Giovanni,

Welcome to JavaRanch. You can do this by using the javascript once you have the values in select then you can assign the value from select to textfiled.

Regards
Jatan
Giovanni Pelissoni
Greenhorn

Joined: Oct 15, 2012
Posts: 2
Hi Jatan, thanks for the welcome,

It's really a great ideia, i was trying use Jquery to get the Action return, do you have any Idea how to do this???


I tried the following, but doesnt work as I thought.



I'm really glad for the advance
 
GeeCON Prague 2014
 
subject: Retrieve value from Action to a sj:textfield using sj:select