Re: Tutorials on Tapestry 4.1.1 and AJAX/javascript

2007-03-21 Thread Ron Piterman
AFAIK Kent's book covers that -

http://www.agileskills2.org/EWDT/

Cheers,
Ron


Wojtek Ciesielski wrote:
> Hi all,
> 
> Are there ANY written tutorials on how to use Javascript (AJAX)
> integration built in Tapestry 4.1.1? Or are API docs like
> http://tapestry.apache.org/tapestry4.1/javascript/form.html and source
> codes the only documentation for this functionality?
> 
> Thanks in advance for any answers,
> Wojtek
> 
> -
> Ta oferta jest dla Ciebie ! Sprawdź na: http://link.interia.pl/f1a33
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Download link for T4 broken

2007-02-27 Thread Ron Piterman
http://tapestry.apache.org/download.html

Cheers,
Ron


Borut Bolčina wrote:
> While looking for source code for Virtual Library I discovered a broken
> link
> 
> http://jakarta.apache.org/site/downloads/downloads_tapestry.cgi
> on
> http://tapestry.apache.org/tapestry4/downloads.html
> 
> P.S. Where can I find VL for 4.0 sources?
> 
> -Borut
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Parameter has already been declared

2007-01-10 Thread Ron Piterman
try changing string[] to Collection and see if this changes
anything, tapestry is probably able to coerce these values, isn't it?
Cheers,
Ron


Dan Adams wrote:
> Someone here has an application where he's getting the following
> exception:
> 
> Caused by: org.apache.hivemind.ApplicationRuntimeException: Parameter
> onLoad has already been declared (at Annotation
> @org.apache.tapestry.annotations.Parameter(cache=true, defaultValue=,
> required=false, name=, aliases=) of public abstract java.lang.String
> com.ifactory.sageeref.component.HeadContents.getOnLoad()). [Annotation
> @org.apache.tapestry.annotations.Parameter(cache=true, defaultValue=,
> required=false, name=, aliases=) of public abstract java.lang.String
> com.ifactory.sageeref.component.HeadContents.getOnLoad()]
> 
>   at
> org.apache.tapestry.spec.ComponentSpecification.addParameterByName(ComponentSpecification.java:245)
> 
>   at
> org.apache.tapestry.spec.ComponentSpecification.addParameter(ComponentSpecification.java:227)
> 
>   at
> org.apache.tapestry.annotations.ParameterAnnotationWorker.performEnhancement(ParameterAnnotationWorker.java:68)
> 
>   at
> org.apache.tapestry.annotations.AnnotationEnhancementWorker.performMethodEnhancement(AnnotationEnhancementWorker.java:142)
> 
>   ... 93 more
> 
> He says that he only gets this when it runs in jetty and not when it
> runs in tomcat although I haven verified that. Here's the page class
> that it's complaining about:
> 
> public abstract class HeadContents extends BaseERefComponent {
> 
>   public abstract String getStylesheet();
>   
>   @Parameter
>   public abstract String getPageName();
> 
>   // SEEMS TO BE COMPLAINING ABOUT THIS
>   @Parameter
>   public abstract String getOnLoad();
>
>   @Parameter
>   public abstract String[] getScriptFiles();
>   
>   @Parameter
>   public abstract String[] getStylesheetFiles();
>   
>   public String getPageTitle(){
> ...
>   }
> }
> 
> Anyone have any suggestions as to what the problem could be? Thanks!
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: "Library 'contrib' not found in application namespace" when use Tree component

2007-01-10 Thread Ron Piterman
try to write some nonsence the application xml so it won't render (an
open ), I would suspect it is not being referenced. then check that
tapestry servlet name is the same as the name you gave the .application

Cheers,
Ron


Zha Minjie wrote:
> Hi all:
>  I am trying to use Tree component in contrib library. My project name
> is TestTapestry. I put the contrib jar in my classpath, and I also
> create TestTapestry.application in WEB-INF direcotry:
> 
>  "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
> 
> specification-path="classpath:/org/apache/tapestry/contrib/Contrib.library">
> 
> 
> 
> 
> But, when I run the application, it still has:
> Library 'con' not found in application namespace.
> Stack Trace:
> 
>*
> org.apache.tapestry.engine.Namespace.createNamespace(Namespace.java:290)
>*
> org.apache.tapestry.engine.Namespace.getChildNamespace(Namespace.java:148)
>*
> org.apache.tapestry.resolver.AbstractSpecificationResolver.findNamespaceForId(AbstractSpecificationResolver.java:204)
> 
> 
>*
> org.apache.tapestry.resolver.ComponentSpecificationResolverImpl.resolve(ComponentSpecificationResolverImpl.java:138)
> 
> 
>*
> $ComponentSpecificationResolver_1100c441ed6.resolve($ComponentSpecificationResolver_1100c441ed6.java)
> 
> 
>*
> $ComponentSpecificationResolver_1100c441ed7.resolve($ComponentSpecificationResolver_1100c441ed7.java)
> 
> ...
> 
> How can solve this?
> Thanks a lot!
> 
> -
> 白云偶尔遮住蓝天,但蓝天永远在白云之上。
> 
> _
> 免费下载 MSN Explorer:   http://explorer.msn.com/lccn/ 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: making links :visited across components

2007-01-09 Thread Ron Piterman
Dennis Sinelnikov wrote:
> Ron,
> 
> Since code speaks thousand words :), I would love to see some sample
> code on what you're trying to do and how you did it.  If you're busy, no
> biggie, just trying to learn a new pattern...

:) yes, I am busy.

I will try to demonstrate it:

===
INSTEAD of implementing the pager like this:


  




and using it like:




THE NEW WAY is:


  
  
  
  


and using it:


  


...


  





to make this work I added to the pager:

@Parameter public abstract String getLinkText();
@Parameter public abstract int getLinkPageNumber();
@Parameter public abstract boolean isLinkSelected();

and

public void updateOutParameters(String text, int pageNum ) {
  setLinkText( text );
  setLinkPageNumber( pageNum );
  setLinkSelected( pageNum == getPageNumber();
}

Note that the pager does not only generate 1 2 3 links but also << and
>> links to move forward and back, so i need the linkText and can not
just use the page number as link text.

Further, an If was required inside the linkBlock because if the pageNum
is 0, I need to generate another link which will be the default link to
the page instead of a direct link, since page number 0 is probably
visited once the page is first accessed...

so it is:


  
... generate a link to the page, which will be "visited" anywayz
  
  


  
  
  


> 
> Thanks,
> Dennis
> 
> RonPiterman wrote:
>> andyhot wrote:
>>> Do you have to use direct links?
>>> They expose too much of the inner workings of tapestry - that's why
>>> they're not got for bookmarks as well...
>>
>> how is this possible if my component should be dropped in different
>> pages ?
>>
>> I found finally another solution:
>>
>> What I did is removed the link rendering from the pager, and delegated
>> it to its body.
>>
>> Added 3 out parameters: link text, link page and if selected.
>>
>> in the page I added as a body a renderBlog, in both pages the same
>> block, which contains the desired link. So both pagers render the same
>> link, thus do the same URls...
>>
>> Cheers,
>> Ron
>>
>>
>>>
>>> Anyway, can you code around this using ExternalLinks ?
>>>
>>>
>>> RonPiterman wrote:
 I have a nice usability problem with direct links nested inside
 components:

 I have a pager component, which takes an in-out "page" parameter.

 The pager component generates direct links, which invoke a listener in
 the component with the page number as parameter.

 The listener calls the set method of the "page" parameter, thus
 changing the page number.

 Now if I drop two instances of the pager component in a page, they
 both generate different links, so visited pages can not be traced:

 if the user clicks "2" on the one pager, the url is:

 http://localhost:8080/bardtke/reg/Forum,$Pager.$DirectLink_1.sdirect?sp=1


 on the other pager, the url is:

 http://localhost:8080/bardtke/reg/Forum,$Pager_0.$DirectLink_1.sdirect?sp=1





 so if on pager 1 page 2 is marked as visited, on pager 1 it isn't :(

 Now thats a fine problem...

 Any idees ?

 Cheers,

 Ron


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


>>>
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: reading a file in web root in a Tapestry fashion

2006-12-21 Thread Ron Piterman
http://hivemind.apache.org/hivemind/BuilderFactory.html#Autowiring



Cyrille37 wrote:
> Ron Piterman a écrit :
>> yes, thats it - BTW, you don't need an explicit set-service.
>> just exposte a setter in your implementation class, and hivemind will
>> autowire it:
>>
>> public void setServletContext( ServletContext ctx) {...}
>>   
> heuu...
> I do not really understand.
> Do you mean Hivemind will do that automatically ?
> What are rules ?
> Do you know the documentation about that ?
> 
> Thanks a lot
> Cyrille
>> Cheers,
>> Ron
>>
>>
>> Cyrille37 wrote:
>>  
>>> Ron Piterman a écrit :
>>>
>>>> On which class do you need to access the resource?
>>>> 
>>> I've resolved the case with Hivemind.
>>> I pass to the ObjectFactory the ServletContext to get a root path and
>>> the relative filename.
>>>
>>>>> interface="games.hangman.service.HangmanFactory">
>>>
>>>
>>>>> service-id="tapestry.globals.ServletContext"/>
>>>
>>>
>>>
>>>
>>>  
>>>
>>>
>>>
>>>
>>>
>>>
>>> I would have liked only the Hivemind's contribution entry, but to pass
>>> parameters to the instance I've understood that we have to use a
>>> Factory. So two Hivemind's entries.
>>>
>>> Perhaps it could be lighter with the Hivemind's "Lightweight Instance
>>> Initialization"
>>> http://hivemind.apache.org/instance-initialization.html
>>> But I do not understand how it works ...
>>>
>>> I would have liked something simple as:
>>>
>>>>> class="games.hangman.service.Hangman" >
>>>   >> ref="tapestry.globals.ServletContext" />
>>>   >> value="WordsList.txt" />
>>>
>>>
>>> Cyrille
>>>
>>>
>>>> Cheers,
>>>> Ron
>>>>
>>>>
>>>>
>>>> Cyrille37 wrote:
>>>>  
>>>>  
>>>>> Hello,
>>>>> Sure it is a beginner question, but I'm a beginner :o)
>>>>>
>>>>> I would like to read a file which is located in the web root
>>>>> folder, and
>>>>> put it in a String.
>>>>> I had a look around the Internet and found some tricks :
>>>>>
>>>>> A la "Servlet" :
>>>>> ServletContext theApplicationsServletContext = (ServletContext)
>>>>> this.getExternalContext().getContext();
>>>>> String realPath =
>>>>> theApplicationsServletContext.getRealPath("/resources/images");
>>>>> File file = new File(realPath + File.separatorChar + justFileName);
>>>>>
>>>>> A la "Rife" :
>>>>> import com.uwyn.rife.tools.FileUtils;
>>>>> URL resource =
>>>>> getClass().getClassLoader().getResource("model/WordList.txt");
>>>>> final String wordlist = FileUtils.readString(resource);
>>>>>
>>>>> Please could you tell me what are methods and usages with Tapestry ?
>>>>>
>>>>> Thanks
>>>>> cyrille
>>>>> 
>>>
>>   
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: reading a file in web root in a Tapestry fashion

2006-12-21 Thread Ron Piterman
for example, you can not expect hivemind to inject IEngineService
automatically since there are many services implementing this interface
(PageService, ExternalService, DirectService and so on)


Otherwise it works fine.

Cheers,
Ron


Jiří Mareš wrote:
> Hi,
> 
> the rules are quite simple, there have to be only one service of the type ... 
> otherwise you have to specify what service
> do you want to ...
> 
> Jirka
> 
> Cyrille37 napsal(a):
>> Ron Piterman a écrit :
>>> yes, thats it - BTW, you don't need an explicit set-service.
>>> just exposte a setter in your implementation class, and hivemind will
>>> autowire it:
>>>
>>> public void setServletContext( ServletContext ctx) {...}
>>>   
>> heuu...
>> I do not really understand.
>> Do you mean Hivemind will do that automatically ?
>> What are rules ?
>> Do you know the documentation about that ?
>>
>> Thanks a lot
>> Cyrille
>>> Cheers,
>>> Ron
>>>
>>>
>>> Cyrille37 wrote:
>>>  
>>>> Ron Piterman a écrit :
>>>>
>>>>> On which class do you need to access the resource?
>>>>> 
>>>> I've resolved the case with Hivemind.
>>>> I pass to the ObjectFactory the ServletContext to get a root path and
>>>> the relative filename.
>>>>
>>>>>>> interface="games.hangman.service.HangmanFactory">
>>>>
>>>>
>>>>>>> service-id="tapestry.globals.ServletContext"/>
>>>>
>>>>
>>>>
>>>>
>>>>  
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I would have liked only the Hivemind's contribution entry, but to pass
>>>> parameters to the instance I've understood that we have to use a
>>>> Factory. So two Hivemind's entries.
>>>>
>>>> Perhaps it could be lighter with the Hivemind's "Lightweight Instance
>>>> Initialization"
>>>> http://hivemind.apache.org/instance-initialization.html
>>>> But I do not understand how it works ...
>>>>
>>>> I would have liked something simple as:
>>>>
>>>>>>> class="games.hangman.service.Hangman" >
>>>>   >>> ref="tapestry.globals.ServletContext" />
>>>>   >>> value="WordsList.txt" />
>>>>
>>>>
>>>> Cyrille
>>>>
>>>>
>>>>> Cheers,
>>>>> Ron
>>>>>
>>>>>
>>>>>
>>>>> Cyrille37 wrote:
>>>>>  
>>>>>  
>>>>>> Hello,
>>>>>> Sure it is a beginner question, but I'm a beginner :o)
>>>>>>
>>>>>> I would like to read a file which is located in the web root
>>>>>> folder, and
>>>>>> put it in a String.
>>>>>> I had a look around the Internet and found some tricks :
>>>>>>
>>>>>> A la "Servlet" :
>>>>>> ServletContext theApplicationsServletContext = (ServletContext)
>>>>>> this.getExternalContext().getContext();
>>>>>> String realPath =
>>>>>> theApplicationsServletContext.getRealPath("/resources/images");
>>>>>> File file = new File(realPath + File.separatorChar + justFileName);
>>>>>>
>>>>>> A la "Rife" :
>>>>>> import com.uwyn.rife.tools.FileUtils;
>>>>>> URL resource =
>>>>>> getClass().getClassLoader().getResource("model/WordList.txt");
>>>>>> final String wordlist = FileUtils.readString(resource);
>>>>>>
>>>>>> Please could you tell me what are methods and usages with Tapestry ?
>>>>>>
>>>>>> Thanks
>>>>>> cyrille
>>>>>> 
>>>   
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: reading a file in web root in a Tapestry fashion

2006-12-21 Thread Ron Piterman
yes, thats it - BTW, you don't need an explicit set-service.
just exposte a setter in your implementation class, and hivemind will
autowire it:

public void setServletContext( ServletContext ctx) {...}

Cheers,
Ron


Cyrille37 wrote:
> Ron Piterman a écrit :
>> On which class do you need to access the resource?
>>   
> 
> I've resolved the case with Hivemind.
> I pass to the ObjectFactory the ServletContext to get a root path and
> the relative filename.
> 
> interface="games.hangman.service.HangmanFactory">
>
>
> service-id="tapestry.globals.ServletContext"/>
>
>
>
>
>  
>
>
>
>
>
> 
> I would have liked only the Hivemind's contribution entry, but to pass
> parameters to the instance I've understood that we have to use a
> Factory. So two Hivemind's entries.
> 
> Perhaps it could be lighter with the Hivemind's "Lightweight Instance
> Initialization"
> http://hivemind.apache.org/instance-initialization.html
> But I do not understand how it works ...
> 
> I would have liked something simple as:
> 
> class="games.hangman.service.Hangman" >
>ref="tapestry.globals.ServletContext" />
>   
>
> 
> Cyrille
> 
>> Cheers,
>> Ron
>>
>>
>>
>> Cyrille37 wrote:
>>  
>>> Hello,
>>> Sure it is a beginner question, but I'm a beginner :o)
>>>
>>> I would like to read a file which is located in the web root folder, and
>>> put it in a String.
>>> I had a look around the Internet and found some tricks :
>>>
>>> A la "Servlet" :
>>> ServletContext theApplicationsServletContext = (ServletContext)
>>> this.getExternalContext().getContext();
>>> String realPath =
>>> theApplicationsServletContext.getRealPath("/resources/images");
>>> File file = new File(realPath + File.separatorChar + justFileName);
>>>
>>> A la "Rife" :
>>> import com.uwyn.rife.tools.FileUtils;
>>> URL resource =
>>> getClass().getClassLoader().getResource("model/WordList.txt");
>>> final String wordlist = FileUtils.readString(resource);
>>>
>>> Please could you tell me what are methods and usages with Tapestry ?
>>>
>>> Thanks
>>> cyrille
>>> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: reading a file in web root in a Tapestry fashion

2006-12-21 Thread Ron Piterman
On which class do you need to access the resource?
Cheers,
Ron



Cyrille37 wrote:
> Hello,
> Sure it is a beginner question, but I'm a beginner :o)
> 
> I would like to read a file which is located in the web root folder, and
> put it in a String.
> I had a look around the Internet and found some tricks :
> 
> A la "Servlet" :
> ServletContext theApplicationsServletContext = (ServletContext)
> this.getExternalContext().getContext();
> String realPath =
> theApplicationsServletContext.getRealPath("/resources/images");
> File file = new File(realPath + File.separatorChar + justFileName);
> 
> A la "Rife" :
> import com.uwyn.rife.tools.FileUtils;
> URL resource =
> getClass().getClassLoader().getResource("model/WordList.txt");
> final String wordlist = FileUtils.readString(resource);
> 
> Please could you tell me what are methods and usages with Tapestry ?
> 
> Thanks
> cyrille
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tap4 documentation: the For component example is not complete

2006-12-21 Thread Ron Piterman
Hallo cyrille,

Its under project information (bottom of navigation) /Issue tracking

http://tapestry.apache.org/issue-tracking.html


You are in a very good situation to help improve the docu, becuase you
are learning tapestry from ground up, and doing it very thoroughly- so
its really important you add jira issues if you find something is
missing/wrong - also if its just a typo -

later you just oversee such things, because you use the docu as
reference only... keep up the good work :)

Cheers,
Ron



Cyrille37 wrote:
> andyhot a écrit :
>> I'd open one JIRA issue in the 'documentation' category,
>> and i'd start adding my findings there...
>>   
> Hi Andy, I could not find this JIRA
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DirectLink with another element instead of

2006-12-21 Thread Ron Piterman
AFAIK all link components have a linkRenderer parameter - I think thats
what you need...

Cheers,
Ron


talk.small wrote:
> I want to create the href with DirectLink, but with another owner element of
>  instead of  
> becuase I want to render an image map on the page like this:
> 
> 
> 
> 
> 
> 
> sitemap.gif 
> 
> Does anyone know how can I achieve it? Thanks
> 
> talk.small
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hook into T4's page creation process

