You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Tobias Kilian <To...@uni-koblenz.de> on 2007/10/12 18:13:50 UTC

[Trinidad] auto-update on every ppr-request?

Hi All!

I want to use Trinidad together with ajax4jsf (richfaces), and have 
problems using the two different ppr-mechanisms together.
Trinidad uses the attribute partialTriggers="list of components, whose 
events update this component"
while a4j uses reRender="list of components to update on this.Event"
These seem to be contrairy mechanisms and im sure they both have been 
discussed long before I got to know jsf.

However the question is, how can they be used together? AFAIK i can 
neither have a trinidad component be a listener for an a4j component nor 
let an a4j component reRender a trinidad component.

Another thing is i have a tr:messages wich i want to be updated on every 
ajax request.
Is there any component to realize auto-update on every ppr-request? In 
a4j there is <a4j:outputPanel ajaxRendered="true"> which does exactly 
what i want, but - same as above - only for requests originating from 
a4j components.

Thanks for any light on this,
Tobias Kilian

Re: [Trinidad] auto-update on every ppr-request?

Posted by Andrew Robinson <an...@gmail.com>.
> The other thing is i really need a tag like I described
> which updates on every request and couldnt find it in Trinidad.

I had the same problem, and ended up writing new components. Adam
frowned upon that functionality though, so they did not make it into
1.0.3. They are stuck in an SVN branch.

See JIRA issues 663 and 664

You can use this source to build your own components that provide a
"alwaysRendered" as well as a "partialTargets" (same philosophy as
reRender)

-Andrew

Re: [Trinidad] auto-update on every ppr-request?

Posted by Scott O'Bryan <da...@gmail.com>.
Tobias,

Well, I won't say Trinidad's is better, just different because they are 
intended on supporting different issues.  Trinidad is able to get more 
flexibility because AJAX is built in, but AJAX4JSF is intended to allow 
a non-ajax renderkit to have ajax and does a really good job of 
supporting this.  If using an ajax renderkit, there is no technical 
reason to look at AJAX4JSF.

Now that said, if you absolutely must, you'll have no choice but to use 
one or the other and submit bugs for anything you find.  What this means 
is, you'll want to use AJAX4JSF's ajax with NONE of the Trinidad.  
Either to the AJAX4JSF project or to Trinidad.  This is going to be a 
slippery slope though because I don't think that there is a huge push to 
get them to work together and unless something is technically wrong from 
a JSF perspective.  But who knows.

As for solutions to the submit on every request issue, you can add a 
partial target for the component you want to update on the Java side.  
It's not clean, but it would probably work.  You might also try 
generating an ER..

Scott

Tobias Kilian wrote:
> Scott O'Bryan schrieb:
>> Tobias,
>>
>> These mechanism's are not compatible.  They are, essentially, two 
>> different AJAX mechanisms.  Do you mind me asking what AJAX4JSF 
>> provides that Trinidad doesn't out of the box?  In other words, why 
>> is Trinidad's AJAX mechanism not sufficient.
> Hi Scott!
>
> I think the Trinidad approach is better, because only the listener has 
> to know the event source and not vice versa. But I am tempted (and 
> ordered by my boss) to use richfaces wherever possible - it seems to 
> be a more monolithic system and looks nicer without having to fight 
> with all those css. The other thing is i really need a tag like I 
> described which updates on every request and couldnt find it in Trinidad.
>
> Greetings,
> Tobias Kilian
>
> <http://dict.leo.org/ende?lp=ende&p=eL4jU.&search=system>
>>
>> AJAX4JSF is intended to make a non-ajax enabled renderkit work like 
>> an ajax enabled one and it seems unnecessarily complex if your 
>> renderkit is ajax-enabled to begin with.
>>
>> Scott
>>
>> Tobias Kilian wrote:
>>> Hi All!
>>>
>>> I want to use Trinidad together with ajax4jsf (richfaces), and have 
>>> problems using the two different ppr-mechanisms together.
>>> Trinidad uses the attribute partialTriggers="list of components, 
>>> whose events update this component"
>>> while a4j uses reRender="list of components to update on this.Event"
>>> These seem to be contrairy mechanisms and im sure they both have 
>>> been discussed long before I got to know jsf.
>>>
>>> However the question is, how can they be used together? AFAIK i can 
>>> neither have a trinidad component be a listener for an a4j component 
>>> nor let an a4j component reRender a trinidad component.
>>>
>>> Another thing is i have a tr:messages wich i want to be updated on 
>>> every ajax request.
>>> Is there any component to realize auto-update on every ppr-request? 
>>> In a4j there is <a4j:outputPanel ajaxRendered="true"> which does 
>>> exactly what i want, but - same as above - only for requests 
>>> originating from a4j components.
>>>
>>> Thanks for any light on this,
>>> Tobias Kilian
>>>
>>
>
>


