Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to map fields and Actions

Status
Not open for further replies.

zooxmusic

Programmer
Nov 24, 2004
96
US
Hi again,
I have another probably simple challenge that I need help on. I am now starting to utilitze the AbstractAction in java. I now am thinking if I have a DlgInput of some sort, how do I get the data that was typed in to the action? Or do I take care of that elsewhere? I was thinking something like a FormData class that will hold the filds I need and then somehow map those to the fields on the DlgInput but I am unsure of how that would work and maybe it won't. Any help would be appreciated.

Brian


Spend like you don't need the money,
love like you've never been hurt and dance like nobody's watching!
 
You could use the putValue(String key, Object value) method of the Action interface to pass the data into the Action implementation. This can then be retrieved in the ActionListener using the getValue(String key) method. Some keys are already defined in the Action class, but you could define your own.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
... did this help? Am I way off beam? Don't just leave the post hanging, Brian.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Sorry Tim,
I actually wrote it for a collegue and I actually think it is very related to what Ed is trying to do in the next post. I haven't been working on this so I apologize. I will find out and let you know.

Brian


Spend like you don't need the money,
love like you've never been hurt and dance like nobody's watching!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top