2006-12-21 Thread Ron Piterman
yes, there is a configurable annotation workers, so you can
create/extend/override page methods when tapestry is preparing the
page/component class.

You can create your own class worker which will add the needed logic to
the mentioned attach event.

Take a look at the annotations module code and hivemind configuration.

Cheers,
Ron



karthik G wrote:
> I just want to add an annotation on the page and then take some action when
> the page is being bound to a request from the page pool.
> 
> @SecuredPage
> abstract class MyPage extends BasePage{
> 
> }
> 
> Is there anyways i can hook into T4's page creation process and then
> depending upon the annotation take some action? For e.g in the above
> case, I
> just want to be able to check for a user object in the session and redirect
> to login page.
> 
> I looked at PageAttachListener and it looks nice. But I dont want to
> implement that in my page but would like to attach a listener to T4 itself.
> 
> thanks,
> Karthik
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Standalone plugins

2006-12-20 Thread Ron Piterman
again, the trick is adding references to a library without coding it.
Tapestry defines in the hivemind registry the service point :

tapestry.parse.SpecificationSource

which is responsible for reading the specification from files - I would
think that to make dynamic libraries load, you need to implement this
service a new:

create a single library which is "dynamic", all other libraries will
delegate to the tapestry implementation.

for your dynamic library, create a specification which is dynamically
generated according to a hivemind configuration point.

Never done this, but was often thinking about it...

Cheers,
Ron


Pedro Abelleira Seco wrote:
> Thanks for your response.
> 
> What I have in mind is to be in the situation of
> having a general web application with a common set of
> services and components (including the a general
> Border, etc.) and getting different contractors to
> develop different parts of the app in parallel without
> having to touch any single file in the main app or any
> other plugin to put them into production.
> 
> Then the warranty and support agreement from each
> contractor would be clearly separated and future
> modifications or additions of new plugins could be
> done by the best bidder.
> 
> Do you think the technical possibilities are enough
> for such scenario?
> 
> Cheers
> Pedro
> 
> 
> --- Ron Piterman <[EMAIL PROTECTED]> escribió:
> 
>> It could be done, but above all needs restarting of
>> the servlet
>> container for every change-
>>
>> Since hivemind lets you peekup configuration from
>> every jar on the
>> classpath, configuration isn't an issue.
>>
>> However, adding a library without making an explicit
>> reference to it
>> should be quite difficult - You may need to create a
>> custom Library spec
>> source.
>>
>> Cheers,
>> Ron
>>
>>
>> Pedro Abelleira Seco wrote:
>>> Hello all,
>>>
>>> I has been a happy user of Tapestry 3 and since
>> then
>>> stepped out of web development for a while. But I
>> have
>>> to return there at some point.
>>>
>>> I would like to be able to do in a web application
>> the
>>> same kind of things that are possible in client
>>> applications with respect to plugins.
>>>
>>> The idea would be to be able to drop a library in
>> the
>>> classpath which contained components and _pages_
>> and
>>> that could:
>>>
>>> 1.- Add entries (links) to a menu in a page of the
>>> application.
>>> 2.- When the user clicks on one of those links to
>>> display the corresponding page, which would be
>> located
>>> in the library.
>>>
>>> Do you think that would be possible with Tapestry?
>>>
>>> Thank you
>>> Pedro
>>>
>>>
>>>
>>> 
>>> 
>>> 
>>> __ 
>>> LLama Gratis a cualquier PC del Mundo. 
>>> Llamadas a fijos y móviles desde 1 céntimo por
>> minuto. 
>>> http://es.voice.yahoo.com
>>>
>>>
> -
>>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>>>
>>
>>
> -
>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>>
>>
> 
> 
> 
>   
> __ 
> LLama Gratis a cualquier PC del Mundo. 
> Llamadas a fijos y móviles desde 1 céntimo por minuto. 
> http://es.voice.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Tap4.0.2] about @Persist("client")

2006-12-20 Thread Ron Piterman
Happy debugging :) Ron


Cyrille37 wrote:
> Ron Piterman a écrit :
>> I would tip that you hold a reference to a page or some threaded bean
>> where you shouldn't. just a wild guess -
>>   
> Hi Ron.
> Thanks for your little chocolate :)
> 
> But the same code (really no change) does not run in a same way when
> hosted in Tomcat and Glassfish.
> There is no problem when it runs in Tomcat,
> There is THE problem when it runs in Glassfish.
> 
> I think there is some Spring or other libs which do not run in the same
> way depends on the hosted server.
> 
> cyrille.
>> Cheers,
>> Ron
>>
>>
>>
>> Cyrille37 wrote:
>>  
>>> Hi,
>>>
>>> I could not reproduce the problem with a simple code. It only happend
>>> with the complet project (Tap, Spring, Hibernate, BeanForm...)
>>>
>>> Should I add a Jira entry to remember the problem, or I'm alone with
>>> this and let wait to see later.
>>>
>>> cyrille
>>>
>>> Cyrille37 a écrit :
>>>
>>>> andyhot a écrit :
>>>>  
>>>>> client, client:page, client:app all use url rewritting
>>>>> to store the property...
>>>>> 
>>>> Effectively, I've tried different @Persist("xxx") and no cookie was
>>>> set.
>>>>
>>>>  
>>>>> So, what's the problem again?
>>>>> 
>>>> The problem is with Glassfish.
>>>> With Glassfish (and all libraries used by my project) the persistence
>>>> run like a singleton.
>>>>
>>>> Here is a part of the code :
>>>>
>>>>  @Persist("client")
>>>>   public abstract int getDocId();
>>>>   public abstract void setDocId(int docId);
>>>>   public void activateExternalPage(Object[] parameters, IRequestCycle
>>>> cycle)
>>>>   {
>>>>   int id = Integer.parseInt( parameters[0].toString());
>>>>   setDocId( id );
>>>>   }
>>>>
>>>> With Glassfish :
>>>>
>>>> With Firefox I make a first call (service=external) :
>>>>   http://localhost:8080/Tap03/Docum/DocumentEdit.external?sp=14
>>>> Then I call (service=page) :
>>>>   http://localhost:8080/Tap03/Docum/DocumentEdit.html
>>>> This second call (serive=page) remember the property "docId".
>>>> I launch another browser (InternetExplorer) and use the url
>>>>   http://localhost:8080/Tap03/Docum/DocumentEdit.html
>>>> And ARGH! It display the page with the property "docId" set to 14
>>>> (like if I call service external with sp=14).
>>>>
>>>> That's crazy. The page and its property seems to be a Singleton
>>>> instance.
>>>>
>>>> With Tomcat there is not that problem. It works like it have to.
>>>>
>>>> Cyrille
>>>>
>>>>  
>>>>>
>>>>> Cyrille37 wrote:
>>>>>
>>>>>> Ron Piterman a écrit :
>>>>>>  
>>>>>>> forgot about cookies just before christmas? what do you eat those
>>>>>>> days?
>>>>>>> :) Ron
>>>>>>>   
>>>>>> Chocolate :)
>>>>>>
>>>>>> By the way. This is not cookies ! But Server !
>>>>>> Argh... ... I'm dying
>>>>>>
>>>>>> The problem does not exists when the application is running on
>>>>>> Tomcat 5.5.17
>>>>>> but exists when running on Glassfish ( Sun Java System Application
>>>>>> Server Platform Edition 9.0_01 (build b14)).
>>>>>> No code change, just changing project's properties in Netbeans5.5.
>>>>>>
>>>>>> Shure the is incompatibility somewhere.
>>>>>> The application using Tapestry 4.0.2, Spring 2.0 final (3.10.2006),
>>>>>> Hibernate 3.2.1GA.
>>>>>>
>>>>>> Perhaps a Father Christmas's surprise
>>>>>> Cyrille.
>>>>>>
>>>>>>  
>>>>>>> Cyrille37 wrote:
>>>>>>>  
>>>>>>>
>>>>>>>> Ron Piterman a écrit :
>>>>>>>>  
>>>>>>>>  
>>

Re: [Tap4.0.2] about @Persist("client")

2006-12-20 Thread Ron Piterman
I would tip that you hold a reference to a page or some threaded bean
where you shouldn't. just a wild guess -
Cheers,
Ron



Cyrille37 wrote:
> Hi,
> 
> I could not reproduce the problem with a simple code. It only happend
> with the complet project (Tap, Spring, Hibernate, BeanForm...)
> 
> Should I add a Jira entry to remember the problem, or I'm alone with
> this and let wait to see later.
> 
> cyrille
> 
> Cyrille37 a écrit :
>> andyhot a écrit :
>>> client, client:page, client:app all use url rewritting
>>> to store the property...
>>
>> Effectively, I've tried different @Persist("xxx") and no cookie was set.
>>
>>> So, what's the problem again?
>> The problem is with Glassfish.
>> With Glassfish (and all libraries used by my project) the persistence
>> run like a singleton.
>>
>> Here is a part of the code :
>>
>>  @Persist("client")
>>   public abstract int getDocId();
>>   public abstract void setDocId(int docId);
>>   public void activateExternalPage(Object[] parameters, IRequestCycle
>> cycle)
>>   {
>>   int id = Integer.parseInt( parameters[0].toString());
>>   setDocId( id );
>>   }
>>
>> With Glassfish :
>>
>> With Firefox I make a first call (service=external) :
>>   http://localhost:8080/Tap03/Docum/DocumentEdit.external?sp=14
>> Then I call (service=page) :
>>   http://localhost:8080/Tap03/Docum/DocumentEdit.html
>> This second call (serive=page) remember the property "docId".
>> I launch another browser (InternetExplorer) and use the url
>>   http://localhost:8080/Tap03/Docum/DocumentEdit.html
>> And ARGH! It display the page with the property "docId" set to 14
>> (like if I call service external with sp=14).
>>
>> That's crazy. The page and its property seems to be a Singleton instance.
>>
>> With Tomcat there is not that problem. It works like it have to.
>>
>> Cyrille
>>
>>>
>>>
>>>
>>> Cyrille37 wrote:
>>>> Ron Piterman a écrit :
>>>>> forgot about cookies just before christmas? what do you eat those
>>>>> days?
>>>>> :) Ron
>>>>>   
>>>> Chocolate :)
>>>>
>>>> By the way. This is not cookies ! But Server !
>>>> Argh... ... I'm dying
>>>>
>>>> The problem does not exists when the application is running on
>>>> Tomcat 5.5.17
>>>> but exists when running on Glassfish ( Sun Java System Application
>>>> Server Platform Edition 9.0_01 (build b14)).
>>>> No code change, just changing project's properties in Netbeans5.5.
>>>>
>>>> Shure the is incompatibility somewhere.
>>>> The application using Tapestry 4.0.2, Spring 2.0 final (3.10.2006),
>>>> Hibernate 3.2.1GA.
>>>>
>>>> Perhaps a Father Christmas's surprise
>>>> Cyrille.
>>>>
>>>>> Cyrille37 wrote:
>>>>>  
>>>>>> Ron Piterman a écrit :
>>>>>>  
>>>>>>> user @Persist("client:page")
>>>>>>>
>>>>>>> AFAIK, "client" uses cookies.
>>>>>>> 
>>>>>> Argh! I've forgotten those so delicious cookies.
>>>>>> Sorry for the noise and thanks Ron for your fast and efficient
>>>>>> answer !
>>>>>>
>>>>>> Cheers
>>>>>> cyrille
>>>>>>
>>>>>>  
>>>>>>> Cheers,
>>>>>>> Ron
>>>>>>>
>>>>>>>
>>>>>>> Cyrille37 wrote:
>>>>>>>  
>>>>>>>   
>>>>>>>> Hello,
>>>>>>>> There is something I do not understand.
>>>>>>>>
>>>>>>>> I've got a page which remember a property "docId" with the
>>>>>>>> @Persist("client") annotation.
>>>>>>>>@Persist("client")
>>>>>>>>public abstract int getDocId();
>>>>>>>>public abstract void setDocId(int docId);
>>>>>>>>
>>>>>>>> When I call the page with an ExternalLink (service=external) I'm
>>>>>>>> setting
>>>>>>>> that "docId" property.
>>>>>>>>http://localhost:8080/Tap03/Docum/DocumentEdit.external?sp=14
>>>>>>>>public void activateExternalPage(Object[] parameters,
>>>>>>>> IRequestCycle
>>>>>>>> cycle)
>>>>>>>>{
>>>>>>>>int id = Integer.parseInt( parameters[0].toString());
>>>>>>>>setDocId( id );
>>>>>>>>}
>>>>>>>>
>>>>>>>> After that call, if I call the page directly (service=page)
>>>>>>>>http://localhost:8080/Tap03/Docum/DocumentEdit.html
>>>>>>>>
>>>>>>>> The page has remembered the "docId" property which I've previously
>>>>>>>> called with the ExternalLink.
>>>>>>>> I do not understand how it could be possible, because the
>>>>>>>> @Persist("client") could not memorize the property on
>>>>>>>> server-side ...
>>>>>>>>
>>>>>>>> Have you got an idea where I've to look to find my mistake ?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> cyrille.
>>>>>>>> 
>>>>>   
>>>>
>>>>
>>>
>>
>>
>>
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Standalone plugins

2006-12-20 Thread Ron Piterman
It could be done, but above all needs restarting of the servlet
container for every change-

Since hivemind lets you peekup configuration from every jar on the
classpath, configuration isn't an issue.

However, adding a library without making an explicit reference to it
should be quite difficult - You may need to create a custom Library spec
source.

Cheers,
Ron


Pedro Abelleira Seco wrote:
> Hello all,
> 
> I has been a happy user of Tapestry 3 and since then
> stepped out of web development for a while. But I have
> to return there at some point.
> 
> I would like to be able to do in a web application the
> same kind of things that are possible in client
> applications with respect to plugins.
> 
> The idea would be to be able to drop a library in the
> classpath which contained components and _pages_ and
> that could:
> 
> 1.- Add entries (links) to a menu in a page of the
> application.
> 2.- When the user clicks on one of those links to
> display the corresponding page, which would be located
> in the library.
> 
> Do you think that would be possible with Tapestry?
> 
> Thank you
> Pedro
> 
> 
> 
>   
>   
>   
> __ 
> LLama Gratis a cualquier PC del Mundo. 
> Llamadas a fijos y móviles desde 1 céntimo por minuto. 
> http://es.voice.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Tap4.0.2] about @Persist("client")

2006-12-19 Thread Ron Piterman
forgot about cookies just before christmas? what do you eat those days?
:) Ron

Cyrille37 wrote:
> Ron Piterman a écrit :
>> user @Persist("client:page")
>>
>> AFAIK, "client" uses cookies.
>>   
> Argh! I've forgotten those so delicious cookies.
> Sorry for the noise and thanks Ron for your fast and efficient answer !
> 
> Cheers
> cyrille
> 
>> Cheers,
>> Ron
>>
>>
>> Cyrille37 wrote:
>>  
>>> Hello,
>>> There is something I do not understand.
>>>
>>> I've got a page which remember a property "docId" with the
>>> @Persist("client") annotation.
>>>@Persist("client")
>>>public abstract int getDocId();
>>>public abstract void setDocId(int docId);
>>>
>>> When I call the page with an ExternalLink (service=external) I'm setting
>>> that "docId" property.
>>>http://localhost:8080/Tap03/Docum/DocumentEdit.external?sp=14
>>>public void activateExternalPage(Object[] parameters, IRequestCycle
>>> cycle)
>>>{
>>>int id = Integer.parseInt( parameters[0].toString());
>>>setDocId( id );
>>>}
>>>
>>> After that call, if I call the page directly (service=page)
>>>http://localhost:8080/Tap03/Docum/DocumentEdit.html
>>>
>>> The page has remembered the "docId" property which I've previously
>>> called with the ExternalLink.
>>> I do not understand how it could be possible, because the
>>> @Persist("client") could not memorize the property on server-side ...
>>>
>>> Have you got an idea where I've to look to find my mistake ?
>>>
>>> Thanks
>>> cyrille.
>>>
>>> 
>>   
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Tap4.0.2] about @Persist("client")

2006-12-19 Thread Ron Piterman
user @Persist("client:page")

AFAIK, "client" uses cookies.

Cheers,
Ron


Cyrille37 wrote:
> Hello,
> There is something I do not understand.
> 
> I've got a page which remember a property "docId" with the
> @Persist("client") annotation.
>@Persist("client")
>public abstract int getDocId();
>public abstract void setDocId(int docId);
> 
> When I call the page with an ExternalLink (service=external) I'm setting
> that "docId" property.
>http://localhost:8080/Tap03/Docum/DocumentEdit.external?sp=14
>public void activateExternalPage(Object[] parameters, IRequestCycle
> cycle)
>{
>int id = Integer.parseInt( parameters[0].toString());
>setDocId( id );
>}
> 
> After that call, if I call the page directly (service=page)
>http://localhost:8080/Tap03/Docum/DocumentEdit.html
> 
> The page has remembered the "docId" property which I've previously
> called with the ExternalLink.
> I do not understand how it could be possible, because the
> @Persist("client") could not memorize the property on server-side ...
> 
> Have you got an idea where I've to look to find my mistake ?
> 
> Thanks
> cyrille.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Job Offer in Germany/Berlin

2006-12-19 Thread Ron Piterman
Hi All,
The Company I am working for is searching for tapestry developer in
Berlin/Germany.

The application we are developing is base on tapestry 4.0 with a custom
ajax extention based on dojo.

The team contains currently 3 highly skilled j2ee developers and 1 front
end (tapestry) developer.

On interreset email me at tapestry1 at piterman dot net

Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T41: RedirectException and async?

2006-12-18 Thread Ron Piterman
I have a small security workflow which is heavily based on 
RedirectExceptions - and was wandering how the tapestry javascript would 
accept this -


When a page is accessed with unsufficient permitions, a 
RedirectException is thrown.


Now, what if the request is async ?

Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Proper way to get ApplicationStateManager?

2006-12-15 Thread Ron Piterman
:( some new feature are failing on the marketing - I also didn't have an 
idee about the new auto injection... lucky I read the list :)


Cheers,
Ron

[EMAIL PROTECTED] wrote:

