Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!

Prav Chau

Ranch Hand
+ Follow
since Jul 17, 2007
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 Prav Chau

Hi Guys,

My scenario is to write a custom logic before actual websphere commerce command is executed. My custom logic needs commandContext object to do a particular operation. I used request.getAttribute("ECConstants.COMMANDCONTEXT...") in JEE filter but I don't get populated commandcontext as user is not logged in.

Does anyone have idea to create filter/interceptor in commerce which has access to commandcontext?

Appreciate your help.

Thanks,
Prav
4 years ago
Hi,

Anyone knows to know add your story or name in Hall of fame certification?

Thanks,
Prav
Hi,

Can anyone suggest me any good book for Mule 2 Framework ( Beginners and Advanced)?\

Thanks in Advance.

Prav
9 years ago
Hi Guys,

I have a below schema. I am trying to save the job and jobdetails object but for some reason not able to populate the jobdetails table. Can someone please help me !!

Job and Jobdetails are one to many relationship

Table1
Job
jobid (PK)
name

Table2
[JobDetail
jobid (FK)
taskid (FK)
jobdetailmessage

Table3
taskid(PK)
taskdesc




Above code doesnt insert values in jobdetails table.can someone create object mapping for me. I created one to many relationship between job and jobdetails but not able to store values automatically while calling save hibernate method with job as object.



Thanks in advance





Hi All,

Can anyone suggest me Eclipse plugin which generates JUnit classes like ( Jtest)?

Thanks
Pravin
9 years ago
Hi Friends,

I am trying to use regex for normal string validation. Tried various regular expression but struts2 validation didn't work for me. In below example I am trying to validate string which will have only Capital letters A to Z. Can anyone help me to find correct regular expression for validating string with special characters.

<field name="regexValidatorField">
<field-validator type="regex">
<param name="expression"><![CDATA[[A-Z]]]></param>
<message><![CDATA[ regexValidatorField must have all capilate A- Z characters ]]></message>
</field-validator>
</field>
9 years ago
Quick Question

DAO implementation should use HibernateTemplate or SessionFactory? All DAO class extends Hibernate Support.

Thanks
10 years ago
So the solution is to put the object in session?
10 years ago
Action Mapping File: dealer_branchedit action populates the fields on edit page. when I try to save it calles "dealer_branchsave" action.

When validation fails it brings the edit page without existing values. All Drop down values and display only values are lost.

<action name="dealer_branchedit" method="branchedit" class="com.smartequip.vendorportal.action.DealerAction">
<interceptor-ref name="defaultStack"/>
<result name="input" type="dispatcher">jsps/edit_dealer_branches.jsp</result>
<result name="error">jsps/error.jsp</result>
<result name="branchedit" type="dispatcher" >jsps/edit_dealer_branches.jsp</result>
</action>

<action name="dealer_branchsave" method="branchsave" class="com.smartequip.vendorportal.action.DealerAction">
<interceptor-ref name="defaultStack"/>
<result name="input" type="dispatcher">jsps/edit_dealer_branches.jsp</result>
<result name="error">jsps/error.jsp</result>
<result name="branchedit" type="dispatcher" >jsps/edit_dealer_branches.jsp</result>
</action>
10 years ago
Hi,

How do I mention scope for action class? I want put all the member variables for the particular myaction class into session.

Basically I am loosing all the values in the form if struts validation fails. Can someone help me to retain the form values if validation fails in struts2.


Thanks,
10 years ago
Hi Everyone,

I am having hard time making Struts2 Validation Framework work in my scenario. Please help me solving the problem.

My Scenario:

1] My ActionClass implement ModelView Interface. It has three methods to add, delete and update. Consider I have three JSPS, add.jsp, update,jsp, delete.jsp
2] I need validation in update.jsp, add.jsp which has different UI so created a validation file ActionClass-update-validations.xml and ActionClass-add-validations.xml respectively.
3] My struts.xml has one action tag with 3 different result as seen below

<action name="myaction_*" method="{1}" class="MyAction">
<interceptor-ref name="defaultStack"/>

<result name="input">jsps/edit.jsp</result>
<result name="list">jsps/add.jsp</result>
<result name="list">jsps/list.jsp</result>
<result name="edit">jsps/edit.jsp</result>
</action>

For validation i have to supply result="input" jsps which will display error messages. I have validation in 3 jsps. How can I provide 3 different "input" jsps each for add.jsp, edit.jsp etc ? Also how to maintain the request values on JSP if validation fails.

Also How to use annotations in this scenario










10 years ago
<bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl" >
<value></value>
</property>

<property name="serviceInterface" value="spring.remoting.AccountService"/>
</bean>

I want to set serviceUrl property of httpInvokerProxy bean dynamically from database or JDBC code. Probably using BeanPostProcessor. Can anyone help me in that.
10 years ago
I want to set the serviceURL property of HttpInvokerProxyFactoryBean dynamically through the Java code. Can someone please help me on that
10 years ago
Sure. I want to inject that property using Spring Framework. In below xml we set poolName member variable of MyDataSource class it in applicationcontext.xml file. I want to set it through java code.

<bean id="myDataSource" class="springexample.hibernate.MyDataSource">
<property name="poolName">
<value>POOLLL</value>
</property>
</bean>
10 years ago
How can I set property for Bean class using java code instead of applicationcontext.xml file.


Consider I have spring bean declared in applicationcontext.xml. I can set it using <property> tag but I want to use java code to set this property as its dynamic.

Thanks in Advance

10 years ago