Re: how to get component event source?

2012-04-14 Thread Lance Java
If the URL is the same then the zone id is the same. Im guessing that your
droppables are defined in a loop too? (I'm talking t:id not client id)

I think that the droppable mixin needs to accept a droppablecontext in a
similar way to draggablecontext and the serverside event should have both
contexts passed to it

My 2p


Re: how to get component event source?

2012-04-14 Thread Chris Mylonas
I agree with you there on droppablecontext!!!  We would have saved 20 emails 
and 20 hours!
The draggable is a component and it's easy for my novice eyes to see it's 
@Parameter.

The droppable though is a mixin for a Zone.  I thought about trying to add my 
own droppable context, but at this stage it's in the too hard basket - given 
I'd also have to screw around with the AJAX-y part.

I did however get my old custom jquery code to work with standard 
@ImportJQueryUI stuff.  The previous week I was doing it this way but had a 
problem because jquery.ui.mouse was not in the import statement and then was in 
the wrong order - which led me to the template based way of doing it because 
there was no drag-age or drop-age :(  - but this is working now :)

Going back has helped me do my things the way I had sussed out last year with 
jquery.  At least the steps for going down my own AJAX component seem easier 
going by the look at the auto complete component source code as suggested at 
the bottom of this page - https://tapestry.apache.org/ajax-and-zones.html
I can do that I think.   I took the afternoon to fix some real world things 
around the joint :)

The most of the examples from jqueryui.com I tested work @ImportJQueryUI with 
custom js - i.e. effects, accordion, dragndrop




