Phoenix Kilimba

Ranch Hand
+ Follow
since Oct 10, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Phoenix Kilimba

Mahendra Pratap wrote:Problem might be with your

try to debug this.



Thanks for the response Mahendra, however am still puzzled, even if the problem is with entityAttributeConverter, why would the problem only occur within a SWF flow, but when the example is being run external to a SWF flow it works?
13 years ago
JSF
Dear Sirs et Madames,
I have a facelets page (test.xhtml) that is like so:


Currently the command button simply bound to a method addAndContinue() which for now does a System.out.println to let me know that it is functioning.


However am experiencing some very perplexing behavior. When I click on the button, no statement is printed at all. As soon as I remove/comment out from test.xhtml the lines pertaining to the drop down menu, i.e removal of the following lines:



when these lines are removed, the method IS run and the statement is printed. This happens within a Spring Web-Flow flow, by the way. When I repeat the exercise but not as part of a SWF flow everything works as it should (the statement is printed) even with the drop down menu code left intact.

If when in the SWF mode, I add immediate="true" to the commandButton i.e



The println statement DOES run, but other things break. Does anyone know what is happening here? I will gladly post more code if necessary...

Thanks in advance.
13 years ago
JSF

Mark Spritzler wrote:And ROLE_USER is how it is stored in your back end datasource for security, meaning your UserDetailService sets the GrantedAuthories as ROLE_USER. With ROLE_ as part of the role string, and all Caps?

Mark



Hello Mark,
It is inherited code so am not completely sure what you may be asking, but am posting details of my UserDetailService class, in the hope it helps. Let me know if it doesn't and you need more info



Thanks again
13 years ago
Dear Sirs et Madames,
AM trying to set up Spring Security for my application. To start with, I only want 2 types of user, and Admin who will have acces to everything, and a Data Clerk, who has limited access (access to pages specifically given through the security intercept url patterns). The following code excerpt shows how I have done this:



However for some reason when I log in as ROLE_USER I [i]always[i] get the http error:403 Access is Denied. Am i doing something wrong?

Thanks in advance, and let me know if this is not enough information.

13 years ago
Dear Sirs et Madames,
Am new to Spring Web Flow and still finding my way around. Am having some issues which am finding quite confusing. I want to create a demographic baseline form. This form will capture Location ID, Location Name, Social Group Id, Social Group Name, Individuals who are members of the social group (a social group can be a family, cohort study group, etc, basically a collection of individuals), and finally, the relationships within the social group. To start of with I enter a location ID. However if the location does not yet exist in the database, there is the option (button) to create a new location. This takes you to a create Location form and is done via Spring WebFlow. When done with creating a location, the application takes you back to the baseline form, also taking care to auto fill in the Location Id and Location Name got from the recently created location.

Likewise with Social Group, you have a choice to enter an existing Id or create a new Social Group which takes you to the Create Social Group Form, creates a group, then takes you back to the Baseline form taking care to auto fill the Social Group ID, Social Group Name got from the recently created Social Group. It should also populate a table just below the Social Group Name textfield with the Individuals in that social group. If there are no individuals registered in the social group, one has the option to create a new Individual by clicking the Add New button and going to the Create New Individual form. Once and individual has been added the user should be taken back to the Baseline form with the recently created Individual adding to the data table. The first two steps work perfectly (Create a location, create a social group) However my issue is for some reason, my datatable containing individuals is not being seen at all? The relevant code is as follows

BaselineBean:



Baseline form (create.xhtml):


The relevant part in baseline-flow.xml:



SO the issue is mainly that the Individuals table never seems to get populated however many individuals I add in the Create Individual form, could anyone please assist?

Thanking you in advance
13 years ago
Thanks Tim, on point as always :-)
13 years ago
Dear Sirs et Madames,
Am stil rather new to Spring Web Flow and my first attempt is meeting with an error am not sure I understand, I have a simple flow like so:



However when I run the application, I get the exception:



The inference from this exception is that the element <evaluate> is somehow used incorrectly, but how so? I can include more code if necessary, I just assumed these were the most relevant parts.

Thanks in advance
13 years ago

Davie Lin wrote:What JSF implementation are you using?

