Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
k venkatesh
How to get aui:button value in MVC portlet
May 14, 2012 8:12 AM
Answer

k venkatesh

Rank: Junior Member

Posts: 50

Join Date: February 20, 2012

Recent Posts

Hi all I am using Liferay 6.0.6.

I have submit button in my jsp like this.
1
2      <aui:button id="addCategory" name="addCategory"  type="submit" value="Add" />


I have writtenthe following code for getting button value in MVC portlet.

1String addCatButton = ParamUtil.getString(req, "addCategory");

But I am unable to get button value in "addCatButton" variable.

Could you please any body help me.

Thanks in advance.
Priyanka Dhingra
RE: How to get aui:button value in MVC portlet
May 14, 2012 11:19 PM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

Hi,
instead of getting the value of the button. why dont you try putting in a hidden field in your form.
k venkatesh
RE: How to get aui:button value in MVC portlet
May 14, 2012 11:59 PM
Answer

k venkatesh

Rank: Junior Member

Posts: 50

Join Date: February 20, 2012

Recent Posts

In my application two conditions are there thats why I have taken this way.

I got the solution for this one.

I have written simply aui:input type="submit" instead of aui:button type="submit". Now I am able to get button value in MVC portlet.
Priyanka Dhingra
RE: How to get aui:button value in MVC portlet
May 15, 2012 12:19 AM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

Thanks for sharing one more solution
Basha Majid
RE: How to get aui:button value in MVC portlet
April 14, 2013 11:22 AM
Answer

Basha Majid

Rank: New Member

Posts: 3

Join Date: April 14, 2013

Recent Posts

hello sir,

im facing the same problem, when i used aui:input type="submit" ,the value which i got was null
please suggest some other solution.

here is code:
< aui:input type="submit" name="sub" value="add"/>

in processaction i tried:

String getvalue=paramutil.getString(request,"sub");
System.out.println(getvalue);

output: null

thanks
Priyanka Dhingra
RE: How to get aui:button value in MVC portlet
May 14, 2013 5:30 AM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

Rather than :-
1< aui:input type="submit" name="sub" value="add"/>

use
1< aui:button type="submit" name="sub" value="add"/>