That's awesome. Was I supposed to be able to find this out somehow with 
documentation? I'd like to think I've been scouring it really hard and never 
came across this :( Or it might just come with understanding HiveMind+Tap?


Greg

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of James
Carman
Sent: Thursday, December 14, 2006 10:53 PM
To: Tapestry users
Subject: Re: Proper way to get ApplicationStateManager?


And, the coolest thing is that this sort of thing *can* be inherited
without using annotations (by putting it in a common superclass).
Otherwise, you have to use XML in your spec files to inject stuff into
all of your subclasses.


On 12/14/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:


Yes. Any/all hivemind services that don't have more than one
definition for the same class interface will be automatically wired
into your components/pages just by declaring the abstract getter or
setter. That's it.

On 12/14/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:


This sounds promising, and I am now on 4.1.1-SNAPSHOT...

public abstract ApplicationStateManager getASM();


As easy as declaring this in a BasePage subclass???


-Greg

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of James
Carman
Sent: Thursday, December 14, 2006 3:08 PM
To: Tapestry users
Subject: Re: Proper way to get ApplicationStateManager?


What version of Tapestry are you using?  4.1?  If so, then it can
autowire stuff for you out of the HiveMind registry.  Just declare an
abstract getter that returns an ApplicationStateManager.  If you're on
4.0, you can download the tapestry-autowire source and build it (via
SVN http://svn.javaforge.com/svn/tapestry/tapestry-autowire/trunk/,
username/password anonymous/anon).  Just drop it into your classpath
and it will do the same thing as 4.1.

On 12/14/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:


I'm replacing the old getVisit() object.

So most of my pages have a call to getVisit(), which returns my AdminVisit 
object, which has the information about if they are logged in, what permissions 
they have etc.

Almost every page calls getVisit(), my Border also calls getVisit() to determine if it's 
showing a simple "Login" link on the left, or if it's showing a full menu 
because they are logged in.

I'm close to wrapping up day 3 trying to get things working! So far the end is 
not in sight.

What I've been able to gather is that I *think* I need to store 
ApplicationStateManager somewhere as a singleton, and then retrieve my visit 
object or store it as needed from there.

I've implemented this method (obviously doesn't work) in hopes that it will 
work someday, I think the idea is correct?

   protected AdminVisit getAdminVisit()
 {
  AdminVisit aVisit = (AdminVisit) 
PCTAdminApplicationServlet.asm.get("adminVisit");

  if (aVisit == null){
aVisit = new AdminVisit();

  PCTAdminApplicationServlet.asm.store("adminVisit", aVisit);
  }
  return aVisit;
 }


Thanks,
Greg

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Ron Piterman
Sent: Thursday, December 14, 2006 2:23 PM
To: users@tapestry.apache.org
Subject: Re: Proper way to get ApplicationStateManager?


Tell us when do you need it and why... *maybe* we can tell you how...
Cheers,
Ron



[EMAIL PROTECTED] wrote:


Thanks Dennis - I'm not sure I understand how to go about fixing the problem if 
it's null at the times I need it :)

Greg




Greg,

You can do what you described before, but pull your visit object in your
SomePage.java classes where you need it.  As Ron pointed out, ASM uses
other service where WebRequest is required.  When you're using it, it's
still null.

-Dennis


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Array-gotcha in .script files

2006-12-15 Thread Ron Piterman

Would you place this in the wiki?
Cheers,
Ron


Jim Steinberger wrote:

Just wanted to give a heads up on a gotcha I ran into.

 


The "index" value of the "foreach" tag is stored as a String, not an
integer, so be careful when using it to, say, index into an array.

 


e.g. If you have a two-dimensional array stored in the input-symbol
"matrix", the following will work fine:

  ${matrix[0].length}

 


But the following, where "matrixIndex" is the symbol used for a
surrounding "foreach"-tag's "index" value, will throw an error:

  ${matrix[matrixIndex].length}

 


The error will tell you that "matrix" does not have the property: 0.
i.e. since matrixIndex is a String, it's looking for a property of the
array-object named "0".

 


This issue hadn't hit me before because OGNL casts it automatically when
used in expressions like: "${matrixIndex > 0}".  But since a
String-input is valid as a [] parameter in OGNL, it doesn't know to cast
it.

 

 


I used the workaround:

  [EMAIL PROTECTED]@parseInt(matrixIndex)].length}

 

 


Jim





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANN] tapestry revisor: syntax checker for tapestry

2006-12-15 Thread Ron Piterman

Hi All,

I just uploaded a very early release of tapestry revisor to

http://www.piterman.net/tapestry-revisor-0.1.zip


Tapestry revisor is a syntax checker for tapestry 4.0 and 4.1.

It currently runs as a standalone application, easily launched from an IDE.

Integration with IDE is in plan.

Some issues are still present, especially with injected objects such as 
EJBs - but I use it in an JBoss project, and it works fine as long as 
JBoss is running.


In the Zip file is a jar and a readme.txt which explains how to run.

Cheers,
Ron



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Proper way to get ApplicationStateManager?

2006-12-14 Thread Ron Piterman

getPage().getRequestCycle().getInfrastructure().getApplicationStateManager()

will give you the ASM from every component.

take the getPage() out when the class is a page class.

so i think this will let you go ?

Cheers,
Ron



[EMAIL PROTECTED] wrote:

I'm replacing the old getVisit() object.

So most of my pages have a call to getVisit(), which returns my AdminVisit 
object, which has the information about if they are logged in, what permissions 
they have etc.

Almost every page calls getVisit(), my Border also calls getVisit() to determine if it's 
showing a simple "Login" link on the left, or if it's showing a full menu 
because they are logged in.

I'm close to wrapping up day 3 trying to get things working! So far the end is 
not in sight.

What I've been able to gather is that I *think* I need to store 
ApplicationStateManager somewhere as a singleton, and then retrieve my visit 
object or store it as needed from there.

I've implemented this method (obviously doesn't work) in hopes that it will 
work someday, I think the idea is correct?

protected AdminVisit getAdminVisit()
  {
   AdminVisit aVisit = (AdminVisit) 
PCTAdminApplicationServlet.asm.get("adminVisit");
	   
	   if (aVisit == null){

 aVisit = new AdminVisit();
	   
	   PCTAdminApplicationServlet.asm.store("adminVisit", aVisit);

   }
   return aVisit;
  }


Thanks,
Greg

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Ron Piterman
Sent: Thursday, December 14, 2006 2:23 PM
To: users@tapestry.apache.org
Subject: Re: Proper way to get ApplicationStateManager?


Tell us when do you need it and why... *maybe* we can tell you how...
Cheers,
Ron



[EMAIL PROTECTED] wrote:


Thanks Dennis - I'm not sure I understand how to go about fixing the problem if 
it's null at the times I need it :)

Greg




Greg,

You can do what you described before, but pull your visit object in your 
SomePage.java classes where you need it.  As Ron pointed out, ASM uses 
other service where WebRequest is required.  When you're using it, it's 
still null.


-Dennis


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Proper way to get ApplicationStateManager?

2006-12-14 Thread Ron Piterman

Tell us when do you need it and why... *maybe* we can tell you how...
Cheers,
Ron



[EMAIL PROTECTED] wrote:

Thanks Dennis - I'm not sure I understand how to go about fixing the problem if 
it's null at the times I need it :)

Greg






Greg,

You can do what you described before, but pull your visit object in your 
SomePage.java classes where you need it.  As Ron pointed out, ASM uses 
other service where WebRequest is required.  When you're using it, it's 
still null.


-Dennis


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Proper way to get ApplicationStateManager?

2006-12-14 Thread Ron Piterman

I think you can access the ASM only in the context of a request.
Cheers,
Ron


[EMAIL PROTECTED] wrote:

Hmm oh dear, just found this at the bottom of my HUGE stack trace... related 
perhaps? I'm not doing something good with hivemind?

Caused by: java.lang.IllegalStateException: The Infrastructure service has not 
yet been initialized.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IAutocompleteModel change

2006-12-14 Thread Ron Piterman

Norbert Sándor wrote:

Sorry, I don't fully understand...
If I understand the new API well, my query in the implementation of 
getValues() should return a list of full hibernate objects in my case.
I don't see how can I still query only the ID and the label - although 
today was a long day :)


So your are also in europe?

Currently, a list of objects is returned from the model, for each one 
getPK and getLabel is called.

It doesn't really mutter if the objects are the same as the value or not.

The same getLabel and getPK are also called with the Value of the 
Autocompleter, so you can still use a list of Object[] in your filter 
method, but you habe to check beforehand what is given, the value 
(entity) or an Object[]...


Better?
Cheers,
Ron




Regards:
Norbi

Ron Piterman írta:


I think you get a List from hibernate?
you can change your model to extract object[0] as key, object[1] as 
value, and return the whole object for getForPrimaryKey( key ) - ( I 
think its another method signature- but the same meaning)...

Cheers,
Ron

Norbert Sándor wrote:


Hello,

Unfortunatelly I've not followed the discussion about the subject.
As the new doc says for IAutocompleteModel.getValues():

* Expected to return a list of all possible values, filtering out 
values that
* match the specified String in the label 
representation of the value.


Sorry for the late reaction but I think the previous version was 
better. I explain why.

In my application I use Autocompleter to list Hibernate objects.
Until this modification my query was:

   SELECT o.id,o.text FROM ... WHERE filter condition

but now I have to write

   SELECT o FROM ... WHERE filter condition

so the query must return full objects, it may require much more DB 
bandwidth.

I see that Autocompleter's implementation is now very clean

   key = model.getPrimaryKey(value);
   label = model.getLabelFor(value);

but it may have negative performance impact in case of more complex 
applications.


Sorry if I misunderstood something...

Regards:
Norbi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IAutocompleteModel change

2006-12-14 Thread Ron Piterman
BTW - I am the initiator of this change - sorry if I made you any 
trouble, but I hope you can also see the benefit...


If you follow my prev. posting, I you should also add a class check in 
the getPK and getLabel - because the value object is also passed to 
these objects. - I agree, its not s clean...


I hope soon one (jesse :) ) would add a translator to the property 
selection / Autocompleter - so it might help solve such problems...


Cheers,
Ron


Norbert Sándor wrote:

Hello,

Unfortunatelly I've not followed the discussion about the subject.
As the new doc says for IAutocompleteModel.getValues():

* Expected to return a list of all possible values, filtering out 
values that
* match the specified String in the label 
representation of the value.


Sorry for the late reaction but I think the previous version was better. 
I explain why.

In my application I use Autocompleter to list Hibernate objects.
Until this modification my query was:

   SELECT o.id,o.text FROM ... WHERE filter condition

but now I have to write

   SELECT o FROM ... WHERE filter condition

so the query must return full objects, it may require much more DB 
bandwidth.

I see that Autocompleter's implementation is now very clean

   key = model.getPrimaryKey(value);
   label = model.getLabelFor(value);

but it may have negative performance impact in case of more complex 
applications.


Sorry if I misunderstood something...

Regards:
Norbi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IAutocompleteModel change

2006-12-14 Thread Ron Piterman

I think you get a List from hibernate?
you can change your model to extract object[0] as key, object[1] as 
value, and return the whole object for getForPrimaryKey( key ) - ( I 
think its another method signature- but the same meaning)...

Cheers,
Ron

Norbert Sándor wrote:

Hello,

Unfortunatelly I've not followed the discussion about the subject.
As the new doc says for IAutocompleteModel.getValues():

* Expected to return a list of all possible values, filtering out 
values that
* match the specified String in the label 
representation of the value.


Sorry for the late reaction but I think the previous version was better. 
I explain why.

In my application I use Autocompleter to list Hibernate objects.
Until this modification my query was:

   SELECT o.id,o.text FROM ... WHERE filter condition

but now I have to write

   SELECT o FROM ... WHERE filter condition

so the query must return full objects, it may require much more DB 
bandwidth.

I see that Autocompleter's implementation is now very clean

   key = model.getPrimaryKey(value);
   label = model.getLabelFor(value);

but it may have negative performance impact in case of more complex 
applications.


Sorry if I misunderstood something...

Regards:
Norbi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: For loop Rewind problem

2006-12-14 Thread Ron Piterman
Tapestry traces the rendered components and uses this info on rewind - 
its better not to temper with that.
If you need JS magic, try using T41 - using Ajax this should be 
possible, though only straight-forward for jesse and other enlightend 
developers :)

Cheers,
Ron

Jiju Mathew wrote:


Hi All,
I have a list of contacts in MyPage class.Tapestry rendered all the 
contacts
in the list asTextFields using @For Loop component ,I have modified some 
of the

contact details and submit ,its working fine.

But after the page is rendered if I am adding one more row to the list 
using javascript,
During rewind the new contact is not getting added to the list in the 
MyPage class


is there any mechanism(or parameter setting) to add this newly added 
contact to the  List ?


Thanks

Regards
jiju







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Moving Components inside a Border Component...

2006-12-14 Thread Ron Piterman
well, it should work - check if tapestry is actually using your border's 
class, it might be you have a configuration error somewhere...


This should be quite clear if you examine the exception page tapestry 
generates: NoSuchPropertyException - look on which class there is no 
such property...


Cheers,
Ron


Thx1011 wrote:

Hi!

Thanks for your help, but I think that this is not quite the problem that I
have...

Let's suppose one component named  XPTO, that takes one parameter PARM.

So in my "normal" Home page I use it like this:



This is ok, I think.

Now I move that line to inside the HTML new component named Border.

So my Home page becomes:



And Inside the new Border HTML, I put the same line above:



What happens now is that I get an exception saying that can't parse the OGNL
Expression

I've moved the property accessors to the Border.java, but still it doesn't
work.

The exception is:

# ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123)
# ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
# ognl.ASTProperty.getValueBody(ASTProperty.java:96)
# ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
# ognl.SimpleNode.getValue(SimpleNode.java:210)
# ognl.Ognl.getValue(Ognl.java:333)
# ognl.Ognl.getValue(Ognl.java:310) 


So what I'm missing?
 
I really can't figure it out...





Ron Piterman-2 wrote:


you put it in the template of the component, and thats it.
if you want it to be configured from the page/container you use 
parameter chain.


for example:

your border might contain (and probably will):

...

since the title is different in every page you add
a title parameter to your border:

@Parameter(required=true) public abstract String getTitle();

and when using the border:



the title will be "passed through" to the shell.

Quite easy :)

Cheers,
Ron


This High Xvision wrote:


Hi! (I'm a newbie, so please bear with me...)

I'm trying to build a Border Component.

So far so good, it works as long as I don't embed
another component.

For example if on my Home.Html page I add




So my question is very simple:

How to instantiate a component inside of a component?

I've tried everything that I remember of and read the
forums, but no 
solution...


Inside the .JWC file on the ,
I've put the 
jscookmenu asset, but I need to instanciate the

jscookmenu, right?

How?

Thanks!




Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Moving Components inside a Border Component...

2006-12-14 Thread Ron Piterman

you put it in the template of the component, and thats it.
if you want it to be configured from the page/container you use 
parameter chain.


for example:

your border might contain (and probably will):

...

since the title is different in every page you add
a title parameter to your border:

@Parameter(required=true) public abstract String getTitle();

and when using the border:



the title will be "passed through" to the shell.

Quite easy :)

Cheers,
Ron


This High Xvision wrote:

Hi! (I'm a newbie, so please bear with me...)

I'm trying to build a Border Component.

So far so good, it works as long as I don't embed
another component.

For example if on my Home.Html page I add




So my question is very simple:

How to instantiate a component inside of a component?

I've tried everything that I remember of and read the
forums, but no 
solution...


Inside the .JWC file on the ,
I've put the 
jscookmenu asset, but I need to instanciate the

jscookmenu, right?

How?

Thanks!


 


Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T41: how to render the ID attribute in an abstract component

2006-12-13 Thread Ron Piterman

Hi all,
I have an custom component which is inheriting from AbstractComponent - 
it is a custom image, which renders  - now what would be 
the right way to render the ID attribute into it ( the clientId which is 
auto generated... or an informal id parameter) ?


Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Some Redirect after Post issues

2006-12-13 Thread Ron Piterman

Did you try to use
@Persist("client:page") ?

this will encode your property in a hidden form field (and in links 
URLs, so the become quite ugly) - but you don't need the hidden fields...


Cheers,
Ron


Bastian Voigt wrote:



Andreas Andreou schrieb:

 
Since the form is in an 'area page' and tapestry's submits trigger the

same page
(i.e. the listeners are found on the current page) it's only normal that
the
validation listener will complain...
Can't you include the current area as a hidden form field, so that it
gets submitted
and your validation listener gets satisfied?



Yes, this is my actual workaraound for the problem. But this means that 
I need to add the hidden field to each and every form component that 
might be used on an area page. This is not what I would call intuitive. 
If ever someone else is to work on my code and add another form, he/she 
will be totally confused by the error thrown by the page validation 
listener, imho.



This, (though I dislike it) could also work:
http://mail-archives.apache.org/mod_mbox/jakarta-tapestry-user/200512.mbox/[EMAIL PROTECTED] 

  


Maybe I'll try that one :-)
I could make an empty page which is used only for redirect-after-post 
and which has no page validation listener or begin render listener. 
However, this is also quite confusing since the listeners are in a 
separate class...



Regards
Bastian




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OT: STIQ Anyone?

2006-12-13 Thread Ron Piterman
On one of the posts above someone mentioned STQI in conjuction with 
Selenium, so i took a look - it look really nice, but no docu - can 
someone give me a hint where to start from ( after installing...) ?


Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Automated Testing Tool

2006-12-13 Thread Ron Piterman
STIQ looks really neet, do you have some good information source about 
how to get start with it?
There is a great install-guide, but the usage-overview is completley 
missing...

Would really like to try it out...

Cheers,
Ron


Konstantin Ignatyev wrote:

Selenium and its wrapper STIQ.

--- Miguel Angel Hernández <[EMAIL PROTECTED]> wrote:



Hi all,

Are there any tools that allow to build automated
tests for tapestry apps?
Do they suport Tacos and Dojo?

cheers,

miguel





Konstantin Ignatyev




PS: If this is a typical day on planet earth, humans will add fifteen million 
tons of carbon to the atmosphere, destroy 115 square miles of tropical 
rainforest, create seventy-two miles of desert, eliminate between forty to one 
hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of 
CFCs to the stratosphere, and increase their population by 263,000

Bowers, C.A.  The Culture of Denial:  Why the Environmental Movement Needs a 
Strategy for Reforming Universities and Public Schools.  New York:  State 
University of New York Press, 1997: (4) (5) (p.206)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Optgroup

2006-12-12 Thread Ron Piterman
There is a renderer parameter to the PropertySelection component, which 
sadly is being ignored.


here are the classes, you can just copy, set the package and use. They 
are a modified version of the PropertySelection component


cheers,
Ron

==


import org.apache.tapestry.*;
import org.apache.tapestry.form.*;
import org.apache.tapestry.valid.ValidatorException;

/**
 * A component used to render a drop-down list of options that the user 
may select. [  * 
href="../../../../../ComponentReference/PropertySelection.html">Component 
Reference ]

 * 
 * Earlier versions of PropertySelection (through release 2.2) were 
more flexible, they included a
 * renderer  property that controlled how the selection was 
rendered. Ultimately, this proved
 * of little value and this portion of functionality was deprecated in 
2.3 and will be removed in

 * 2.3.
 * 
 * Typically, the values available to be selected are defined using an
 * [EMAIL PROTECTED] org.apache.commons.lang.enum.Enum}. A PropertySelection is 
dependent on an

 * [EMAIL PROTECTED] IPropertySelectionModel} to provide the list of possible 
values.
 * 
 * Often, this is used to select a particular [EMAIL PROTECTED] 
org.apache.commons.lang.enum.Enum} to assign to
 * a property; the [EMAIL PROTECTED] EnumPropertySelectionModel} class simplifies 
this.

 * 
 * Often, a drop-down list will contain an initial option that serves 
both as a label and to represent
 * that nothing is selected. This can behavior can easily be achieved 
by decorating an existing
 * [EMAIL PROTECTED] IPropertySelectionModel} with a [EMAIL PROTECTED] 
LabeledPropertySelectionModel}.

 * 
 * As of 4.0, this component can be validated.
 *
 * @author Howard Lewis Ship
 * @author Paul Ferraro
 */
public abstract class RendererPropertySelection extends 
PropertySelection implements ValidatableField

{
/**
 * @see 
org.apache.tapestry.form.AbstractFormComponent#renderFormComponent(org.apache.tapestry.IMarkupWriter, 
org.apache.tapestry.IRequestCycle)

 */
protected void renderFormComponent(IMarkupWriter writer, 
IRequestCycle cycle)

{
renderDelegatePrefix(writer, cycle);

writer.begin("select");
writer.attribute("name", getName());

if (isDisabled())
writer.attribute("disabled", "disabled");

if (getSubmitOnChange())
writer.attribute("onchange", "javascript: 
this.form.events.submit();");


renderIdAttribute(writer, cycle);

renderDelegateAttributes(writer, cycle);

getValidatableFieldSupport().renderContributions(this, writer, 
cycle);


// Apply informal attributes.
renderInformalParameters(writer, cycle);

writer.println();

IPropertySelectionModel model = getModel();

if (model == null)
throw Tapestry.createRequiredParameterException(this, "model");

int count = model.getOptionCount();
boolean foundSelected = false;
Object value = getValue();

IPropertySelectionRenderer renderer = getRenderer();
if ( renderer == null && ( model instanceof 
IPropertySelectionRenderer ) )

if ( ! isDefaultRenderer() )
renderer = (IPropertySelectionRenderer) model;

for (int i = 0; i < count; i++)
{
Object option = model.getOption(i);
boolean isSelected = !foundSelected && isEqual(option, value);

if ( renderer != null )
	renderer.renderOption( this , writer, cycle , model , 
option, i , isSelected );

else {

writer.begin("option");
writer.attribute("value", model.getValue(i));

if ( isSelected )
{
writer.attribute("selected", "selected");

foundSelected = true;
}

writer.print(model.getLabel(i));

writer.end();

}

writer.println();
}

writer.end(); // 

renderDelegateSuffix(writer, cycle);
}

/**
 * @see 
org.apache.tapestry.form.AbstractFormComponent#rewindFormComponent(org.apache.tapestry.IMarkupWriter, 
org.apache.tapestry.IRequestCycle)

 */
protected void rewindFormComponent(IMarkupWriter writer, 
IRequestCycle cycle)

{
String value = cycle.getParameter(getName());

Object object = (value == null) ? null : 
getModel().translateValue(value);


try
{
getValidatableFieldSupport().validate(this, writer, cycle, 
object);


setValue(object);
}
catch (ValidatorException e)
{
getForm().getDelegate().record(e);
}
}

private boolean isEqual(Object left, Object right)
{
// Both null, or same object, then are equal

if (left == r

Re: @Persist and @InitialValue (followup)

2006-12-07 Thread Ron Piterman
Yes, it doesn't seem they work together - for me too... (on t4.0)
Cheers,
Ron

Dan Adams wrote:
> I've ran into a problem that other people seem to have reported on the
> mailing list before. But my unanswered question is: if you use @Persist
> and @InitialValue, when does the value get set back from the session?
> I've got the same problem someone else did where the property is set to
> the same value every time. Thanks.
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 4.1 Stability (Hi Jesse! :P)

2006-12-05 Thread Ron Piterman
If you need ajax, you can't go around 4.1 - if you don't, 4.0 has some
advantages (as far as I can see) - such as much smaller javascript
footprint for form validation, and stability -

However, Jesse does a great work in fixing bugs in 4.1 very fast, I go
to sleep in Europe and Jesse fixes the bugs at day time in the states,
so the next morning a new version is out - thats amazing !

It is not so easy to recommend anything in active development for
production - I can just say - I am working on a project which should go
in production on Jan 1st and am using 4.1 ---

Cheers,
Ron


Cyrille37 wrote:
> 
> Hi Jesse,
> 
> You think we have to use the 4.1 vs. 4.0.
> For example I'm learning Tapestry for a project which will really start
> in january.
> Will you tell me to use the 4.1 ?
> 
> thanks
> cyrille
> 
> Jesse Kuhnert a écrit :
>> I think it would reckless of me to recommend anything that may or may
>> not affect anyone's job/career..
>>
>> That being said - if it were me - yeah I'd totally go for it.
>>
>> It's probably been a mistake to wait so long for 4.1.1 to come out
>> anyways. Probably I'll just fix this validation message issue and
>> release it.
>>
>> On 12/5/06, [EMAIL PROTECTED]
>> <[EMAIL PROTECTED]> wrote:
>>> Okay, I know Jesse is probably fed up with these types of questions!
>>> And we've gone over it before, about 4.1, 5.0, roadmaps, etc, a
>>> couple weeks ago.
>>>
>>> The 4.1 "snapshot" that's out right now, for a relatively simple app
>>> - no custom components, hivemind services, Java 1.4 so no
>>> annotations, and maybe a sprinkle of DOJO stuff (hence the reason to
>>> switch to 4.1!!) - would moving from 4.0 to 4.1 be a horrible idea?
>>>
>>> I skimmed over a lot of the open issues on JIRA and none seem too
>>> severe, or too widespread to some of the "proven" core of tapestry.
>>> Our application is for our internal staff (a dozen or so), and since
>>> it's relatively small, is usually decently tested for bugs. So it's
>>> not like I'm re-writing Amazon.com or something with Tap4.1 and will
>>> lose billions of dollars over a bug..
>>>
>>> 4.1 looks really nice, and it would be great to jump in, rather then
>>> do it in 4.0 and then re-do it in 4.1 in 6 months. That said, go for
>>> it? All comments apprieciated!
>>>
>>> Thanks,
>>> Greg
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 4.1 Stability (Hi Jesse! :P)

2006-12-05 Thread Ron Piterman
Hijacking threads is an antipattern ;)
still - don't know why you ask, but you can find the tapestry 4.1
dependencies under the framework module ( tapestry -> 4.1 -> modules /
framework -> dependencies )

took me a while to find where this is hidden...

Cheers,
Ron

[EMAIL PROTECTED] wrote:
> Does this page apply to Tap5 or Tap4.1?
> 
> http://tapestry.apache.org/dependencies.html
> 
> 
> Thanks,
> Greg
> 
> -Original Message-
> From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 05, 2006 12:12 PM
> To: Tapestry users
> Subject: Re: 4.1 Stability (Hi Jesse! :P)
> 
> 
> I think it would reckless of me to recommend anything that may or may
> not affect anyone's job/career..
> 
> That being said - if it were me - yeah I'd totally go for it.
> 
> It's probably been a mistake to wait so long for 4.1.1 to come out
> anyways. Probably I'll just fix this validation message issue and
> release it.
> 
> On 12/5/06, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
>> Okay, I know Jesse is probably fed up with these types of questions! And 
>> we've gone over it before, about 4.1, 5.0, roadmaps, etc, a couple weeks ago.
>>
>> The 4.1 "snapshot" that's out right now, for a relatively simple app - no 
>> custom components, hivemind services, Java 1.4 so no annotations, and maybe 
>> a sprinkle of DOJO stuff (hence the reason to switch to 4.1!!) - would 
>> moving from 4.0 to 4.1 be a horrible idea?
>>
>> I skimmed over a lot of the open issues on JIRA and none seem too severe, or 
>> too widespread to some of the "proven" core of tapestry. Our application is 
>> for our internal staff (a dozen or so), and since it's relatively small, is 
>> usually decently tested for bugs. So it's not like I'm re-writing Amazon.com 
>> or something with Tap4.1 and will lose billions of dollars over a bug..
>>
>> 4.1 looks really nice, and it would be great to jump in, rather then do it 
>> in 4.0 and then re-do it in 4.1 in 6 months. That said, go for it? All 
>> comments apprieciated!
>>
>> Thanks,
>> Greg
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with Euro symbol

2006-12-05 Thread Ron Piterman
Sam Gendler wrote:
> The symbol you are seeing is the symbol used to denote 'locale
> specific currency symbol' in a format pattern.  What is strange is
> that if you don't have a symbol for that currency in your current
> locale, you should get the ISO 3-letter code (EUR, in this case)
> rather than a euro symbol.  Is it possible that you are escaping the
> currency symbol in your format string, so that the currency symbol
> itself is being rendered to the output, rather than having it replaced
> by the correct currency within the formatter?

The formatter is the standard Java formatter - so I don't escape
anything - I count on tapestry to do that.

The wrapper format object does not do anything with formatting, it just
manipulates the passed object before this is formatted by the java
currency format - it takes the long and passes a float which is the
original long divided by 100.

> 
> The only other thought I have is that you are telling your browser
> that the file is UTF-8 via the meta header, but you may well not have
> told Tapestry to spit out UTF-8 characters, resulting in the browser
> rendering the generic currency symbol. Putting the  http-equiv="Content-Type" content="text/html;charset=UTF-8"/> line in
> the template is not the only thing necessary to get your documents in
> UTF-8 correctly. That just tells the browsewr what to expect.
If I would, i would have used the tapestry configuration to change the
encoding - but actually I don't change the encoding at all, tapestry is
using utf-8 by default.

The line showing the meta in my postings was not taken from my template,
but from the html tapestry's shell component renders.

 Tapestry
> will use the default charset of the JVM when reading and writing to
> streams, so if your default charset is not a superset of UTF-8, you
> could easily wind up with characters that don't translate correctly.

Tapestry is set to use utf-8 by default - and I suspect it gets a string
"€ 1000" - and should encode it the right way.

> You can discover your default charset by simply printing
> Charset.defaultCharset() to your logs.  If you aren't running in
> UTF-8, try telling the JVM that is running Tapestry to use UTF-8.  You
> can only change the default charset at startup.  Add
> -Dfile.encoding=UTF-8 to your JAVA_OPTS var before running tomcat.
> That will cause all templates and properties values to be rendered to
> the client as UTF-8.

I will look again at this problem at friday, and will debug into it to
learn more - this is somewhat heavier because using jboss, so debugging
isn't fun at all :(

Thanx !
Cheers,
Ron


> 
> And yes, please let's take i18n very seriously as it is rare for me to
> have to develop apps that aren't translated into several different
> languages and charsets (cyrillic being the usual culprit when it comes
> to problems)
> 
> --sam
> 
> On 12/4/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
>> If you get to something more definitive let me know. I should probably
>> take i18n issues very seriously considering the percentage of
>> users/developers coming from countries not using english as the
>> default native language.
>>
>> On 12/4/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
>> > not yet - there is no ajax/json involved :(
>> > but I will update and see...
>> >
>> > Cheers,
>> > Ron
>> >
>> >
>> > Jesse Kuhnert wrote:
>> > > Not sure if you were bitten by the same encoding of ajax/json bug
>> that
>> > > others were from this weekends changes but a new release was just
>> > > published that should fix any issues related to that.
>> > >
>> > > On 12/4/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
>> > >
>> > >> Thanx, but I am using:
>> > >>
>> > >> public Format getCurrencyFormat() {
>> > >>   Locale l = getPage().getEngine().getLocale();
>> > >>   return new NumberTranslatorFormat(
>> NumberFormat.getCurrencyInstance( l
>> > >> ) );
>> > >> }
>> > >>
>> > >> the NumberTranslatorFormat is a custom format which devides or
>> > >> multiplies the numbers, but is delegating formatting to the given
>> > >> CurrencyFormat.
>> > >>
>> > >> :(
>> > >>
>> > >> Cheers,
>> > >> Ron
>> > >>
>> > >>
>> > >>
>> > >> Christian Haselbach wrote:
>> > >> > Zitat von Ron Piterman <[EMAIL PROTECTED]>:
>> > >> &g

Re: Problem with Euro symbol

2006-12-04 Thread Ron Piterman

not yet - there is no ajax/json involved :(
but I will update and see...

Cheers,
Ron


Jesse Kuhnert wrote:

Not sure if you were bitten by the same encoding of ajax/json bug that
others were from this weekends changes but a new release was just
published that should fix any issues related to that.

On 12/4/06, Ron Piterman <[EMAIL PROTECTED]> wrote:


Thanx, but I am using:

public Format getCurrencyFormat() {
  Locale l = getPage().getEngine().getLocale();
  return new NumberTranslatorFormat( NumberFormat.getCurrencyInstance( l
) );
}

the NumberTranslatorFormat is a custom format which devides or
multiplies the numbers, but is delegating formatting to the given
CurrencyFormat.

:(

Cheers,
Ron



Christian Haselbach wrote:
> Zitat von Ron Piterman <[EMAIL PROTECTED]>:
>
>
>>The € is comming from the java currency format object:
>>NumebrFormat.getCurrencyInstance();
>
>
> Just a guess. You are using a number format without specifying
> the locale. Hence, the default locale for your platform is
> used which propably includes the encoding latin9. The code
> which denotes the euro symbol in latin9 denotes the currency
> symbol in latin1 and (IIRC) in UTF-8. Thus, you see the currency
> symbol, not the expected euro symbol.
>
> Regards,
> Christian.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with Euro symbol

2006-12-04 Thread Ron Piterman

Thanx, but I am using:

public Format getCurrencyFormat() {
 Locale l = getPage().getEngine().getLocale();
 return new NumberTranslatorFormat( NumberFormat.getCurrencyInstance( l 
) );

}

the NumberTranslatorFormat is a custom format which devides or 
multiplies the numbers, but is delegating formatting to the given 
CurrencyFormat.


:(

Cheers,
Ron



Christian Haselbach wrote:

Zitat von Ron Piterman <[EMAIL PROTECTED]>:



The € is comming from the java currency format object:
NumebrFormat.getCurrencyInstance();



Just a guess. You are using a number format without specifying
the locale. Hence, the default locale for your platform is
used which propably includes the encoding latin9. The code
which denotes the euro symbol in latin9 denotes the currency
symbol in latin1 and (IIRC) in UTF-8. Thus, you see the currency
symbol, not the expected euro symbol.

Regards,
Christian.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with Euro symbol

2006-12-04 Thread Ron Piterman

When inside the template, the € symbol is rendered fine.

strange thing...

any idea ?

Cheers,
Ron


Andrea Chiumenti wrote:

is your java src in UTF-8 ?
What if you hardcode € into your teplate ? does it correctly display ?
and what if you put into java src public String getEuro() {return "€";}
and then into  ?

On 12/4/06, Ron Piterman <[EMAIL PROTECTED]> wrote:



Andrea Chiumenti wrote:
> try  ISO-8859-15, what happen ?

nothing changes :(

> and is fomrat really what you have on src ? If so correct with format

no, fomrat was just a typo in the posting.

> kiuma
>
> On 12/4/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
>
>>
>> Hi all,
>> I am using
>> 
>> 
>>
>> the currency format is a java standard currency format, but the Euro
>> symbol is not inserted properly so one gets a ¤ instead of € -
>>
>> any idea why and how to change that?
>>
>> the page includes the standard
>> 
>>
>> which is generated by the Shell component.
>>
>> Cheers,
>> Ron
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with Euro symbol

2006-12-04 Thread Ron Piterman

The € is comming from the java currency format object:
NumebrFormat.getCurrencyInstance();
Cheers,
Ron

Andrea Chiumenti wrote:

is your java src in UTF-8 ?
What if you hardcode € into your teplate ? does it correctly display ?
and what if you put into java src public String getEuro() {return "€";}
and then into  ?

On 12/4/06, Ron Piterman <[EMAIL PROTECTED]> wrote:



Andrea Chiumenti wrote:
> try  ISO-8859-15, what happen ?

nothing changes :(

> and is fomrat really what you have on src ? If so correct with format

no, fomrat was just a typo in the posting.

> kiuma
>
> On 12/4/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
>
>>
>> Hi all,
>> I am using
>> 
>> 
>>
>> the currency format is a java standard currency format, but the Euro
>> symbol is not inserted properly so one gets a ¤ instead of € -
>>
>> any idea why and how to change that?
>>
>> the page includes the standard
>> 
>>
>> which is generated by the Shell component.
>>
>> Cheers,
>> Ron
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with Euro symbol

2006-12-04 Thread Ron Piterman

Andrea Chiumenti wrote:

try  ISO-8859-15, what happen ?


nothing changes :(


and is fomrat really what you have on src ? If so correct with format


no, fomrat was just a typo in the posting.


kiuma

On 12/4/06, Ron Piterman <[EMAIL PROTECTED]> wrote:



Hi all,
I am using



the currency format is a java standard currency format, but the Euro
symbol is not inserted properly so one gets a ¤ instead of € -

any idea why and how to change that?

the page includes the standard


which is generated by the Shell component.

Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with Euro symbol

2006-12-04 Thread Ron Piterman

Hi all,
I am using



the currency format is a java standard currency format, but the Euro 
symbol is not inserted properly so one gets a ¤ instead of € -


any idea why and how to change that?

the page includes the standard


which is generated by the Shell component.

Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Empty string becomes null on submit

2006-11-30 Thread Ron Piterman

afaik this is the normal behaviour: empty fields set the property to null.

Cheers,
Ron

Inge Solvoll wrote:

I've suddenly gotten a problem in my code. When I enter nothing into a text
field on a tapestry page and submit, the corresponding abstract getter
method returns null instead of empty string "". I have checked my code, and
nothing has changed, this used to work before. I haven't upgraded any of 
the

jar files for tapestry or tacos or something like that.

One thing has changed: I've started using UTF-8 encoding for my webapp. I
have a filter that enforces characterEncoding UTF-8, and my html and
.application file are also configured to use UTF-8. I'm suspecting the
Unicode changes to cause this strange null-behaviour, but I don't know what
to do. I've tried rolling back to ISO-8859-1 like before, but nothing
happens. Don't know if I managed to remove all UTF-8 references completely
though.

Has anyone experienced something similar? Is this an encoding issue or 
is it

something else?




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple browser windows causing session issue

2006-11-30 Thread Ron Piterman
It depends on the setup of your wizard, if it a single page iterating 
over components or a series of tapestry pages following each other - but 
either way you prevent such problems by persisting flow information in 
the client, not as cookies but on a page - based in URLs.


You should always keep in mind the information flow and know what is 
stored where, this will keep you out of such troubles.


For example, you may persist some information as hidden fields in your 
form. However, you can not do this if you use Autocompleter or other 
json requests, since they don't submit the form.


In such cases you can use the excelent @Persist("client:page") which 
will store everything inside URLs, but will not persist across pages: 
component X with a persistant property on page A and component X - the 
same component - on page B will not share the data, you will have to 
activley "transfer" it either in your listener code (submit or direct 
link) or via an external link.


Cheers,
Ron


Robert Breidecker wrote:

I have a stateful Tapestry application which includes
a wizard that steps the user from one page to another
to collect input data.  If I run my application in two
browser windows (or tabs) within the same browser
session, each instance of my application steps on the
session variables in the the other instance.

I noticed that the HTML for each application contained
the same jsessionid.  I turned off cookies for my
application at the server level (Tomcat 5.5) and then
my application worked fine across two browser windows.
The URLs for both instances now include the jsessionid
in them and each jsessionid is different.

Even though this works for me, is this really the way
to solve my problem?  It seems like I must be missing
something in Tapestry that would handle this for me,
regardless if cookies are on or off.

~Rob Breidecker


 


Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: span key - dynamic component, and may not appear inside an ignored block

2006-11-29 Thread Ron Piterman

check if all yaour attributes are closed properly.
Cheers,
Ron


John Coleman wrote:

This code:


	Save the record 
and return

Produces this error: Tag  on line 125 is a dynamic component, and may not 
appear inside an ignored block. Is there a simple way around this, I would 
rather like to use  wherever I like.


John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Update component loses its @EventListener

2006-11-28 Thread Ron Piterman

Thanx for pointing this out !
Ron


Mark Reynolds wrote:

Jesse pointed out that it should be target= instead of element= when the
thing being listened to is a Tapestry component (i.e., has a jwcid).
Apparently, element= is for html elements that aren't tapestry components.

If the problem you are having is the same as mine (I think it might be) 
then

it is fixed in the snapshot from last night.

On 11/28/06, Ron Piterman <[EMAIL PROTECTED]> wrote:



ok - I see there is a jira issue about this one...


Ron Piterman wrote:
> Hi all -
> I have a simlar scenario to the above post with the same name:
>
> I call responseBuilder.updateComponent on the template-container of a
> component with an @EventListener.
>
> The component is being rendered but the javascript is not regenerated.
>
> The usecase is as follows:
>
> 
>  
>  
>  renderTag="ognl:false">
>   
>
>  
>  renderTag="ognl:false">
>   
>   
>  
> 
>
> @EventListener(
>   submitForm="myform", validateForm=false ,
>   elements="select" , events="onchange")
> public void colorChanged() {
>   getResponseRenderer().updateComponent("color");
> }
>
> Any advise?
>
> Cheers,
> Ron
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Update component loses its @EventListener

2006-11-28 Thread Ron Piterman

ok - I see there is a jira issue about this one...


Ron Piterman wrote:

Hi all -
I have a simlar scenario to the above post with the same name:

I call responseBuilder.updateComponent on the template-container of a 
component with an @EventListener.


The component is being rendered but the javascript is not regenerated.

The usecase is as follows:


 
 
 
  
   
 
 
  
  
 


@EventListener(
  submitForm="myform", validateForm=false ,
  elements="select" , events="onchange")
public void colorChanged() {
  getResponseRenderer().updateComponent("color");
}

Any advise?

Cheers,
Ron




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Update component loses its @EventListener

2006-11-28 Thread Ron Piterman

Hi all -
I have a simlar scenario to the above post with the same name:

I call responseBuilder.updateComponent on the template-container of a 
component with an @EventListener.


The component is being rendered but the javascript is not regenerated.

The usecase is as follows:


 
 
 
  
   
 
 
  
  
 


@EventListener(
  submitForm="myform", validateForm=false ,
  elements="select" , events="onchange")
public void colorChanged() {
  getResponseRenderer().updateComponent("color");
}

Any advise?

Cheers,
Ron




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: @Asset problem

2006-11-27 Thread Ron Piterman

You are mixing between creating assets and defining them.

The annotation is defining an asset, and what you probably want is 
create a new one on the fly.-


To do so, you need to inject one of the AssetFactory services from here, 
and use it to create one on the fly...


http://tapestry.apache.org/tapestry4/tapestry/hivedocs/module/tapestry.asset.html

Cheers,
Ron



Srinivas Yermal wrote:

Hi,

I am now a big fan of tapestry annotations since everything stays neatly in
one place, except in one area which still bothers me. I want to specify
assets like stylesheets and such in a Border component that can be used by
the rest of the pages and the whole app looks uniform and so on and so
forth.

But I also want to be able to change the stylesheet name at deploy time,
without having to recompile and redistribute the war file, in other words
bother the developers whenever I want to change it. So I thought may be I
can declare it as a key (stylesheet = css/mycss.css) in the
app.propertiesfile and pick it up in Border component.

@Asset("message:stylesheet") - This isnt working. I dont know whether its
supposed to.

I went ahead and tried this -
public IAsset getStylesheet() {
   return getAsset(getMessages().getMessage("stylesheet"));
}

However this code always returns null. I guess the asset needs to be
registered much ahead, (there is some code I see in AbstractComponent which
uses a map to store references of assets). So how am I supposed to setup
dynamic assets? Is there a way of creating assets when required? I remember
having read something about this but I am unable to find it. I would be
grateful if you could point me in the right direction.

Thanks,
Srini.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help with bindings needed

2006-11-26 Thread Ron Piterman

Sure you didn't forget ognl: prefix in a parameter binding?
Cheers,
Ron


Andrea Chiumenti wrote:

Hello I've the following problem with a component that inherits from an
AbstractComponent one:

Error converting value for parameter editTable: No type converter for type
org.jfly.web.components.edittable.EditTable is available.

Stack Trace:

  - org.apache.tapestry.coerce.ValueConverterImpl.coerceValue(
  ValueConverterImpl.java:105)
  - 
$ValueConverter_10f237256e2.coerceValue($ValueConverter_10f237256e2.java)


  - org.apache.tapestry.binding.AbstractBinding.getObject(
  AbstractBinding.java:91)
  - 
$EditTableEventConnector_28.getEditTable($EditTableEventConnector_28.java)


  -
  org.jfly.web.components.edittable.EditTableEventConnector.renderComponent
  (EditTableEventConnector.java:46)
  - 
$EditTableEventConnector_28.renderComponent($EditTableEventConnector_28.java) 



  - 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)


  - org.apache.tapestry.AbstractComponent.renderBody(
  AbstractComponent.java:434)
  - net.sf.tacos.ajax.components.AjaxFormSupportImpl.render(
  AjaxFormSupportImpl.java:537)
  - net.sf.tacos.ajax.components.AjaxForm.renderComponentDelegate(
  AjaxForm.java:327)
  - net.sf.tacos.ajax.components.AjaxForm.renderComponent(AjaxForm.java:84)

  - $AjaxForm_43.renderComponent($AjaxForm_43.java)
  - 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)


  - org.apache.tapestry.AbstractComponent.renderBody(
  AbstractComponent.java:434)
  - org.apache.tapestry.html.Body.renderComponent(Body.java:129)
  - $Body_42.renderComponent($Body_42.java)
  - 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)


  - org.apache.tapestry.AbstractComponent.renderBody(
  AbstractComponent.java:434)
  - org.apache.tapestry.html.Shell.renderComponent(Shell.java:115)
  - $Shell_31.renderComponent($Shell_31.java)
  - 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)


  - 
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)


  - 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)


  - org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:275)
  - 
org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:366)


  -
  org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(
  ResponseRendererImpl.java:71)
  - 
$ResponseRenderer_10f23725716.renderResponse($ResponseRenderer_10f23725716.java) 



  - org.apache.tapestry.engine.HomeService.service(HomeService.java:65)
  - $IEngineService_10f23725781.service($IEngineService_10f23725781.java)

  - org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(
  EngineServiceOuterProxy.java:66)
  - org.apache.tapestry.engine.AbstractEngine.service(
  AbstractEngine.java:248)
  - org.apache.tapestry.services.impl.InvokeEngineTerminator.service(
  InvokeEngineTerminator.java:60)
  - 
$WebRequestServicer_10f2372575e.service($WebRequestServicer_10f2372575e.java) 



  - org.apache.tapestry.services.impl.DisableCachingFilter.service(
  DisableCachingFilter.java:48)
  - 
$WebRequestServicerFilter_10f23725760.service($WebRequestServicerFilter_10f23725760.java) 



  - 
$WebRequestServicer_10f23725762.service($WebRequestServicer_10f23725762.java) 



  - 
$WebRequestServicer_10f2372575a.service($WebRequestServicer_10f2372575a.java) 



  -
  
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service

  (WebRequestServicerPipelineBridge.java:56)
  - 
$ServletRequestServicer_10f23725740.service($ServletRequestServicer_10f23725740.java) 



  - org.apache.tapestry.request.DecodedRequestInjector.service(
  DecodedRequestInjector.java:55)
  - 
$ServletRequestServicerFilter_10f2372573c.service($ServletRequestServicerFilter_10f2372573c.java) 



  - 
$ServletRequestServicer_10f23725742.service($ServletRequestServicer_10f23725742.java) 



  - org.apache.tapestry.multipart.MultipartDecoderFilter.service(
  MultipartDecoderFilter.java:52)
  - 
$ServletRequestServicerFilter_10f2372573a.service($ServletRequestServicerFilter_10f2372573a.java) 



  - 
$ServletRequestServicer_10f23725742.service($ServletRequestServicer_10f23725742.java) 



  - org.apache.tapestry.services.impl.SetupRequestEncoding.service(
  SetupRequestEncoding.java:53)
  - 
$ServletRequestServicerFilter_10f2372573e.service($ServletRequestServicerFilter_10f2372573e.java) 



  - 
$ServletRequestServicer_10f23725742.service($ServletRequestServicer_10f23725742.java) 



  - 
$ServletRequestServicer_10f23725734.service($ServletRequestServicer_10f23725734.java) 



  - org.apache.tapestry.ApplicationServlet.doService(
  ApplicationServlet.java:123)
  - 
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)


  - javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
  - javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  - org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
  Applic

Re: Dynamic Working with Tapestry...

2006-11-26 Thread Ron Piterman
Tapestry uses for validation the ValidationDelegate - I would recomment 
you stick to it, it will make your life much easier, and it is one of 
tapestry's most powerfull features:


You can use validators on each of your fields, and that doesn't mean 
they have to be preconfigured - you can use a dynamic list of Validator 
objects, depending on the current iteration (maybe not all a required).


So all you have to do is

@Bean
public abstract ValidationDelegate getDelegate();

and



and in your submit listener:

if ( getDeleagte().getHasErrors() )
  return;

Take a look at Form validation in the users guide.

Cheers,
Ron




Skorpien126 wrote:

Thats not exactly the situation... here a descreption depending on your code
snippet.



  
(includes Validation and further function)
 
 
DateColumn"
  
(includes Validation and further function)
 
  

  



the Problem is that I don´t know how to check the Validation of each
component in the "doSubmit-Method". I need a way to iterate over the
"subcomponents"!?!?!

Maybe your way would work, but then it´s incosistent to my hierachy. 


P.S. Thx for help.





Ron Piterman-2 wrote:

If I get this right, there is some kind of iteration over objects inside 
the form component.
When the form is submitted, the iteration will be performed again, this 
one updating the values.
then you add an "action" binding to the submit, and persist the whole 
list of obejcts which were updated:



 
  
 
 


the currentValue property will point to the current iteration value, and 
the input will update each object in the iteration.


Did I get it right this time?

Cheers,
Ron


Skorpien126 wrote:


I´m not sure I´ve I understand you in the right way. Updating one
Component
is not the problem, I stillt tried taht and it works.. I want that my
ContainerElement includes the "@Form"  and in the Form tag the dynamic
Number of Components is included. So the ConatinerElement have to take
care
of binding and updating the values of the Subcomponent.



Ron Piterman-2 wrote:


There are some approaches to that problem, one approach would be to use 
the parameter binding for that:


The component gets a paraemter from its container, and is responsible to 
update the parameter.


Say you have a property on your page/container component:

public Data getData() {...}
public void setData( Data data ) { // now perform the save }

you pass "data" as a paraemter binding to your component which includes 
the form, and on your submit listener, after verifying everything is 
fine, you call setData:


@Parameter public abstract Data getData();
public abstract void setData( Data data );

public void doSubmit() {
 // validata...
 // check that everything is ok...
 if (getDelegate().getHasErrors() )
   return;
 setData( getData() );
}


Another approach would be to use an IActionListener as paramter and 
invoke it - this is the approach I take usually.


Hope that helps,
Cheers,
Ron


Skorpien126 wrote:



Hi...
I´ve another Post, describing the same problem. In my eyes it is one the
things which should be solved more than one times. So I will give a


whole


describtion about what I want.

OK... i have ca 30 tables each one, holding information about 1 product.
Lets say one table holds information of chairs,  the other of tables and
so
one. Each Table has a dynmamic number of Columns. Maybe an id,


describing


text, a date.. . For each Type I´ve build a subcomponent ...
DateComponent,
StringComponent and so on. The Subcomponents include the "value"
(String,date ...) the validation and maybe some further functionality.

Ok... when openening a Page I get an Id with which I create a
Containercomponent "RequestContainer"(PERSISTBEAN) ...   this Container
includes a Collection of "Subcomponents" correspondening to the coloums
of
the depending table and also some further, unimportant informations... 


Ok... so far so good. It´s not problem to visualize the information. But
I
want to update the whole Object at once. So  I´ve make a form in the
Containercomponent and in the Form-Tag I iterate over the Column-Values.
The
Form invokes a SaveMethod. In which I want to write back the values of
the
validated, values of the subcomponents. My Question... How Can I get the
values of the dynamic subcomponents (image that it+s not possible to
bind a parameter to a dynamicList-Item) How can I check that each value
is
"correct/validated"??? 

If more code is needed... just ask. 
Thx u... and have a nice WE.



Here Some Example Code:
ContainerComponent.html

   
 
   editable="true"/>    
	   
	 
		   editable="true"/>    
	   
	 ...   
  


DisplayString.html


  
  

Der Inhalt halt...
		   
  





---

Re: 2nd try: ajax updating components inside a For

2006-11-26 Thread Ron Piterman

Thanx jesse, thats great !

I guess I miss some basic understanding of how for works in ajax 
context, but I still didn't manager to update a single iteration -


Currently it only works if you update the container of the for, and 
still there are some issues with multiple posts (I added a jira issue).


Would you/? explain what would be the preferred way to solve this prob 
(updating a form inside a single iteration)?


Cheers,
Ron




Jesse Kuhnert wrote:

This should work now. I'm not entirely certain it was being handled
correctly at the time you originally wrote this message but it works
now. An example to look at might be

http://opencomponentry.com:8080/timetracker/LocaleList.htm

On 11/24/06, Ron Piterman <[EMAIL PROTECTED]> wrote:


Hi all,
I have a simple For loop which iterates over some object.
the objects are all rendered to DirectLinks.
When a DirectLink-listener is called, the clicked Item should change to
"edit view" and render a Form instead of the Link.
When the form is submitted, the item should render again to the Link (
"view mode").

Now the question is, how to change the code below, to do the trick with
ajax.

When using normal http requests the page looks like this:


  
try ajax with list 
 
  


  

  
  
  

 
 
  

  
 

 

  


and the class:

public abstract class Home extends BasePage
{
 public Object getObjects() {
 // return the list of obejcts
 }

 /** the value of the current iteration */
 public abstract Value getCurrentObject();

 @Persist
 public abstract Value getEditObject();
 public abstract void setEditObject( Value v );

 public boolean isEditMode() {
 return getEditObject() != null &&
 getEditObject().equals( getCurrentObject() );
 }

 public void edit( Long id ) {
 setEditObject( getObject( id ) );
 }

 public void doSubmit() {
 // ... save ... and then
 this.setEditObject ( null );
 }

 public void doCancel() {
 this.setEditObject( null );
 }

 private Value getObject( Long id ) {
   // ... return the value for the given id
 }

}


Thanx in advance,
Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: deploying .war file on tomcat

2006-11-24 Thread Ron Piterman

I know this from jboss, but may be it also applies to tomcat:
Check if TOMCAT_HOME is pointing to the same installation of tomcat you 
acatually use.

Cheers,
Ron


MattHouston wrote:

Hi everybody,

I'm developping an application using Tapestry with Eclipse. I use Tomcat
inside Eclipse to test my application.
Now I wants to launch the project directly in tomcat using a .war file. When
I launch the application, I have the following error (HTTP500), concerning
libraries (tapestry-framework-4.1.jar) :

exception

javax.servlet.ServletException: Unable to initialize application servlet:
Error at
jar:file:/var/lib/tomcat5/webapps/NoviaSuiteDev/WEB-INF/lib/tapestry-framework-4.1.jar!/META-INF/tapestry.request.xml,
line 246, column 113: access denied (java.util.PropertyPermission
org.apache.tapestry.disable-caching read)
org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:206)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)

cause mère

org.apache.hivemind.ApplicationRuntimeException: Error at
jar:file:/var/lib/tomcat5/webapps/NoviaSuiteDev/WEB-INF/lib/tapestry-framework-4.1.jar!/META-INF/tapestry.request.xml,
line 246, column 113: access denied (java.util.PropertyPermission
org.apache.tapestry.disable-caching read)
[jar:file:/var/lib/tomcat5/webapps/NoviaSuiteDev/WEB-INF/lib/tapestry-framework-4.1.jar!/META-INF/tapestry.request.xml,
line 246, column 113]
org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
org.apache.hivemind.impl.RegistryInfrastructureConstructor.includeContribution(RegistryInfrastructureConstructor.java:714)
...

Have you got any solution ?
Thanks,

Olivier



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to wrap tapestry.services.FactoryServices?

2006-11-24 Thread Ron Piterman

Yes, thats probably a good way to do the "wrapping"...
Cheers,
Ron


Francesco Degrassi wrote:

Actually, as i understand it, if you contribute to
tapestry.services.ApplicationServices, you can override a specific
service used by tapestry with your own and still have in the registry
the original provided by tapestry.
e.g.: I want to override Home service so it uses my own
HomeServiceWrapper class...

In my hivemodule.xml i would put:












I did not test it, but i'm fairly confident it would work. Please
correct me if i somehow forgot something, i'm still getting used to
hivemind.

Ron Piterman wrote:


I don't get exactly what you want to do by "wrapping".
You can replace an implementation of a service by providing another
implementation, but then the old one will not exist in the registry
anymore.

But it sounds more what you need is to intercept the services - take a
look at hivemind interceptors...

Cheers,
Ron


Patrick Moore wrote:


Hi --

I am trying to wrap some engine service by replacing the configuration
point, tapestry.services.FactoryServices with this definition:

  
  
  
  
  
  
  
  
  

I did something similiar to this to replace
tapestry.services.ResponseContributors:

  
  
  
  
  
  

but for the factoryservices I get :

Error building service transparentpolitics.sessionFactory: Error at
context:/WEB-INF/hivemodule.xml, line 76, column 87: Unable to
construct service tapestry.services.ServiceMap: Error building service
tapestry.services.ServiceMap: Error at
jar:file:/C:/Documents%20and%20Settings/Owner/.m2/repository/org/apache/tapestry/tapestry-framework/4.1.1-SNAPSHOT/tapestry-framework-4.1.1-SNAPSHOT.jar!/META-INF/tapestry.services.xml,

line 159, column 81: Unable to initialize service
tapestry.services.ServiceMap (by invoking method initializeService on
org.apache.tapestry.services.impl.ServiceMapImpl): Unable to construct
configuration tapestry.services.FactoryServices: Element service (at
context:/WEB-INF/transpol.persistence.xml, line 47, column 72)
contains errors: Value for attribute 'name' ('home') duplicates a
prior instance at
jar:file:/C:/Documents%20and%20Settings/Owner/.m2/repository/org/apache/tapestry/tapestry-framework/4.1.1-SNAPSHOT/tapestry-framework-4.1.1-SNAPSHOT.jar!/META-INF/tapestry.services.xml,

line 53, column 54.


Does anyone have any ideas on how I can do this service wrapping?

-Pat

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to active a page in @EventListener method?

2006-11-24 Thread Ron Piterman

don't know either, but have you tried
getRequestCycle().activate( page )?

Cheers,
Ron


Jun Tsai wrote:

hi,all

   I find the eventListener can't active a page.such as
@EventListener(elements =
{"PriceTypeField0","PriceTypeField1","PriceTypeField2"}, events = 
"onclick")

public IPage doSomething(){
  .
  .

return getRequestCycle().getPage("xx.page");
}


How to active a page ?

thanks

Jun Tsai



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dynamic Working with Tapestry...

2006-11-24 Thread Ron Piterman
If I get this right, there is some kind of iteration over objects inside 
the form component.
When the form is submitted, the iteration will be performed again, this 
one updating the values.
then you add an "action" binding to the submit, and persist the whole 
list of obejcts which were updated:



 
  
 
 


the currentValue property will point to the current iteration value, and 
the input will update each object in the iteration.


Did I get it right this time?

Cheers,
Ron


Skorpien126 wrote:

I´m not sure I´ve I understand you in the right way. Updating one Component
is not the problem, I stillt tried taht and it works.. I want that my
ContainerElement includes the "@Form"  and in the Form tag the dynamic
Number of Components is included. So the ConatinerElement have to take care
of binding and updating the values of the Subcomponent.



Ron Piterman-2 wrote:

There are some approaches to that problem, one approach would be to use 
the parameter binding for that:


The component gets a paraemter from its container, and is responsible to 
update the parameter.


Say you have a property on your page/container component:

public Data getData() {...}
public void setData( Data data ) { // now perform the save }

you pass "data" as a paraemter binding to your component which includes 
the form, and on your submit listener, after verifying everything is 
fine, you call setData:


@Parameter public abstract Data getData();
public abstract void setData( Data data );

public void doSubmit() {
  // validata...
  // check that everything is ok...
  if (getDelegate().getHasErrors() )
return;
  setData( getData() );
}


Another approach would be to use an IActionListener as paramter and 
invoke it - this is the approach I take usually.


Hope that helps,
Cheers,
Ron


Skorpien126 wrote:


Hi...
I´ve another Post, describing the same problem. In my eyes it is one the
things which should be solved more than one times. So I will give a whole
describtion about what I want.

OK... i have ca 30 tables each one, holding information about 1 product.
Lets say one table holds information of chairs,  the other of tables and
so
one. Each Table has a dynmamic number of Columns. Maybe an id, describing
text, a date.. . For each Type I´ve build a subcomponent ...
DateComponent,
StringComponent and so on. The Subcomponents include the "value"
(String,date ...) the validation and maybe some further functionality.

Ok... when openening a Page I get an Id with which I create a
Containercomponent "RequestContainer"(PERSISTBEAN) ...   this Container
includes a Collection of "Subcomponents" correspondening to the coloums
of
the depending table and also some further, unimportant informations... 


Ok... so far so good. It´s not problem to visualize the information. But
I
want to update the whole Object at once. So  I´ve make a form in the
Containercomponent and in the Form-Tag I iterate over the Column-Values.
The
Form invokes a SaveMethod. In which I want to write back the values of
the
validated, values of the subcomponents. My Question... How Can I get the
values of the dynamic subcomponents (image that it+s not possible to
bind a parameter to a dynamicList-Item) How can I check that each value
is
"correct/validated"??? 

If more code is needed... just ask. 
Thx u... and have a nice WE.



Here Some Example Code:
ContainerComponent.html


 
   editable="true"/>    
	   
	 
		   editable="true"/>    
	   
	 ...   
   


DisplayString.html


   
   

Der Inhalt halt...
		   
   





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to wrap tapestry.services.FactoryServices?

2006-11-24 Thread Ron Piterman

I don't get exactly what you want to do by "wrapping".
You can replace an implementation of a service by providing another 
implementation, but then the old one will not exist in the registry anymore.


But it sounds more what you need is to intercept the services - take a 
look at hivemind interceptors...


Cheers,
Ron


Patrick Moore wrote:

Hi --

I am trying to wrap some engine service by replacing the configuration
point, tapestry.services.FactoryServices with this definition:

   configuration-id="service:tapestry.services.FactoryServices">

   
   object="service:transactionalDirectService" />

   
   
   object="service:tapestry.services.Restart" />

   
   object="service:tapestry.services.External" />

   

I did something similiar to this to replace
tapestry.services.ResponseContributors:

   
   
   object="service:tapestry.services.JSONResponseContributor" />

   
   
   

but for the factoryservices I get :

Error building service transparentpolitics.sessionFactory: Error at
context:/WEB-INF/hivemodule.xml, line 76, column 87: Unable to
construct service tapestry.services.ServiceMap: Error building service
tapestry.services.ServiceMap: Error at
jar:file:/C:/Documents%20and%20Settings/Owner/.m2/repository/org/apache/tapestry/tapestry-framework/4.1.1-SNAPSHOT/tapestry-framework-4.1.1-SNAPSHOT.jar!/META-INF/tapestry.services.xml, 


line 159, column 81: Unable to initialize service
tapestry.services.ServiceMap (by invoking method initializeService on
org.apache.tapestry.services.impl.ServiceMapImpl): Unable to construct
configuration tapestry.services.FactoryServices: Element service (at
context:/WEB-INF/transpol.persistence.xml, line 47, column 72)
contains errors: Value for attribute 'name' ('home') duplicates a
prior instance at
jar:file:/C:/Documents%20and%20Settings/Owner/.m2/repository/org/apache/tapestry/tapestry-framework/4.1.1-SNAPSHOT/tapestry-framework-4.1.1-SNAPSHOT.jar!/META-INF/tapestry.services.xml, 


line 53, column 54.


Does anyone have any ideas on how I can do this service wrapping?

-Pat

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dynamic Working with Tapestry...

2006-11-24 Thread Ron Piterman
There are some approaches to that problem, one approach would be to use 
the parameter binding for that:


The component gets a paraemter from its container, and is responsible to 
update the parameter.


Say you have a property on your page/container component:

public Data getData() {...}
public void setData( Data data ) { // now perform the save }

you pass "data" as a paraemter binding to your component which includes 
the form, and on your submit listener, after verifying everything is 
fine, you call setData:


@Parameter public abstract Data getData();
public abstract void setData( Data data );

public void doSubmit() {
  // validata...
  // check that everything is ok...
  if (getDelegate().getHasErrors() )
return;
  setData( getData() );
}


Another approach would be to use an IActionListener as paramter and 
invoke it - this is the approach I take usually.


Hope that helps,
Cheers,
Ron


Skorpien126 wrote:

Hi...
I´ve another Post, describing the same problem. In my eyes it is one the
things which should be solved more than one times. So I will give a whole
describtion about what I want.

OK... i have ca 30 tables each one, holding information about 1 product.
Lets say one table holds information of chairs,  the other of tables and so
one. Each Table has a dynmamic number of Columns. Maybe an id, describing
text, a date.. . For each Type I´ve build a subcomponent ... DateComponent,
StringComponent and so on. The Subcomponents include the "value"
(String,date ...) the validation and maybe some further functionality.

Ok... when openening a Page I get an Id with which I create a
Containercomponent "RequestContainer"(PERSISTBEAN) ...   this Container
includes a Collection of "Subcomponents" correspondening to the coloums of
the depending table and also some further, unimportant informations... 


Ok... so far so good. It´s not problem to visualize the information. But I
want to update the whole Object at once. So  I´ve make a form in the
Containercomponent and in the Form-Tag I iterate over the Column-Values. The
Form invokes a SaveMethod. In which I want to write back the values of the
validated, values of the subcomponents. My Question... How Can I get the
values of the dynamic subcomponents (image that it+s not possible to
bind a parameter to a dynamicList-Item) How can I check that each value is
"correct/validated"??? 

If more code is needed... just ask. 
Thx u... and have a nice WE.



Here Some Example Code:
ContainerComponent.html

 
 
		   
	   
	 
		   
	   
	 ...   



DisplayString.html





Der Inhalt halt...
		   






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



2nd try: ajax updating components inside a For

2006-11-24 Thread Ron Piterman

Hi all,
I have a simple For loop which iterates over some object.
the objects are all rendered to DirectLinks.
When a DirectLink-listener is called, the clicked Item should change to 
"edit view" and render a Form instead of the Link.
When the form is submitted, the item should render again to the Link ( 
"view mode").


Now the question is, how to change the code below, to do the trick with 
ajax.


When using normal http requests the page looks like this:


 
   try ajax with list 

 

   
 
   
 
 
 
   


 
   
 

   

   
 


and the class:

public abstract class Home extends BasePage
{
public Object getObjects() {
// return the list of obejcts
}

/** the value of the current iteration */
public abstract Value getCurrentObject();

@Persist
public abstract Value getEditObject();
public abstract void setEditObject( Value v );

public boolean isEditMode() {
return getEditObject() != null &&
getEditObject().equals( getCurrentObject() );
}

public void edit( Long id ) {
setEditObject( getObject( id ) );
}

public void doSubmit() {
// ... save ... and then
this.setEditObject ( null );
}

public void doCancel() {
this.setEditObject( null );
}

private Value getObject( Long id ) {
  // ... return the value for the given id
}

}


Thanx in advance,
Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



4.1 : updating components inside a For

2006-11-23 Thread Ron Piterman
I Guess this is a frequent question, yet I could not find an anwer in 
the forum:


I have a for iterating over some objects, generating a list of direct 
links ( "view mode").


what I want to achieve is that when a link is activated, only the 
selected item refereshes to a form ("edit mode"), which on submit turns 
back to the "view mode".


How do I refresh only one instance of the iterated list.

Trying to refersh just the iterated item or even the whole list gives 
all kind of errors about no id found of some hidden field in the form 
and so forth -


So a small overview of the required flow would be great :)

Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: nested foreach problem

2006-11-22 Thread Ron Piterman
To follow the error message, you probably declared an abstract property
getter (or declared a  Dear groups
> 
> Sorry for last incomplete email. 
> 
> I have some problem when using nested foreach problem.
> I have a list of products. It works fine when display
> one by one using foreach. 
> 
> 
>   
>   
>  
> 
> 
>expression="getProductListPairs()"/>
>expression="getProductList()"/>
> 
> 
> But when I try to group two of product into pair for
> display, problem appear and error resulted.
> 
> "Unable to enhance class com.hket.myloop.page.Home
> because it implements a non-abstract write method for
> property 'productPairs'."
> 
> Can somebody give me some hints for this? Thanks.
> 
> coding fragment as attached
> 
> regards
> 
> wayne
> 
> 
>  
> 
> Sponsored Link
> 
> Compare mortgage rates for today. 
> Get up to 5 free quotes. www2.nextag.com
> 
> 
> 
> 
> Home.java
> 
> public abstract class Home extends AbstractBasePage implements 
> PageDetachListener 
> {
>   private JDO_MYLOOP_SELL_PRODUCT _currentProduct;
>   private List _productList, _productPairs;
> 
>   public void pageBeginRender(PageEvent event) 
>   {
>   super.pageBeginRender(event);
>   log.debug("ENTER Page Begin Render Listener method");
>   
>   Main global = ((Main)getGlobal());  
> 
>   Visit visit = (Visit)getVisit();
>   
>   _productList = global.getMainpageProducts();
>   
>   _productPairs = new ArrayList();
>   
>   List leftProductList = new ArrayList();
>   List rightProductList = new ArrayList();
> 
>   for (int pairCount=0; pairCount < _productList.size(); 
> pairCount+=2) 
>   {
>   leftProductList.add(_productList.get(pairCount));   
>   
>   
>   
>   try
>   {
>   _productPairs.add(new JDO_MYLOOP_SELL_PRODUCT[] 
> {(JDO_MYLOOP_SELL_PRODUCT) _productList.get(pairCount), 
> (JDO_MYLOOP_SELL_PRODUCT) _productList.get(pairCount+1)});
>   
>   }
>   catch (Exception e)
>   {
>   _productPairs.add(new JDO_MYLOOP_SELL_PRODUCT[] 
> {(JDO_MYLOOP_SELL_PRODUCT) _productList.get(pairCount), null});
>   }
>   }   
>   setProductList(_productList);
>   }
> 
>   public List getProductList()
>   {
>   log.debug("get productlist");
>   return _productList;
>   }
>   
>   public void setProductList(List list)
>   {
>   log.debug("set productlist");
>   _productList = list;
>   }
>   
>   public JDO_MYLOOP_SELL_PRODUCT getProduct() 
> {
>   return _currentProduct;
> }
> 
> public void setProduct(JDO_MYLOOP_SELL_PRODUCT product)
>   {
>   _currentProduct = product;
>   }
> 
>   public void setProductPairs(List list)
>   {
>   _productPairs = list;
>   }
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: button values

2006-11-22 Thread Ron Piterman
yes it is much better (faster) , and you can use it on each binding
(formal and informal parameters).
Cheers,
Ron


John Coleman wrote:
> D&J Gredler  gmail.com> writes:
> I used the label attribute to supply i.e. label="ognl:messages.getMessage...".
> 
> Can I use messages: anywhere,and drop ognl, is that better? We use Tapestry 
> 4.0 
> I think.
> 
> regards,
> John
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



4.1 exception page

2006-11-19 Thread Ron Piterman

Hi all,


Is there any way I can disable the hide/show in the exception page and 
see the exception trace as it used to be in 4 without clicking my way 
through it ?


Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re:

2006-11-16 Thread Ron Piterman

Sorry - my mistake, everything's fine...


Ron Piterman wrote:

Hi all,
Are there any known problems /anything new to usign  in 
4.1 ?


For me it doesn't seem to work - eventhough I have a properties file for 
my component, the messages are empty -


This is strange since normally if not found, tapestry would print the 
uppercase message key - very strange,


Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



users@tapestry.apache.org

2006-11-16 Thread Ron Piterman

Hi all,
Are there any known problems /anything new to usign  in 
4.1 ?


For me it doesn't seem to work - eventhough I have a properties file for 
my component, the messages are empty -


This is strange since normally if not found, tapestry would print the 
uppercase message key - very strange,


Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Escaping quotes in OGNL expressions in Tapestry templates

2006-10-11 Thread Ron Piterman
have you tried:

value="ognl:'Section: "' + section.name + '"'"

?

Cheers, Ron


Jim Steinberger wrote:
> Hello,
> 
> I ran into the situation where I needed to insert a double-quote in an OGNL 
> expression.  I wanted to do: value="ognl:'Section: \"' + section.name + 
> '\"'", but the Tapestry parser doesn't like that very much.
> 
> A solution offered in the archives is to explicitly declare the component in 
> the .page or .jwc file, where you can escape strings in the 
> parameter-bindings just like in Java.
> 
> 
> I prefer anonymous components directly in the template, myself, and wanted to 
> offer the alternative of using Java's Unicode capability:  "ognl:'Section: 
> \u0022' + section.name + '\u0022'".   Double Quote = \u0022, Single Quote = 
> \u0027.  Works great for me in Tapestry 4.0.2.
> 
>  
> Jim
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validation questions: components and messages

2006-10-10 Thread Ron Piterman
Yes - you can do much with the delegate :)
BTW - consider using CSS for this instead of adding elements , it might
be more elegant and easier to maintain...

Cheers,
Ron

Reto Hotz wrote:
> Hi,
> 
> On 10/10/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
>> Dave Rathnow wrote:
>> > Also, is there an easy way to get the individual error messages from
>> the
>> > validation delegate?
>>
>> In such a case you need to create your own class, extending the standard
>> validation delegate. There are methods which allow the delegate to hook
>> up into the rendering of fields and their labels, so you can do just
>> what you described.
> 
> We also wrote our own validation delegate with nice error-icons.
> Somehow like this:
> 
> public class MyValidationDelegate extends ValidationDelegate {
> 
>public void writeAttributes(IMarkupWriter writer, IRequestCycle
> cycle, IFormComponent component, IValidator validator) {
>if (isInError())
>writer.attribute("class", "validationerror");
>}
> 
>public void writeSuffix(IMarkupWriter writer, IRequestCycle cycle,
> IFormComponent component, IValidator validator) {
>if (isInError()) {
>writer.print(" ");
>writer.beginEmpty("img");
>writer.attribute("src", "warning_small.gif");
>}
>}
> 
>public void writeLabelPrefix(IFormComponent component,
> IMarkupWriter writer, IRequestCycle cycle) {
>if (isInError(component)) {
>writer.begin("span");
>writer.attribute("class", "label-error");
>}
>}
> 
>public void writeLabelSuffix(IFormComponent component,
> IMarkupWriter writer, IRequestCycle cycle) {
>if (isInError(component))
>writer.end(); // 
>}
> }
> 
> 
> HTH
> 
> Greetings
> Reto
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validation questions: components and messages

2006-10-10 Thread Ron Piterman
Dave Rathnow wrote:
> I have written a component that contains text fields that need to be validated
> when a page is submitted but I can't figure out how component validation
> hooks into Tapestry's validation framework.  I can access my validation 
> delegate
> in my page component but how can I get the validation delegate from my
> component?

You use per Form one instance of validation delegate. It tracks the
validation errors which the components report. This happends from
itself, you just need to define the validators on the fields.

> 
> Also, is there an easy way to get the individual error messages from the
> validation delegate?  I want to put individual validation errors messages
> next to each field rather than have a single message at the top of the page
> and then ** beside each of the errored field.

In such a case you need to create your own class, extending the standard
validation delegate. There are methods which allow the delegate to hook
up into the rendering of fields and their labels, so you can do just
what you described.

> 
> Thanks,
> Dave.
>

Please,
Ron



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Accessing HiveMind Registry

2006-10-10 Thread Ron Piterman
One way would be to create a factory for instances of this class in
hivemind, and inject any services you need to it.

Another way would be to get the registry instance tapestry uses, which
is stored as a context attribute. see the ApplicationServlet code.
Cheers,
Ron


Edoardo Campagnano wrote:
> Hi to all,
> 
> I've got a small prioblem with HiveMind. I wrote a small Service but I must
> use from a class taht is outside a Tapestry component and can't be declared
> abstract. I need something like in the HiveMind manual:
> 
>  
> 
> (from the HiveMind home page)
> .
> Registry registry = RegistryBuilder.constructDefaultRegistry();
> MyService service = (MyService)
> registry.getService("com.mypackage.MyService", MyService.class);
> 
> .
> 
>  
> 
> The key is access the Registry but in this way it throws an exception. I'
> don't know how but I'm sure it is possible
> 
>  
> 
> Edoardo 
> 
>  
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: checkboxes problem

2006-10-10 Thread Ron Piterman
Yes, I know why this happends: you have a bug, a mistake  in your code.
Cheers,
Ron


Andrés Nates wrote:
> Hello
> 
>  
> 
> I have the following problem
> 
>  
> 
> I have a list of checkboxes, when i select a checkbox the page recharges
> itself. But if i select the last of the checkboxes in the list, when the
> page recharges, all checkboxes appears selected. Anybody knows Why this
> happens?, and What can I do to solve this problem?
> 
>  
> 
> Thanks
> 
>  
> 
> Cordialmente, 
> ~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~
> ANDRÉS NATES M.
> Director de implantación e infraestructura.
> Nuevos Medios
> Calle 25 No. 127-220 Autopista Cali-Jamundí Km. 7
> Tel: (572) - 524 07 77 Ext. 2173
> Email:  
> [EMAIL PROTECTED]
> Cali   - Colombia 
> POLÍTICA DE CALIDAD
> Proveer soluciones tecnológicas de software para la gestión del
> conocimiento cumpliendo lo pactado con los clientes mediante el
> mejoramiento continuo y la innovación, apoyado en la sinergia 
> corporativa de Parquesoft.
> 
>  
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File System Browse Component

2006-10-09 Thread Ron Piterman
As far as I can remember, there was a tree component in tacos which did
just that - try to download an old version - it should be in the demo
application.
Cheers,
Ron


Peter Dawn wrote:
> guys,
> 
> i am trying to implement this functionality where a user can browse
> for a folder from within my web app. now as i understand using html
> the user cannot select a folder location (only a file).
> 
> now is there a file system browse component for tap3, which
> essentially displays the local file system to the user  and the user
> is able to select a folder from it.
> 
> i remember somebody mentioning this a while ago, but i cant find the
> link now. can somebody help me out. or is there any other solution to
> this.
> 
> thanks.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form submitting problem

2006-08-24 Thread Ron Piterman

Me again...

Two things: the exception page is not for business logic exceptions but 
should be used as a fallback in case of dev mistakes (also known as 
bugs) and in case someone tempers with your application and sends wrong 
information in the URLs.


Tapestry's Form handling is one of the framework's best and most mature 
features, which , imho, makes this framework so important. If you don't 
use it - you miss a great feature.


Cheers,
Ron

Tim Sawyer wrote:

Thanks Ron.  In this case, that's fine I can add that in.

In other cases it's just not possible.  I have a 700,000 line Java business 
layer behind my front end, there are going to be all sorts of exceptions 
cropping up.  It doesn't make commercial sense to write all that validation 
in the front end.


Does anyone know why the original problem I outlined occurs?  Is tapestry 
doing some validation on the form submit to ensure it is not double 
submitted? 


Ta,

Tim.

On Thursday 24 August 2006 14:21, Ron Piterman wrote:


Use validation instead of a custom exception page, this will solve your
problem and be more useable, since the user can correct the problem on
the same page where the error message apeared.

Cheers,
Ron

Tim Sawyer wrote:


hi,

I have a tapestry page which displays a text entry field for each item in
an array.  These fields are for entering cheque numbers, and there is
also an Activate button.  If activate is pushed whilst one of the cheque
number fields is blank, then I (correctly) get an exception raised - "all
cheque numbers must be entered"  This is shown to the user using a custom
exception page.

Here's where my problems start.  If I now click back on the exception
page (which does a javascript:history.back()), fill in the missing cheque
number, and then click Activate again, the newly entered cheque number
does not get through to the model behind the array of cheque number
fields.

Does anyone have any idea why?  Or any pointers as to where to look?

Cheers,

Tim.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form submitting problem

2006-08-24 Thread Ron Piterman
naturally I forgot the getRequestCycle.activate(...) in the try clause, 
just after the save(...);


Cheers,
Ron



Tim Sawyer wrote:

Thanks Ron.  In this case, that's fine I can add that in.

In other cases it's just not possible.  I have a 700,000 line Java business 
layer behind my front end, there are going to be all sorts of exceptions 
cropping up.  It doesn't make commercial sense to write all that validation 
in the front end.


Does anyone know why the original problem I outlined occurs?  Is tapestry 
doing some validation on the form submit to ensure it is not double 
submitted? 


Ta,

Tim.

On Thursday 24 August 2006 14:21, Ron Piterman wrote:


Use validation instead of a custom exception page, this will solve your
problem and be more useable, since the user can correct the problem on
the same page where the error message apeared.

Cheers,
Ron

Tim Sawyer wrote:


hi,

I have a tapestry page which displays a text entry field for each item in
an array.  These fields are for entering cheque numbers, and there is
also an Activate button.  If activate is pushed whilst one of the cheque
number fields is blank, then I (correctly) get an exception raised - "all
cheque numbers must be entered"  This is shown to the user using a custom
exception page.

Here's where my problems start.  If I now click back on the exception
page (which does a javascript:history.back()), fill in the missing cheque
number, and then click Activate again, the newly entered cheque number
does not get through to the model behind the array of cheque number
fields.

Does anyone have any idea why?  Or any pointers as to where to look?

Cheers,

Tim.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form submitting problem

2006-08-24 Thread Ron Piterman

Still you can use validation.

Instead of catching the exception in the engine, and forward to the 
exception page, catch the exception in the page's class, and record an 
error in your ValidationDelegate.


instead of :

getSomeService().save(foo);


use


try {
  getSomeService().save(foo);
}
catch (Exception ex ) {
  record( ex );
}

where the record method adds an error to the validation delegate.

Hope that helps,
Ron


Tim Sawyer wrote:

Thanks Ron.  In this case, that's fine I can add that in.

In other cases it's just not possible.  I have a 700,000 line Java business 
layer behind my front end, there are going to be all sorts of exceptions 
cropping up.  It doesn't make commercial sense to write all that validation 
in the front end.


Does anyone know why the original problem I outlined occurs?  Is tapestry 
doing some validation on the form submit to ensure it is not double 
submitted? 


Ta,

Tim.

On Thursday 24 August 2006 14:21, Ron Piterman wrote:


Use validation instead of a custom exception page, this will solve your
problem and be more useable, since the user can correct the problem on
the same page where the error message apeared.

Cheers,
Ron

Tim Sawyer wrote:


hi,

I have a tapestry page which displays a text entry field for each item in
an array.  These fields are for entering cheque numbers, and there is
also an Activate button.  If activate is pushed whilst one of the cheque
number fields is blank, then I (correctly) get an exception raised - "all
cheque numbers must be entered"  This is shown to the user using a custom
exception page.

Here's where my problems start.  If I now click back on the exception
page (which does a javascript:history.back()), fill in the missing cheque
number, and then click Activate again, the newly entered cheque number
does not get through to the model behind the array of cheque number
fields.

Does anyone have any idea why?  Or any pointers as to where to look?

Cheers,

Tim.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating listener urls

2006-08-24 Thread Ron Piterman

Sure - so, what is that you are asking? how to generate an URL?

In Tapestry, EngineService is responsible to generate URLs and respond 
to them.


Implement your own service and let it check for a request parameter you 
add in your java script.


You will however have to pass a basic url (generated by your service) to 
the javascript, if you want to do thing right.

If you don't, you can write the URL from scratch in Javascript:

app?service=myservice&myownparameter=somejavascriptvalue

But i would keep away from that sort of thing.

Cheers,
Ron



Vinicius Carvalho wrote:

Hello there! In my page I have lots of Asynchronous calls using
XMLHttpRequest. I'm having a hard time dealing with so many calls,
I'll show way:

I did not use the XTile component, because I need a better suport from
the Service, and also It's a fire and forget way, I don't need
response.

So My idea was to create an AjaxSend service + component. The
component writes a sendFunction.

Problem is, I'm dealing with a lot of those components on my screen.
Cuz for each listener in the page I add a component (Bad design I
know). So my question is:

Would be possible to have just one script: let's say:

function asynchSend(url,params[]){
... ajax stuff here
}

and then on my Page, I have methods that would return the Listeners 
urls? like :


public String getLogoutLink(){
return the url to the logout method ...
}

Is this possible?

Best Regards

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to be redirected from login form to BasePage?

2006-08-24 Thread Ron Piterman

its cycle.activate("Home");

Cheers,Ron

CIJOML wrote:

Hi,

I wrote little application which now I want secure.
So I developped login form, but I am unable to be redirected to BasePage after 
successfull login.


When I call such page directly in DP.application, it renders:

http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd";>



DP Michal Semler
 
specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
specification-path="/org/krysalis/menu/component/Menu.library"/>



But when I change Home.page to Login.page, it returns errors:

Login process goes OK, and then I don't know how to call from cycle.activate 
my Home.page:


My Login.java
-
package org.cijoml.ui.pages;

import java.sql.SQLException;


import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.IPage;
import org.apache.tapestry.html.BasePage;
import org.cijoml.utils.IBatisUtil;
import org.cijoml.model.Administrator;

import com.ibatis.sqlmap.client.SqlMapClient;


public abstract class Login extends BasePage {

public abstract String getNick();
public abstract String getHeslo();
public abstract void setZprava(String zprava);

	public void login(IRequestCycle cycle) throws SQLException 
	{

if (isValidLogin(getNick(), getHeslo())) {
cycle.activate("Home.page");

return;
}
setZprava("Spatne jmeno nebo heslo!!!");
}

private boolean isValidLogin(String nick, String heslo) throws 
SQLException {
return true; //this is not important for this case
}
}


Login.html:






Error Message











Jmeno Administratora: 

size="30"/>






Heslo: 

hidden="ognl:true" size="30"/>








 





Login.page:


http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd";>











Thanks a lot for help!

Michal

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form submitting problem

2006-08-24 Thread Ron Piterman
Use validation instead of a custom exception page, this will solve your 
problem and be more useable, since the user can correct the problem on 
the same page where the error message apeared.


Cheers,
Ron



Tim Sawyer wrote:

hi,

I have a tapestry page which displays a text entry field for each item in
an array.  These fields are for entering cheque numbers, and there is also
an Activate button.  If activate is pushed whilst one of the cheque number
fields is blank, then I (correctly) get an exception raised - "all cheque
numbers must be entered"  This is shown to the user using a custom
exception page.

Here's where my problems start.  If I now click back on the exception page
(which does a javascript:history.back()), fill in the missing cheque
number, and then click Activate again, the newly entered cheque number
does not get through to the model behind the array of cheque number
fields.

Does anyone have any idea why?  Or any pointers as to where to look?

Cheers,

Tim.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to page on F1 keypress

2006-08-24 Thread Ron Piterman
If each page has only one F1 page, or, say a limitted number of F1 - you 
implement a javascript listener and uses JS to redirect (I don't know 
the exact call) -


The URL is passed to your .script file - you get it by using the 
relevant engine service's getLink method. I think they did exist in 3.0.


Cheers,
Ron



Peter Dawn wrote:

ok. so i am just working on getting JS to listen to F1 keyevent. once
i have that working than the question is how do i trigger a page
redirect. i mean how do i pass on the info from my JS to tapestry.
maybe i should treat F1 keypress as a formsubmit and then process it
(but what about pages that already have a formsubmit). i think its
simpler than i think.

and thanks jesse for your response :-)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I want my HTML *that* way

2006-08-04 Thread Ron Piterman
train your designers to produce clean html - after all nowadays its not 
out of the cloudes..

Cheers,
Ron


Rui Pacheco wrote:

Its not the first time that Tapestry's HTML parser throws an exception
because a piece of HTML is not well formed.

If I have a table that isn't closed properly, or a span tag that isn't
opened correctly, then its impossible to continue, for example.

My problem is, I'm creating my component's templates from snippets of code
designed with DreamWeaver by other people (designers). The HTML renders
correctly on any browser, but is not understood by Tapestry. The thing 
is, I

can't afford to correct every piece of HTML that is sent my way, its just
too time consuming.

I'll try to send you an example, but it would be hard now - I've corrected
all the HTML I found :)

On 8/4/06, hv @ Fashion Content <[EMAIL PROTECTED]> wrote:



I never had that problem could you be a bit more specific

"Rui Pacheco" <[EMAIL PROTECTED]> skrev i en meddelelse
news:[EMAIL PROTECTED]
> Hi all
>
> I have a template, designed under DreamWeaver with loads of randomly
> placed
> HTML tags, and Tapestry won't parse it. It chockes on tags that don't
> open,
> it chockes on form tags placed at the same level as tables, etc.
>
> Is there a way to tell Tapestry's HTML parser to be a bit more relaxed?
I
> mean, I still have a couple of pages to go through, and its going to be
> hell
> if he complains about every bit of malformed HTML.
>
> --
> Cumprimentos,
> Rui Pacheco
>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with parameters of a custom component (Tapestry 4.01)

2006-08-04 Thread Ron Piterman

Brian Doherty wrote:

Hi,
Yes, I understand what you are saying here. I do not understand the 
following. If I use instance variables to pass the storeLocation into my 
component it works fine. storeLocation is passed through to the 
component and getLocationOfStore() contains the location I passed in 
from the page. If however I use an abstract property to pass the 
storeLocation into my component, storeLocation is not passed into the 
component ie. getStoreLocation() is null


where do you set your storeLocation property ( or, why shouldn't it be 
null ) ?

Cheers,
Ron



Thanks
Brian

Ron Piterman wrote:


:)

Tapestry uses a pool to store page instances. While rendering it is 
safe to use instance variables but you have to make sure they are 
reset, preferrably in either pageDetached or pageAttached events.
If you don't reset them, information can be shared between many users 
of your site, but not by all, since they might get another instance 
from the pool.


When using abstract properties, tapestry does the initialization work 
for you.


Hope that helps,
Ron



Brian Doherty wrote:

Sorry. What I mean by does not work is that getLocationOfStore() in 
my component is null after the component renders.
When I use the updated code below the storeLocation is passed through 
to the component and getLocationOfStore() contains the location I 
passed in from the page.
It does not like it when I use abstract getters and setters but I 
dont understand why.


Thanks
Brian


Ron Piterman wrote:


Brian Doherty wrote:



Hi,

I am having problems binding a property on my page to a parameter 
in my component. The following does not work




can you be more specific. "Does not work" is somehow general...



I have a CategoryListComponent as follows


  



On my CategoryList.java I have

public abstract void setStoreLocation(Location storeLocation);
public abstract Location getStoreLocation();


If however I change it as follows, it works fine. The storeLocation 
is passed into the component.



  



On my CategoryList.java this time I have

private Location locationOfStore;
public  void setLocationOfStore(Location locationOfStore) {
  this.locationOfStore = locationOfStore;
  }
public  Location getLocationOfStore() {
  return locationOfStore;
  }

I dont understand why the Location wont be passed through if it 
declared as abstract. Any help would be great


Regards
Brian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: "Could not find a strategy instance for class RubricSelectionModel" when working with PropertySelection component

2006-08-03 Thread Ron Piterman
you probably serialize it in some way (usually by persisting it) but it 
is not serializeable.

either make it serializeable or remove the persisting code.
Cheers,
Ron



[EMAIL PROTECTED] wrote:

Good day!

I'm developing portlet using Tapestry portlet technology (4.0.2). I've
created page with PropertySelection component. But it displays error "Could
not find a strategy instance for class
net.mycompany.portal.news.newslist.RubricSelectionModel".

How can I run my portlet successfully?

Please, help me!

Thanks!

My sources:
Edit.html:






Edit.page:

http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>

  

  
  

  
  


  




NewListEditPage.java:
package net.mycompany.portal.news.newslist;

import java.io.IOException;

import javax.portlet.PortletPreferences;
import javax.portlet.ReadOnlyException;
import javax.portlet.ValidatorException;

import org.apache.tapestry.annotations.InjectObject;
import org.apache.tapestry.html.BasePage;

import net.mycompany.common.CommonRegistry;

public abstract class NewsListEditPage extends BasePage {

  @InjectObject("service:tapestry.portlet.PortletRequest")
  public abstract javax.portlet.PortletRequest getPortletRequest();

  public abstract String getStockId();

  public abstract Rubric getCurrentRubric();

  public static RubricSelectionModel getRubricSelectionModel(){
return new
RubricSelectionModel(CommonRegistry.getRubricList());
  }

  public void onOk() {
System.out.println("Listener called. Stock id is: " +
getStockId());
PortletPreferences prefs =
getPortletRequest().getPreferences();
try {
  prefs.setValue("DocCount", getStockId());
  prefs.setValue("RubricId",
getCurrentRubric().getId().toString());
  prefs.store();
} catch (ReadOnlyException e) {
  e.printStackTrace();
} catch (ValidatorException e) {
  e.printStackTrace();
} catch (IOException e) {
  e.printStackTrace();
}
  }
}



RubricSelectionModel.java:
package net.mycompany.portal.news.newslist;

import java.io.Serializable;
import java.util.Iterator;
import java.util.List;

public class RubricSelectionModel implements Serializable{
  private static final long serialVersionUID = 1L;

  private List rubricList;

public RubricSelectionModel(List itemList) {
this.rubricList = itemList;
}

public int getOptionCount() { return rubricList.size(); }

public Object getOption(int index) {
return rubricList.get(index);
}

public String getLabel(int index) {
return ((Rubric) rubricList.get(index)).getName();
}

public String getValue(int index) {
  return ((Rubric) rubricList.get(index)).getId().toString();
}

public Object translateValue(String value) {
  Iterator e = rubricList.iterator();
  while(e.hasNext()){
Rubric rubric = (Rubric)e.next();
if(rubric.getId().toString() == value){
  return rubric;
}
  }
  return null;
}
}



Rubric.java:
package net.mycompany.portal.news.newslist;

import java.io.Serializable;

public class Rubric implements Serializable{
  private static final long serialVersionUID = 1L;

  private Integer id;
  private String code;
  private String name;

  public String getCode() {
return code;
  }
  public void setCode(String code) {
this.code = code;
  }
  public Integer getId() {
return id;
  }
  public void setId(Integer id) {
this.id = id;
  }
  public String getName() {
return name;
  }
  public void setName(String name) {
this.name = name;
  }

  public Rubric(Integer id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
  }
}



DBUtils.java:
package net.mycompany.portal.utils;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class DBUtils {

  private static DataSource ds;

  private static SessionFactory sessionFactory = new
Configuration().configure()
  .buildSessionFactory();

  public static SessionFactory getSessionFactory() {
return sessionFactory;
  }

}




portlet.xml:
http:

Re: Problem with parameters of a custom component (Tapestry 4.01)

2006-08-03 Thread Ron Piterman

:)

