object based security (owner)

2014-03-14 Thread Ken in Nashua
Hi Folks,

I want to create a web site data model whereby... whatever a user creates... 
they own.

And when they come back to the website to operate again... they will see only 
what they own.

Its not as much as page based security as it is object based security... as in 
model object.

Are there annotations available or mechanisms within tapestry-security to 
perform this in one hit so I can just put it at the top of my class (an 
annotation) or page and operate only on what the owner created ?

Thanks
  

Re: working with DOM and text for implementing realtime chat

2014-03-14 Thread Boris Horvat
yea I am using tapestry-cometd with jquery currently so once I do the
migration I will use 5.4/jquery.

Thanks. I will try this in couple of weeks and see what happens :)

Cheers


On Fri, Mar 14, 2014 at 7:55 PM, Lance Java wrote:

> Hi Boris, I haven't had either running under 5.4. I'm guessing by 5.4 you
> really mean 5.4/jquery?
>
> Im guessing tapestry-atmosphere would work with 5.4/prototype. I think
> there's a single line of js that relies on prototype's json utils which
> will need to be tweaked to the jquery equivalent.
>
> tapestry-cometd should work as is under 5.4/jquery.
>



-- 
Sincerely
*Boris Horvat*


Re: Caching of assets (js libraries, css etc.)

2014-03-14 Thread Luke Wilson-Mawer
OK, thanks for this. Seems like we're probably safe.

Thanks,

Luke


On Fri, Mar 14, 2014 at 5:32 PM, Howard Lewis Ship  wrote:

> For normal assets, the URL directly includes a content hash value.  This
> covers stylesheets, images, fonts, and JavaScript libraries.  In addition,
> assets provide both far-future expires headers and ETags, to assist with
> caching in the client or intermediate servers.
>
> Modules are a bit different because they can't include the content hash, as
> the content hash would then be part of the name of the module. So no
> content hash in module URLs, and no far-future expires header (since an
> upgrade of the app may change the module).  However, there's still ETags
> support, so most module requests are quickly responded to with a 304 status
> code.
>
>
> On Fri, Mar 14, 2014 at 9:35 AM, Luke Wilson-Mawer <
> lukewilsonma...@gmail.com> wrote:
>
> > In previous version the asset URLs contained the version, so they would
> > change each time the version changed. In 5.4 this doesn't seem to be the
> > case.
> >
> > Am I mistaken? If not, is this by design? And what's to stop assets being
> > cached between releases of different versions of the software?
> >
> > Kind regards,
> >
> > Luke
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>


Re: 5.4-beta3 JavaScript backward compatibility issue? - Tynamo CKEditor 0.0.1 with tapestry 5.4-beta3 does not seem to work

2014-03-14 Thread Dragan Sahpaski
Hi Balázs,
You're right and it is a bug in tapestry.
JavaScriptSupport.addInitializerCall is not backwards compatible when using
a JSONArray. I filled a JIRA with a patch
https://issues.apache.org/jira/browse/TAP5-2300 so please follow. I hope it
get's resolved soon. If not I'll probably release a new version of
tapestry-ckeditor. I wan't it to be compatible with 5.4 ASAP.

​Thanks for reporting this one and for the debugging info.

Cheers,
Dragan Sahpaski


On Thu, Mar 13, 2014 at 7:22 PM, Balázs Palcsó wrote:

