You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Inge Solvoll <ta...@ingenett.com> on 2005/11/10 11:05:57 UTC

tacos - PartialPropertySelection instead of PartialLink

I have the following scenario:

I have a select at the top of my page. When the value of the select 
changes, another section of my page should be reloaded. Much like the 
behaviour of PartialLink, but using a PropertSelection component for 
refreshing parts.

Does this exist (or something similar), or do I need to write new code 
for selects that mimics the behaviour of PartialLink?

Inge

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: tacos - PartialPropertySelection instead of PartialLink

Posted by Inge Solvoll <ta...@ingenett.com>.
One last thing:

I have looked at the example application, PartialForms page, for several 
times, and I just don't get it. Why does it work if none of the 
PartialForm components include the refreshParts attribute?

I have tried to make it work in my application, but the forms just keep 
refreshing the entire page when I try to submit, both with javascript 
and with the Submit component...

Distribution: tacos-docs-20050421.war

Inge

Inge Solvoll wrote:
> A couple of more iterations around the problem, and I'm having problems. 
> I'm using nesting of PropertySelection components on the page, where 
> another PropertySelection component is rendered in a Part, when the 
> value of the first one changes. And a third PropertySelection of the 
> same kind if the second one changes.
> 
> I've to implement 3 PartialForm components, each containing a 
> PropertySelection component with submitOnChange="true". But then again, 
> there is the problem with losing all other values on the page when one 
> of the forms submits...
> 
> It seems like this is an unsolvable problem...
> 
> Inge
> 
> Inge Solvoll wrote:
> 
>> After reviewing the problem for a while, I have the following idea to 
>> a solution:
>>
>> The Partial link renders the following html:
>>
>> <a href="/context/app?service=partial/1/PageName/PageName/tacosLink" 
>> onclick="return new PartRequest(this.href, 
>> ['test1','test2']).send();">Link</a>
>>
>> My solution is a hack, hiding the html generated by PartialLink using 
>> DHTML, and referencing it from a select like this:
>>
>> <select onchange="return new 
>> PartRequest(document.forms[0].tacosLink.href, 
>> ['test1','test2']).send();">
>> </select>
>>
>> Of course this code is a hack, and can be much improved, but it gets 
>> the job done nicely for now.
>>
>> I guess I could quite easily extend the PartialPropertySelection just 
>> like tacos extends the DirectLink for PartialLink. I think I got what 
>> I need, except for the getLink method of the PartialLink component. 
>> Any ideas of how I port this to PropertySelection?
>>
>> Is this an interesting component to have for the tacos library?
>>
>> Inge
>>
>>
>> Inge Solvoll wrote:
>>
>>> I have the following scenario:
>>>
>>> I have a select at the top of my page. When the value of the select 
>>> changes, another section of my page should be reloaded. Much like the 
>>> behaviour of PartialLink, but using a PropertSelection component for 
>>> refreshing parts.
>>>
>>> Does this exist (or something similar), or do I need to write new 
>>> code for selects that mimics the behaviour of PartialLink?
>>>
>>> Inge
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>> .
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: tacos - PartialPropertySelection instead of PartialLink

Posted by Inge Solvoll <ta...@ingenett.com>.
A couple of more iterations around the problem, and I'm having problems. 
I'm using nesting of PropertySelection components on the page, where 
another PropertySelection component is rendered in a Part, when the 
value of the first one changes. And a third PropertySelection of the 
same kind if the second one changes.

I've to implement 3 PartialForm components, each containing a 
PropertySelection component with submitOnChange="true". But then again, 
there is the problem with losing all other values on the page when one 
of the forms submits...

It seems like this is an unsolvable problem...

Inge

Inge Solvoll wrote:
> After reviewing the problem for a while, I have the following idea to a 
> solution:
> 
> The Partial link renders the following html:
> 
> <a href="/context/app?service=partial/1/PageName/PageName/tacosLink" 
> onclick="return new PartRequest(this.href, 
> ['test1','test2']).send();">Link</a>
> 
> My solution is a hack, hiding the html generated by PartialLink using 
> DHTML, and referencing it from a select like this:
> 
> <select onchange="return new 
> PartRequest(document.forms[0].tacosLink.href, ['test1','test2']).send();">
> </select>
> 
> Of course this code is a hack, and can be much improved, but it gets the 
> job done nicely for now.
> 
> I guess I could quite easily extend the PartialPropertySelection just 
> like tacos extends the DirectLink for PartialLink. I think I got what I 
> need, except for the getLink method of the PartialLink component. Any 
> ideas of how I port this to PropertySelection?
> 
> Is this an interesting component to have for the tacos library?
> 
> Inge
> 
> 
> Inge Solvoll wrote:
> 
>> I have the following scenario:
>>
>> I have a select at the top of my page. When the value of the select 
>> changes, another section of my page should be reloaded. Much like the 
>> behaviour of PartialLink, but using a PropertSelection component for 
>> refreshing parts.
>>
>> Does this exist (or something similar), or do I need to write new code 
>> for selects that mimics the behaviour of PartialLink?
>>
>> Inge
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
>> .
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: tacos - PartialPropertySelection instead of PartialLink

Posted by Inge Solvoll <ta...@ingenett.com>.
After reviewing the problem for a while, I have the following idea to a 
solution:

The Partial link renders the following html:

<a href="/context/app?service=partial/1/PageName/PageName/tacosLink" 
onclick="return new PartRequest(this.href, 
['test1','test2']).send();">Link</a>

My solution is a hack, hiding the html generated by PartialLink using 
DHTML, and referencing it from a select like this:

<select onchange="return new 
PartRequest(document.forms[0].tacosLink.href, ['test1','test2']).send();">
</select>

Of course this code is a hack, and can be much improved, but it gets the 
job done nicely for now.

I guess I could quite easily extend the PartialPropertySelection just 
like tacos extends the DirectLink for PartialLink. I think I got what I 
need, except for the getLink method of the PartialLink component. Any 
ideas of how I port this to PropertySelection?

Is this an interesting component to have for the tacos library?

Inge


Inge Solvoll wrote:
> I have the following scenario:
> 
> I have a select at the top of my page. When the value of the select 
> changes, another section of my page should be reloaded. Much like the 
> behaviour of PartialLink, but using a PropertSelection component for 
> refreshing parts.
> 
> Does this exist (or something similar), or do I need to write new code 
> for selects that mimics the behaviour of PartialLink?
> 
> Inge
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
> .
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org