Re: [Trinidad] auto-update on every ppr-request?

Posted by Tobias Kilian <To...@gmx.de>.
Scott O'Bryan schrieb:
> Tobias,
>
> These mechanism's are not compatible.  They are, essentially, two 
> different AJAX mechanisms.  Do you mind me asking what AJAX4JSF 
> provides that Trinidad doesn't out of the box?  In other words, why is 
> Trinidad's AJAX mechanism not sufficient.
Hi Scott!

I think the Trinidad approach is better, because only the listener has 
to know the event source and not vice versa. But I am tempted (and 
ordered by my boss) to use richfaces wherever possible - it seems to be 
a more monolithic system and looks nicer without having to fight with 
all those css. The other thing is i really need a tag like I described 
which updates on every request and couldnt find it in Trinidad.

Greetings,
Tobias Kilian

<http://dict.leo.org/ende?lp=ende&p=eL4jU.&search=system>
>
> AJAX4JSF is intended to make a non-ajax enabled renderkit work like an 
> ajax enabled one and it seems unnecessarily complex if your renderkit 
> is ajax-enabled to begin with.
>
> Scott
>
> Tobias Kilian wrote:
>> Hi All!
>>
>> I want to use Trinidad together with ajax4jsf (richfaces), and have 
>> problems using the two different ppr-mechanisms together.
>> Trinidad uses the attribute partialTriggers="list of components, 
>> whose events update this component"
>> while a4j uses reRender="list of components to update on this.Event"
>> These seem to be contrairy mechanisms and im sure they both have been 
>> discussed long before I got to know jsf.
>>
>> However the question is, how can they be used together? AFAIK i can 
>> neither have a trinidad component be a listener for an a4j component 
>> nor let an a4j component reRender a trinidad component.
>>
>> Another thing is i have a tr:messages wich i want to be updated on 
>> every ajax request.
>> Is there any component to realize auto-update on every ppr-request? 
>> In a4j there is <a4j:outputPanel ajaxRendered="true"> which does 
>> exactly what i want, but - same as above - only for requests 
>> originating from a4j components.
>>
>> Thanks for any light on this,
>> Tobias Kilian
>>
>


Re: [Trinidad] auto-update on every ppr-request?

Posted by Scott O'Bryan <da...@gmail.com>.
Tobias,

These mechanism's are not compatible.  They are, essentially, two 
different AJAX mechanisms.  Do you mind me asking what AJAX4JSF provides 
that Trinidad doesn't out of the box?  In other words, why is Trinidad's 
AJAX mechanism not sufficient.

AJAX4JSF is intended to make a non-ajax enabled renderkit work like an 
ajax enabled one and it seems unnecessarily complex if your renderkit is 
ajax-enabled to begin with.

Scott

Tobias Kilian wrote:
> Hi All!
>
> I want to use Trinidad together with ajax4jsf (richfaces), and have 
> problems using the two different ppr-mechanisms together.
> Trinidad uses the attribute partialTriggers="list of components, whose 
> events update this component"
> while a4j uses reRender="list of components to update on this.Event"
> These seem to be contrairy mechanisms and im sure they both have been 
> discussed long before I got to know jsf.
>
> However the question is, how can they be used together? AFAIK i can 
> neither have a trinidad component be a listener for an a4j component 
> nor let an a4j component reRender a trinidad component.
>
> Another thing is i have a tr:messages wich i want to be updated on 
> every ajax request.
> Is there any component to realize auto-update on every ppr-request? In 
> a4j there is <a4j:outputPanel ajaxRendered="true"> which does exactly 
> what i want, but - same as above - only for requests originating from 
> a4j components.
>
> Thanks for any light on this,
> Tobias Kilian
>