> Hi All,
>
> I am trying to use tynamo/ckeditor mixin. Here is the template code:
>
>  t:mixins="tynamo/ckeditor" parameters="{'toolbar': 'Full'}" />
>
>
> I get the following error
> Invoking t5/core/init("initCKEditor", ["description",{"toolbar":"Full"}])
>
>1. RequireJS error: require: Cannot set property 'visibility' of
>undefined console.js:109<
> http://localhost:8080/AjanlatotKapok.hu/modules.gz/t5/core/console.js>
>   1. (anonymous
> function)console.js:109<
> http://localhost:8080/AjanlatotKapok.hu/modules.gz/t5/core/console.js>
>   2. requirejs.onErrorconsole.js:136<
> http://localhost:8080/AjanlatotKapok.hu/modules.gz/t5/core/console.js>
>   3. onErrorrequire.js:537<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   4. Module.checkrequire.js:886<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   5. (anonymous
> function)require.js:1113<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   6. (anonymous
> function)require.js:132<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   7. (anonymous
> function)require.js:1156<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   8. eachrequire.js:57<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   9. Module.emitrequire.js:1155<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   10. Module.checkrequire.js:917<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   11. Module.enablerequire.js:1143<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   12. Module.initrequire.js:774<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   13. callGetModulerequire.js:1170<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   14. context.completeLoadrequire.js:1544<
> http://localhost:8080/AjanlatotKapok.hu/assets/meta/z87656c56/tapestry5/require.js
> >
>   15. context.onScriptLoad
>
>
>
> After some JavaScript debugging I found that
> Tapestry.Initializer.initCKEditor is called with incorrect arguments.
>
> Tapestry.Initializer.initCKEditor = function(textareaId, ckeditorInitJSON)
> {
>
> arguments when it gets called:
>
>1. ckeditorInitJSON: undefined
>2. textareaId: Array[2]
>   1. 0: "description"
>   2. 1: Object
>  1. toolbar: "Full"
>  2. __proto__: Object
>   3. length: 2
>   4. __proto__: Array[0]
>
>
> The correct would be this I assume
>
>1. ckeditorInitJSON: Object
>2.toolbar: "Full"
>3.  __proto__: Object
>4. textareaId: "description"
>
>
> It looks like to me that the module initialization is not backward
> compatible.
> Is this known/expected? Shall I raise a JIRA?
>
> Thanks and regards,
> Balazs Palcso
>


Re: working with DOM and text for implementing realtime chat

2014-03-14 Thread Lance Java
Hi Boris, I haven't had either running under 5.4. I'm guessing by 5.4 you
really mean 5.4/jquery?

Im guessing tapestry-atmosphere would work with 5.4/prototype. I think
there's a single line of js that relies on prototype's json utils which
will need to be tweaked to the jquery equivalent.

tapestry-cometd should work as is under 5.4/jquery.


Re: working with DOM and text for implementing realtime chat

2014-03-14 Thread Boris Horvat
Lance did you had any issues running it with 5.4. I plan to update my stuff
in a month from now so just wondering is there is something to look out for
On 14 Mar 2014 09:34, "Lance Java"  wrote:

> You could use tapestry-atmosphere
> https://github.com/uklance/tapestry-atmosphere
> https://github.com/uklance/tapestry-atmosphere/wiki/PushTarget-Component
> http://tapestry-atmosphere.uklance.cloudbees.net/chatdemo (live chat demo)
>
> Or tapestry-cometd
> https://github.com/uklance/tapestry-cometd
> https://github.com/uklance/tapestry-cometd-demo (contains chat demo)
>


Re: VS: tapestry + maven + jboss tools + hot deploying ?

2014-03-14 Thread leandroaispuru
Thanks for your answers.

I found the solution in jboss forum.

In case someone faces the same problem here is the link with the correct
answer by Snjezana Peco:
https://community.jboss.org/en/tools/blog/2011/02/21/getting-started-with-jboss-tools-jboss-maven-integration-and-weld?et=blogs.comment.created#comment-13436

I was missing some jboss configuration.




2014-03-14 8:39 GMT-03:00 Thiago H de Paula Figueiredo :

> On Fri, 14 Mar 2014 04:06:04 -0300, Ville Virtanen <
> ville.virta...@orientimport.fi> wrote:
>
>  on the fly that it manages, but not the others. I've seen that Tapestry's
>> offering is enough for most setups, but I've always struggled a bit with
>> large multiproject setups, as only the main project is easy to get
>> refreshed
>> on the fly. If someone knows a way to do it, please let me know.
>>
>
> Never had a problem with that using Eclipse (I haven't tried the other
> IDEs for a long time) and RunJettyRun or an embedded Jetty instance (one
> created programatically, very easy to do). Maven's jetty:run sucks
> incredibly hard for debugging and multiproject setups. Just make sure the
> main project has the other as dependencies, manually in Eclipse or
> automatically through the Maven plugin.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Caching of assets (js libraries, css etc.)

2014-03-14 Thread Howard Lewis Ship
For normal assets, the URL directly includes a content hash value.  This
covers stylesheets, images, fonts, and JavaScript libraries.  In addition,
assets provide both far-future expires headers and ETags, to assist with
caching in the client or intermediate servers.

Modules are a bit different because they can't include the content hash, as
the content hash would then be part of the name of the module. So no
content hash in module URLs, and no far-future expires header (since an
upgrade of the app may change the module).  However, there's still ETags
support, so most module requests are quickly responded to with a 304 status
code.


On Fri, Mar 14, 2014 at 9:35 AM, Luke Wilson-Mawer <
lukewilsonma...@gmail.com> wrote:

> In previous version the asset URLs contained the version, so they would
> change each time the version changed. In 5.4 this doesn't seem to be the
> case.
>
> Am I mistaken? If not, is this by design? And what's to stop assets being
> cached between releases of different versions of the software?
>
> Kind regards,
>
> Luke
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com


Caching of assets (js libraries, css etc.)

2014-03-14 Thread Luke Wilson-Mawer
In previous version the asset URLs contained the version, so they would
change each time the version changed. In 5.4 this doesn't seem to be the
case.

Am I mistaken? If not, is this by design? And what's to stop assets being
cached between releases of different versions of the software?

Kind regards,

Luke


Show and tell / New 5.4 app live.

2014-03-14 Thread George Christman
I'd like to first say thanks to all who have contributed to the on going
evolution of Tapestry and it's support. I'm a long time user of Tapestry
starting with version 3 in 2005 and I must say leaps and bounds have been
made since then. I'd also like to say thanks to all who have continued to
answer my never ending array of questions ;-) Thanks guys! It has been a
pleasure working with you all.

