Re: [appfuse-user] Native2ascii and Chinese character

2007-02-26 Thread Jonathan Tse
I am using appfuse 1.9.3 , thx wnqq wrote: please let us know which version of appfuse you are talking about. Jonathan Tse wrote: Hi all, I am currently working on the i18n part of my application. I notice that I need to perform a native2ascii conversion for my ApplicationResources_

Re: [appfuse-user] JfreeChart - Struts2 - Appfuse detailed problem report -- I am a fool

2007-02-26 Thread VJ22
Sure thing.will sit down over the weekend and get it done J. David Mendoza R. wrote: > > Of course we would love a Struts2 - JFreeChart tutorial!!! Please do... > > David M. > > > VJ22 wrote: >> Thanks Dusty >> >> I finally get this working and howI was re-initializing the c

Re: [appfuse-user] Native2ascii and Chinese character

2007-02-26 Thread wnqq
please let us know which version of appfuse you are talking about. Jonathan Tse wrote: > > Hi all, > > I am currently working on the i18n part of my application. I notice > that I need to perform a native2ascii conversion for my > ApplicationResources_zh*.properties or otherwise I will g

[appfuse-user] Native2ascii and Chinese character

2007-02-26 Thread Jonathan Tse
Hi all, I am currently working on the i18n part of my application. I notice that I need to perform a native2ascii conversion for my ApplicationResources_zh*.properties or otherwise I will get some monster character. Why is that? The file are already encoded in UTF-8. Moreover, if I type ch

Re: [appfuse-user] Unit Test SpringMVC Controller

2007-02-26 Thread Matt Raible
It should be possible to solve this, here's two ways that come to mind: 1. Set the MessageAccessor in a unit test so the lookup doesn't fail. 2. Add logic to BaseControllerTestCase so it's friendlier to mock tests. Here's a snippet of how I did #1 in Spring Live: public class UserFormControlle

Re: [appfuse-user] Unit Test SpringMVC Controller

2007-02-26 Thread porvak
Hi, I've changed my test class to extend BaseControllerTestCase instead of MockObjectTestCase and my test now passes! My question now is that I'm connecting to the database even though I don't need to; is there an approach that could be taken to bypass connecting to the database(Maybe by somehow

Re: [appfuse-user] Implementing Groups with Roles

2007-02-26 Thread tonyl
I already made User.getAuthorities() call User.getAllAuthorities() and that's what allowed me to log in and have the mainMenu.xhtml display the links to the admin secured areas. It's just that when I then click to view the Users List - I get the access denied error. I'll try it. mraible wrote:

Re: [appfuse-user] Implementing Groups with Roles

2007-02-26 Thread Matt Raible
What if you change User.getAllAuthorities to be User.getAuthorities - does that work? Matt On 2/26/07, tonyl <[EMAIL PROTECTED]> wrote: I get the following error: Caused by: org.acegisecurity.AccessDeniedException: Access is denied at org.acegisecurity.vote.AffirmativeBased.decide(Aff

Re: [appfuse-user] Implementing Groups with Roles

2007-02-26 Thread tonyl
I get the following error: Caused by: org.acegisecurity.AccessDeniedException: Access is denied at org.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:68) at org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:

Re: [appfuse-user] Implementing Groups with Roles

2007-02-26 Thread Matt Raible
On 2/26/07, tonyl <[EMAIL PROTECTED]> wrote: The following code got me a whole lot farther than I expected. I'm getting an Access Denied Error however. The code that checks for that is in UserSecurityAdvice - correct? It depends on when you get the access denied error. You might try running a

Re: [appfuse-user] Implementing Groups with Roles

2007-02-26 Thread tonyl
The following code got me a whole lot farther than I expected. I'm getting an Access Denied Error however. The code that checks for that is in UserSecurityAdvice - correct? public GrantedAuthority[] getAuthorities() { /* List authorities = new LinkedList(); au

Re: [appfuse-user] Implementing Groups with Roles

2007-02-26 Thread tonyl
Matt, I checked out the JIRA issue, and it redirects to http://opensource.atlassian.com/projects/spring/browse/SEC-272 which is still open. I'll check the sample apps, too. mraible wrote: > > Apparently, Acegi security supports groups now, but I couldn't find > any documentation on it. Yo

Re: [appfuse-user] Implementing Groups with Roles

2007-02-26 Thread Matt Raible
Apparently, Acegi security supports groups now, but I couldn't find any documentation on it. You might want to check one of their sample apps. http://opensource.atlassian.com/projects/spring/browse/SEC-325 Matt On 2/26/07, tonyl <[EMAIL PROTECTED]> wrote: So, we are adding groups of users to

[appfuse-user] Implementing Groups with Roles

