Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a generic doubt

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not know whether this question can be posted here but I would go ahead as my app is in struts-2...

I have a login page.After logging in...

There are 3 platforms for persistence...

1)xml
2)db
3)Serializable Object

I need to program this inputs and allow the user to decide his persistence platform...what is the best way to do it, and how to project this part in UI??

properties file?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Radiobox or dropdown?
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes,so how will my action classes behave or rather how should they be managed?

like, lets say I have an action class for creating a project called CreateProjectAction...

Here based on the type selected i need to create project ,For Ex if the user selects XML,the application should do xml related stuff and
I should create a Project element in an XML file in CreateProjectAction and If it's DB i should turn my application in DB mode and insert a project row in projectTable...

How to manage this way? any others inputs would be great help!!! thanks
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could do anything from a simple if else / switch or do something more refined like switch to different strategies of creating a project based on the selected value. You question seems to be about java in general rather than struts
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic