Rajkumar Kathiresan

Greenhorn
+ Follow
since Dec 30, 2008
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rajkumar Kathiresan

1. what would happen if I open the session with "Session.getCurrentSession()" and close the same session with "session.close()" at the end of my method? Whether it will throw any error?
2. If I again I try to open the the session with "Session.getCurrentSession()" it will throw any error?
lol It worked for me Thanks.
11 years ago
I have a two map "student","address" in my action class.


I want to get the values from address map using the key of student map. ie., i need to append "S" with the key of student & need to pass that new value as a key for address Map. I tried some thing but its not working...



any one help me on this...
11 years ago
After a day Night spent over this problem I found solution for this
I give my own generator class NextSequence which implements the org.hibernate.id.IdentifierGenerator


my NextSequence class looks like


Now I have two problem

  • It bring value "Java9" as max value even i have a value "Java10". Is it any possible way to get the value "Java10" as max value
  • Its still specific to one Entity. It is possible to make it generalized one, where i can use this NextSequence class for all my tables.
    Like For Author my id would be like "Au001","Au002", etc.
    Help me on this.
    Thankx in advance
    Raja
    Hi It may be a basic question.. but I am unable to find any answer for this..
    I have a table Employee which have a column Emp_id,Emp_name and salary where Emp_id is primary key.
    My Problem is My Emp_id should be like <CompanyName><SequenceNo> (eg. 'JAVA1','JAVA2','JAVA3') like this.
    How to create this sequence?

    Thanks & Regards,
    Raj
    1. Your validation file name must be <actionclass>-<validation>.xml
    2. your action should have getters and setters for the field against you are validating.
    3. In interceptor basicStack must be above the validation & workflow interceptor in struts.xml.
    4. <S:fielderror> is doesnot have a property "fieldName"
    use like this
    11 years ago
    You need to construct your logic based on ternary operator. It will be more complicated when the first list size increase. Still I provide a solution for your problem.



    but the other way to use the doubleselect (its called OGNL method)

    But very simple way is


    Create a optionMap as a LinkedHashMap (because it have sorted order) in your action and use it.


    Hope its solve your problem. Let me know if you need any clarification.
    11 years ago
    Hope you misunderstand the concept of Interceptors. Interceptors are called before and after the execution of the method.
    And its the exact syntax for excluding the method from validation
    <param name="excludeMethods">populate</param>
    otherwise you can use the solution suggested by "Anbarasu"

    let me know if you need any assistance
    11 years ago