On 14/04/2012, at 6:06 PM, Lance Java wrote:

 If the URL is the same then the zone id is the same. Im guessing that your
 droppables are defined in a loop too? (I'm talking t:id not client id)
 
 I think that the droppable mixin needs to accept a droppablecontext in a
 similar way to draggablecontext and the serverside event should have both
 contexts passed to it
 
 My 2p


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



Re: Accessing protected instrumented fields

2012-04-14 Thread Olaf Tomczak
Great news Howard,

I'll try the fix right away. Thanks for your awesome work!

--
Olaf Tomczak

2012/4/13 Steve Eynon steve.ey...@alienfactory.co.uk

 Oh sweet. That is good news, cheers!
 --
 Steve Eynon
 ---
 If at first you don't succeed,
so much for skydiving!




 On 13 April 2012 06:47, Howard Lewis Ship hls...@gmail.com wrote:
  Turns out its mutable fields that don't work.  I was fooled because my
  tests mistakenly only attempted injected fields.
 
  In any case, it is fixed in 5.3.3-rc-3.
 
  On Wed, Apr 11, 2012 at 9:20 PM, Steve Eynon
  steve.ey...@alienfactory.co.uk wrote:
  Hello,
 
  Directly accessing instrumented fields (@Parameter etc...) from
  subclasses does not work. This is fine, but I do wish T5 complained
  bitterly when it finds a instrumented field marked as non-public.
 
  Olaf found similar problems here (TAP5-1860):
 
 http://tapestry.1045711.n5.nabble.com/Protected-page-properties-confusion-td5607824.html
 
  We've come a cropper with this a couple of times when young'uns mark a
  @Parameter field as protected and accesses it from a subclass. The
  nasty gotcha being, that once the field is shadowed in DevMode, it
  works fine! But then fails spectacularly in ProdMode with an NPE as
  the actual field instance is never set!
 
  I know this is all related to TAP5-1801 and the T5.3.2 release but I'm
  not really sure what it was supposed to address. If, as I suspect, we
  shouldn't mark instrumented fields as protected could the
  documentation be updated to say so? (
 
 http://tapestry.apache.org/component-classes.html#ComponentClasses-InstanceVariables
  )
 
  Cheers,
 
  Steve.
  --
  Steve Eynon
  ---
  If at first you don't succeed,
 so much for skydiving!
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 
  --
  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
 
  -
  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




Re: Uploading Images!

2012-04-14 Thread loshmeey
@bhorvat

hehe actually im was at fon, finished first 2 years, and then transferred to
fit! and i am really happy with that decision :D..anyway to the problem im
having. I got the upload to work but.. 

this is the form..pretty simple

t:form t:id=form
t:upload t:id=file t:value=file validate=required /
t:submit t:id=submit value=submit /
/t:form

and java

public Object onSuccessFromForm(){

File copied = new File(/testUpload/ + file.getFileName());

file.write(copied);
return index;
}

so my problem is:
if i leave the code like this i get file not found exception, but if i
remove /testUpload/, it works just fine. So where is the file? And, i am
using glassfish that comes with netbeans to test the app, should i make
/testUpload/ folder maybe on localhost in order to save it there?

--
Best Regards
Milos

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Uploading-Images-tp5639019p5640344.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Live Class and Template Reloading using jetty and Intellij

2012-04-14 Thread Bob Harner
I haven't used IntelliJ much, but take a look at the troubleshooting
section at the bottom of
http://tapestry.apache.org/class-reloading.html if you haven't already.
 On Apr 12, 2012 8:28 AM, klausbayrhammer bayrhammer.kl...@gmail.com
wrote:

 Hey,

 Im having some trouble with the live class reloading using a jetty/intellij
 setup.

 I deploy the project as an exploded archive starting the jetty (6.1.x) via
 intellij's (10.5) jettty integration. Everything starts up just fine and
 the
 app is running. When i modify a page or tml, build the project and do a
 update classes and resources i can see that the classes are compiled
 correctly and the modified classes/jars have been updated correctly in the
 exploded archive. So far so good, but somehow jetty doesn't seem to reload
 the changed classes.

 What am I missing? I am using Tapestry 5.2.6 with production-mode disabled
 (-Dtapestry.production-mode=false)

 thanks in advance
 Klaus

 --
 View this message in context:
 http://tapestry.1045711.n5.nabble.com/Live-Class-and-Template-Reloading-using-jetty-and-Intellij-tp5634877p5634877.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

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




Re: Live Class and Template Reloading using jetty and Intellij

2012-04-14 Thread Guillaume Bodet
I'm using Tapestry together with Idea and live class reloading is just
working fine.
Launch jetty from the maven plugin, and just hit CTRL+F9 to reload pages
and components.

Regards

Guillaume


Tel.:
Fax :
+33 (0)177 721 613
+33 (0)140 130 430
P Avant d¹imprimer, pensez à l¹environnement
Ce message et toutes les pièces jointes sont établis à l'intention
exclusive de ses destinataires et sont confidentiels. L'internet ne
permettant pas d'assurer l'intégrité de ce message, Finance active décline
toute responsabilité au titre de ce message, dans l'hypothèse où il aurait
été intercepté ou modifié.


















Le 12/04/12 09:35, « klausbayrhammer » bayrhammer.kl...@gmail.com a
écrit :

Hey,

Im having some trouble with the live class reloading using a
jetty/intellij
setup.

I deploy the project as an exploded archive starting the jetty (6.1.x) via
intellij's (10.5) jettty integration. Everything starts up just fine and
the
app is running. When i modify a page or tml, build the project and do a
update classes and resources i can see that the classes are compiled
correctly and the modified classes/jars have been updated correctly in the
exploded archive. So far so good, but somehow jetty doesn't seem to reload
the changed classes.

What am I missing? I am using Tapestry 5.2.6 with production-mode disabled
(-Dtapestry.production-mode=false)

thanks in advance
Klaus

--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Live-Class-and-Template-Reloading-us
ing-jetty-and-Intellij-tp5634877p5634877.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
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



Re: Uploading Images!

2012-04-14 Thread loshmeey
soo, i added the code you gave me for example, and i still keep getting file
not found exception. I made folder images in project folder and it still
keeps popping up..so, can anyone help me out with this ? :)

--
Best Regards
Milos

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Uploading-Images-tp5639019p5640721.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Tapestry with Spring

2012-04-14 Thread arterzatij
Hi,

I'm currently doing some similar integration.

First thing, while loading services the spring bean is loaded.

This is the log info 

code[DEBUG] spring.TapestryBeanFactory Creating shared instance of
singleton bean 'loginService'
[DEBUG] spring.TapestryBeanFactory Creating instance of bean 'loginService'
[DEBUG] spring.TapestryBeanFactory Eagerly caching bean 'loginService' to
allow for resolving potential circular references
[DEBUG] spring.TapestryBeanFactory Finished creating instance of bean
'loginService'
/code

Second, when I'm trying to inject it into a class. It simply does not
injected I'm getting a null service...

and this is the way i'm currently injecting the service:

code
@Inject
private LoginService loginService;
/code

BTW, the current class that I'm trying to inject this Spring Bean is a class
Service that use the Tapestry Spring-Security to do the authentication.

There are some stuff that I missing?

Hope some could help me.