2007-02-26 Thread tonyl
So, we are adding groups of users to the base application generated by AppFuse, and we have set up the groups to accept Roles, just like Users. The issue that I am having is how to have the session recognize the amalgamation of roles from both the User and the Groups that the User belongs to. For

Re: [appfuse-user] Running Quartz Jobs on Acegi Secured Methods

2007-02-26 Thread Brett Knights
I think your easiest course would be to call, in your applicatonContext file, setJobDataAsMap. Add the user as a property to the job data. Then extend your JobDetail to look for the user object in the merged job data and set up the Authentication object appropriately. HTH BTW not looking at

Re: [appfuse-user] Calendar component and Date field for Appfuse 2.0

2007-02-26 Thread dusty
Strangely enough Fan, someone kind of hijacked this thread with an issue that could very well help you. Random and strange. The issue is that Appfuse ships with .html mapped to be the extension for struts actions. Dojo requires an actual .html file be served up and Struts intercepts the request

Re: [appfuse-user] JfreeChart - Struts2 - Appfuse detailed problem report -- I am a fool

2007-02-26 Thread dusty
PLEASE DO! You can post it here or you can create a page on the Struts2 wiki here: http://cwiki.apache.org/confluence/display/S2WIKI/Home You can just create your own account to post to this wiki. Both would be great. -Dusty VJ22 wrote: > > Thanks Dusty > > I finally get this working and h

Re: [appfuse-user] Running Quartz Jobs on Acegi Secured Methods

2007-02-26 Thread kirankeshav
Thanks, Brett. We have configured quartz declaratively with the following in the applicationContext: 0 15 0 ? * * generateSummar

Re: [appfuse-user] Multiple Usernames

2007-02-26 Thread Matt Raible
Acegi has a SwitchUserFilter that may be helpful. http://acegisecurity.org/multiproject/acegi-security/apidocs/org/acegisecurity/ui/switchuser/SwitchUserProcessingFilter.html Allowing two usernames per user could probably be done with some custom logic in UserDaoHibernate. Matt On 2/26/07, Zak

Re: [appfuse-user] How id is set in Useraction.java appfuse 2.0M3

2007-02-26 Thread govindpatwa
thanks got it . that's for quick reply mraible wrote: > > The id value is set when you pass in an id parameter. In regular ol' > AppFuse, getId() is never read in the JSPs, instead user.getId() is > read. > > Matt > > On 2/26/07, govindpatwa <[EMAIL PROTECTED]> wrote: >> >> i am using

Re: [appfuse-user] Running Quartz Jobs on Acegi Secured Methods

2007-02-26 Thread Brett Knights
My jobs inherit from QuartzJobBean and I override executeInternal. Inside that method I call another method that configures the authentication object. In the example below the object that knows what user to run as is an Application. private Application app; ... private void loadApplicati

[appfuse-user] Multiple Usernames

2007-02-26 Thread Zakir
Hello Experts. I am using appfuse 1.9.4, with spring 2.0. I am currently designing a webapp, and I would like it to support a user's email address as the username. This is easy to implement (just switch the label in the User), but I would also like my app to allow user's to have multiple email

Re: [appfuse-user] How id is set in Useraction.java appfuse 2.0M3

2007-02-26 Thread Matt Raible
The id value is set when you pass in an id parameter. In regular ol' AppFuse, getId() is never read in the JSPs, instead user.getId() is read. Matt On 2/26/07, govindpatwa <[EMAIL PROTECTED]> wrote: i am using struts2.0 basic web framework and appfuse 2.0 M3 Michael Horwitz wrote: > > Whi

Re: [appfuse-user] How id is set in Useraction.java appfuse 2.0M3

2007-02-26 Thread govindpatwa
i am using struts2.0 basic web framework and appfuse 2.0 M3 Michael Horwitz wrote: > > Which web framework are you using, and which version of AppFuse? > > Mike. > > > On 2/26/07, govindpatwa <[EMAIL PROTECTED]> wrote: >> >> >> Hi >> >> i am new to appfuse. This may silly question . but i

Re: [appfuse-user] JfreeChart - Struts2 - Appfuse detailed problem report -- I am a fool

2007-02-26 Thread J. David Mendoza R.
Of course we would love a Struts2 - JFreeChart tutorial!!! Please do... David M. VJ22 wrote: Thanks Dusty I finally get this working and howI was re-initializing the chart in my execute() method after declaring it as a private variable...DUH DUH DUH !! DO let me know if anyone el

Re: [appfuse-user] Including static content in an appfuse project

2007-02-26 Thread Matt Raible
I plan to try and implement this today as I need it for a project. My hope is I can use the DojoFilter attached to the following issue to accomplish this: http://issues.appfuse.org/browse/APF-431 Matt On 2/26/07, Sanjiv Jivan <[EMAIL PROTECTED]> wrote: I've spent a lot of time in hte past tyri

