Hi,

Happy New Year!

I would suggest having also a look at Pier Widgets.

Cheers,
Reza

On January 2, 2013 at 5:13 PM "dtrussardi@tiscali.it" <dtrussardi@tiscali.it> wrote:
> Ciao,
> 
> Happy New Year to all.
> 
> Thank Yanni for your answer ( sorry for my delay ).
> 
> > On 24/12/12 4:48 AM, dtrussardi@tiscali.it wrote:
> >>> I have a pier site with a menu to manage some pages.
> >>> Some of this pages are configured to manage components.
> >>> 
> >>> For test i add some Counter seaside application instances.
> >>> 
> >>> Now when display a specific page with some counter it work fine:
> >>> 
> >>> i can change any specific counter instance in the page.
> >>> 
> >>> My problem is when i change the menu for display another page.
> >>> 
> >>> In this case when redisplay a page with the counters all instance are reset to 0.
> >>> 
> >>> Now my question is:
> >>> 
> >>> what do i do for redisplay the counter at the last update ?
> >>> 
> >>> I need to configure something ?
> > 
> > IIUC, a Seaside component is created and initialized for each Seaside session. I believe there is a way to set some initial values using link parameters, but the details are not at my fingertips.
> > 
> 
> I found one example relative to this question creating a blog based on PRBlogKernelDistribution.
> 
> > Can you say a bit more about how you are using the pier page to manage components. Ideally, an example of the wiki markup, and maybe a code snippet that configures the Pier component to create the WACounter (or, the steps done in Pier, if you're not doing this part in code).
> 
> It in the blog page, it rendering some counter example based on the following code:
> 
> -------------------------------------------------------------------------------------------------------------------
> blogPostEmbeddingComponents
> ^ (PBPost named: 'embedding-components')
> title: 'Embedding components';
> tags: #('components' 'embedding' 'Seaside');
> publication: TimeStamp now;
> contents:
> 'Embedding Seaside components is straightforward. Simply add a component to a node within the site''s tree structure, then add a reference to that component within a blog post. For example if you add a component as a child of this post, you can then then embed the component using the syntax. \+mychild\+. Here is an embedded ajaxified counter:
> 
> +ajaxcounter+
> 
> ...and the standard counter:
> 
> +counter+
> 
> Test Seaside''s state management by clicking on the \+\+ and \-\- links. Pier blogs are ideal for demoing and describing your Seaside components. In fact you can use Pier as the basis for application development by embedding components in pages, especially if you are building a content-rich site.';
> addChild: ((PRComponent named: 'ajaxcounter')
> componentClass: JQCounterFunctionalTest;
> yourself);
> addChild: ((PRComponent named: 'counter')
> componentClass: WACounter;
> yourself);
> yourself.
> -----------------------------------------------------------------------------------------------------------------------------------
> 
> 
> 
> You can display the blog page and do some operations + - on one counter,
> 
> After if you click on any menu item ( Home or Blog itself ) 
> 
> you lose the state of the counter instances.
> 
> But i need to remember the state of the counters instance ( or any other my root components ) so that when redisplay the page i display the 
> 
> right last update value.
> 
> 
> I hope that the example is understandable.
> 
> I remain available for any further information.
> 
> Thanks for any considerations,
> 
> 
> Dario Trussardi
> 
> 
> 
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki