Forums de discussion

The bridge put some id beside component and form id

Anonyme, modifié il y a 12 années.

The bridge put some id beside component and form id

Envoyer: 1
Hello all,
I tried develop JSF porltet with navigation, and retrieve parameters from the second page but I wasn't able to reach the parameter through "formID:componentID" I discover that portletfaces added some id beside this id like "A1706:formID:componentID" how can I retrive or resetting this ID.
I solve this in some portlet through create managed bean and name it transporter and add property for what I want to retrieve it and set it with component value.
I have another senario want to validate two fields in the same validator, I tried to retrieve component with their ID throug


context.getViewRoot().findComponent("componentID")


I got null component it seems doesn't find component with componentID I guess need to add what portletfaces added beside the componentID.
cause in the above scenario I was able to retrieve attribute of request through

request.getParameter("A1706:formID:componentID")


for your information this "A1706" different from portlet to portlet.

best regards,
Moayad Abu Jaber
thumbnail
Neil Griffin, modifié il y a 12 années.

RE: The bridge put some id beside component and form id

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
To obtain the ID, try calling FacesContext.getCurrentInstance().getExternalContext().encodeNamespace("");
Moayad Abu Jaber, modifié il y a 12 années.

RE: The bridge put some id beside component and form id

New Member Publications: 17 Date d'inscription: 03/03/11 Publications récentes
thanks really helpful