ボタンが作成されると、クラスui-corner-all
は常に適用されます。私は次のことを試しました:
<p:commandButton id="like" styleClass="ui-corner-right" />
しかし、うまくいきませんでした。Firebug では、次の両方が表示ui-corner-all
されましたui-corner-right
。
<div id="form1:like" type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left ui-corner-right">
更新 1:
JMelnik からのヒントに従って、次のスクリプトを追加することで、 ui-corner-all
toのスタイルを変更することに成功しました。ui-corner-right
<style type="text/css">
#myForm\:likeButton .ui-corner-all {
border-radius: 6px 0px 0px 6px !important;
}
</style>
<p:commandButton>
内側<h:panelGroup>
を次のようにラップします。
<h:form id="myForm">
<h:panelGroup id="likeButton">
<p:commandButton />
<h:panelGroup>
</h:form>
更新 2:
BalusC の提案のおかげで、次のソリューションの方が優れているはずです。
<style type="text/css">
.likeButton .ui-corner-all {
border-radius: 6px 0px 0px 6px !important;
}
</style>
<h:panelGroup styleClass="likeButton">
<p:commandButton />
<h:panelGroup>
よろしくお願いします、