Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
sheela mk
ParamUtil
June 17, 2012 11:55 PM
Answer

sheela mk

Rank: Regular Member

Posts: 112

Join Date: February 16, 2012

Recent Posts

Hai.. Guys..Can anybody..tel me..what the meanin of below line..



ParamUtil.getLong(request, "resourcePrimKey");emoticon
Sandeep Nair
RE: ParamUtil
June 18, 2012 12:07 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1692

Join Date: November 5, 2008

Recent Posts

Its an utility method by liferay to retrieve parameter from request, which will save you from nullpointer exception

It is same as writing the following lines

1long resourcePrimkey = 0;
2if(request.getParameter("resourcePrimkey")!=null){
3 resourcePrimkey  =Long.parseLong( request.getParameter("resourcePrimkey"));
4}
sheela mk
RE: ParamUtil
June 18, 2012 12:11 AM
Answer

sheela mk

Rank: Regular Member

Posts: 112

Join Date: February 16, 2012

Recent Posts

resourcePrimkey..where do we mention this ..in jsp....
Riccardo Ferrari
RE: ParamUtil
June 18, 2012 1:01 AM
Answer

Riccardo Ferrari

Rank: Regular Member

Posts: 137

Join Date: November 13, 2010

Recent Posts

Hi,

'resourcePrimkey' is just the name of a parameter. If it is not declared in the page that your are reading (probably a fragment) that it must be declared in parent pages.
If you need more helo, please tell us which file are you reading.

Regards,
Riccardo
sheela mk
RE: ParamUtil
June 18, 2012 1:07 AM
Answer

sheela mk

Rank: Regular Member

Posts: 112

Join Date: February 16, 2012

Recent Posts

Liferay in action..Slogan Contest Portlet..example is there know..

And also..Let me Know How to have worlflow..to our custom portlet...
Riccardo Ferrari
RE: ParamUtil
June 18, 2012 4:30 AM
Answer

Riccardo Ferrari

Rank: Regular Member

Posts: 137

Join Date: November 13, 2010

Recent Posts

If you search within jsps files in the slogan context portlet you will find parameters named 'resourcePrimKey'.
These are the parameters that are read by the actions java files, using ParamUtil utility, to perform their tasks on specific slogan entity.

Please find the following link about workflow setup in custom portlets:
http://www.liferay.com/web/jonas.yuan/blog/-/blogs/5786756

Regards,
Riccardo
sheela mk
RE: ParamUtil
June 18, 2012 11:14 PM
Answer

sheela mk

Rank: Regular Member

Posts: 112

Join Date: February 16, 2012

Recent Posts

Thank You..So much..Ferrari...emoticon