I know for certain that JSF 1.1 does not have <f:ajax> tag



Where do i verify what JSF implementation am using, what jar/s in particular, and how will i b able to tell what version they are? I suspecct though am using 1.2 but would like to verify. If I AM using 1.2, what are my options for ajaxifying without having to resort to JSF 2.0?

Thanks again
13 years ago
JSF
Dear Sirs et Madames,
AM trying to incorporate a little ajax to my apps but am only just learning how. I have created the following xhtml file to display my very simplistic first attempt



However when I try run it, it gives me the following exception


Can anyone please point me in the right direction?

Thanks in advance
13 years ago
JSF

Nathan Pruett wrote:The base exception is here -


# 2010-05-04 18:32:48.138::WARN: Nested in org.springframework.beans.factory.BeanCreationException:
# Error creating bean with name 'org.springframework.security.config.http.UserDetailsServiceInjectionBeanPostProcessor#0':
# Initialization of bean failed; nested exception is java.lang.ClassCastException:
# org.springframework.transaction.annotation.AnnotationTransactionAttributeSource cannot be cast to
# org.openhds.dao.finder.FinderExecutor: java.lang.ClassCastException:
# org.springframework.transaction.annotation.AnnotationTransactionAttributeSource cannot be cast to
# org.openhds.dao.finder.FinderExecutor
# at org.openhds.dao.finder.Interceptor.invoke(Interceptor.java:19)



What's at org.openhds.dao.finder.Interceptor.invoke(Interceptor.java:19)?

What does the org.openhds.dao.finder.FinderExecutor class have in it?



Well the Interceptor class is like so:



And the FinderExecutor is like:



Hope this helps. Thanks again
13 years ago
Sorry for the late response, I had left the office. Well the Aspect class looks like so:



And is configured in applicationContext.xml like so:



Any observations or criticisms greatly appreciated, all part of the learning process :-) !
Thanks again
13 years ago

David Newton wrote:Have them implement an interface.

I'm not saying not to do it with aspects, but you'd have the same problem with the class hierarchy unless you had as aspect for each type. At that point the complexity of an AOP solution outweighs just doing it normally.



Well correct me if am wrong, but I thought I could avoid having an aspect for each type if I had the create() method in EntityCrudImpl as the join point. Would that not avoid the repetitious code, would that not work?

Thanks again
13 years ago
Sorry about the code that goes on and on, I tried just coding it, however, ALL persistent entities have these two fields, but not all persistent entities share a parent superclass. So the problem becomes, should I hard code this logic directly into each entityDao (repetitive, always the same code) or is there someway I can centralise the code to avoid repetitiveness (Inheriting from a superclass would be the first choice but that forces some classes which dont always fit the IS-A criteria being forced to inherit from a superclass) , so I thought Aspects may allow me to write once and call where needed. Hope I explained that well enough, please let me know if you need any more info.

Thanks again in advance
13 years ago
Dear Sirs et Madames;

I have an application in which there are a number of persistent entities. All these entities have a few things in common, they all have the fields insertedBy, insertedDate.

The insertedBy field is the currently logged in user. My Dao interface looks like so:



and my EntityCrud Interface looks like so:


EntityCrudImpl looks like:


My question is: I need the two properties of an entityItem insertedBy, insertedDate updated whenever the create() method (which effectively is the method which persists the entityItem) is called. I got it into my head to use Spring AOP and to create an aspect to achieve this, however as am kind of new to Spring AOP could anyone tell me how this could be achieved, and the merits of using aspects to achieve it? Is there an example where one has used aspects for auditing which I could maybe have a look at?

Any help would be greatly appreciated.
13 years ago
Dear Sirs et Madames,
I am experiencing a few issues in regards to using Spring AOP.

Currently the application runs with no exceptions , but in order to achieve what I need to achieve, I have to define an aspect in my applicationContext.xml file. However, as soon as I introduce the following element:



I get the following error stack trace:



Has anyone any idea why this may happen? The only change I have made so far is added those 2 lines
<aop:config>
</aop:config>

I have also imported the relevant namespaces for AOP ( I think ) like so:


can anyone please advise?
Thanks in advance.


13 years ago