struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Punit J Patel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3993) How to implement simple CRUD application
Date Thu, 23 Jan 2014 10:58:42 GMT

    [ https://issues.apache.org/jira/browse/WW-3993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13879845#comment-13879845
] 

Punit J Patel commented on WW-3993:
-----------------------------------

This problem not resolved by paramsPrepareParamsStack.I resolved this problem by using input
method instead of prepareInput and InputConfig annotation as below :

	@Override
    public String input() {
    	carModelsAvailable = personService.getCarModels();
    	sports = personService.getSports();
    	countries = personService.getCountries();
    	genders = personService.getGenders();

    	if (person != null && person.getPersonId() != null) {
    		person = personService.getPerson(person.getPersonId());
    	}
    	return INPUT;
    }
    
    @InputConfig(methodName=INPUT)
    public String save() {
    	System.out.println("Save Action");
        if (person.getPersonId() == null) {
            personService.insertPerson(person);
        } else {
            personService.updatePerson(person);
        }
        return SUCCESS;
    }

> How to implement simple CRUD application
> ----------------------------------------
>
>                 Key: WW-3993
>                 URL: https://issues.apache.org/jira/browse/WW-3993
>             Project: Struts 2
>          Issue Type: Sub-task
>          Components: Example Applications
>            Reporter: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.17
>
>         Attachments: crud-with-maven.7z, crud-with-maven.7z
>
>
> Rewrite to Maven based project and with the latest Struts version
> https://cwiki.apache.org/confluence/display/WW/CRUD+Demo+I



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message