MentaTutorials

Rev

Rev 28 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28 Rev 38
Line 2... Line 2...
2
2
3
import java.sql.Connection;
3
import java.sql.Connection;
4
4
5
import org.menta.action.LoginAction;
5
import org.menta.action.LoginAction;
6
import org.menta.action.UserAction;
6
import org.menta.action.UserAction;
-
 
7
import org.menta.dao.UserDAO;
7
import org.menta.dao.jdbc.JdbcUserDAO;
8
import org.menta.dao.jdbc.JdbcUserDAO;
8
import org.menta.model.Group;
9
import org.menta.model.Group;
9
import org.menta.model.Language;
10
import org.menta.model.Language;
10
import org.menta.model.User;
11
import org.menta.model.User;
-
 
12
import org.menta.service.UserService;
11
import org.menta.service.impl.UserServiceImpl;
13
import org.menta.service.impl.UserServiceImpl;
-
 
14
import org.mentabean.BeanSession;
12
import org.mentabean.DBTypes;
15
import org.mentabean.DBTypes;
13
import org.mentabean.util.SQLUtils;
16
import org.mentabean.util.SQLUtils;
14
import org.mentawai.action.LogoutAction;
17
import org.mentawai.action.LogoutAction;
15
import org.mentawai.ajax.renderer.ResultRenderer;
18
import org.mentawai.ajax.renderer.ResultRenderer;
16
import org.mentawai.core.ApplicationManager;
19
import org.mentawai.core.ApplicationManager;
Line 119... Line 122...
119
                filter(new AuthenticationFilter());
122
                filter(new AuthenticationFilter());
120
                on(LOGIN, redir("/jsp/login.jsp"));
123
                on(LOGIN, redir("/jsp/login.jsp"));
121
               
124
               
122
                filter(new ValidationFilter());
125
                filter(new ValidationFilter());
123
               
126
               
124
                filter(new TransactionFilter("transaction"));
127
                filter(new TransactionFilter());
125
        }
128
        }
126
       
129
       
127
        @Override
130
        @Override
128
        public void setupIoC() {
131
        public void setupIoC() {
129
132
130
                ioc("beanSession", props.getClass("mentabean.dialect"));
133
                ioc(BeanSession.class, props.getClass("mentabean.dialect"));
131
               
134
               
132
                ioc("userDAO", JdbcUserDAO.class);
135
                ioc(UserDAO.class, JdbcUserDAO.class);
133
               
136
               
134
                ioc("userService", UserServiceImpl.class);
137
                ioc(UserService.class, UserServiceImpl.class);
135
        }
138
        }
136
       
139
       
137
        @Override
140
        @Override
138
        public void loadActions() {
141
        public void loadActions() {
139
               
142