Andrew Baba wrote:
Here is code and advices in comments for a save localization data, I also added a sample how they display pages in listLoclizationData page
Wendy Gibbons wrote:do you know about forms, and submitting in HTML? As that is what you should be learning and writing.
Then the java should be in the servlet that gets called when the form submits, and the servlet then sets the next page.
I do not know how that fits in with all the framwork code you have to work around.
I would recommend getting a good book, the head first jsp book is good
http://shop.oreilly.com/product/9780596516680.do
Wendy Gibbons wrote:Have a look at enums (not enumerations)
here is a good page:
http://docs.oracle.com/javase/1.5.0/docs/guide/language/enums.html
I would make a method in ModelToCheck that took a language and s_TheTranslation, then this code could be inside model to check.
then inside model to check it could use the enum.
here is some psuedo code, because how to get the correct enum from the id is a bit of a learnt trick (it will not compile)
Wendy Gibbons wrote:I do, you can either have 20 small classes, or 1 enum each with it's own method
can you show me how you would do it with generics?
Andrew Moko wrote:
Wendy Gibbons wrote:I do, you can either have 20 small classes, or 1 enum each with it's own method
can you show me how you would do it with generics?
Sure. Here's my two centavos..
This method allows languages to be set dynamically without necessarily modifying the LocalizationDataModel class.
Wendy Gibbons wrote:
Andrew Moko wrote:
Wendy Gibbons wrote:I do, you can either have 20 small classes, or 1 enum each with it's own method
can you show me how you would do it with generics?
Sure. Here's my two centavos..
This method allows languages to be set dynamically without necessarily modifying the LocalizationDataModel class.
you haven't shown how you get the language class from the ID that is supplied, how you get rid of that big case statement?
Friends help you move. Good friends help you move bodies. This tiny ad will help:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
|