[appfuse-user] Problem updating entities

2008-09-17 Thread alibehzadian
Hi there, I am using AppFuse 2.0.2 and Struts2 and Hibernate 3. I have two entities with @ManyToOne relation. When I want to update Many side of the relation I got this Hibernate Exception: identifier of an instance of ir.appfuse.app.model.City was altered from 698 to 654 I guess that Hibernat

[appfuse-user] Question about

2008-09-13 Thread alibehzadian
Hi there, I have a list of objects and I want to use to display them in my page. My question is: How to pre-select some items in the list based on my entity? Yours, Ali Behzadian Nejad. -- View this message in context: http://www.nabble.com/Question-about-%3Cs%3Acheckboxlist--%3E-tp19470904s

Re: [appfuse-user] one problem about appfuse2

2008-09-11 Thread alibehzadian
Hi, See your hibernate.cfg.xml in src/test/resources folder and see that if your entity is added or no? You should have a line like this: Ali Behzadian Nejad. -- View this message in context: http://www.nabble.com/one-problem-about-appfuse2-tp19373607s2369p19429535.html Sent from the App

Re: [appfuse-user] Login Problem with a User not in roles ROLE_ADMIN and ROLE_USER

2008-09-11 Thread alibehzadian
SOLVED. The problem was that the user account was not enable. -- View this message in context: http://www.nabble.com/Login-Problem-with-a-User-not-in-roles-ROLE_ADMIN-and-ROLE_USER-tp19428832s2369p19429232.html Sent from the AppFuse - User mailing list archive at Nabble.com. -

[appfuse-user] Login Problem with a User not in roles ROLE_ADMIN and ROLE_USER

2008-09-10 Thread alibehzadian
Hi, I have created a new user with a new role: ROLE_MANAGER. I have added a new interceptor named "managerOnly" to see if user is in role ROLE_MANAGER. When I login with this new user I get login error. Is there a missing step that I should do? Ali Behzadian Nejad. -- View this message in co

[appfuse-user] Decoratpr Problem

