掲示板
h:button and h:link
12年前 に PortletFaces Community Member によって更新されました。
h:button and h:link
Regular Member 投稿: 199 参加年月日: 12/04/03 最新の投稿
I'm having problems using these elements, but I don't know if it has anything to do with the bridge.
I'm using version 2.0.1 of the bridge in Liferay. When I use these elements, the generated html is:
"onclick="window.location.href='null';", i.e. the button or link doesn't work.
Could this be a problem with the bridge or should I search elsewhere?
I'm using version 2.0.1 of the bridge in Liferay. When I use these elements, the generated html is:
"onclick="window.location.href='null';", i.e. the button or link doesn't work.
Could this be a problem with the bridge or should I search elsewhere?
12年前 に Johann Kneringer によって更新されました。
RE: h:button and h:link
Junior Member 投稿: 42 参加年月日: 11/11/10 最新の投稿
If you want to navigate to a certain view, you have to use the "action" with an outcome...
You have to use h:commandButton or h:commandLink
If you have 2 views, mypage1.xhtml & mypage2.xhtml, and you want to navigate from view 1 to 2, you have to make a h:commandButton on view1. Write in the action of the commandbutton "mypage2".
If this wont work, you have to define certain navigation rules in your faces-config.xml....
Check the demo-portlets for further information
You have to use h:commandButton or h:commandLink
If you have 2 views, mypage1.xhtml & mypage2.xhtml, and you want to navigate from view 1 to 2, you have to make a h:commandButton on view1. Write in the action of the commandbutton "mypage2".
If this wont work, you have to define certain navigation rules in your faces-config.xml....
Check the demo-portlets for further information
12年前 に PortletFaces Community Member によって更新されました。
RE: h:button and h:link
Regular Member 投稿: 199 参加年月日: 12/04/03 最新の投稿
As I understand it, h:button and h:link were introduced in JSF 2 to support navigation using HTTP GET, as opposed to using HTTP POST when e.g. h:commandButton is used. Of course I can use h:commandButton but it seems unnecessary to use POST when there's no form data to process.
12年前 に PortletFaces Community Member によって更新されました。
RE: h:button and h:link
Regular Member 投稿: 199 参加年月日: 12/04/03 最新の投稿
Bumping this thread.
Has any one successfully used h:button or h:link in a portlet?
Has any one successfully used h:button or h:link in a portlet?
9年前 に Neil Griffin によって更新されました。
RE: h:button and h:link
Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
9年前 に David H Nebinger によって更新されました。
RE: h:button and h:link
Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿PortletFaces Community Member:
When I use these elements, the generated html is:"onclick="window.location.href='null';", i.e. the button or link doesn't work.
Okay, no one has asked the obvious, so I will. What exactly are you trying to use with the tags? Can you share the full use of the tag? I mean, not to be condescending or anything, but if you just add a <h:link /> tag with no attributes and no children, well then the generated html would be nonsense (even though you really can't do a link in this way, it's just an example to show how you might get bad generated code because the tag itself doesn't have enough to make sense).