In 2008 we took a risk and decided to move forward with t5 beta over spring
with the development of our new app. We experienced some short lived
glorious times as we successfully processed hundreds of thousands of users
and cars, however do to our nations elected official and his cash for
clunkers program, it destroyed our market place forcing me to have to
change our brand to CarDaddy.com.

With the lack of success with the new brand I eventually had to move on to
other opportunities.  I ended up taking a job with our state government and
some contract work for a hotel wireless company, however along with my
move, I decided to bring along my dear friend Tapestry5. Tapestry5 has
ended up becoming an active platform within my organizations which we are
now actively focused on building 5.4 apps. :)

While being focused with my other work, my personal app which was still
being ran on T5.1 was lacking support and ended up getting hacked (apache)
three weeks ago by the Chinese bringing down my servers. This forced me to
have to whip up a new application over the past three weeks by myself in
5.4 and yup, that wasn't a typo, only three weeks and that includes mobile
too, okay maybe they were 3 very long weeks, but I still managed to pulled
it off and I don't think I could have without the help of T5.4, jquery,
bootstrap etc :) Well I'd like to share my new app with the community while
once again pushing out a beta app into production :) I realize there is a
lot of room for improvement, so feel free to suggest away. Growth seems to
be on the rise as traffic / inventory continue to increase daily and I
don't have a doubt in my mind that Tapestry won't be up for the job.

Once again, thank you guys for all you have done.

New 5.4-beta3 site
www.cardaddy.com


Cheers,
George

-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: VS: tapestry + maven + jboss tools + hot deploying ?

2014-03-14 Thread Thiago H de Paula Figueiredo
On Fri, 14 Mar 2014 04:06:04 -0300, Ville Virtanen  
 wrote:



on the fly that it manages, but not the others. I've seen that Tapestry's
offering is enough for most setups, but I've always struggled a bit with
large multiproject setups, as only the main project is easy to get  
refreshed

on the fly. If someone knows a way to do it, please let me know.


Never had a problem with that using Eclipse (I haven't tried the other  
IDEs for a long time) and RunJettyRun or an embedded Jetty instance (one  
created programatically, very easy to do). Maven's jetty:run sucks  
incredibly hard for debugging and multiproject setups. Just make sure the  
main project has the other as dependencies, manually in Eclipse or  
automatically through the Maven plugin.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: working with DOM and text for implementing realtime chat

2014-03-14 Thread Lance Java
You could use tapestry-atmosphere
https://github.com/uklance/tapestry-atmosphere
https://github.com/uklance/tapestry-atmosphere/wiki/PushTarget-Component
http://tapestry-atmosphere.uklance.cloudbees.net/chatdemo (live chat demo)

Or tapestry-cometd
https://github.com/uklance/tapestry-cometd
https://github.com/uklance/tapestry-cometd-demo (contains chat demo)


working with DOM and text for implementing realtime chat

2014-03-14 Thread John
Hi,

