You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mark Horn <ma...@agilesrc.com> on 2008/08/19 17:11:04 UTC

ActionLink, PageTester and ElementID

I just updated to Tapestry 5.0.14 from 5.0.11 and have run into an
issue with using PageTester to test ActionLinks as shown here
http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html

It looks like this change in 5.0.12,
https://issues.apache.org/jira/browse/TAPESTRY-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
is causing the trouble I'm running into.

My ActionLinks no longer have an "id" therefore the call

Element link = doc.getElementById("link1");

is now returning an null, causing the line

doc = tester.clickLink(link);

to throw a NullPointException.

Any suggestions on how to get around this?

example of from tml file where id was set using t:id

			<table t:type="grid" source="list" row="type"
				reorder="name,description" >
				<t:parameter name="nameCell">
					<t:pagelink t:id="new" page="prop:createPage">
						${type.name}
					</t:pagelink>
				</t:parameter>
			</table>

Thanks,
Mark

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


Re: ActionLink, PageTester and ElementID

Posted by Mark Horn <ma...@agilesrc.com>.
perfect thanks!

On Tue, Aug 19, 2008 at 4:09 PM, Robert Zeigler <ro...@scazdl.org> wrote:
> ah... Sorry...
> Change:
> beginRender
> to
> afterRender
>
> in the ensureid mixin.
>
> Alternatively, you might be able to get away with writing ensureid as a
> "@MixinAfter".
>
> The problem is exactly what tapestry is saying: the component hasn't been
> rendered yet (the component's beginRender hasn't been called yet when the
> mixin's beginRender is called), so it can't have an id yet.
>
> Robert
>
> On Aug 19, 2008, at 8/1912:33 PM , Mark Horn wrote:
>
>> That gets me much closer, I changed my tml to look like this
>>
>> ...
>> <table t:type="grid" source="list" row="product"
>> reorder="name,description" >
>>   <t:parameter name="nameCell">
>>        <t:pagelink t:id="details"
>>              page="product/list" context="product.id
>> t:mixins="ensureId" >${product.name}</t:pagelink>
>>        </t:parameter>
>> </table>
>> ....
>>
>> but now I'm getting the following exception.
>>
>> org.apache.tapestry5.ioc.internal.util.TapestryException: Client id
>> for product/List:details is not available as it did not render yet (or
>> was disabled).
>>
>> note my pageLinks are being rendered inside a table.
>>
>> On Tue, Aug 19, 2008 at 12:55 PM, Robert Zeigler <ro...@scazdl.org>
>> wrote:
>>>
>>> Check out the second comment by HLS:
>>>
>>> "Or, here's a better idea; an id should only be generated if
>>> getClientId()
>>> is invoked, at which point the id attribute of the element may be set.
>>> Dynamic updates to the DOM are a great thing. "
>>>
>>> That's the behavior that ended up getting implemented.
>>> You still want to use t:id.
>>>
>>> But you need to make sure that "getClientId" is called.
>>>
>>> A simple way to do this would be to attach a mixin:
>>>
>>> package com.example.mixins;
>>>
>>> public class EnsureId {
>>>  @InjectContainer
>>>  private ClientElement element;
>>>  void beginRender() {
>>>      element.getClientId();
>>>  }
>>> }
>>>
>>> <t:pagelink t:id="new" mixins="ensureid" page="newid">Some
>>> Link</t:pagelink>
>>>
>>>
>>> Robert
>>>
>>>
>>> On Aug 19, 2008, at 8/1910:42 AM , Mark Horn wrote:
>>>
>>>> hhmm... that is a problem as my links are in a loop. so they used to
>>>> be remove, remove_0, etc.  if I set id="remove" then all links have
>>>> the id of 'remove' which does not work for my tests ether.
>>>>
>>>> Any other ideas?
>>>>
>>>> On Tue, Aug 19, 2008 at 11:32 AM, Mark Horn <ma...@agilesrc.com>
>>>> wrote:
>>>>>
>>>>> right.. how did I miss that. thanks!
>>>>>
>>>>> On Tue, Aug 19, 2008 at 11:27 AM, Filip S. Adamsen <fs...@fsadev.com>
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> As far as I can tell from the issue you linked to, you need to bind
>>>>>> the
>>>>>> id
>>>>>> (not t:id) parameter of the link.
>>>>>>
>>>>>> -Filip
>>>>>>
>>>>>> On 2008-08-19 17:11, Mark Horn wrote:
>>>>>>>
>>>>>>> I just updated to Tapestry 5.0.14 from 5.0.11 and have run into an
>>>>>>> issue with using PageTester to test ActionLinks as shown here
>>>>>>> http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html
>>>>>>>
>>>>>>> It looks like this change in 5.0.12,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> https://issues.apache.org/jira/browse/TAPESTRY-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>>>>>>> is causing the trouble I'm running into.
>>>>>>>
>>>>>>> My ActionLinks no longer have an "id" therefore the call
>>>>>>>
>>>>>>> Element link = doc.getElementById("link1");
>>>>>>>
>>>>>>> is now returning an null, causing the line
>>>>>>>
>>>>>>> doc = tester.clickLink(link);
>>>>>>>
>>>>>>> to throw a NullPointException.
>>>>>>>
>>>>>>> Any suggestions on how to get around this?
>>>>>>>
>>>>>>> example of from tml file where id was set using t:id
>>>>>>>
>>>>>>>                    <table t:type="grid" source="list" row="type"
>>>>>>>                            reorder="name,description" >
>>>>>>>                            <t:parameter name="nameCell">
>>>>>>>                                    <t:pagelink t:id="new"
>>>>>>> page="prop:createPage">
>>>>>>>                                            ${type.name}
>>>>>>>                                    </t:pagelink>
>>>>>>>                            </t:parameter>
>>>>>>>                    </table>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Mark
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: ActionLink, PageTester and ElementID

Posted by Robert Zeigler <ro...@scazdl.org>.
ah... Sorry...
Change:
beginRender
to
afterRender

in the ensureid mixin.

Alternatively, you might be able to get away with writing ensureid as  
a "@MixinAfter".

The problem is exactly what tapestry is saying: the component hasn't  
been rendered yet (the component's beginRender hasn't been called yet  
when the mixin's beginRender is called), so it can't have an id yet.

Robert

On Aug 19, 2008, at 8/1912:33 PM , Mark Horn wrote:

> That gets me much closer, I changed my tml to look like this
>
> ...
> <table t:type="grid" source="list" row="product"
> reorder="name,description" >
>    <t:parameter name="nameCell">
>         <t:pagelink t:id="details"
>               page="product/list" context="product.id
> t:mixins="ensureId" >${product.name}</t:pagelink>
>         </t:parameter>
> </table>
> ....
>
> but now I'm getting the following exception.
>
> org.apache.tapestry5.ioc.internal.util.TapestryException: Client id
> for product/List:details is not available as it did not render yet (or
> was disabled).
>
> note my pageLinks are being rendered inside a table.
>
> On Tue, Aug 19, 2008 at 12:55 PM, Robert Zeigler  
> <ro...@scazdl.org> wrote:
>> Check out the second comment by HLS:
>>
>> "Or, here's a better idea; an id should only be generated if  
>> getClientId()
>> is invoked, at which point the id attribute of the element may be  
>> set.
>> Dynamic updates to the DOM are a great thing. "
>>
>> That's the behavior that ended up getting implemented.
>> You still want to use t:id.
>>
>> But you need to make sure that "getClientId" is called.
>>
>> A simple way to do this would be to attach a mixin:
>>
>> package com.example.mixins;
>>
>> public class EnsureId {
>>   @InjectContainer
>>   private ClientElement element;
>>   void beginRender() {
>>       element.getClientId();
>>   }
>> }
>>
>> <t:pagelink t:id="new" mixins="ensureid" page="newid">Some Link</ 
>> t:pagelink>
>>
>>
>> Robert
>>
>>
>> On Aug 19, 2008, at 8/1910:42 AM , Mark Horn wrote:
>>
>>> hhmm... that is a problem as my links are in a loop. so they used to
>>> be remove, remove_0, etc.  if I set id="remove" then all links have
>>> the id of 'remove' which does not work for my tests ether.
>>>
>>> Any other ideas?
>>>
>>> On Tue, Aug 19, 2008 at 11:32 AM, Mark Horn <ma...@agilesrc.com>
>>> wrote:
>>>>
>>>> right.. how did I miss that. thanks!
>>>>
>>>> On Tue, Aug 19, 2008 at 11:27 AM, Filip S. Adamsen <fs...@fsadev.com>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> As far as I can tell from the issue you linked to, you need to  
>>>>> bind the
>>>>> id
>>>>> (not t:id) parameter of the link.
>>>>>
>>>>> -Filip
>>>>>
>>>>> On 2008-08-19 17:11, Mark Horn wrote:
>>>>>>
>>>>>> I just updated to Tapestry 5.0.14 from 5.0.11 and have run into  
>>>>>> an
>>>>>> issue with using PageTester to test ActionLinks as shown here
>>>>>> http://tapestry.apache.org/tapestry5/guide/unit-testing- 
>>>>>> pages.html
>>>>>>
>>>>>> It looks like this change in 5.0.12,
>>>>>>
>>>>>>
>>>>>> https://issues.apache.org/jira/browse/TAPESTRY-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>>>>>> is causing the trouble I'm running into.
>>>>>>
>>>>>> My ActionLinks no longer have an "id" therefore the call
>>>>>>
>>>>>> Element link = doc.getElementById("link1");
>>>>>>
>>>>>> is now returning an null, causing the line
>>>>>>
>>>>>> doc = tester.clickLink(link);
>>>>>>
>>>>>> to throw a NullPointException.
>>>>>>
>>>>>> Any suggestions on how to get around this?
>>>>>>
>>>>>> example of from tml file where id was set using t:id
>>>>>>
>>>>>>                     <table t:type="grid" source="list" row="type"
>>>>>>                             reorder="name,description" >
>>>>>>                             <t:parameter name="nameCell">
>>>>>>                                     <t:pagelink t:id="new"
>>>>>> page="prop:createPage">
>>>>>>                                             ${type.name}
>>>>>>                                     </t:pagelink>
>>>>>>                             </t:parameter>
>>>>>>                     </table>
>>>>>>
>>>>>> Thanks,
>>>>>> Mark
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


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


Re: ActionLink, PageTester and ElementID

Posted by Mark Horn <ma...@agilesrc.com>.
That gets me much closer, I changed my tml to look like this

...
<table t:type="grid" source="list" row="product"
 reorder="name,description" >
    <t:parameter name="nameCell">
         <t:pagelink t:id="details"
               page="product/list" context="product.id
t:mixins="ensureId" >${product.name}</t:pagelink>
         </t:parameter>
</table>
....

but now I'm getting the following exception.

org.apache.tapestry5.ioc.internal.util.TapestryException: Client id
for product/List:details is not available as it did not render yet (or
was disabled).

note my pageLinks are being rendered inside a table.

On Tue, Aug 19, 2008 at 12:55 PM, Robert Zeigler <ro...@scazdl.org> wrote:
> Check out the second comment by HLS:
>
> "Or, here's a better idea; an id should only be generated if getClientId()
> is invoked, at which point the id attribute of the element may be set.
> Dynamic updates to the DOM are a great thing. "
>
> That's the behavior that ended up getting implemented.
> You still want to use t:id.
>
> But you need to make sure that "getClientId" is called.
>
> A simple way to do this would be to attach a mixin:
>
> package com.example.mixins;
>
> public class EnsureId {
>    @InjectContainer
>    private ClientElement element;
>    void beginRender() {
>        element.getClientId();
>    }
> }
>
> <t:pagelink t:id="new" mixins="ensureid" page="newid">Some Link</t:pagelink>
>
>
> Robert
>
>
> On Aug 19, 2008, at 8/1910:42 AM , Mark Horn wrote:
>
>> hhmm... that is a problem as my links are in a loop. so they used to
>> be remove, remove_0, etc.  if I set id="remove" then all links have
>> the id of 'remove' which does not work for my tests ether.
>>
>> Any other ideas?
>>
>> On Tue, Aug 19, 2008 at 11:32 AM, Mark Horn <ma...@agilesrc.com>
>> wrote:
>>>
>>> right.. how did I miss that. thanks!
>>>
>>> On Tue, Aug 19, 2008 at 11:27 AM, Filip S. Adamsen <fs...@fsadev.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> As far as I can tell from the issue you linked to, you need to bind the
>>>> id
>>>> (not t:id) parameter of the link.
>>>>
>>>> -Filip
>>>>
>>>> On 2008-08-19 17:11, Mark Horn wrote:
>>>>>
>>>>> I just updated to Tapestry 5.0.14 from 5.0.11 and have run into an
>>>>> issue with using PageTester to test ActionLinks as shown here
>>>>> http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html
>>>>>
>>>>> It looks like this change in 5.0.12,
>>>>>
>>>>>
>>>>> https://issues.apache.org/jira/browse/TAPESTRY-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>>>>> is causing the trouble I'm running into.
>>>>>
>>>>> My ActionLinks no longer have an "id" therefore the call
>>>>>
>>>>> Element link = doc.getElementById("link1");
>>>>>
>>>>> is now returning an null, causing the line
>>>>>
>>>>> doc = tester.clickLink(link);
>>>>>
>>>>> to throw a NullPointException.
>>>>>
>>>>> Any suggestions on how to get around this?
>>>>>
>>>>> example of from tml file where id was set using t:id
>>>>>
>>>>>                      <table t:type="grid" source="list" row="type"
>>>>>                              reorder="name,description" >
>>>>>                              <t:parameter name="nameCell">
>>>>>                                      <t:pagelink t:id="new"
>>>>> page="prop:createPage">
>>>>>                                              ${type.name}
>>>>>                                      </t:pagelink>
>>>>>                              </t:parameter>
>>>>>                      </table>
>>>>>
>>>>> Thanks,
>>>>> Mark
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: ActionLink, PageTester and ElementID

Posted by Robert Zeigler <ro...@scazdl.org>.
Check out the second comment by HLS:

"Or, here's a better idea; an id should only be generated if  
getClientId() is invoked, at which point the id attribute of the  
element may be set. Dynamic updates to the DOM are a great thing. "

That's the behavior that ended up getting implemented.
You still want to use t:id.

But you need to make sure that "getClientId" is called.

A simple way to do this would be to attach a mixin:

package com.example.mixins;

public class EnsureId {
     @InjectContainer
     private ClientElement element;
     void beginRender() {
         element.getClientId();
     }
}

<t:pagelink t:id="new" mixins="ensureid" page="newid">Some Link</ 
t:pagelink>


Robert


On Aug 19, 2008, at 8/1910:42 AM , Mark Horn wrote:

> hhmm... that is a problem as my links are in a loop. so they used to
> be remove, remove_0, etc.  if I set id="remove" then all links have
> the id of 'remove' which does not work for my tests ether.
>
> Any other ideas?
>
> On Tue, Aug 19, 2008 at 11:32 AM, Mark Horn <ma...@agilesrc.com>  
> wrote:
>> right.. how did I miss that. thanks!
>>
>> On Tue, Aug 19, 2008 at 11:27 AM, Filip S. Adamsen <fs...@fsadev.com>  
>> wrote:
>>> Hi,
>>>
>>> As far as I can tell from the issue you linked to, you need to  
>>> bind the id
>>> (not t:id) parameter of the link.
>>>
>>> -Filip
>>>
>>> On 2008-08-19 17:11, Mark Horn wrote:
>>>>
>>>> I just updated to Tapestry 5.0.14 from 5.0.11 and have run into an
>>>> issue with using PageTester to test ActionLinks as shown here
>>>> http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html
>>>>
>>>> It looks like this change in 5.0.12,
>>>>
>>>> https://issues.apache.org/jira/browse/TAPESTRY-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>>>> is causing the trouble I'm running into.
>>>>
>>>> My ActionLinks no longer have an "id" therefore the call
>>>>
>>>> Element link = doc.getElementById("link1");
>>>>
>>>> is now returning an null, causing the line
>>>>
>>>> doc = tester.clickLink(link);
>>>>
>>>> to throw a NullPointException.
>>>>
>>>> Any suggestions on how to get around this?
>>>>
>>>> example of from tml file where id was set using t:id
>>>>
>>>>                       <table t:type="grid" source="list" row="type"
>>>>                               reorder="name,description" >
>>>>                               <t:parameter name="nameCell">
>>>>                                       <t:pagelink t:id="new"
>>>> page="prop:createPage">
>>>>                                               ${type.name}
>>>>                                       </t:pagelink>
>>>>                               </t:parameter>
>>>>                       </table>
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


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


Re: ActionLink, PageTester and ElementID

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Weird. According to TAPESTRY-2294 the value should be uniqued via 
RenderSupport...

-Filip

On 2008-08-19 17:42, Mark Horn wrote:
> hhmm... that is a problem as my links are in a loop. so they used to
> be remove, remove_0, etc.  if I set id="remove" then all links have
> the id of 'remove' which does not work for my tests ether.
> 
> Any other ideas?
> 
> On Tue, Aug 19, 2008 at 11:32 AM, Mark Horn <ma...@agilesrc.com> wrote:
>> right.. how did I miss that. thanks!
>>
>> On Tue, Aug 19, 2008 at 11:27 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:
>>> Hi,
>>>
>>> As far as I can tell from the issue you linked to, you need to bind the id
>>> (not t:id) parameter of the link.
>>>
>>> -Filip
>>>
>>> On 2008-08-19 17:11, Mark Horn wrote:
>>>> I just updated to Tapestry 5.0.14 from 5.0.11 and have run into an
>>>> issue with using PageTester to test ActionLinks as shown here
>>>> http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html
>>>>
>>>> It looks like this change in 5.0.12,
>>>>
>>>> https://issues.apache.org/jira/browse/TAPESTRY-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>>>> is causing the trouble I'm running into.
>>>>
>>>> My ActionLinks no longer have an "id" therefore the call
>>>>
>>>> Element link = doc.getElementById("link1");
>>>>
>>>> is now returning an null, causing the line
>>>>
>>>> doc = tester.clickLink(link);
>>>>
>>>> to throw a NullPointException.
>>>>
>>>> Any suggestions on how to get around this?
>>>>
>>>> example of from tml file where id was set using t:id
>>>>
>>>>                        <table t:type="grid" source="list" row="type"
>>>>                                reorder="name,description" >
>>>>                                <t:parameter name="nameCell">
>>>>                                        <t:pagelink t:id="new"
>>>> page="prop:createPage">
>>>>                                                ${type.name}
>>>>                                        </t:pagelink>
>>>>                                </t:parameter>
>>>>                        </table>
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

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


Re: ActionLink, PageTester and ElementID

Posted by Mark Horn <ma...@agilesrc.com>.
hhmm... that is a problem as my links are in a loop. so they used to
be remove, remove_0, etc.  if I set id="remove" then all links have
the id of 'remove' which does not work for my tests ether.

Any other ideas?

On Tue, Aug 19, 2008 at 11:32 AM, Mark Horn <ma...@agilesrc.com> wrote:
> right.. how did I miss that. thanks!
>
> On Tue, Aug 19, 2008 at 11:27 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:
>> Hi,
>>
>> As far as I can tell from the issue you linked to, you need to bind the id
>> (not t:id) parameter of the link.
>>
>> -Filip
>>
>> On 2008-08-19 17:11, Mark Horn wrote:
>>>
>>> I just updated to Tapestry 5.0.14 from 5.0.11 and have run into an
>>> issue with using PageTester to test ActionLinks as shown here
>>> http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html
>>>
>>> It looks like this change in 5.0.12,
>>>
>>> https://issues.apache.org/jira/browse/TAPESTRY-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>>> is causing the trouble I'm running into.
>>>
>>> My ActionLinks no longer have an "id" therefore the call
>>>
>>> Element link = doc.getElementById("link1");
>>>
>>> is now returning an null, causing the line
>>>
>>> doc = tester.clickLink(link);
>>>
>>> to throw a NullPointException.
>>>
>>> Any suggestions on how to get around this?
>>>
>>> example of from tml file where id was set using t:id
>>>
>>>                        <table t:type="grid" source="list" row="type"
>>>                                reorder="name,description" >
>>>                                <t:parameter name="nameCell">
>>>                                        <t:pagelink t:id="new"
>>> page="prop:createPage">
>>>                                                ${type.name}
>>>                                        </t:pagelink>
>>>                                </t:parameter>
>>>                        </table>
>>>
>>> Thanks,
>>> Mark
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

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


Re: ActionLink, PageTester and ElementID

Posted by Mark Horn <ma...@agilesrc.com>.
right.. how did I miss that. thanks!

On Tue, Aug 19, 2008 at 11:27 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:
> Hi,
>
> As far as I can tell from the issue you linked to, you need to bind the id
> (not t:id) parameter of the link.
>
> -Filip
>
> On 2008-08-19 17:11, Mark Horn wrote:
>>
>> I just updated to Tapestry 5.0.14 from 5.0.11 and have run into an
>> issue with using PageTester to test ActionLinks as shown here
>> http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html
>>
>> It looks like this change in 5.0.12,
>>
>> https://issues.apache.org/jira/browse/TAPESTRY-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>> is causing the trouble I'm running into.
>>
>> My ActionLinks no longer have an "id" therefore the call
>>
>> Element link = doc.getElementById("link1");
>>
>> is now returning an null, causing the line
>>
>> doc = tester.clickLink(link);
>>
>> to throw a NullPointException.
>>
>> Any suggestions on how to get around this?
>>
>> example of from tml file where id was set using t:id
>>
>>                        <table t:type="grid" source="list" row="type"
>>                                reorder="name,description" >
>>                                <t:parameter name="nameCell">
>>                                        <t:pagelink t:id="new"
>> page="prop:createPage">
>>                                                ${type.name}
>>                                        </t:pagelink>
>>                                </t:parameter>
>>                        </table>
>>
>> Thanks,
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: ActionLink, PageTester and ElementID

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi,

As far as I can tell from the issue you linked to, you need to bind the 
id (not t:id) parameter of the link.

-Filip

On 2008-08-19 17:11, Mark Horn wrote:
> I just updated to Tapestry 5.0.14 from 5.0.11 and have run into an
> issue with using PageTester to test ActionLinks as shown here
> http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html
> 
> It looks like this change in 5.0.12,
> https://issues.apache.org/jira/browse/TAPESTRY-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
> is causing the trouble I'm running into.
> 
> My ActionLinks no longer have an "id" therefore the call
> 
> Element link = doc.getElementById("link1");
> 
> is now returning an null, causing the line
> 
> doc = tester.clickLink(link);
> 
> to throw a NullPointException.
> 
> Any suggestions on how to get around this?
> 
> example of from tml file where id was set using t:id
> 
> 			<table t:type="grid" source="list" row="type"
> 				reorder="name,description" >
> 				<t:parameter name="nameCell">
> 					<t:pagelink t:id="new" page="prop:createPage">
> 						${type.name}
> 					</t:pagelink>
> 				</t:parameter>
> 			</table>
> 
> Thanks,
> Mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

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