Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Chaminda Amarasinghe
Liferay Liferay Faces adds portlet id as a prefix to component id and nam
December 26, 2012 1:03 PM
Answer

Chaminda Amarasinghe

Rank: New Member

Posts: 22

Join Date: December 16, 2012

Recent Posts

Hi All,

May be this is requried, but I see that liferay / liferay faces adds portlet id to all of jsf componet id and name field.

For example if i have a button as follows in xhtml

<h:commandButton id"btt_id">

which produces html as follows.

<button id="A2930:btt_id">

I think "A2930" is the portlet Id, I need to know is there a way to aboid that prefix or set my own one? because it will leads to fail my funtional tests (WebDrive), where I find the elements by ID, or name. At least if this Id is a constant in any environment / any jsf implementation, then that is fair enough

Thanks
Chaminda
Neil Griffin
RE: Liferay Liferay Faces adds portlet id as a prefix to component id and n
December 26, 2012 2:31 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2363

Join Date: July 26, 2005

Recent Posts

The prefix is necessary in order to namespace forms for multiple portlets on a portal page. But you can set your own prefix by following the instructions in this post: http://www.liferay.com/community/forums/-/message_boards/view_message/18667360#_19_message_18709839