Re: [appfuse-user] Including static content in an appfuse project

2007-02-26 Thread Sanjiv Jivan
I've spent a lot of time in hte past tyring to serve static html and dynamic html from the same web app with both mapped to the .html extension. I wanted files under /static/*.html to be served statically by the web container and /app/*.html to go via my Spring MVC controllers. Unfortunately the u

Re: [appfuse-user] How to read request parameter in windows-1257 encoding in appfuse 2+struts2?

2007-02-26 Thread ros
Matt, I found solution: http://www.nabble.com/how-to-read-request-parameter-in-windows-1257-encoding-tf3284137.html#a9160958 mraible wrote: > > Did you set any special encoding using JSP tags in 1.9.3? Code wise, > there shouldn't be a whole lot different between 1.9.x and 2.0. If > you're ge

Re: [appfuse-user] Calendar component and Date field for Appfuse 2.0

2007-02-26 Thread Fan
I tried with the following lines on top of the JSP: but it does not help :( mraible wrote: > > Try adding this to the top of your JSP: > > >you should already have this > > > > Matt > > On 2/26/07, Fan <[EMAIL PROTECTED]> wrote: >> >> what to do with elemen

[appfuse-user] Running Quartz Jobs on Acegi Secured Methods

2007-02-26 Thread kirankeshav
I was wondering if anyone has used Quartz scheduling with Acegi? More specifically, we have secured method invocation via acegi (when a secured method is invoked, the securityServiceInterceptor is invoked and the Authentication object is checked) in our appfuse based application, and have quartz r

Re: [appfuse-user] Including static content in an appfuse project

2007-02-26 Thread Brett Knights
Yes. I did start by replying to some other post. Thanks Tim Azzopardi wrote: Its possible that nobody answered it because of how it appears on nabble which alot of people use to access (e.g. mraible I think) the mailing list. On nable, your posting appears under the thread "Calendar component an

Re: [appfuse-user] A Little problem in the tutorial

2007-02-26 Thread Matt Raible
If you're using a modular archetype, the service and dao beans should be defined in core/src/main/resources/applicationContext.xml. There's currently a bug where the web test classes won't pick up this file when testing. I hope to fix that this morning. http://issues.appfuse.org/browse/APF-656

Re: [appfuse-user] A Little problem in the tutorial

2007-02-26 Thread Elreador
Oops, made a mistake here. In the "Services - Register a personManager bean definition", the applicationContext.xml shouldn't go "core/src/main/resources" for a modular archtype, since we are defining a bean for the web module, not for core module. I think it should go in "web/src/main/webapp/WEB

Re: [appfuse-user] Calendar component and Date field for Appfuse 2.0

2007-02-26 Thread Matt Raible
Try adding this to the top of your JSP: you should already have this Matt On 2/26/07, Fan <[EMAIL PROTECTED]> wrote: what to do with element ? mraible wrote: > > Do you have in the element of your page? > > http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/comp

Re: [appfuse-user] Junit testing

2007-02-26 Thread Matt Raible
The following error means that you have invalid XML: XML document structures must start and end within the same entity. I'd suggest using an XML editor in your IDE or opening the file in Internet Explorer to see where the error is. Matt On 2/25/07, Jolly <[EMAIL PROTECTED]> wrote: Hello Ja

Re: [appfuse-user] Including static content in an appfuse project

2007-02-26 Thread Tim Azzopardi
Its possible that nobody answered it because of how it appears on nabble which alot of people use to access (e.g. mraible I think) the mailing list. On nable, your posting appears under the thread "Calendar component and Date field for Appfuse 2.0" which shows up in nabble as a topic that has lots

Re: [appfuse-user] Calendar component and Date field for Appfuse 2.0

2007-02-26 Thread Fan
what to do with element ? mraible wrote: > > Do you have in the element of your page? > > http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/components/Head.html > > Matt > > On 2/25/07, Fan <[EMAIL PROTECTED]> wrote: >> >> I had installed firebug, while running the appl

Re: [appfuse-user] How id is set in Useraction.java appfuse 2.0M3

2007-02-26 Thread Michael Horwitz
Which web framework are you using, and which version of AppFuse? Mike. On 2/26/07, govindpatwa <[EMAIL PROTECTED]> wrote: Hi i am new to appfuse. This may silly question . but i am facing a small problem . i am not able to edit user . Its throwing null pointer exeception at getId() method

Re: [appfuse-user] Unit Test SpringMVC Controller

2007-02-26 Thread Michael Horwitz
Hi, You may want to extend BaseControllerTestCase rather than MockObjectTestCase as the BaseFormController requires a Spring application context to be present when it initialises. The piece of code that is failing is when the BaseFormController tries to obtain the default date format from the res