Tapestry uses a pool to store page instances. While rendering it is safe 
to use instance variables but you have to make sure they are reset, 
preferrably in either pageDetached or pageAttached events.
If you don't reset them, information can be shared between many users of 
your site, but not by all, since they might get another instance from 
the pool.


When using abstract properties, tapestry does the initialization work 
for you.


Hope that helps,
Ron



Brian Doherty wrote:
Sorry. What I mean by does not work is that getLocationOfStore() in my 
component is null after the component renders.
When I use the updated code below the storeLocation is passed through to 
the component and getLocationOfStore() contains the location I passed in 
from the page.
It does not like it when I use abstract getters and setters but I dont 
understand why.


Thanks
Brian


Ron Piterman wrote:


Brian Doherty wrote:



Hi,

I am having problems binding a property on my page to a parameter in 
my component. The following does not work



can you be more specific. "Does not work" is somehow general...



I have a CategoryListComponent as follows


  



On my CategoryList.java I have

public abstract void setStoreLocation(Location storeLocation);
public abstract Location getStoreLocation();


If however I change it as follows, it works fine. The storeLocation 
is passed into the component.



  



On my CategoryList.java this time I have

private Location locationOfStore;
public  void setLocationOfStore(Location locationOfStore) {
  this.locationOfStore = locationOfStore;
  }