I'm trying to emulate something like Facebooks chat facility. I need to display 
a list of messages that make up a conversation.

Every so often I want to append any new messages to the end of the list. I also 
need all of the output text fully escaped so that \n becomes  and so forth.

How should I approach achieving this with a tapestry component.

John

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


VS: tapestry + maven + jboss tools + hot deploying ?

2014-03-14 Thread Ville Virtanen
Live class reloading works in JBoss too, at least the last time I used it.
(7.x.x) You have to make your IDE to compile directly to the web container
exploded directory structure. This is specific to your IDE / web container,
and not really Tapestry. 

First of all read this: https://tapestry.apache.org/class-reloading.html
especially "Troubleshooting Live Class Reloading" and "If Live Class
Reloading doesn't work". 

https://www.google.fi/search?q=eclipse+compile+on+save 
https://www.google.fi/search?q=eclipse+change+output+directory 

If you want full code-refresh-view cycle, you should look at
http://zeroturnaround.com/software/jrebel/ Tapestry only changes the classes
on the fly that it manages, but not the others. I've seen that Tapestry's
offering is enough for most setups, but I've always struggled a bit with
large multiproject setups, as only the main project is easy to get refreshed
on the fly. If someone knows a way to do it, please let me know.

I don't think the question was about HA, but here goes nothing: if you're
going to have high availability site, you should have multiple backend
servers that you can bounce one by one. Have your load balancer(s) to
automaticly ping back end servers and drop dead ones and add resurrecting
back, remember to replicate session or go stateless. The services behind the
web application servers must also be ofcourse clustered and accessed through
LB ip address for an example.

In that setup you can freely stop and start nodes, provided that the
remaining ones have enough power to serve incoming requests. Script you
deployment so that it automaticly stops a node, redeploys, starts it back
up, moves to next node after your monitoring tells the node is back online,
otherwise retries. The tools to make this happen may include nagios
(http://www.nagios.org/), new relic (http://newrelic.com/), chef
(http://www.getchef.com/chef/) / puppet (http://puppetlabs.com/)

Ville

-Alkuperäinen viesti-
Lähettäjä: Geoff Callender [mailto:geoff.callender.jumpst...@gmail.com] 
Lähetetty: 14. maaliskuuta 2014 2:30
Vastaanottaja: Tapestry users
Aihe: Re: tapestry + maven + jboss tools + hot deploying ?

I've never had to operate a high-availability site, so I've not needed to
deal with this. I've always had a maintenance window available.

Some years ago I used to develop in JBoss with an expanded EAR, and hot
deploy worked fine, with the usual caveat that eventually you'll get PermGen
errors.

Cheers,

Geoff

On 14/03/2014, at 5:32 AM, leandroaisp...@gmail.com wrote:

> Hi all,
> 
> I got the following scenario,
> 
> - A Tapestry 5.3 web application called project A (contains tml files, 
> java pages files, and common web files)
> - A Business logic project called B (Business services)
> - A Model project called C (pojos with hibernate annotations and daos)
> 
> - I manage project dependencies with Maven 2.
> 
> - I deploy project from eclipse(Juno) using Jboss Tools(1.4.0) and 
> Jboss Tools Maven Integration(1.4.0) to a Wildfly 8.0.1 server .
> 
> In order to deploy web application i have created a new server (jboss 
> server type).
> I run my A project into the mentioned server.
> 
> All is working fine except i want tml files changes to be taken on the 
> fly without the automatically  re deploying of the application.
> 
> Questions:
> 1) Is there a way to change tml and java files on project A  without 
> the need of redeploying the whole app??
> 
> The server configuration has an option to publish  the project 
> (re-deploy) when a resource has changed. But it redeploys the whole 
> application also when i change tml files from project A. The worst 
> part is that session data get lost and i have to re login to application
and complete forms again.
> 
> If i chose "Never publish automatically" none of my changes are seen 
> by server.
> 
> 2) If answer to question 1 is positive now i want to know if is there 
> a way to change and compile project B and C classes and see the 
> changes without redeployng web application?
> 
> 
> 3) I know Tapestry's Jumpstart application works on JBoss/Wildfly does 
> anyone knows if T5's class reloading works in JBoss?
> At least it's not working for me,  Geoff do you have any thoughts on 
> this topic?
> 
> cheers and thanks in advance!
> 
> Leandro.


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



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