Thanks a lot Randal and Tom,<br>I could accomplish the task with your help and guidance.<br>The following are the things I did.<br><br>1) Add &#39;identifier&#39; an instance Variable in MySession (which is my root session class).
<br><br>2) Add 2 methods #identifier and #identifier: in MyRootComponent ( Which is a subclass of WAComponent and my root component)<br><br>MyRootComponent&gt;&gt; identifier<br>^ self session identifier<br><br><br>MyRootComponent&gt;&gt;identifier: anId
<br>self session identifier: anId<br><br><br>3) Override #updateUrl: in MyRootComponent<br><br>updateUrl: url<br>&quot;identifier has the html Id of the anchor/element clicked last&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super updateUrl: url.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url fragment: self identifier<br><br>4)MyRootComponent # renderContentOn: is simple<br><br>MyRootComponent&gt;&gt;renderContentOn: html<br>&quot;model is an OrderedCollection&quot;<br>self model do: [:eachItem | self renderEachItem: eachItem on: html]
<br><br><br>5) #renderEachItem:on: is tweaked a bit to accomodate html anchor name: . I suppose this can also work with textInputs and submitButtons or any other form elements.<br><br><br>MyRootComponent&gt;&gt;renderEachItem: eachItem on: html
<br><br>&quot;I am going to have some temp variables to assign html nextId. Each Item has title, quantity&quot;<br>| id1 id2 id3 |<br>id1 := id2 := id3 := nil.<br>html text: anItem title.<br>html text: anItem quantity.<br>
html anchor name: (id1 := html nextId); callback: [self identifier: id1.self incrementQuantity: anItem]; with: &#39;+&#39;.<br>html anchor name: (id2 := html nextId); callback: [self identifier: id2.self decrementQuantity: anItem]; with: &#39;-&#39;.
<br>html anchor name: (id3 := html nextId); callback: [self identifier: id3.self delete: anItem]; with: &#39;Delete&#39;.<br><br><br><br>Thanks a lot again to all the experienced users who make our lives easier. What a way to start a New Year.
<br><br><br>Thanks &amp; Regards,<br>Rajeev<br><br><br><div class="gmail_quote">On Jan 1, 2008 10:51 PM, Randal L. Schwartz &lt;<a href="mailto:merlyn@stonehenge.com">merlyn@stonehenge.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt;&gt;&gt;&gt;&gt; &quot;Rajeev&quot; == Rajeev Lochan &lt;<a href="mailto:lochan94@gmail.com">lochan94@gmail.com</a>&gt; writes:<br><br>Rajeev&gt; I tried this and it works out of the box only with a particular predefined
<br>Rajeev&gt; Anchor. As I mentioned above, mine is going to be Dynamically built list<br>Rajeev&gt; with a lot of items. Is there anyway to assign unique name to all anchors.<br>Rajeev&gt; One of the solutions I can think of is
<br><br>Rajeev&gt; html anchor name: html nextId asString.<br><br>Rajeev&gt; Then somehow pass this information to #updateUrl:<br><br>Just designing out loud, but I suspect your callback could update a state<br>variable (in the component) that defines the anchor tag to which to scroll,
<br>and the #updateUrl: of that component would add that tag to the url. &nbsp;Might<br>just work, since the callback pass is processed *before* the rendering pass.<br><font color="#888888"><br>--<br>Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<br>&lt;<a href="mailto:merlyn@stonehenge.com">merlyn@stonehenge.com</a>&gt; &lt;URL:<a href="http://www.stonehenge.com/merlyn/" target="_blank">http://www.stonehenge.com/merlyn/</a>&gt;<br>Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
<br>See <a href="http://PerlTraining.Stonehenge.com" target="_blank">PerlTraining.Stonehenge.com</a> for onsite and open-enrollment Perl training!<br></font></blockquote></div><br><br clear="all"><br>-- <br>Rajeev Lochan<br>
<br>Co-founder, AR-CAD.com<br><br><a href="http://www.ar-cad.com">http://www.ar-cad.com</a><br>+91 9243468076 (Bangalore)<br>080 65355873