public  Location getLocationOfStore() {
  return locationOfStore;
  }

I dont understand why the Location wont be passed through if it 
declared as abstract. Any help would be great


Regards
Brian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tapestry / Spring / Hibernate / Tomcat strange error

2006-08-03 Thread Ron Piterman
I would check your urls: you probably try to access an engine service 
which does not exist. either through an url or when generating a link?
check the url which generates this exception, specifically the service= 
parameter ( if using roude URLs ).

If you are using fiendly URLs, try to see which encoder makes problems.
Cheers,
Ron


John Menke wrote:

We are getting the following error sporadically.  Can anyone shed any light
on this for us?

org.apache.hivemind.ApplicationRuntimeException: No engine service
named  *(arbitrary
string here - usually a bogus email address)*

at org.apache.tapestry.services.impl.ServiceMapImpl.buildProxy(
ServiceMapImpl.java:143)

at org.apache.tapestry.services.impl.ServiceMapImpl.getService(
ServiceMapImpl.java:105)

at $ServiceMap_10cb01fc8b0.getService($ServiceMap_10cb01fc8b0.java)

at 
org.apache.tapestry.engine.RequestCycle.getService(RequestCycle.java:202)


at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java
:241)

at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(
InvokeEngineTerminator.java:60)

at
$WebRequestServicer_10cb01fc8e0.service($WebRequestServicer_10cb01fc8e0.java) 



