Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hussain Shaikh
values from language hook to jsp hook
August 27, 2012 2:21 AM
Answer

Hussain Shaikh

Rank: Junior Member

Posts: 34

Join Date: June 6, 2012

Recent Posts

I have made a hook portlet overriding login.jsp, I have some label eg. screen-name in it, I have changed this keys so that I can get value from my own language hook portlet. But I am not able to get the values from my language hook portlet where I have placed my keys.
Please suggest me how to get values from my language hook portlet to my jsp hook portlet.
Any help ?
Sagar A Vyas
RE: values from language hook to jsp hook
August 27, 2012 2:40 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 655

Join Date: April 17, 2009

Recent Posts

Hussain Shaikh:
I have made a hook portlet overriding login.jsp, I have some label eg. screen-name in it, I have changed this keys so that I can get value from my own language hook portlet. But I am not able to get the values from my language hook portlet where I have placed my keys.
Please suggest me how to get values from my language hook portlet to my jsp hook portlet.
Any help ?



Hi Hussain,

Please try with this hook i have tested in my machine. (Please find attached file)

Let me know whether its working or not ?

Thanks,
Sagar Vyas
Attachments: Test-Language-hook.zip (3.6k)
Hussain Shaikh
RE: values from language hook to jsp hook
August 27, 2012 3:06 AM
Answer

Hussain Shaikh

Rank: Junior Member

Posts: 34

Join Date: June 6, 2012

Recent Posts

Hi Sagar, I have understood the problem actually the label value I was seeking for is when user is not logged in and hence language properties file is in accessible. Now, can you tell me how to make language hook values accessible for not logged or guest user as well?
Hussain Shaikh
RE: values from language hook to jsp hook
August 27, 2012 4:01 AM
Answer

Hussain Shaikh

Rank: Junior Member

Posts: 34

Join Date: June 6, 2012

Recent Posts

The problem got solved it is working for guest user also, it was just some wrong key format that was causing problem. My key was something like this "screen-name:=Screen Name"
So it was not working, hence do not end key with a colon.
venka reddy
RE: values from language hook to jsp hook
August 27, 2012 6:50 AM
Answer

venka reddy

Rank: Regular Member

Posts: 230

Join Date: March 23, 2011

Recent Posts

Hi Sagar,

How Can we access <custom-portlet>-sevice.jar in a hook?