Forums Register Login

Namespace prefix for form fields..

+Pie Number of slices to send: Send
If I prefix a form field with portlet namespace, should I use this prefixed parameter name to get the value in my portlet class??

To be specific... my jsp looks like this:


Now, how should I access myfield in my render() method???


I strongly feel it should be the second way. But I did not find any convenient answer in JSR...
+Pie Number of slices to send: Send
holla,

if you define the field names of your form like that, the second way should do. And yes, it is not very handy. Why do you want to prefix the input names of the form? I do not know your use case, but normally prefixing the form name is sufficient to avoid name ambiguities on a portal page for JavaScript etc., or do I miss something? If you ony prefix the name of the form, the name of the parameter is just like it is in the HTML tag.

Btw.: Welcome to the Java Ranch! Your login name does not adhere to the Official policy on registered names.

Greetings, Stefan
+Pie Number of slices to send: Send
"holla"
Welcome to the JavaRanch! It's great that you found our snazzy new Portal and Portlets forum... but can you do me one favor? Please change your display name to match the JavaRanch Naming Policy (basically you should have a legitmate sounding first and last name). You can tweak it here

Thanks! and again welcome to the JavaRanch!
- Jess
+Pie Number of slices to send: Send
hi Stefan,
thanks for your comments.. the second method should be the logical one. i was just playing with different combinations and i came across this scenario..


regarding my name -
my name is sachin holla. most of my friends call me holla, so i kept that display name..
Are you here to take over the surface world? Because this tiny ad will stop you!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1664 times.
Similar Threads
Return ONLY the contnet of a portlet
EditAction not called on liferay
encode namsepace in portlets
"struts_action" param inside renderURL tag for liferay's MVCPortlet
liferay portlet - form parameters missing from request
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:51:24.