at
$WebRequestServicer_10cb01fc8dc.service($WebRequestServicer_10cb01fc8dc.java) 



at
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(
WebRequestServicerPipelineBridge.java:56)

at
$ServletRequestServicer_10cb01fc8c0.service($ServletRequestServicer_10cb01fc8c0.java) 



at org.apache.tapestry.request.DecodedRequestInjector.service(
DecodedRequestInjector.java:55)

at
$ServletRequestServicerFilter_10cb01fc8bc.service($ServletRequestServicerFilter_10cb01fc8bc.java) 



at
$ServletRequestServicer_10cb01fc8c2.service($ServletRequestServicer_10cb01fc8c2.java) 



at org.apache.tapestry.multipart.MultipartDecoderFilter.service(
MultipartDecoderFilter.java:52)

at
$ServletRequestServicerFilter_10cb01fc8ba.service($ServletRequestServicerFilter_10cb01fc8ba.java) 



at
$ServletRequestServicer_10cb01fc8c2.service($ServletRequestServicer_10cb01fc8c2.java) 



at org.apache.tapestry.services.impl.SetupRequestEncoding.service(
SetupRequestEncoding.java:53)

at
$ServletRequestServicerFilter_10cb01fc8be.service($ServletRequestServicerFilter_10cb01fc8be.java) 



