File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes a generic doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "a generic doubt" Watch "a generic doubt" New topic

a generic doubt

Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
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...

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

Joined: Sep 29, 2008
Posts: 12617

Radiobox or dropdown?
Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
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

Joined: Feb 24, 2006
Posts: 6662

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

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
I agree. Here's the link:
subject: a generic doubt
It's not a secret anymore!