Thanks in advance.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-with-Spring-tp5574749p5640804.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.

2012-04-14 Thread netdawg
I posted in Tomcat forum and got this response - have not tested - posting
here as-is, use at your own risk: 

 If a file named index.jsp is declared as a welcome and it is not there in
 the system, 
 tomcat does not allow failover to framework like Tapestry.

It sounds like behaviour that can be controlled by resourceOnlyServlets
option in Context,
See  http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

The current behaviour is caused by compatibility concerns with earlier
versions of Tomcat. Read the doc for more details.


  However, if a file named Bienvenue.jsp is declared as welcome file, the
 failover is allowed.

Unlikely. You have to provide specific example to confirm that. The above
mentioned option could explain that as well.

 Howeverwelcome-file-list /
 is ignored and server picks up default values in
 ${Tomcat.home}/conf/web.xml

conf/web.xml is not just default. It is merged with app's web.xml using the
rules for merging web fragments, as specified in the Servlet 3.0 Rev.a
specification.  If current behaviour contradicts with
specification, please cite what point in merging algorithm is not followed.

Best regards,
Konstantin Kolinko

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5641083.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Uploading Images!

2012-04-14 Thread bhorvat
I am not sure where do you get an error, when you upload a file or when you
try to display it? 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Uploading-Images-tp5639019p5641121.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Uploading Images!