2008-08-30 Thread alibehzadian
I want to exclude some URLs from decorator. I put the line below in decorators.xml: ... /admin/eskan/eskanData.html?studentNumber=* /* but my page is still decorated. What should I do? Thanks, Ali Behzadian Nejad. -- View this message in context

Re: [appfuse-user] I18N Problem

2008-08-25 Thread alibehzadian
Dear Youssef, When I put my text in ApplicationResource bundle with a key, I have no problem. This problem arises when I put i18n texts inside JSP. So problem is somewhere else. Ali Behzadian Nejad. -- View this message in context: http://www.nabble.com/I18N-Problem-tp19132153s2369p19140793.ht

Re: [appfuse-user] I18N Problem

2008-08-25 Thread alibehzadian
In meta.jsp (that is included in every JSP) I have the following line: and my IDE is set to use UTF-8 as its encoding. Even I set encoding manually to UTF-8 (with some tools) and then rebuild the project and still have the problem. I guess the problem is related to order of filters or is re

Re: [appfuse-user] I18N Problem

2008-08-24 Thread alibehzadian
Dear Matt, I did what you said, but the problem still exists. I also disabled the localeFilter but nothing changed. Any idea? Ali Behzadian Nejad. -- View this message in context: http://www.nabble.com/I18N-Problem-tp19132153s2369p19138567.html Sent from the AppFuse - User mailing list archiv

[appfuse-user] I18N Problem

2008-08-24 Thread alibehzadian
Hi, I used Persian text right inside JSP. I saved JSP file with UTF-8 encoding and then I build the project. After visiting the JSP, all texts garble. I guess the problem is related to sitemesh decorator but I have no idea how to solve this problem. Any idea? Ali Behzadian Nejad. -- View this

[appfuse-user] Customizing Code Generation Templates

2008-08-14 Thread alibehzadian
Hi, I want to change code generation templates. What should I do? I am using Struts2 Basic + Hibernate in full source mode. Ali Behzadian Nejad. -- View this message in context: http://www.nabble.com/Customizing-Code-Generation-Templates-tp18978100s2369p18978100.html Sent from the AppFuse -

Re: [appfuse-user] OneToMany Relation Problem

2008-08-14 Thread alibehzadian
Thank you Martin, lazyLoadingFilter is by default disable and I don't know why. I will uncomment it and change EAGER fetch types to LAZY and then test application again. Does enabling this filter needs extra changes in code or not? Ali Behzadian Nejad. -- View this message in context: http:/

Re: [appfuse-user] OneToMany Relation Problem

2008-08-13 Thread alibehzadian
Dear Martin, When I set FetchType to LAZY, I get lazyInitializationException. I am using DWR and I guess the problem is related to DWR remoting but I am not sure. Any Idea? Ali Behzadian Nejad. -- View this message in context: http://www.nabble.com/OneToMany-Relation-Problem-tp18890496s2369p1

[appfuse-user] OneToMany Relation Problem

2008-08-08 Thread alibehzadian
Hi I have three entities in my domain: Country, Province and City. Country has a bi-directional OneTOMany relation with Province as below: // In Country.java private Set provinces = new HashSet(); ... @OneToMany( mappedBy = "country",fetch = FetchType.EAGER)

Re: [appfuse-user] the set up and learning cure is crazy high

2008-08-03 Thread alibehzadian
Hi I don't agree you. It took me only 1 hour to set up and run AppFuse. Before starting AppFuse you should know a little about Maven and its dependencies and repositories. Watch Matt's videos about AppFuse. For me setting up and running AppFuse is exactly the same as Matt captured in http://s

[appfuse-user] JSF or Struts2?

2008-08-01 Thread alibehzadian
Hi, I want to start new project with Appfuse 2. I am familiar with Struts2 and newbie in JSF. What is pros and cons of these two frameworks? Do you suggest Struts2 or JSF and why? Please explain in details! Thanks in advance, Ali Behzadian Nejad. -- View this message in context: http://www.nab

[appfuse-user] How to have secure files?

2008-07-27 Thread alibehzadian
Hi there, I want to secure my upload directory so not logged-in users can not see the files. I added (I upload files to this directory and its sub directories) to security.xml but it seems that it does not work fine and even not logged-in users can see this files. Thanks, Ali behzadian Ne

[appfuse-user] Struts 2 template

2008-07-22 Thread alibehzadian
Hi there, I want to change AppFuse's default struts2 template and make it tabular. I made a copy of template/css_xhtml folder and named it "my_template". Then I changed "form.ftl" and "form-close.ftl" and replaced with and and . In my form, I added "theme="my_template". Then I encountered thi

Re: [appfuse-user] Doubt in jsp variables

2008-07-17 Thread alibehzadian
... user.id maps to getUser().setId() ;-) But about JavaBean Naming conventions: Each bean has a setter and a getter method that begins with "set" and "get" followed by bean name with uppercased first character. So if you have a bean named "user", you should have setUser(...) and getUser() meth

[appfuse-user] adding model classes in different packages

2008-07-14 Thread alibehzadian
Hi, I want to create some packages for my domain model, one for core entities and one for other entities. Is it possible? I am using AppFuse 2.0.2. Thanks, Ali Behzadian Nejad. -- View this message in context: http://www.nabble.com/adding-model-classes-in-different-packages-tp18439153s2369p18

Re: [appfuse-user] Problem with "simple" display-only page - SOLVED

2008-07-08 Thread alibehzadian
I guess you should start your JSP url with a "/". Try this: /WEB-INF/pages/deliveryTonnageList.jsp I hope it will fix the problem. Ali Behzadian Nejad -- View this message in context: http://www.nabble.com/No-result-defined-for-action-au.com.myapp.webapp.action.DeliveryTonna

[appfuse-user] Convert Date attributes to JalaliDate

2008-07-07 Thread alibehzadian
Hi there, I am developing a Persian-language site with AppFuse Struts 2 Archetype. In web tier, users enter Jalali date but I want to convert these jalali dates to Gregorian date (java.util.Date) before saving them in database. I have the algorithm and libraries to for conversion. Which classes

Re: [appfuse-user] Appfuse Access denied error

2008-07-05 Thread alibehzadian
Hi Chris, "editUser" action is inside admin package (struts.xml). All actions in this package have "admin" prefix. So the exact url of "editUser" action is "http://your.domain.com/admin/editUser.html?...";. All actions are -by default- secure. So you can not access any action without logging in

Re: [appfuse-user] Appfuse code generator 2.0

2008-07-02 Thread alibehzadian
Hi, You can use "mvn appfuse:gen-model". Take a look at this: " http://static.appfuse.org/plugins/appfuse-maven-plugin/gen-model-mojo.html http://static.appfuse.org/plugins/appfuse-maven-plugin/gen-model-mojo.html " Ali Behzadian Nejad. -- View this message in context: http://www.nabble.com/

Re: [appfuse-user] How to get user from session

2008-07-02 Thread alibehzadian
If you want to get current logged in user, use the code snippet below: User currentUser = null; SecurityContext ctx = SecurityContextHolder.getContext(); if (ctx.getAuthentication() != null) { Authentication auth = ctx.getAuthentication(); if (auth.

Re: [appfuse-user] Appfuse core Web Classes Modification

2008-06-29 Thread alibehzadian
Hi, You should change src/main/resources/your/package/model/User-Validation.xml. Ali Behzadian Nejad. -- View this message in context: http://www.nabble.com/Appfuse-core-Web-Classes-Modification-tp18176415s2369p18178084.html Sent from the AppFuse - User mailing list archive at Nabble.com. --

Re: [appfuse-user] Strange search behaviour

2008-06-29 Thread alibehzadian
Dear Matt, I have no problem with search criteria. It works fine with two built-in users (user and admin) but it doesn't work for other users that signed-up or are inserted into sample-data.xml. I have no idea what is wrong. I populate new user with exact same data as built-in user and then searc

[appfuse-user] Strange search behaviour

2008-06-28 Thread alibehzadian
Hi there, I did create a new project with Struts 2 Basic Archetype. I modified the UserManager(Impl) and UserDao(Hibernate) and add a new method: In UserManagerImpl: public List findUsers(DetachedCriteria criteria) { return dao.findUsers(criteria); } In UserDaoHibernate: p