RE: Contains a child component with id
Thanks Lava! :) > Date: Wed, 12 Jun 2013 15:38:40 +0100 > Subject: Re: Contains a child component with id > From: lance.j...@googlemail.com > To: users@tapestry.apache.org > > You can't have 2 components on the page with the same id. > > Use eventlink instead of the deprecated actionlink. Both links can then > have the same event. > On 12 Jun 2013 15:29, "Nomen Nomanum" wrote: > > > Hi! I have implemented following scenario: > > > > based on the following result > > > > public boolean getOutcome(){ > > return article.getOutcomevalue() == 1; > > } > > > > public Article getArticleSpecific(){ > > return article; > > } > > > > > > to render my page > > > > > > > > > > > > > > > > > > > > However, it complains "... contains a child component with id > > 'articleSpecific'
Re: SymbolConstant to handle multiple app stages
http://tapestry.apache.org/configuration.html#Configuration-SettingExecutionModes On Wednesday, June 12, 2013, George Christman wrote: > Hello, I see a symbol constant for production mode, does Tapestry have a > way to handle a third? For example dev, staging, prod? > > Thanks, > George > -- Dmitry Gusev AnjLab Team http://anjlab.com
SymbolConstant to handle multiple app stages
Hello, I see a symbol constant for production mode, does Tapestry have a way to handle a third? For example dev, staging, prod? Thanks, George
Re: symbol not defined
http://tapestry.apache.org/symbols.html On Wed, Jun 12, 2013 at 7:44 PM, Dmitry Gusev wrote: > Just set the value of the symbol, try adding this via system properties: > > -Dtapestry.execution-mode=production > > > On Wed, Jun 12, 2013 at 7:41 PM, George Christman > wrote: > >> It's funny you ask this question, I was just about to ask a similar one >> about getting production mode. >> >> >> On Wed, Jun 12, 2013 at 11:28 AM, John wrote: >> >> > This code blows up on production system, but is fine on dev and qa! How >> > should I fix it? >> > >> > John >> > >> > /** The execution mode. */ >> > @Inject >> > @Symbol(SymbolConstants.EXECUTION_MODE) >> > private String exeMode; >> > >> > org.apache.tapestry5.ioc.internal.OperationException: Symbol >> > 'tapestry.execution-mode' is not defined. >> >> >> >> >> -- >> George Christman >> www.CarDaddy.com >> P.O. Box 735 >> Johnstown, New York >> > > > > -- > Dmitry Gusev > > AnjLab Team > http://anjlab.com > -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: symbol not defined
Just set the value of the symbol, try adding this via system properties: -Dtapestry.execution-mode=production On Wed, Jun 12, 2013 at 7:41 PM, George Christman wrote: > It's funny you ask this question, I was just about to ask a similar one > about getting production mode. > > > On Wed, Jun 12, 2013 at 11:28 AM, John wrote: > > > This code blows up on production system, but is fine on dev and qa! How > > should I fix it? > > > > John > > > > /** The execution mode. */ > > @Inject > > @Symbol(SymbolConstants.EXECUTION_MODE) > > private String exeMode; > > > > org.apache.tapestry5.ioc.internal.OperationException: Symbol > > 'tapestry.execution-mode' is not defined. > > > > > -- > George Christman > www.CarDaddy.com > P.O. Box 735 > Johnstown, New York > -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: symbol not defined
It's funny you ask this question, I was just about to ask a similar one about getting production mode. On Wed, Jun 12, 2013 at 11:28 AM, John wrote: > This code blows up on production system, but is fine on dev and qa! How > should I fix it? > > John > > /** The execution mode. */ > @Inject > @Symbol(SymbolConstants.EXECUTION_MODE) > private String exeMode; > > org.apache.tapestry5.ioc.internal.OperationException: Symbol > 'tapestry.execution-mode' is not defined. -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
symbol not defined
This code blows up on production system, but is fine on dev and qa! How should I fix it? John /** The execution mode. */ @Inject @Symbol(SymbolConstants.EXECUTION_MODE) private String exeMode; org.apache.tapestry5.ioc.internal.OperationException: Symbol 'tapestry.execution-mode' is not defined.
Re: Contains a child component with id
You can't have 2 components on the page with the same id. Use eventlink instead of the deprecated actionlink. Both links can then have the same event. On 12 Jun 2013 15:29, "Nomen Nomanum" wrote: > Hi! I have implemented following scenario: > > based on the following result > > public boolean getOutcome(){ > return article.getOutcomevalue() == 1; > } > > public Article getArticleSpecific(){ > return article; > } > > > to render my page > > > > > > > > > > However, it complains "... contains a child component with id > 'articleSpecific'
Contains a child component with id
Hi! I have implemented following scenario: based on the following result public boolean getOutcome(){ return article.getOutcomevalue() == 1; } public Article getArticleSpecific(){ return article; } to render my page However, it complains "... contains a child component with id 'articleSpecific'
Re: best way of incorporating static pages?
I would use new URL("http://localhost/static"; + path).openStream() to fetch the data instead of File(). Leave the security up to Tomcat. On Wed, Jun 12, 2013 at 7:01 AM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Wed, 12 Jun 2013 07:08:10 -0300, John wrote: > > Hi, >> > > Hi! > > > I have a need to link to some static HTML generated by a CMS app. >> Assuming this content is in a directory outside my Tapestry app, what would >> be the best way of linking/serving it via Tapestry? >> > > I'd create a page that receives the file name or path in the activation > context and returns a StreamResponse wrapping the file (which is probably > in a fixed folder or its subfolders). Pay attention to security, refusing > file names or paths with '..' (without the quotes) on it so no file outside > the HTML folder is ever returned. > > -- > Thiago H. de Paula Figueiredo > > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: best way of incorporating static pages?
On Wed, 12 Jun 2013 07:08:10 -0300, John wrote: Hi, Hi! I have a need to link to some static HTML generated by a CMS app. Assuming this content is in a directory outside my Tapestry app, what would be the best way of linking/serving it via Tapestry? I'd create a page that receives the file name or path in the activation context and returns a StreamResponse wrapping the file (which is probably in a fixed folder or its subfolders). Pay attention to security, refusing file names or paths with '..' (without the quotes) on it so no file outside the HTML folder is ever returned. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Embedding content from separate modules (a.k.a plugins)
On Tue, 11 Jun 2013 23:15:21 -0300, Ilya Obshadko wrote: Ok. It's interesting however - if I declare an inner class inside a page class, is it going to be accessible via URL? No. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: best way of incorporating static pages?
Hi John I use (basically) OutputRaw for something similar. You can either try to use a regex to strip all unwanted elements from the CMS html or mark a div or introduce a new element (easier to exactly find the content and drop the rest). Unfortunately most work is related to "links": you have to make CMS links compatible to the Tapestry way. So write a component which accepts the url/name/id of your CMS content as parameter and when rendering load the page, strip unwanted content and uses OutputRaw to stream the CMS data in your page. Furthermore I propose you cache the stripped content (use guava cache for example) to avoid accesing a slow CMS on each request. Jens Sent from my iPhone On 12.06.2013, at 12:08, "John" wrote: > Hi, > > I have a need to link to some static HTML generated by a CMS app. Assuming > this content is in a directory outside my Tapestry app, what would be the > best way of linking/serving it via Tapestry? > > Perhaps I should just configure a seperate Jetty context and provide absolute > URLs in someway? > > I'd also consider the static content being part of the projects Java > resources, not so keen though. > > John - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
best way of incorporating static pages?
Hi, I have a need to link to some static HTML generated by a CMS app. Assuming this content is in a directory outside my Tapestry app, what would be the best way of linking/serving it via Tapestry? Perhaps I should just configure a seperate Jetty context and provide absolute URLs in someway? I'd also consider the static content being part of the projects Java resources, not so keen though. John
Re: Localization issue
This is core java and not really tapestry related. It's driven by Locale.getDefault() http://stackoverflow.com/questions/8809098/how-do-i-set-the-default-locale-for-my-jvm