2012-04-14 Thread loshmeey
right, sorry i forgot to mention the important part! It happens when i click
submit..i still didn`t figure out why it pops up or how ti fix it :/

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Uploading-Images-tp5639019p5641284.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



File System Asset Factory help needed and petition wanted

2012-04-14 Thread bhorvat
Hi all,

I am trying to write an file system asset. Before I get to the problem, does
anyone has any idea why that is not included? It seems to me that this is
not something that the users should write for them selves, right? If someone
has a better approach or a solution to my problem please let me know?

After looking online I have found an old bug jira in tapestry with possible
solution 

https://issues.apache.org/jira/browse/TAP5-423

I have taken that solution and reimplemented it, removed some more complex
thing that I dont need (this was first imagined as tapestry patch so it
modifies some core classes so I have write it without that). The java files
can be found below. 

http://tapestry.1045711.n5.nabble.com/file/n5641308/AssetPathPrefixAliasMap.java
AssetPathPrefixAliasMap.java 
http://tapestry.1045711.n5.nabble.com/file/n5641308/FileAssetAliasManager.java
FileAssetAliasManager.java 
http://tapestry.1045711.n5.nabble.com/file/n5641308/FileAssetAliasManagerImpl.java
FileAssetAliasManagerImpl.java 
http://tapestry.1045711.n5.nabble.com/file/n5641308/FileAssetFactory.java
FileAssetFactory.java 
http://tapestry.1045711.n5.nabble.com/file/n5641308/FileBindingFactory.java
FileBindingFactory.java 
http://tapestry.1045711.n5.nabble.com/file/n5641308/FileResource.java
FileResource.java 

AppModule.java

public static void bind(ServiceBinder binder) {
binder.bind(FileAssetAliasManager.class,
FileAssetAliasManagerImpl.class);
binder.bind(FileAssetFactory.class);
binder.bind(BindingFactory.class,
FileBindingFactory.class).withId(FileBindingFactory);
}

 public static void
contributeFileAssetAliasManager(MappedConfigurationString, String
configuration) {
configuration.add(images,
file:/C:/Users/borish/Documents/NetBeansProjects/flow/src/main/webapp/images/);
}

public void contributeAssetSource(MappedConfigurationString,
AssetFactory configuration,
FileAssetFactory filesystemAssetFactory) {
configuration.add(file, filesystemAssetFactory);
}

public static void contributeBindingSource(MappedConfigurationString,
BindingFactory configuration,
@InjectService(FileBindingFactory) BindingFactory
fileBindingFactory) {
configuration.add(file, fileBindingFactory);
}

Usage example

  ${file:images/logo.png} 

So this works in a way that it compiles and I can run the application. The
file path is written ok, and I can see in that paths is converted as it
should be. However in the browser I get an error that says 

Resource interpreted as Image but transferred with MIME type text/html

I am now quite sure why is this happening? Any ideas? 

I am hoping that a lot of users will get onto this as I think that it should
be part of tapestry :D
Also how can someone become a contributor to the tapestry?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/File-System-Asset-Factory-help-needed-and-petition-wanted-tp5641308p5641308.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: File System Asset Factory help needed and petition wanted

2012-04-14 Thread bhorvat
And once more I am hoping that this can be added to the tapestry? So if
someone has any ideas why it should please let me know

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/File-System-Asset-Factory-help-needed-and-petition-wanted-tp5641308p5641311.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Not serializable: org.apache.tapestry5.tree.TreeExpansionModel

2012-04-14 Thread Felix Gonschorek
Hi all,

i'am currently trying to improve our tapestry application framework to
support session persistence across server restarts (and maybe across
multiple nodes in our server farm in the future).

i managed to made it to change all our own business objects that are
stored in the session to implement the interface serializable, so that
the session manager of our servlet container (jetty 8) can store it to
the file system.

the class org.apache.tapestry5.tree.DefaultTreeExpansionModel which is
used in the 5.3.2 Tree component to save the tree state is not
serializable. i can't replace the model without extending and changing
the whole tree component. The DefaultTreeExpansionModel implements the
interface org.apache.tapestry5.OptimizedSessionPersistedObject which
letst one assume, that a optimized session management is desired.

There are no fields in the class (or superclass) that are not
serializable, so as far as i can see a proper solution would be to just
add the Serializable interface and everyhting should be fine.

Is it okay to open a jira task for this? I would highly appreciate this
fix for the next version of tapestry.


Thanks,

Felix

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



Re: Uploading Images!

2012-04-14 Thread bhorvat
Here you go a simple code that works

http://tapestry.1045711.n5.nabble.com/file/n5641351/A.java A.java 
http://tapestry.1045711.n5.nabble.com/file/n5641351/A.tml A.tml 

Just make sure that you have a folder named testUpload

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Uploading-Images-tp5639019p5641351.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Not serializable: org.apache.tapestry5.tree.TreeExpansionModel

2012-04-14 Thread Kalle Korhonen
Sounds reasonable to me, please open a jira.

Kalle


On Sat, Apr 14, 2012 at 5:07 PM, Felix Gonschorek fe...@netzgut.net wrote:
 Hi all,

 i'am currently trying to improve our tapestry application framework to
 support session persistence across server restarts (and maybe across
 multiple nodes in our server farm in the future).

 i managed to made it to change all our own business objects that are
 stored in the session to implement the interface serializable, so that
 the session manager of our servlet container (jetty 8) can store it to
 the file system.

 the class org.apache.tapestry5.tree.DefaultTreeExpansionModel which is
 used in the 5.3.2 Tree component to save the tree state is not
 serializable. i can't replace the model without extending and changing
 the whole tree component. The DefaultTreeExpansionModel implements the
 interface org.apache.tapestry5.OptimizedSessionPersistedObject which
 letst one assume, that a optimized session management is desired.

 There are no fields in the class (or superclass) that are not
 serializable, so as far as i can see a proper solution would be to just
 add the Serializable interface and everyhting should be fine.

 Is it okay to open a jira task for this? I would highly appreciate this
 fix for the next version of tapestry.


 Thanks,

 Felix

 -
 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



Re: Tapestry with Spring

2012-04-14 Thread Jonathan Barker
If you are injecting into a service (and not a page) then you want to
have a service constructor that takes a LoginService parameter.  The
injection style you have used is for Pages and Components.

On Sat, Apr 14, 2012 at 11:56 AM, arterzatij arterza...@gmail.com wrote:
 Hi,

 I'm currently doing some similar integration.

 First thing, while loading services the spring bean is loaded.

 This is the log info

 code[DEBUG] spring.TapestryBeanFactory Creating shared instance of
 singleton bean 'loginService'
 [DEBUG] spring.TapestryBeanFactory Creating instance of bean 'loginService'
 [DEBUG] spring.TapestryBeanFactory Eagerly caching bean 'loginService' to
 allow for resolving potential circular references
 [DEBUG] spring.TapestryBeanFactory Finished creating instance of bean
 'loginService'
 /code

 Second, when I'm trying to inject it into a class. It simply does not
 injected I'm getting a null service...

 and this is the way i'm currently injecting the service:

 code
        @Inject
        private LoginService loginService;
 /code

 BTW, the current class that I'm trying to inject this Spring Bean is a class
 Service that use the Tapestry Spring-Security to do the authentication.

 There are some stuff that I missing?

 Hope some could help me.

 Thanks in advance.

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Tapestry-with-Spring-tp5574749p5640804.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

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




-- 
Jonathan Barker
ITStrategic

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