myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jozef Dropco <jozef.dro...@gmail.com>
Subject Re: [Trinidad] Changing content of form
Date Sat, 15 May 2010 21:50:56 GMT
Hmm, I found maybe a solution but I am not able to get it running. Maybe 
its wrong way but I am not sure.
Subform make possible to validate only part of the page.
http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_subform.html

Can somebody help me ? Its making me crazy.

Jozef

On 12.5.2010 15:34, Cédric Durmont wrote:
> Maybe it's a bit dirty, and maybe it won't work at all (I'm still
> quite new to the jsf/trinidad world), but you can try to remove all
> messages in the valuechangelistener.
> FacesContext.getCurrentInstance().getMessages() will give you an
> iterator on the message queue.
>
> Regards,
> Cedric
>
> 2010/5/12 Jozef Dropco<jozef.dropco@gmail.com>:
>    
>> Thanks Cedric,
>> that made the trick but I got some warnings about FacesMessage, so is it
>> possible to make it without them?
>>
>> INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been
>> displayed.
>> sourceId=j_id29[severity=(ERROR 2), summary=(A value is required.),
>> detail=(You must enter a value.)]
>> sourceId=j_id30[severity=(ERROR 2), summary=(A value is required.),
>> detail=(You must enter a value.)]
>>
>>
>> Jozef
>>
>> On 12.5.2010 14:03, Cédric Durmont wrote:
>>      
>>> I won't say it's the ideal way, but my trick is to use a
>>> valueChangeListener on the tr:selectBooleanCheckbox, with
>>> immediate="true". When the ValueChangeListener is triggered, I update
>>> the list used by the tr:selectOneChoice, and the partialTrigger does
>>> the rest.
>>>
>>> Hope this helps.
>>> Regards,
>>> Cedric Durmont
>>>
>>> 2010/5/12 Jozef Dropco<jozef.dropco@gmail.com>:
>>>
>>>        
>>>> I have following form, and I need when I toggle checkbox change values of
>>>> selectOneChoice. But inputText is first-time blank and selectOneChoice is
>>>> first-time null, so when I toggle checkbox javascript validation stops
>>>> rerendering, is  it possible to change the value without validation. I
>>>> tried
>>>> immediate="true" but no success :-(.
>>>>
>>>> Any ideas?
>>>> Thanks Jozef
>>>>
>>>> <tr:panelFormLayout>
>>>> <tr:inputText required="true" label="#{msg.price}"
>>>> value="#{pensionBean.pension.price.price}">
>>>> <tr:validateDoubleRange minimum="0.0"/>
>>>> <tr:convertNumber type="number"/>
>>>> </tr:inputText>
>>>> <tr:selectBooleanCheckbox autoSubmit="true" id="pensionCurrencyChanger"
>>>> label="#{msg.useSystemCurrencies}"
>>>> value="#{pensionBean.pension.price.discriminator}"/>
>>>>
>>>> <tr:selectOneChoice required="true" label="#{msg.currency}"
>>>> partialTriggers="pensionCurrencyChanger"
>>>> value="#{pensionBean.pension.price.currentCurrency}">
>>>> <f:selectItems value="#{pensionBean.allCurrencies}"/>
>>>> </tr:selectOneChoice>
>>>> </tr:panelFormLayout>
>>>>
>>>>
>>>>          
>>>
>>>        
>>
>>      
>    


Mime
View raw message