You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Amaris Nieves <da...@gmail.com> on 2008/10/21 00:35:58 UTC
[TRINIDAD] Problem adding partialTrigger
I' m trying to add a partialTrigger but I'm unable to do it using the
partialTrigger attribute. Originally I thought that it was a problem with
the naming container but I've tried everything and no luck. What i want to
do is when the element with id="same" is submitted the value for the select
id=paSubType is updated and it should be rapainted.
I also tried the addPartialTargets in the valueChangeListener method but it
still does not get repainted.
<tr:subform id="addressTypeSubform">
<tr:selectBooleanCheckbox id="same"
autoSubmit="true"
value="#{orderForm.samePostalAddress}"
label="#{msgBundle['address.label.samePostal']}"
valueChangeListener="#{orderForm.
doAssignPostalAddress}" />
</tr:subform>
<tr:subform id="mainSubForm">
<tr:panelFormLayout partialTriggers="
::addressTypeSubform:same" id="paSubTypePanel">
<tr:selectOneRadio id="paSubType"
required="true"
value="#{orderForm.order.postalAddress.addressSubtype}">
<tr:forEach var="aType"
items="#{orderForm.postalAddressSubtypeList}">
<f:selectItem
itemLabel="#{aType.fieldName}"
itemValue="#{aType.fieldCode}" />
</tr:forEach>
</tr:selectOneRadio>
</tr:panelFormLayout>
</tr:subform>
Is it that I'm doing something wrong?
Re: [TRINIDAD] Problem adding partialTrigger
Posted by Amaris Nieves <da...@gmail.com>.
I verified with Firegub and it was actually working but returning Invalid
PPR response. This is the error log:
["Invalid PPR response. The response-headers were:\nDate: Mon, 20 Oct 2008
23:55:04 GMT\nTransfer-Encoding: chunked\nContent-Type:
text/html;charset=utf-8\nX-Powered-By: Servlet/2.5 JSP/2.1, JSF/1.2\n\n The
invalid response was:\n<?xml version="1.0" ?>\n<?Tr-XHR-Response-Type
?>\n<content action="/PRTCFace2Face/faces/order/postalAddressType.jspx">
<fragment><![CDATA[<div id="paSubTypePanel"
class="af_panelFormLayout"><table cellpadding="0" cellspacing="0" border="0"
summary="" style="width: auto"><tbody><tr>\n <td
class="af_panelFormLayout_column" colspan="1"><table cellpadding="0"
cellspacing="0" border="0" width="100%" summary=""><tbody><tr>\n <td></td>\n
\n <td></td>\n </tr><tr>\n <td></td>\n \n <td
class="af_panelFormLayout_content-cell"><!--Start:
org.apache.myfaces.trinidad.SelectOne["paSubType"]--><table
id="mainSubForm:paSubType__xc_" class="af_selectOneRadio p_AFRequired"
cellpadding="0" cellspacing="0" border="0" summary=""><tr>\n <td
class="af_selectOneRadio_label" valign="top" nowrap="nowrap"><span
id="mainSubForm:paSubType::icon" style="display:none;"><a
name="_msgAnc_mainSubForm:paSubType" title="Error"
class="AFErrorIconStyle">X</a></span><span title="Necesario"
class="AFRequiredIconStyle">*</span></td>\n \n <td valign="top"
nowrap="nowrap" class="AFContentCell"><!--Start:
org.apache.myfaces.trinidad.SelectOne["paSubType"]--><span
id="mainSubForm:paSubType" class="af_selectOneRadio_content"><input
type="radio" name="mainSubForm:paSubType" id="mainSubForm:paSubType:_0"
value="0"></input><label for="mainSubForm:paSubType:_0">Comunidad
Urbana</label><br></br><input type="radio" name="mainSubForm:paSubType"
id="mainSubForm:paSubType:_1" value="1"></input><label
for="mainSubForm:paSubType:_1">Apartado Postal</label><br></br><input
type="radio" name="mainSubForm:paSubType" id="mainSubForm:paSubType:_2"
value="2"></input><label for="mainSubForm:paSubType:_2">Ruta
Rural</label><br></br><input type="radio" name="mainSubForm:paSubType"
id="mainSubForm:paSubType:_3" value="3"></input><label
for="mainSubForm:paSubType:_3">Ruta de Contrato</label></span></td>\n
</tr><tr>\n <td></td>\n \n <td class="AFComponentMessageCell"><!--Start:
org.apache.myfaces.trinidad.SelectOne["paSubType"]--><span
id="mainSubForm:paSubType::msg" class="OraInlineErrorText"></span></td>\n
</tr></table></td>\n </tr></tbody></table></td>\n
</tr></tbody></table></div>]]></fragment><fragment><![CDATA[<span
id="tr_j_id_id3_Postscript"><input type="hidden"
name="javax.faces.ViewState"
value="!-5270ea3f"></input></span>]]></fragment><script><![CDATA[_addValidators("j_id_id3",["mainSubForm:paSubType",1,0,(void
0),[]],[],{},['Seleccione un valor.']);var
j_id_id3_SF={"addressTypeSubform":1,"mainSubForm":1};]]></script></content>"]
On Mon, Oct 20, 2008 at 6:35 PM, Amaris Nieves <da...@gmail.com>wrote:
> I' m trying to add a partialTrigger but I'm unable to do it using the
> partialTrigger attribute. Originally I thought that it was a problem with
> the naming container but I've tried everything and no luck. What i want to
> do is when the element with id="same" is submitted the value for the select
> id=paSubType is updated and it should be rapainted.
>
> I also tried the addPartialTargets in the valueChangeListener method but
> it still does not get repainted.
>
> <tr:subform id="addressTypeSubform">
> <tr:selectBooleanCheckbox id="same"
> autoSubmit="true"
>
> value="#{orderForm.samePostalAddress}"
>
> label="#{msgBundle['address.label.samePostal']}"
> valueChangeListener="#{orderForm.
> doAssignPostalAddress}" />
> </tr:subform>
> <tr:subform id="mainSubForm">
> <tr:panelFormLayout partialTriggers="
> ::addressTypeSubform:same" id="paSubTypePanel">
> <tr:selectOneRadio id="paSubType"
> required="true"
>
> value="#{orderForm.order.postalAddress.addressSubtype}">
> <tr:forEach var="aType"
> items="#{orderForm.postalAddressSubtypeList}">
> <f:selectItem
> itemLabel="#{aType.fieldName}"
>
> itemValue="#{aType.fieldCode}" />
> </tr:forEach>
> </tr:selectOneRadio>
> </tr:panelFormLayout>
> </tr:subform>
>
> Is it that I'm doing something wrong?
>