at
$ServletRequestServicer_10cb01fc8c2.service($ServletRequestServicer_10cb01fc8c2.java) 



at
$ServletRequestServicer_10cb01fc8b4.service($ServletRequestServicer_10cb01fc8b4.java) 



at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java
:123)

at org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java
:168)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)

at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal 


(OpenSessionInViewFilter.java:174)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(
OncePerRequestFilter.java:76)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)

at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)

at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection 


(Http11BaseProtocol.java:667)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)

at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:595)




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with parameters of a custom component (Tapestry 4.01)

2006-08-03 Thread Ron Piterman

Brian Doherty wrote:


Hi,

I am having problems binding a property on my page to a parameter in my 
component. The following does not work


can you be more specific. "Does not work" is somehow general...



I have a CategoryListComponent as follows


  



On my CategoryList.java I have

public abstract void setStoreLocation(Location storeLocation);
public abstract Location getStoreLocation();


If however I change it as follows, it works fine. The storeLocation is 
passed into the component.



  



On my CategoryList.java this time I have

private Location locationOfStore;
public  void setLocationOfStore(Location locationOfStore) {
  this.locationOfStore = locationOfStore;
  }
public  Location getLocationOfStore() {
  return locationOfStore;
  }

I dont understand why the Location wont be passed through if it declared 
as abstract. Any help would be great


Regards
Brian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upgrading to 4.1 - question about concepts

2006-08-03 Thread Ron Piterman

Jesse Kuhnert wrote:

Those sound like requirements :)

This is good, I hadn't fully attacked/handled widget support yet (hence the
lack of seeing very many), but I'd love to be able to pick your brain about
more specifics of what/how/why you are doing some of the things with your
widgets. (If it's not a public sort of thing you can email me off list).


thanx jesse,

The most simple example here is a selection of a table row. We use 
tables extensivly, and one of the most common actions is selecting a 
table row by clicking on it.


What the user sees is that the row is selected (a class name is added, 
and removed somewhere else, the background color changes) - but actually 
the row widget sends a request to the server - using a plain tapestry 
listener url. the listener method changes the application state and then 
renders a


true

the row widget recieves this xml, lets dojo parse it and invokes all 
 elements in it, in this case the selectRow method.


So I don't need to generate javascript from tapestry. ever. Everything 
is a widget and an rpc. I find it very comfortable and clean, and since 
the widget is corresponding with its tapestry component, the tapestry 
component just has to "know" the widget (which actions it supports).
Its really like two systems (tapestry and dojo) work together through an 
API. I find the tap4.1 way of using dojo is very much event oriented, 
while the way I use dojo is very much encapsulating everything inside 
widgets.


One of the common actions, which is implemented in a base widget from 
which all inherit is a "replaceById" - and there are some other like 
"redirect" and so on.


Going back to the example above:
It seems very very easy to create from tapestry the event TR.onclick but 
how to I render the response?
At the moment I would guess that I have to generate some javascript from 
tapestry which does the work, don't I ?


Cheers,
Ron



The format is currently "similar" to tacos, though handled a little
differently.

The client side file that handles the xml-rpc sort of calls is
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js?view=markup. 



The element types/id's mostly come from the ResponseBuilder interface,
http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/services/ResponseBuilder.html 


.

I don't know if I can promise anything this extensive being done in one
weekend but the more input I can get the better. (for day to day 
pondering's

sake )

On 8/2/06, Ron Piterman <[EMAIL PROTECTED]> wrote:



Hi,
In an application I am currently working on (tapestry 4.0) we use
extensivley dojo widgets and a custom ajax render cycle.

Usually the Ajax responses are rendered by a special renderer which
wrapps components renders inside a kind of xml-rpc. This is parsed by
java scripts and performs different actions:

It looks something like:

...
and so on.

The nice thing is, the widget that sends the request handles the
response, so one can call from inside tapestry methods on the widgets,
passing component render-results as parameters.

Now as far as I understand from the docu, tapestry 4.1 contains one very
important method for ajax response: ResponseBuilder.updateComponent(...)

this will end in a replace-by-id, which is quite trivial - but what is
the tap4.1 way of doing other things like openning a dojo dialog,
changing status of existing widgets (and thus the under- or overlying
html) and so on? Do I have to write javascript templates for all of
those actions?

As far as can remember from tacos, the ajax response was also a sort of
xml-rpc, handled by the tacos JS library. I would guess it was
"imported" into tap4.1 - is there an overview of this somewhere? (how
the response should look like ...) - more under the hood as in the
existing docu?

Thanx for reading that long ;)

Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



upgrading to 4.1 - question about concepts

2006-08-02 Thread Ron Piterman

Hi,
In an application I am currently working on (tapestry 4.0) we use 
extensivley dojo widgets and a custom ajax render cycle.


Usually the Ajax responses are rendered by a special renderer which 
wrapps components renders inside a kind of xml-rpc. This is parsed by 
java scripts and performs different actions:


It looks something like:

...
and so on.

The nice thing is, the widget that sends the request handles the 
response, so one can call from inside tapestry methods on the widgets, 
passing component render-results as parameters.


Now as far as I understand from the docu, tapestry 4.1 contains one very 
important method for ajax response: ResponseBuilder.updateComponent(...)


this will end in a replace-by-id, which is quite trivial - but what is 
the tap4.1 way of doing other things like openning a dojo dialog, 
changing status of existing widgets (and thus the under- or overlying 
html) and so on? Do I have to write javascript templates for all of 
those actions?


As far as can remember from tacos, the ajax response was also a sort of 
xml-rpc, handled by the tacos JS library. I would guess it was 
"imported" into tap4.1 - is there an overview of this somewhere? (how 
the response should look like ...) - more under the hood as in the 
existing docu?


Thanx for reading that long ;)

Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Different JSESSIONID in Cookie and URL?

2006-07-27 Thread Ron Piterman

hello Christian -

As far as I know the session is managed by tomcat ( or any other 
container ) - so maybe the tomcat list is a better place to ask...


but since it is managed by the container, I would suggest that relying 
on a session id taken either from the url or from the cookie might cause 
some problems if you change the container configuration.


If you want to implement long sessions or store some extra session 
information outside of the session map itself (which seem to me two 
reasons to try to capture the session id) I would suggest creating your 
own id and, ofcause, store it in the session :)


Hope that helps,

Cheers,
Ron



Christian Mittendorf wrote:

Hello!

My Tapestry 4 based application uses the Home.page to read all url  and 
cookie parameters. The page then decides what to do next and it  throws 
a PageRedirectException in its pageBeginRender Method.


If I open this app in the browser, I'll first get a cookie with  
JSESSIONID X. Then, on the page shown after the page redirect has  taken 
place, the app is using a different JSESSIONID in its rewritten  urls 
("/XYZ/app;jsessionid=Y").


In the end I turned off cookies for my app to make it work properly.  
However, my question now is "why"? Why are the session ids from the  
rewritten url and the cookie different? What am I missing?


Christian   
-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OT: hivemind help

2006-07-19 Thread Ron Piterman
hi - I try to pass a parameter to a serviceIMplementationFactory but get 
an exception from hivemind:


Parameter parameters must not be null.

here is the xml:




  

 
 
 
 



 

  

  

  


and in another module:


  


  


the exception:

java.lang.NullPointerException
Parameter parameters must not be null.
org.apache.hivemind.util.Defense.notNull(Defense.java:41)
org.apache.hivemind.impl.ServiceImplementationFactoryParametersImpl.(ServiceImplementationFactoryParametersImpl.java:47)
org.apache.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:59)
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructCoreServiceImplementation(AbstractServiceModelImpl.java:108)
org.apache.hivemind.impl.servicemodel.PooledServiceModel.constructPooledService(PooledServiceModel.java:210)
org.apache.hivemind.impl.servicemodel.PooledServiceModel.obtainPooledService(PooledServiceModel.java:186)
org.apache.hivemind.impl.servicemodel.PooledServiceModel.getServiceImplementationForCurrentThread(PooledServiceModel.java:170)


Any Idea what I am doing wrong here ?

Cheers,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sending a redirect

2006-07-07 Thread Ron Piterman

throw a RedirectException

Cheers,
Ron


Dan Adams wrote:

How do you send a redirect from an engine serivice?




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ASO & Interceptor

2006-07-06 Thread Ron Piterman
The simple approach is to use the 
http://tapestry.apache.org/tapestry4/tapestry/hivedocs/service/tapestry.state.ApplicationStateManager.html

service, either autowired or specifically set to your interceptor service.

Another version which I use is create one hivemind service with getters 
for all of your state objects - the implemntation uses again the service 
mentioned  above, but I like it because its easy to maintain.


Cheers,
Ron


Kosarev A.V. wrote:

Hi all!

How I can receive tapestry state object (e.g. visit object) in hivemind
interceptor?

Thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Family Tree web app problem with image map using Tapestry 4..

2006-07-06 Thread Ron Piterman

I didn't read through your short "novel" - but scanned through it -

I would advice you to use a DirectLink component instead of the 
DirectArea, and pass a custom ILinkRenderer as a renderer parameter -


Cheers,
Ron


Alex Tian wrote:

hi, everyone, I know it's gonna be a lenthy statement below, but I
desperately need help...

my task actually is to build a "family tree" web application, for
simplicity, e.g. User enters his/her name and his relatives'names (e.g. his
parents' names and children's names ) and sumbit the form (triggers a
listener in that page's .java file). What I do is generate a tree-like image
to show the relations among them (use only rectangles with lines to connect
them, on each rectangle write proper family member's name which the user
entered) and display it on the page and use image map to make those
rectangles on the image clickable (e.g. user can link to a person's detail
page), because the I don't know what relations will be among those family
members and how many names the user will enter, so I cannot pre-define the
coords attribute and the number of  tags for "image map".

As I said in the first post, I managed to generate the buffered image and
display it on the page, I used 2 classes and 1 interface exactly as Chart
example in Workbench example (IChartProvider.java, ChartService.java,
ChartAsset.java). and I used DirectArea custom component in Virtual Library
example implemented image map on this newly created image, the DirectArea
custom component in Virtual Library example to implement the image map so
that when user clicks a region of the image, it is just a link to another
page.

The problem now is I don't know how many 
tags will be in .html for image map and I have to specify the "coords"
attribute in each  tag myself. Because in my web app, I don't know how
many family memebers'names the user will provide( the number of  tag
is unknown) and what relations will be among them ( the rectangle's
coordinates on the image will be different everytime, so the "coords" value
in each  is unknown), say this time there should be 1  tag(1
clickable area on that image) and the coords value is "10,10 10,10", but
next time user wants 2  tags(2 clickable area on that image) and the
coords value are "20,20 20,20 ",   "30,30 30,30" that's what DirectArea.java
does not do, because the coords attribute's value is already specified in
.html and the number of  tag doesn't change. I know there is a way to
specify coords value in DirectArea.java in the method below:

protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
{
if (cycle.isRewinding())
return;

Object[] parameters = 
DirectLink.constructServiceParameters(getParameters

());

IEngineService service = cycle.getEngine().getService

(Tapestry.DIRECT_SERVICE);
ILink link = service.getLink(cycle, this, parameters);

writer.beginEmpty("area");
writer.attribute("href", link.getURL());

renderInformalParameters(writer, cycle);
}

I can write "writer.attribute("coords", "10, 10 10,10");" after
"writer.attribute("href", link.getURL());"
but since DirectArea is a component, everytime I use DirectArea component,
the coords value would be same, that even makes it worse than specifying the
coords's value in .html, because for each 
one can specify the coords'value differently.

Do I have to create a new custome component of my own, if so, can I extend
the DirectArea component's feature, modify the DirectArea.java and How ? or
any other ways to solve the problem?

thanks very much...




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Family Tree web app problem with image map using Tapestry 4..

2006-07-06 Thread Ron Piterman

Alex Tian wrote:

hi, everyone, I know it's gonna be a lenthy statement below, but I
desperately need help...

my task actually is to build a "family tree" web application, for
simplicity, e.g. User enters his/her name and his relatives'names (e.g. his
parents' names and children's names ) and sumbit the form (triggers a
listener in that page's .java file). What I do is generate a tree-like image
to show the relations among them (use only rectangles with lines to connect
them, on each rectangle write proper family member's name which the user
entered) and display it on the page and use image map to make those
rectangles on the image clickable (e.g. user can link to a person's detail
page), because the I don't know what relations will be among those family
members and how many names the user will enter, so I cannot pre-define the
coords attribute and the number of  tags for "image map".

As I said in the first post, I managed to generate the buffered image and
display it on the page, I used 2 classes and 1 interface exactly as Chart
example in Workbench example (IChartProvider.java, ChartService.java,
ChartAsset.java). and I used DirectArea custom component in Virtual Library
example implemented image map on this newly created image, the DirectArea
custom component in Virtual Library example to implement the image map so
that when user clicks a region of the image, it is just a link to another
page.

The problem now is I don't know how many 
tags will be in .html for image map and I have to specify the "coords"
attribute in each  tag myself. Because in my web app, I don't know how
many family memebers'names the user will provide( the number of  tag
is unknown) and what relations will be among them ( the rectangle's
coordinates on the image will be different everytime, so the "coords" value
in each  is unknown), say this time there should be 1  tag(1
clickable area on that image) and the coords value is "10,10 10,10", but
next time user wants 2  tags(2 clickable area on that image) and the
coords value are "20,20 20,20 ",   "30,30 30,30" that's what DirectArea.java
does not do, because the coords attribute's value is already specified in
.html and the number of  tag doesn't change. I know there is a way to
specify coords value in DirectArea.java in the method below:

protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
{
if (cycle.isRewinding())
return;

Object[] parameters = 
DirectLink.constructServiceParameters(getParameters

());

IEngineService service = cycle.getEngine().getService

(Tapestry.DIRECT_SERVICE);
ILink link = service.getLink(cycle, this, parameters);

writer.beginEmpty("area");
writer.attribute("href", link.getURL());

renderInformalParameters(writer, cycle);
}

I can write "writer.attribute("coords", "10, 10 10,10");" after
"writer.attribute("href", link.getURL());"
but since DirectArea is a component, everytime I use DirectArea component,
the coords value would be same, that even makes it worse than specifying the
coords's value in .html, because for each 
one can specify the coords'value differently.

Do I have to create a new custome component of my own, if so, can I extend
the DirectArea component's feature, modify the DirectArea.java and How ? or
any other ways to solve the problem?

thanks very much...




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Overriding Locale detection in T4

2006-06-28 Thread Ron Piterman

take a look at the wiki -> tapestry 4 -> howtos

Cheers,
Ron


Firas A. wrote:

Hello,
 
The application I'm working on needs to be fully localized, which means

correct display of language, currency, date and number formats. In my
application specification I have the following setting:
meta key="org.apache.tapestry.accepted-locales" value="en,sv" which gives
english speaking and swedish speaking users access to the application. As
for the language, the requirement is satisfied.
 
But how about the currency/dates/numbers which, as everybody knows, are

dependent on the ISO country code? Is there a way to 'help' Tapestry create
a complete locale, i.e., 'en_GB' instead of just 'en'? Ideally, this routine
should be done once per session.
 
Thanks for your time!
 

 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: dojo question

2006-06-08 Thread Ron Piterman

**/*

cheers,
Ron


Peter Dawn wrote:

hi guys,
sorry for asking an ant question. but i am trying to implement dojo
and my ant file wouldnt include all my sub-folders. i have tried *.*,
*. but to no luck. can you guys suggest something which will fix this
problem.
thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] hivemind: external xml entities in a jar?

2006-06-08 Thread Ron Piterman

Hi all,
is it possible to use external xml entities in a hivemind.xml which 
reference to a resource in the classpath ?


The hivemodule.xml is inside a jar (/META_INF/) and the extranal entity 
is in the same jar.


Thanx,
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >