Re: Lightweight TapestryTools update site

2012-04-13 Thread Gavin Lei
This problem is fixed already, now TapestryTools will search for
partner file like this:

1. same package
2. same root directory
3. other places in the project

In Maven case, now it will always find corresponding file in src folder.

在 2012年4月14日 上午9:39,Gavin Lei  写道:
> Hi Giulio,
>
> Use isDerived can judge one file is generated by Maven or not, this
> will real work in this situation. But tml file in source code and java
> file in source code are in the same root directory, my search
> algorithm should find tml file in source code file first, then return.
> Currently, it found tml in target file first, i will also correct this
> issue.
>
> 2012/4/14 Giulio Micali :
>> Hi Gavin,
>> I gave a look at the code compared to my old patch, looks like 2 lines of
>> code are missing (the dirty ones in my patch):
>>
>> ### Eclipse Workspace Patch 1.0
>> #P org.apache.tapestrytools.ui
>> Index:
>> src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java
>> ===
>> ---
>> src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java
>> (revision 301)
>> +++
>> src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java
>> (working copy)
>> @@ -114,6 +114,9 @@
>> private void travelAllFolder(IResource[] fileList, String fileName)
>> throws CoreException{
>> for(int i=0; i> IResource eachFile = fileList[i];
>> +boolean isTargetFolder = eachFile.isDerived();
>> +if (isTargetFolder) continue; // we should skip non-source
>> paths
>> +
>> if(eachFile.getType() == IResource.FILE &&
>> eachFile.getName().equals(fileName)){
>> this.partenerFile = eachFile.getFullPath().toString();
>> return ;
>>
>>
>> I'm not sure if "isDerived()" is the right method or if the condition must
>> be more complicated, but it seems to work for me now.
>>
>>
>> Cheers,
>> Giulio
>
>
>
> --
> -
> Best Regards
> Gavin Lei (雷银)
> Email: gavingui2...@gmail.com



-- 
-
Best Regards
Gavin Lei (雷银)
Email: gavingui2...@gmail.com

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



Re: Lightweight TapestryTools update site

2012-04-13 Thread Gavin Lei
My bad, I have fix it already, now you can find "Tapestry Switch"
command in preferences/general/keys, i will upload new package to the
update site soon, just see attach file

在 2012年4月14日 上午6:48,Kalle Korhonen  写道:
> Thanks Gavin. However, there's something fishy in how the key binding
> is implemented. It doesn't appear in the preferences/general/keys
> list. You can see the Tapestry command if you look what it's
> conflicting with (by default CTRL+R is assigned to "Run Tests" and
> "Run to Line" for debug) and it appears you cannot re-assign the
> Tapestry key to something else. I think the default should be
> something different that's less likely to conflict with existing
> defaults.
>
> Kalle
>
>
> 2012/4/13 Gavin Lei :
>> Hi all,
>>
>> I have finished Template/Java switch feature (Shortcuts is still CTRL
>> + R) for TapestryTools, and uploaded the feature into Tapestry update
>> center[1], if you have interested, please have a trial of it. Install
>> guide can be found here[2].
>>
>> Feedback are welcome here :-)
>>
>> [1] http://tapestrytools.googlecode.com/svn/TapestryTools/
>> [2] 
>> http://code.google.com/p/tapestrytools/wiki/Install_Guide_Lightweight_TapestryTools
>>
>> 在 2012年4月11日 下午2:44,Kalle Korhonen  写道:
>>> Excellent timing then, thanks Gavin.
>>>
>>> Kalle
>>>
>>>
>>> 2012/4/10 Gavin Lei :
 Hi Kalle,

 the template/java switch shortcut will come true in the 2-3 days, I am just
 working for it now:-)


>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>
>>
>>
>> --
>> -
>> Best Regards
>> Gavin Lei (雷银)
>> Email: gavingui2...@gmail.com



-- 
-
Best Regards
Gavin Lei (雷银)
Email: gavingui2...@gmail.com


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

Re: Serving images outisde of war in tapestry

2012-04-13 Thread bhorvat
I have found some examples of this. And some JIRA reports. Does anyone have
any idea why this is not included into the tapestry itself? It seems to me
that this is somewhat important since it is not a good idea to store the
images into the war file itself.

Any one have any idea if file system approach should be avoided if that is
why this is not a part of the tapestry itself, especially since there is a
community desire for it 

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

cheers

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Serving-images-outisde-of-war-in-tapestry-tp5637138p5639915.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-13 Thread bhorvat
Hej Milos I am also from Serbia (well I have moved now) but I have graduate
from the FON (since you are using the tapestry and if you are on them
faculty then I know your professor - personally)

I will give you some example code so that you can figure things out and if
you need more help feel free to reach out.

So what you need is in your .tml

 

  
 

in your java file you would then have

@Inject
private ApplicationGlobals appGlobals;
@Property
private UploadedFile uploadImage;


@OnEvent(value = EventConstants.SUCCESS, component = "form")
void processForm() {

if (uploadImage!= null) {
String fileName = uploadImage.getFileName());
File copied = new
File(appGlobals.getServletContext().getRealPath("/images/") + "/" +
fileName);
uploadImage.write(copied);
} 
}

So above you check if the file is uploaded and then u get the name, and move
the file to a location where you want it

Hope this gives you a simpel example to try it out

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Uploading-Images-tp5639019p5639912.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: Javadoc not in the maven builds of the tapestry 5.3

2012-04-13 Thread Chris Mylonas
Good man!
Thanks Howard,


On 14/04/2012, at 11:36 AM, Howard Lewis Ship wrote:

> 5.3.3 will include a downloadable source zip and a javadoc zip in
> addition to the binary zip.  This change has already been made.
> 
> On Thu, Apr 12, 2012 at 9:01 PM, Chris Mylonas  wrote:
>> This would be great!
>> 
>> +1
>> 
>> 
>> On 13/04/2012, at 1:56 PM, bhorvat wrote:
>> 
>>> I second this. Is it hard to include that?
>>> Or is there a way for us to include it ourselves?
>>> 
>>> regards
>>> 
>>> --
>>> View this message in context: 
>>> http://tapestry.1045711.n5.nabble.com/Javadoc-not-in-the-maven-builds-of-the-tapestry-5-3-tp4696293p5637306.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
>> 
> 
> 
> 
> -- 
> 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: Lightweight TapestryTools update site

2012-04-13 Thread Gavin Lei
Hi Giulio,

Use isDerived can judge one file is generated by Maven or not, this
will real work in this situation. But tml file in source code and java
file in source code are in the same root directory, my search
algorithm should find tml file in source code file first, then return.
Currently, it found tml in target file first, i will also correct this
issue.

2012/4/14 Giulio Micali :
> Hi Gavin,
> I gave a look at the code compared to my old patch, looks like 2 lines of
> code are missing (the dirty ones in my patch):
>
> ### Eclipse Workspace Patch 1.0
> #P org.apache.tapestrytools.ui
> Index:
> src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java
> ===
> ---
> src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java
> (revision 301)
> +++
> src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java
> (working copy)
> @@ -114,6 +114,9 @@
> private void travelAllFolder(IResource[] fileList, String fileName)
> throws CoreException{
> for(int i=0; i IResource eachFile = fileList[i];
> +boolean isTargetFolder = eachFile.isDerived();
> +if (isTargetFolder) continue; // we should skip non-source
> paths
> +
> if(eachFile.getType() == IResource.FILE &&
> eachFile.getName().equals(fileName)){
> this.partenerFile = eachFile.getFullPath().toString();
> return ;
>
>
> I'm not sure if "isDerived()" is the right method or if the condition must
> be more complicated, but it seems to work for me now.
>
>
> Cheers,
> Giulio



-- 
-
Best Regards
Gavin Lei (雷银)
Email: gavingui2...@gmail.com

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



Re: Javadoc not in the maven builds of the tapestry 5.3

2012-04-13 Thread Howard Lewis Ship
5.3.3 will include a downloadable source zip and a javadoc zip in
addition to the binary zip.  This change has already been made.

On Thu, Apr 12, 2012 at 9:01 PM, Chris Mylonas  wrote:
> This would be great!
>
> +1
>
>
> On 13/04/2012, at 1:56 PM, bhorvat wrote:
>
>> I second this. Is it hard to include that?
>> Or is there a way for us to include it ourselves?
>>
>> regards
>>
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/Javadoc-not-in-the-maven-builds-of-the-tapestry-5-3-tp4696293p5637306.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
>



-- 
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



tapestry5-jquery - @ImportJQueryUI - order of imports is important!!!

2012-04-13 Thread Chris Mylonas
Hello Tapestry List,

Firstly, Sorry to harass your inboxes the last 12 or so hours.  But I found 
something someone may want to have a look into!
I've used the draggable sample from http://docs.jquery.com/UI/Draggable

Note that jquery.ui.mouse must come before jquery.ui.draggable in the 
@ImportJQueryUI() declaration.


Here are my samples

js/draggable.js
  $(document).ready(function() {
$("#draggable").draggable();
  });

layout/draggable.css
#draggable {
width: 100px;
height: 70px;
background: silver;
}


Draggable.tml
http://tapestry.apache.org/schema/tapestry_5_3.xsd"; 
xmlns:p="tapestry:parameter">

JQuery Testing

Drag me






DOES NOT WORK  Draggable.java
@ImportJQueryUI({"jquery.ui.core", "jquery.ui.draggable", "jquery.ui.mouse"})
@Import(stylesheet="context:layout/draggable.css",library="context:js/draggable.js")
public class Draggable {

}

The errors from the javascript console in chrome are:
Uncaught TypeError: undefined is not a function
$.widgetjquery.ui.widget.js:61
(anonymous function)jquery.ui.draggable.js:17
(anonymous function)jquery.ui.draggable.js:823
draggable.js:2Uncaught TypeError: Object [object Object] has no method 
'draggable'
(anonymous function)draggable.js:2
jQuery.extend._Deferred.deferred.resolveWithjquery-1.6.2.js:1008
jQuery.extend.readyjquery-1.6.2.js:436
DOMContentLoadedjquery-1.6.2.js:915



DOES WORK!  Draggable.java
@ImportJQueryUI({"jquery.ui.core",  "jquery.ui.mouse", "jquery.ui.draggable"})
@Import(stylesheet="context:layout/draggable.css",library="context:js/draggable.js")
public class Draggable {

}

Re: how to get component event source?

2012-04-13 Thread Chris Mylonas
Good morning - thanks for the candid comments, they are welcome :D

Hacky it is.   The URL generated is the same for each component.  So I'll look 
at what Thiago suggested by passing a query parameter.
Or just let the code sit there ready to tackle it the next release :)

Cheers
Chris

On 14/04/2012, at 7:39 AM, Thiago H. de Paula Figueiredo wrote:

> On Fri, 13 Apr 2012 17:15:13 -0300, Lance Java  
> wrote:
> 
>> Well... to say it's not possible is wrong. To say it's hacky is correct ;)
> 
> Yep, that's right. I'd say Tapestry itself doesn't provide the source of the 
> event, but you can try to figure that out by looking at the URL. :)


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



Re: how to get component event source?

2012-04-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Apr 2012 17:15:13 -0300, Lance Java   
wrote:


Well... to say it's not possible is wrong. To say it's hacky is correct  
;)


Yep, that's right. I'd say Tapestry itself doesn't provide the source of  
the event, but you can try to figure that out by looking at the URL. :)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: how to get component event source?

2012-04-13 Thread Lance Java
Well... to say it's not possible is wrong. To say it's hacky is correct ;)

He's using a library which doesn't pass the information and might not want
to wait for a new release of the library

The information is there... Worst case scenario you could @Inject the
request and parse the component id from the URL.


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

2012-04-13 Thread netdawg
Agree.  Welcome file list is probably the cleanest (standards-based) fix.  



 


This seems to tell Tomcat "there are no welcome files" ...   

In fact, seems like you can set welcome file to any arbitrary component and
it will still pick up Tapestry Index.  

For instance, 

index

Or,


about

Note that there is an about component in newapp - still picks up Index (?!)
- seems like anything here is ignored. 

Or, 

Burger King in Moscow

All of of the above are equivalent.  

However a physical file name with extension, 

Bienvenue.jsp

will work whether or not there is a Bienvenue.jsp (i.e. go to Bienvenue.jsp
if present, failover to Index when not).  

The ONLY filename that generates the error (does NOT failover to Index when
no in system) 

index.jsp

The htm and html extensions to index are OK...meaning failover to Index if
not present just like the "french" verison.

I think we have beaten this to death,  thanks guys.  




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5639153.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-13 Thread loshmeey
Thank you very much for the quick response! 

Im gonna try to work my way trough the link you sent me and if i get
stuck... ill come back with more detailed questions!

Thanks again!

@George Christman

nop, not using Jquery for now, but will look into it! Thank you!

--
Best regards
Milos
 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Uploading-Images-tp5639019p5639106.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-Hibernate / Sybase image data type

2012-04-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Apr 2012 15:05:23 -0300, George Christman  
 wrote:



I just don't know enough about the hibernate version underlining
tapestry-hibernate, I was hoping one of the developers may have some
insight.


This is a pure Sybase issue as far as I could see, so I still think it  
shouldn't have been posted here.
Tapestry-Hibernate doesn't actually care about the Hibernate version if  
it's at least 3.1. Tapestry-Hibernate has a provided dependency on  
Hibernate. Basically, this means it doesn't choose a Hibernate version and  
you should choose it.


I do care about keeping the mailing list in its focus otherwise it will  
lose subscribers which aren't interested in the non-Tapestry stuff.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Tapestry-Hibernate / Sybase image data type

2012-04-13 Thread George Christman
I just don't know enough about the hibernate version underlining
tapestry-hibernate, I was hoping one of the developers may have some
insight. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-Sybase-image-data-type-tp5639008p5639081.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-13 Thread Thiago H. de Paula Figueiredo

On Fri, 13 Apr 2012 14:47:14 -0300, loshmeey  wrote:


Hello everyone,


Hi! Welcome to the mailing list!


I want to upload a picture from a .tml page to web server,


You can use Tapestry-Upload's Upload component for that.


and on the other .tml page display that picture...


There's no single approach here, but once you have the image bytes in an  
array, you can create a page to show images. In this page, you'll need to  
have an onActivate() method that returns a StreamResponse wrapping the  
image bytes. Then you'll need to create an URL for this page. You can  
@Inject PageRenderLinkSouce and use one of its methods for that.


http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile  
has some nice examples.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Tapestry-Hibernate / Sybase image data type

2012-04-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Apr 2012 14:36:28 -0300, George Christman  
 wrote:



Hello,


Hi!


I know this isn't entirely related to Tapestry,


I can't see how this is related to Tapestry at all, so I don't think this  
should have been posted here.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Uploading Images!

2012-04-13 Thread George Christman
Not sure if your using jquery, but have you looked at the tapestry-jquery
ajaxupload component?

http://tapestry5-jquery.com/docs/components/docsajaxupload

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Uploading-Images-tp5639019p5639042.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



Uploading Images!

2012-04-13 Thread loshmeey
Hello everyone, this is my first post soo i kinda feel i need to introduce
myself :). Im 22, studying IT from Serbia. I had tapestry in one of the
classes on colleague and i really started to like it and i still like it
very much! I mastered all the "basics" (forms, beaneditforms, grids, zones,
working with hibernate to save data to db, and extract it from db etc..) but
now i`ve really hit a wall. 

I want to upload a picture from a .tml page to web server, and on the other
.tml page display that picture...nothing really fancy, but i am really
struggling on doing it! Sooo... pleease help me!! I hope you can  provide
some example code to :)


---
Best Regards
Milos 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Uploading-Images-tp5639019p5639019.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



Tapestry-Hibernate / Sybase image data type

2012-04-13 Thread George Christman
Hello, I'm using tapestry-hibernate in my project. I was recently asked to
store file uploads in the database. Sybase only offers the datatype image
and tapestry-hibernate doesn't seem to offer that as an option. 

I've tried 


@Lob
private byte[]fileContent;

public byte[] getFileContent() {
return fileContent;
}

public void setFileContent(byte[] fileContent) {
this.fileContent = fileContent;
}

which allows me to insert the byte data into the table, but gives me the
following exception when trying to retrieve it. 

ioc.Registry The method com.sybase.jdbc3.jdbc.SybResultSet.getBlob(String)
is not supported and should not be called. ioc.Registry Operations trace:
ioc.Registry [ 1] Triggering event 'activate' on Purchase_Request
TapestryModule.RequestExceptionHandler Processing of request failed with
uncaught exception: The method
com.sybase.jdbc3.jdbc.SybResultSet.getBlob(String) is not supported and
should not be called. org.apache.tapestry5.ioc.internal.OperationException:
The method com.sybase.jdbc3.jdbc.SybResultSet.getBlob(String) is not
supported and should not be called.

I've tried this guys solution without success
http://stackoverflow.com/questions/9049488/retrieve-image-from-blob-via-hibernate-not-jdbc

I also found this jira issue 
https://issues.jboss.org/browse/JBPAPP-2867

Laura claims the "The workaround for this issue is to create user-defined
types that map to the Sybase text and image types."


I know this isn't entirely related to Tapestry, but was hoping someone in
our community may have ran into this issue and managed to come up with a
solution. 

Thanks

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-Sybase-image-data-type-tp5639008p5639008.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: how to get component event source?

2012-04-13 Thread Thiago H. de Paula Figueiredo

Answer to the question is the subject: there's no way to do that.

On the other hand, you can add a query parameter to your AJAX request with  
the information of which client-side object triggered it.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Render Queue Error in Expansion

2012-04-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Apr 2012 12:14:23 -0300, Lance Java   
wrote:


It sounds like a lot of work... perhaps someone else knows of an easier  
way to get the source of a component event?


Have you thought of adding a query parameter containing the id of the  
rendered object? That's what I'd do.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



how to get component event source?

2012-04-13 Thread Chris Mylonas
Fresh Request now that we have a simple question (re: subject line).

Here is the template for my component (a PhoneExtension) - it receives a phone 
call.

http://tapestry.apache.org/schema/tapestry_5_3.xsd";>


${currentExtension.number} ${currentExtension.name} 
(note: these values are null on AJAX refresh)










It has 2 Zones for dropping objects into (jquery drag and drop).  I can't 
identify which out of 10 of these gets the drop because all id are either 
extensionZone or voicemailZone.

My page template uses this phone component like this (the receptionist (with a 
draggable component) drops the calls onto the PhoneExtensions):









If it's time to go back to the drawing board with it and use 
MarkupWriter...then so be it!!

Any help is great,
Cheers
Chris

P.S. It's 2 am - I'm going to sleep.

Re: Lightweight TapestryTools update site

2012-04-13 Thread Giulio Micali
Oh, i forgot: the autocomplete feature didn't works for me because I didn't
delete the old workspace.
With a new workspace it works.

Thanks for the great job,
Giulio


Re: Lightweight TapestryTools update site

2012-04-13 Thread Giulio Micali
Hi Gavin,
I gave a look at the code compared to my old patch, looks like 2 lines of
code are missing (the dirty ones in my patch):

### Eclipse Workspace Patch 1.0
#P org.apache.tapestrytools.ui
Index:
src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java
===
---
src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java
(revision 301)
+++
src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java
(working copy)
@@ -114,6 +114,9 @@
 private void travelAllFolder(IResource[] fileList, String fileName)
throws CoreException{
 for(int i=0; i

Re: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
Mate, thanks a lot for your effort I must say.  And you summed it up well
- how to get the source of a component event?   (if all the components have the 
same id)

At the moment, all 16 droppables have a component id of either "extensionZone" 
or "voicemailZone".

I can't set a "context" or custom id as I would like because you can't have 
property expansions passing into components - the exception is "...it must 
start with a letter and contain letters,numbers and underscore" - and for some 
reason "context" i passed in didn't stick.

If i leave no id so that tapestry assigns it, i get an exception.

I don't mind the "a lot of work aspect"  -- but my tapestry knowledge hasn't 
quite hit into environment (apart from heartbeat) and contributing/augmenting 
stuff.  My brain would explode at this point :)

I might try the MarkupWriter again and see if I can push t:id stuff through it 
- that way I may be able to do the Zone.getBody() or getId() to be unique

But last week when I was mucking around with this stuff, using the 
@ImportJQueryUI() with my own custom javascript for drag and drop (simple 
jqueryui samples) failed to do anything.  This tml based stuff was the only way 
to make drag'n'drop work.

If I can set up a clean project with the non-working drag and drop, maybe i can 
submit a bug to the github project.



> I think that you need a handle on the ComponentEventRequestParameters so
> that you can call getNestedComponentId() which will have the id of the zone
> which fired the event.
> 
> I'm not sure that this tapestry makes this avaliable to you by default but
> you could do it yourself.
> 
> 1. Writer a ComponentEventRequestFilter which @Injects the Environment and
> calls environment.push()  and pop() with the ComponentEventRequestParameters
> 
> 2. Contribute the filter to the AjaxComponentEventRequestHandler
> 
> 3. Your component could do this
>   @Environmental ComponentEventRequestParameters parameters;
>   @Inject ComponentResources resources;
> 
>   void myEventHandler() {
>  Component component =
> resources.getEmbeddedComponent(parameters.getNestedComponentId());
>   }
> 
> It sounds like a lot of work... perhaps someone else knows of an easier way
> to get the source of a component event?


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



Re: Lightweight TapestryTools update site

2012-04-13 Thread Gavin Lei
Hi Giulio,

Thank you for your feedbacks here

在 2012年4月13日 下午11:07,Giulio Micali  写道:
> Hi Gavin,
> i tried with a new workspace and here the results.
>
> - For the default view: Yes, it works like that even in my PC: it's not the
> default for a new workspace, but it remembers the setting (i don't know if
> in project or workspace, i guess the last).

So, i guess nothing should change here :-)

> - For the issue 13: for pages in /src/main/webapp it works correctly, for
> TMLs in /src/main/resources it picks the target instead the right path.

There is really a issue in multi-tml files maven situation. Java
always find TML file in "target" folder, this is not correct. I will
adjust search algorithm here

> - For the autocomplete. it was my mistake: I tried on the TML in target, in
> the source tml works.

In fact, i can also see the auto-complete feature in TML editor when i
am editing TML file in *target* as well as in *src* directory. This is
normal situation. There is not any reason if it does not work in TML
file in target folder.

>
> Cheers,
> Giulio
>
>
> 2012/4/13 Gavin Lei 
>
>> Hi,
>>
>> One more comment below
>>
>> 在 2012年4月13日 下午10:45,Gavin Lei  写道:
>> > Hi
>> >
>> > 2012/4/13 Giulio Micali :
>> >> Hi Gavin,
>> >> I just tried the feature, and it shows the Issue 13 (it finds the tml in
>> >> target, using maven).
>> >
>> > I will test it in Maven environment now
>> >
>> >>
>> >> For the tml editor, I have 2 problems:
>> >> 1) it doesn't perform the autocomplete of tapestry components (or
>> >> parameters)
>> >
>> > Several users told me this feature work well. What is your mean of "it
>> > doesn't perform"? Usually you can pop up the content assist by
>> > shortcut, it is ALT + / in my PC.
>> >
>> >> 2) the "source" tab is not the default view, and everytime I should
>> switch
>> >> manually. Can you set it as default ?
>>
>> I think it is not "everytime I should switch manually".
>>
>> In my experience and my experiment just now, once you open your
>> XML/TML editor if design tab is the default view, then you switch to
>> the source tab manually, close all the open windows/editors, or even
>> close and re-open your Eclipse, open a file by XML/TML editor, the
>> default tab is "source".
>>
>> At least, it works like this in my PC, maybe we can wait for more
>> feedbacks here. In my opinion now, this really works well, no need to
>> change.
>>
>> >
>> > The "source" tab is the default view in my PC *everytime*, let's hear
>> > what others say here.
>> >
>> >>
>> >> Here my installation details:
>> >> 1) the latest eclipse SDK Classic, not J2EE (downloaded 3 days ago)
>> >> 2) subclipse 1.6.x
>> >> 3) m2e latest version
>> >> 4) RunJettyRun 1.3.3
>> >>
>> >>
>> >> Cheers,
>> >> Giulio
>> >
>> >
>> >
>> > --
>> > -
>> > Best Regards
>> > Gavin Lei (雷银)
>> > Email: gavingui2...@gmail.com
>>
>>
>>
>> --
>> -
>> Best Regards
>> Gavin Lei (雷银)
>> Email: gavingui2...@gmail.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>



-- 
-
Best Regards
Gavin Lei (雷银)
Email: gavingui2...@gmail.com

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



Render Queue Error in Expansion

2012-04-13 Thread Lance Java
Ignore my prev post about adding the drop zone to the context as this is
not associated with the draggable when the page is drawn.

I think that you need a handle on the ComponentEventRequestParameters so
that you can call getNestedComponentId() which will have the id of the zone
which fired the event.

I'm not sure that this tapestry makes this avaliable to you by default but
you could do it yourself.

1. Writer a ComponentEventRequestFilter which @Injects the Environment and
calls environment.push()  and pop() with the ComponentEventRequestParameters

2. Contribute the filter to the AjaxComponentEventRequestHandler

3. Your component could do this
   @Environmental ComponentEventRequestParameters parameters;
   @Inject ComponentResources resources;

   void myEventHandler() {
  Component component =
resources.getEmbeddedComponent(parameters.getNestedComponentId());
   }

It sounds like a lot of work... perhaps someone else knows of an easier way
to get the source of a component event?


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

2012-04-13 Thread Kalle Korhonen
welcome-file-list element is a standard part of web.xml. index.jsp is
the default value for it at the container level of Tomcat, so setting
the value to "index" in a Tapestry5 application is the correct option.
Looks like we are missing the configuration from the archetype, I'll
fix it for the next version.

Kalle


On Fri, Apr 13, 2012 at 5:27 AM, Lance Java  wrote:
> Have you tried:
> 
>
> Or with jstl
> 

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



Re: Lightweight TapestryTools update site

2012-04-13 Thread Giulio Micali
Hi Gavin,
i tried with a new workspace and here the results.

- For the default view: Yes, it works like that even in my PC: it's not the
default for a new workspace, but it remembers the setting (i don't know if
in project or workspace, i guess the last).
- For the issue 13: for pages in /src/main/webapp it works correctly, for
TMLs in /src/main/resources it picks the target instead the right path.
- For the autocomplete. it was my mistake: I tried on the TML in target, in
the source tml works.

Cheers,
Giulio


2012/4/13 Gavin Lei 

> Hi,
>
> One more comment below
>
> 在 2012年4月13日 下午10:45,Gavin Lei  写道:
> > Hi
> >
> > 2012/4/13 Giulio Micali :
> >> Hi Gavin,
> >> I just tried the feature, and it shows the Issue 13 (it finds the tml in
> >> target, using maven).
> >
> > I will test it in Maven environment now
> >
> >>
> >> For the tml editor, I have 2 problems:
> >> 1) it doesn't perform the autocomplete of tapestry components (or
> >> parameters)
> >
> > Several users told me this feature work well. What is your mean of "it
> > doesn't perform"? Usually you can pop up the content assist by
> > shortcut, it is ALT + / in my PC.
> >
> >> 2) the "source" tab is not the default view, and everytime I should
> switch
> >> manually. Can you set it as default ?
>
> I think it is not "everytime I should switch manually".
>
> In my experience and my experiment just now, once you open your
> XML/TML editor if design tab is the default view, then you switch to
> the source tab manually, close all the open windows/editors, or even
> close and re-open your Eclipse, open a file by XML/TML editor, the
> default tab is "source".
>
> At least, it works like this in my PC, maybe we can wait for more
> feedbacks here. In my opinion now, this really works well, no need to
> change.
>
> >
> > The "source" tab is the default view in my PC *everytime*, let's hear
> > what others say here.
> >
> >>
> >> Here my installation details:
> >> 1) the latest eclipse SDK Classic, not J2EE (downloaded 3 days ago)
> >> 2) subclipse 1.6.x
> >> 3) m2e latest version
> >> 4) RunJettyRun 1.3.3
> >>
> >>
> >> Cheers,
> >> Giulio
> >
> >
> >
> > --
> > -
> > Best Regards
> > Gavin Lei (雷银)
> > Email: gavingui2...@gmail.com
>
>
>
> --
> -
> Best Regards
> Gavin Lei (雷银)
> Email: gavingui2...@gmail.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Lightweight TapestryTools update site

2012-04-13 Thread Gavin Lei
Hi,

One more comment below

在 2012年4月13日 下午10:45,Gavin Lei  写道:
> Hi
>
> 2012/4/13 Giulio Micali :
>> Hi Gavin,
>> I just tried the feature, and it shows the Issue 13 (it finds the tml in
>> target, using maven).
>
> I will test it in Maven environment now
>
>>
>> For the tml editor, I have 2 problems:
>> 1) it doesn't perform the autocomplete of tapestry components (or
>> parameters)
>
> Several users told me this feature work well. What is your mean of "it
> doesn't perform"? Usually you can pop up the content assist by
> shortcut, it is ALT + / in my PC.
>
>> 2) the "source" tab is not the default view, and everytime I should switch
>> manually. Can you set it as default ?

I think it is not "everytime I should switch manually".

In my experience and my experiment just now, once you open your
XML/TML editor if design tab is the default view, then you switch to
the source tab manually, close all the open windows/editors, or even
close and re-open your Eclipse, open a file by XML/TML editor, the
default tab is "source".

At least, it works like this in my PC, maybe we can wait for more
feedbacks here. In my opinion now, this really works well, no need to
change.

>
> The "source" tab is the default view in my PC *everytime*, let's hear
> what others say here.
>
>>
>> Here my installation details:
>> 1) the latest eclipse SDK Classic, not J2EE (downloaded 3 days ago)
>> 2) subclipse 1.6.x
>> 3) m2e latest version
>> 4) RunJettyRun 1.3.3
>>
>>
>> Cheers,
>> Giulio
>
>
>
> --
> -
> Best Regards
> Gavin Lei (雷银)
> Email: gavingui2...@gmail.com



-- 
-
Best Regards
Gavin Lei (雷银)
Email: gavingui2...@gmail.com

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



Re: Lightweight TapestryTools update site

2012-04-13 Thread Gavin Lei
Hi

2012/4/13 Giulio Micali :
> Hi Gavin,
> I just tried the feature, and it shows the Issue 13 (it finds the tml in
> target, using maven).

I will test it in Maven environment now

>
> For the tml editor, I have 2 problems:
> 1) it doesn't perform the autocomplete of tapestry components (or
> parameters)

Several users told me this feature work well. What is your mean of "it
doesn't perform"? Usually you can pop up the content assist by
shortcut, it is ALT + / in my PC.

> 2) the "source" tab is not the default view, and everytime I should switch
> manually. Can you set it as default ?

The "source" tab is the default view in my PC *everytime*, let's hear
what others say here.

>
> Here my installation details:
> 1) the latest eclipse SDK Classic, not J2EE (downloaded 3 days ago)
> 2) subclipse 1.6.x
> 3) m2e latest version
> 4) RunJettyRun 1.3.3
>
>
> Cheers,
> Giulio



-- 
-
Best Regards
Gavin Lei (雷银)
Email: gavingui2...@gmail.com

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



Re: Lightweight TapestryTools update site

2012-04-13 Thread Giulio Micali
Hi Gavin,
I just tried the feature, and it shows the Issue 13 (it finds the tml in
target, using maven).

For the tml editor, I have 2 problems:
1) it doesn't perform the autocomplete of tapestry components (or
parameters)
2) the "source" tab is not the default view, and everytime I should switch
manually. Can you set it as default ?

Here my installation details:
1) the latest eclipse SDK Classic, not J2EE (downloaded 3 days ago)
2) subclipse 1.6.x
3) m2e latest version
4) RunJettyRun 1.3.3


Cheers,
Giulio


Re: Render Queue Error in Expansion

2012-04-13 Thread Lance Java
If you want to know which dropzone received the dragabble, just pass the
zone id in the context along with the extension id.

I can't remember exatly how but I'm sure you can lookup zones by id by
@Inject'ing the ComponentResources


Re: Render Queue Error in Expansion

2012-04-13 Thread Lance Java
Something like this:



${extension.name}
${extension.number}




${droppedExtension.name}
${droppedExtension.number}



Page.java
-
@InjectComponent
private Zone extensionZone;

@Property
private Item extension;

@Property
private List extensions;

@Property
private Item droppedExtension;

@Inject
private ExtensionDao extensionDao;

void onActivate() {
extensions = ???;
}

@OnEvent(value = JQueryEventConstants.DROP, component = "extensionZone")
void Object dropOnExtensionZone(Object[] context){
String extensionId = (String) context[0];
this.droppedExtension = extensionDao.getFromDatabase(extensionId);
return extensionZone.getBody();
}


Re: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
Thanks Lance -

I have two problems at the moment - both when I componentize the stuff.  On a 
single page, no probs.
1.  Render Queue Error - on AJAX update for Extensions - it gets lost after the 
initial render because the looping is finished from initial page load (i 
presume).
2.  Which dropzone got the event.

NOTE:  Draggable's are OK - I have the draggablecontext to pass.

  -gets dropped onto>(transfer the call)

Currently, If I hard code ALL the drop zones, I know which one got dropped on 
from @OnEvent(value, component)
Which is fine for a one-off prototype, but I don't want to repackage the app 
and redeploy on adds/moves/changes to phone system configs.  i.e. add 2 
extensions.  Especially on 5 different sites.

With my component(s), I have the luxury of "dynamic" changes to number of 
reception lines and extensions - but lose the ability to know which dropzone 
was triggered.  I always know which reception line is doing the transferring 
because of the draggablecontext.
I'm already getting 1234 was dropped onto 
I'll give it a shot because I need the ValueEncoder practise - but I don't 
think it will solve my which-dropzone-received-the-draggable problem.

If it does, I'll eat my goatee :)

Chris

On 13/04/2012, at 11:48 PM, Lance Java wrote:

> Create a ValueEncoder for your currentExtension Object
> 
> Then use ValueEncoder.toClient(V value) to create a string which will be
> used in your draggablecontext.
> 
> Then, in your drop event, use ValueEncoder.toValue(String value) on the
> context value to deserialise the Object.


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



Re: Render Queue Error in Expansion

2012-04-13 Thread Lance Java
Create a ValueEncoder for your currentExtension Object

Then use ValueEncoder.toClient(V value) to create a string which will be
used in your draggablecontext.

Then, in your drop event, use ValueEncoder.toValue(String value) on the
context value to deserialise the Object.


Re: Lightweight TapestryTools update site

2012-04-13 Thread Gavin Lei
Hi all,

I have finished Template/Java switch feature (Shortcuts is still CTRL
+ R) for TapestryTools, and uploaded the feature into Tapestry update
center[1], if you have interested, please have a trial of it. Install
guide can be found here[2].

Feedback are welcome here :-)

[1] http://tapestrytools.googlecode.com/svn/TapestryTools/
[2] 
http://code.google.com/p/tapestrytools/wiki/Install_Guide_Lightweight_TapestryTools

在 2012年4月11日 下午2:44,Kalle Korhonen  写道:
> Excellent timing then, thanks Gavin.
>
> Kalle
>
>
> 2012/4/10 Gavin Lei :
>> Hi Kalle,
>>
>> the template/java switch shortcut will come true in the 2-3 days, I am just
>> working for it now:-)
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
-
Best Regards
Gavin Lei (雷银)
Email: gavingui2...@gmail.com

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



Re: Give Custom Component a "context" that is not Ljava.lang.Object;@828642

2012-04-13 Thread Chris Mylonas

On 13/04/2012, at 11:02 PM, Thiago H. de Paula Figueiredo wrote:

> On Fri, 13 Apr 2012 09:46:04 -0300, Chris Mylonas  wrote:
> 
>> I need to convert from Ljava.lang.Object@234141 to "string representation" 
>> or what value it is (which happens to be a string) I set during render (so 
>> the HTML that is output is good enough for me).
> 
> It seems to me that you haven't understood what I said: if you pass the 
> context parameter without the expansion, your component will receive the 
> original object of type Object[], not a String, so you don't need to convert 
> a String to an Object[]. In your event handler method, the parameter must be 
> an Object[], or, betetr yet, an EventContext.

I think I understood - I was just being stubborn!   Thanks for caring :)
I needed to convert to String, or the ID because of below.

below.
My problem is at render time, everything is fine.
At event time (because it's drag and drop) the context is lost.  Even the 
"value" is lost.
The dragged component has a context, and I retrieve this at event processing.
But I have no idea where the dragged component got dropped - unless I access 
the DOM I guess.
WIth a "context" or something, I can at least iterate through my list until I 
get a match.


I might call it a night - it's just past 11pm here and the coffee will shortly 
wear off :)
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Give Custom Component a "context" that is not Ljava.lang.Object;@828642

2012-04-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Apr 2012 09:46:04 -0300, Chris Mylonas   
wrote:


I need to convert from Ljava.lang.Object@234141 to "string  
representation" or what value it is (which happens to be a string) I set  
during render (so the HTML that is output is good enough for me).


It seems to me that you haven't understood what I said: if you pass the  
context parameter without the expansion, your component will receive the  
original object of type Object[], not a String, so you don't need to  
convert a String to an Object[]. In your event handler method, the  
parameter must be an Object[], or, betetr yet, an EventContext.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Give Custom Component a "context" that is not Ljava.lang.Object;@828642

2012-04-13 Thread Chris Mylonas
bugger.  i think it's null anyway...which is probably what you were both 
leading me to.
i had another field in the event method named context anywaywhich was the 
URL of the event in the form of an Object[]

i'm still back at square one - will review what i have done.

thanks


On 13/04/2012, at 10:33 PM, Thiago H. de Paula Figueiredo wrote:

> On Fri, 13 Apr 2012 08:50:26 -0300, Taha Hafeez Siddiqi 
>  wrote:
> 
>> Hi
> 
> Hi!
> 
>> Try
>> 
>> t:context='currentExtension.number' instead of 
>> t:context='${currentExtension.number}'
> 
> Never never never ever use expansions when passing parameter values. :) 
> Expansions always coerce the value to String and are meant to be used to 
> output values to HTML, never to component parameters.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> 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: Give Custom Component a "context" that is not Ljava.lang.Object;@828642

2012-04-13 Thread Chris Mylonas
never never never ... thanks for the tip.  String is fine for me - it's not the 
most efficient way, but I've got a bit of a problem finding out where my 
dragged (and known) component got dropped.

I need to convert from Ljava.lang.Object@234141 to "string representation" or 
what value it is (which happens to be a string) I set during render (so the 
HTML that is output is good enough for me).


Doing it the never never never way - I can (I think safely) get the string 
value, then look it up in my list when the event is triggered (dropped in this 
case).
The dragged object has a parameter that is received, but the droppedOn 
component can only be retrieved with the @OnEvent annotation - which is good 
for a single page full of components -

I have two custom components - 1.  uses draggable, the other uses droppable.  I 
need to know what gets dropped onto what.

It would be like having two grids with one grid full of draggable rows and the 
other grid with droppable rows.
If I can get the string value of the droppable row, I know which object it is 
(my objects have unique string values so I'm safe in that respect).



On 13/04/2012, at 10:33 PM, Thiago H. de Paula Figueiredo wrote:

> On Fri, 13 Apr 2012 08:50:26 -0300, Taha Hafeez Siddiqi 
>  wrote:
> 
>> Hi
> 
> Hi!
> 
>> Try
>> 
>> t:context='currentExtension.number' instead of 
>> t:context='${currentExtension.number}'
> 
> Never never never ever use expansions when passing parameter values. :) 
> Expansions always coerce the value to String and are meant to be used to 
> output values to HTML, never to component parameters.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> 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: Give Custom Component a "context" that is not Ljava.lang.Object;@828642

2012-04-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Apr 2012 08:50:26 -0300, Taha Hafeez Siddiqi  
 wrote:



Hi


Hi!


Try

t:context='currentExtension.number' instead of  
t:context='${currentExtension.number}'


Never never never ever use expansions when passing parameter values. :)  
Expansions always coerce the value to String and are meant to be used to  
output values to HTML, never to component parameters.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
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-13 Thread Lance Java
Have you tried:


Or with jstl



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

2012-04-13 Thread Lance Java
How about getting rid of index.jsp and adding "index" to your web.xml in
the welcome file list. I'm assuming tomcat will try your config before the
default


Re: Give Custom Component a "context" that is not Ljava.lang.Object;@828642

2012-04-13 Thread Chris Mylonas
Nope.  Tried both context and t:context


HTML came out:
http://tapestry.apache.org/schema/tapestry_5_3.xsd";>

The prop expansion worked ok for html before (below)
Still get [Ljava.lang.Object@34255245 on the event both ways.


I see that using your suggestion is what happens in the Hi-Lo game, when a 
page's template passes a context to the component.
In my case, I'm in the component template - if that makes a difference?


PS - just been reading your OAuth service blogs - hopefully get to 
understanding those things over the weekend - thanks




On 13/04/2012, at 9:50 PM, Taha Hafeez Siddiqi wrote:

> Hi 
> 
> Try 
> 
> t:context='currentExtension.number' instead of 
> t:context='${currentExtension.number}' 
> 
> regards
> Taha
> 
> On Apr 13, 2012, at 5:13 PM, Chris Mylonas wrote:
> 
>> Hi List,
>> 
>> I tried giving a custom component a context (just a String) but when I go to 
>> use it on an event, I get the output to be [Ljava.lang.Object;@783b110a 
>> instead of "1234" which is what is set during rendering.
>> 
>> The output html looks a little strange compared to the component's tml - 
>> like I'm missing something:
>> 
>> http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
>> 
>>  
>> 
>> > xmlns:ns0="http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
>> 
>> 
>> I'm looking at the PageLink component and it's way of getting a context is 
>> as an Object[] rather than a simple String.
>> I'm guessing when it creates the link, there's some magic that happens 
>> underneath to create the "context" into whatever is used in the template to 
>> a valid portion of a URL
>> 
>>   Link link = resources.createPageLink(page, 
>> resources.isBound("context"), context);
>> 
>>   writeLink(writer, link);
>> 
>> Given my above output "[Ljava.lang.Object;@783b110a" - what's the trick to 
>> turn this object for t:context="${currentExtension.number}" into 
>> context="1234" so that the URL that tapestry spits out during the component 
>> event look like 
>> /christest/draggable6.extension.1234.voicemailzone:zonedrop/ISDN1  (where 
>> 1234 is at the moment omitted)
>> 
>> Any hints would be very helpful!!
>> 
>> Cheers
>> Chris
> 
> 
> -
> 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: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.

2012-04-13 Thread netdawg
Nope forward does not work, tried that first  (see previous post).  

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5638114.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-13 Thread Lance Java
Redirect will cause an extra request and will change the URL in the
browser. Try forward instead


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

2012-04-13 Thread netdawg
And now empty welcome file list in application does NOT work.  Make sense,
since the server will just default upward from application to container
level default list.  I win ;-)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5638095.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: Give Custom Component a "context" that is not Ljava.lang.Object;@828642

2012-04-13 Thread Taha Hafeez Siddiqi
Hi 

Try 

t:context='currentExtension.number' instead of 
t:context='${currentExtension.number}' 

regards
Taha

On Apr 13, 2012, at 5:13 PM, Chris Mylonas wrote:

> Hi List,
> 
> I tried giving a custom component a context (just a String) but when I go to 
> use it on an event, I get the output to be [Ljava.lang.Object;@783b110a 
> instead of "1234" which is what is set during rendering.
> 
> The output html looks a little strange compared to the component's tml - like 
> I'm missing something:
> 
> http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
> 
>   
> 
>  xmlns:ns0="http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
> 
> 
> I'm looking at the PageLink component and it's way of getting a context is as 
> an Object[] rather than a simple String.
> I'm guessing when it creates the link, there's some magic that happens 
> underneath to create the "context" into whatever is used in the template to a 
> valid portion of a URL
> 
>Link link = resources.createPageLink(page, 
> resources.isBound("context"), context);
> 
>writeLink(writer, link);
> 
> Given my above output "[Ljava.lang.Object;@783b110a" - what's the trick to 
> turn this object for t:context="${currentExtension.number}" into 
> context="1234" so that the URL that tapestry spits out during the component 
> event look like 
> /christest/draggable6.extension.1234.voicemailzone:zonedrop/ISDN1  (where 
> 1234 is at the moment omitted)
> 
> Any hints would be very helpful!!
> 
> Cheers
> Chris


-
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-13 Thread netdawg
Placing index.jsp with the following in it solves the problem:

<%
  response.sendRedirect("Index");
%>

No need to jury rig the configuration.  

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5638076.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-13 Thread Lance Java
Perhaps you can override the tomcat defaults by adding an empty
 to your web.xml

Then no tapestry config required?


Give Custom Component a "context" that is not Ljava.lang.Object;@828642

2012-04-13 Thread Chris Mylonas
Hi List,

I tried giving a custom component a context (just a String) but when I go to 
use it on an event, I get the output to be [Ljava.lang.Object;@783b110a instead 
of "1234" which is what is set during rendering.

The output html looks a little strange compared to the component's tml - like 
I'm missing something:

http://tapestry.apache.org/schema/tapestry_5_3.xsd";>



http://tapestry.apache.org/schema/tapestry_5_3.xsd";>


I'm looking at the PageLink component and it's way of getting a context is as 
an Object[] rather than a simple String.
I'm guessing when it creates the link, there's some magic that happens 
underneath to create the "context" into whatever is used in the template to a 
valid portion of a URL

Link link = resources.createPageLink(page, 
resources.isBound("context"), context);

writeLink(writer, link);

Given my above output "[Ljava.lang.Object;@783b110a" - what's the trick to turn 
this object for t:context="${currentExtension.number}" into context="1234" so 
that the URL that tapestry spits out during the component event look like 
/christest/draggable6.extension.1234.voicemailzone:zonedrop/ISDN1  (where 1234 
is at the moment omitted)

Any hints would be very helpful!!

Cheers
Chris

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

2012-04-13 Thread netdawg
YES, that worked.  Sort of.   

Root URL is not found, but if pulled up as Index, no mo [ERROR].  
Specifically, 

http://localhost:8080/newapp/  leads to HTTP 404 error - page not found

However, 

http://localhost:8080/newapp/Index  works (?!)

Sorry to be pickyHere is the quote from 

http://tapestry.apache.org/configuration.html#Configuration-Changestoweb.xml
http://tapestry.apache.org/configuration.html#Configuration-Changestoweb.xml 


User Guide wrote
> 
> Tapestry Requests vs. Container Requests
> 
> The Tapestry filter matches all the requests that apply to Tapestry, and
> passes the rest off to the servlet container. In situations where there
> would be a naming conflict, */actual files inside the web application take
> precedence over Tapestry pages./* (*) 
> 
> *Tapestry recognizes the root URL, where the servlet path is simply "/",
> and renders the application page "Index", if it exists.* (which is the
> case with newapp...it has an Index component, but that is NOT what T5 is
> doing) (**) 
> 

(*)meaning an index.jsp inside web app would intercept the request meant for
the Index component?  Guess what, it does...! )

(**) This contradicts (*) - I think we just discovered that this may not be
working as advertised in (and probably not just in) Tomcat 7...unless
configured to ignore welcome file list as advised.   

Basically, the root URL is not pulling up Index (first/before other
resources)...and Tapestry is AMBIGUOUS about the precedence - at least in
the manual.

One would think the simplest fix would be to put an index.jsp in the newapp
folder with a jsp forward to Index, as follows: 

 

But, sure enough, that does NOT work...would be too easy ;-).  

Nevertheless, good work.  This has been fun.  Yes, the JIRA 1904 may be
closed...with the proper explanation  of the workaround (as you guys see
fit).

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5638049.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-13 Thread Lance Java
Please try the following:

public static void contributeIgnoredPathsFilter(Configuration
configuration) {
   configuration.add("/index\\.(?:html|htm|jsp)");
}

If it works, we'll close the JIRA and put some tomcat specific
documentation somewhere


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

2012-04-13 Thread netdawg
Yes, this may indeed be the temporary workaround.  Since it is limited to the
application, and not the entire server/container, this is the preferred fix. 
Much Thanks for fleshing this out.  

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637951.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-13 Thread netdawg
YES.  That solves the problem indeed.  BUT, no thanks ;-).  This fix will
almost certainly break many other applications on the production server and
I am pretty sure the community shares my sentiment.  Unfortunately, T5 will
need to address this.   JIRA created: 

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

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637941.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-13 Thread Lance Java
Another option might be to tell tapestry to ignore the welcome file list

public static void contributeIgnoredPathsFilter(Configuration
configuration) {
   configuration.add("(index\\.html)|(index\\.htm)|(index\\.jsp)");
}

http://tapestry.apache.org/configuration.html#Configuration-ConfiguringIgnoredPaths


Re: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
I think I need to
@InjectContainer
private MainPage container

Then I can access the "rows" of the grid through the source List<>.   (or 
source list of my entity - phones in this case)

I'll have a look at the in-place-editor for grid because that must do something 
similar.
Then do something in the beforeRenderTemplate to redraw the AJAX-updated 
re-render.





On 13/04/2012, at 8:12 PM, Lance Java wrote:

> Your ajax event handler method will need to initialize any properties that
> are required in the rendering block
> 
> Draggables can have a "draggablecontext" attribute. Although I've not used
> it I'm sure that you could pass the context required to initialize your
> property.


-
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-13 Thread Lance Java
It looks like you will need to remove all entries from the
 in $TOMCAT_HOME/conf/web.xml

See "How do I override the default home page loaded by Tomcat?" here
http://wiki.apache.org/tomcat/HowTo


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

2012-04-13 Thread netdawg
Here is the complete access log from Tomcat 7 (I pulled up about then index
...  captured in 2nd last tine...and then about again)...not sure (yet) what
the server config should be ...  and if that is even advisable since in
production there are other apps to contend with ...


127.0.0.1 - - [13/Apr/2012:00:05:11 -1000] "GET / HTTP/1.1" 200 7388
127.0.0.1 - - [13/Apr/2012:00:05:28 -1000] "GET /manager/html HTTP/1.1" 401
2542
127.0.0.1 - admin [13/Apr/2012:00:05:35 -1000] "GET /manager/html HTTP/1.1"
200 13364
127.0.0.1 - admin [13/Apr/2012:00:05:41 -1000] "POST
/manager/html/undeploy?path=/newapp&org.apache.catalina.filters.CSRF_NONCE=5E267AF1A2CF07C36BE4802B8A7190CF
HTTP/1.1" 200 11831
127.0.0.1 - admin [13/Apr/2012:00:05:50 -1000] "POST
/manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=89C1AF8973D749095B555ADE319A1CE8
HTTP/1.1" 200 13364
127.0.0.1 - - [13/Apr/2012:00:06:23 -1000] "GET /newapp/about HTTP/1.1" 200
1021
127.0.0.1 - - [13/Apr/2012:00:06:24 -1000] "GET
/newapp/assets/1.0-SNAPSHOT/tapestry/tapestry-console.css HTTP/1.1" 200 267
127.0.0.1 - - [13/Apr/2012:00:06:24 -1000] "GET
/newapp/assets/1.0-SNAPSHOT/tapestry/t5-alerts.css HTTP/1.1" 200 334
127.0.0.1 - - [13/Apr/2012:00:06:24 -1000] "GET
/newapp/assets/1.0-SNAPSHOT/tapestry/tree.css HTTP/1.1" 200 422
127.0.0.1 - - [13/Apr/2012:00:06:24 -1000] "GET
/newapp/assets/1.0-SNAPSHOT/ctx/layout/layout.css HTTP/1.1" 200 1224
127.0.0.1 - - [13/Apr/2012:00:06:24 -1000] "GET
/newapp/assets/1.0-SNAPSHOT/stack/en/core.js HTTP/1.1" 200 82756
127.0.0.1 - - [13/Apr/2012:00:06:24 -1000] "GET
/newapp/assets/1.0-SNAPSHOT/ctx/layout/images/img01.jpg HTTP/1.1" 200 752
127.0.0.1 - - [13/Apr/2012:00:06:24 -1000] "GET
/newapp/assets/1.0-SNAPSHOT/ctx/layout/images/img10.gif HTTP/1.1" 200 1344
127.0.0.1 - - [13/Apr/2012:00:06:24 -1000] "GET
/newapp/assets/1.0-SNAPSHOT/ctx/layout/images/img08.gif HTTP/1.1" 200 297
127.0.0.1 - - [13/Apr/2012:00:11:49 -1000] "GET /newapp/about HTTP/1.1" 200
1021
127.0.0.1 - - [13/Apr/2012:00:11:57 -1000] "GET /newapp/ HTTP/1.1" 500 288
127.0.0.1 - - [13/Apr/2012:00:12:16 -1000] "GET /newapp/about HTTP/1.1" 200
1021


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637875.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: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas


> Your ajax event handler method will need to initialize any properties that
> are required in the rendering block

So somewhere in my early rendering phases I'd need to get a reference to the 
current block that is to be re-rendered and grab values out of that - I guess.

> Draggables can have a "draggablecontext" attribute. Although I've not used
> it I'm sure that you could pass the context required to initialize your
> property.

draggable context gets passed no problem - it's on the drop zone.


Within my component, the currentExtension is null.

I think I'll have to re-work what I want to do, or dive into tapestry's innards 
to get a reference to the current component.  (like row in a grid)

//THIS WORKS!
@OnEvent(value = JQueryEventConstants.DROP, component = "extensionZone")
void dropOnExtensionZone(Object[] context){
String contextString = (String)context[0];
this.thedata = contextString + " on dropzone for " + 
currentExtension ;
}



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

2012-04-13 Thread netdawg
Thanks.  YES, commenting out  yui-compressor dependency in pom.xml eliminates
the first error above.  

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637859.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: Render Queue Error in Expansion

2012-04-13 Thread Lance Java
Your ajax event handler method will need to initialize any properties that
are required in the rendering block

Draggables can have a "draggablecontext" attribute. Although I've not used
it I'm sure that you could pass the context required to initialize your
property.


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

2012-04-13 Thread Lance Java
Inspect the HTTP logs, is Tomcat trying to redirect from root to some other
page (index.jsp or something)?

There might be some config in tomcat that you can tweak / remove.


AJAX Re: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
Ah ha - let me make it a bit clearer.

The AJAX stuff all works, if I hard code the values within my component.

It's like having a grid and each row has the ${currentRow.name} 
${currentRow.value}
These property bindings don't exist after render.

If I were to use the Grid -> addCell then there is no problem.  AJAX does it's 
drag and drop thing.





On 13/04/2012, at 7:41 PM, Chris Mylonas wrote:

> Hi Tap List,
> 
> I've got two custom components.  Reception Line & Office Phone
> They are just little divs and with a draggable and a droppable zone 
> respectively.
> 
> In my testing, dragging and dropping between these works when everything is 
> done on the same page and this is my first shot at componentizing my initial 
> drag and drop fiddling.  I mean, one component has the drag, and another 
> component has the drop zone.
> 
> Each Office Phone looks like this
> http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
> 
>   
>t:mixins='jquery/zonedroppable'>
>   ${currentExtension.name}
>   ${currentExtension.number}
>   
>t:mixins='jquery/zonedroppable'>
>   
>src="${asset:context:layout/images/email.png}" />
>   
>   
>   
> 
> 
> 
> I have 3 of these in my List "source".
> 
> I think I understand that ${currentExtension} worked when rendering the page. 
>  But now that there is some AJAX happening - ${currentExtension} is null 
> because there is no "source" anymore.  Where should I start looking in 
> Tapestry to pass this stuff.  Can I somehow grab the "id" of something then 
> traverse my "source" List and get the corresponding name/number that 
> this expansion had during the initial render?
> 
> Hope that makes sense,
> Cheers
> Chris



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

2012-04-13 Thread netdawg
Indeed.  But it is the reference implementation of the servlet standard.  In
other words, the "fault" is not with Tomcat...even if it probably is.  

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637826.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



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

2012-04-13 Thread Lance Java
I think you've now hit this https://issues.apache.org/jira/browse/TAP5-1729

Try commenting out the following in your pom.xml

org.apache.tapestry
tapestry-yuicompressor
${tapestry-release-version}



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

2012-04-13 Thread Lance Java
The tapestry source code does not have a single reference to "jsp". I think
that tomcat might be trying to "help" somehow.


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

2012-04-13 Thread netdawg
YES, about link works, with errors in logs, both in Tomcat 7 and 5, (and the
index page continues to barf in Tomcat 7).  Here is the corresponding 
stacktrace: 

First [ERROR] is from About page (renders fine though).  Second, now
familiar, [ERROR] is generated by clicking on Index link from About page


Application 'app' (version 1.0-SNAPSHOT) startup time: 234 ms to build IoC
Regis
try, 780 ms overall.

 __  __ 
/_  __/__   ___ ___ / /___ __  / __/
 / / / _ `/ _ \/ -_|_-http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637797.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



Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
Hi Tap List,

I've got two custom components.  Reception Line & Office Phone
They are just little divs and with a draggable and a droppable zone 
respectively.

In my testing, dragging and dropping between these works when everything is 
done on the same page and this is my first shot at componentizing my initial 
drag and drop fiddling.  I mean, one component has the drag, and another 
component has the drop zone.

Each Office Phone looks like this
http://tapestry.apache.org/schema/tapestry_5_3.xsd";>



${currentExtension.name}
${currentExtension.number}










I have 3 of these in my List "source".

I think I understand that ${currentExtension} worked when rendering the page.  
But now that there is some AJAX happening - ${currentExtension} is null because 
there is no "source" anymore.  Where should I start looking in Tapestry to pass 
this stuff.  Can I somehow grab the "id" of something then traverse my "source" 
List and get the corresponding name/number that this expansion had 
during the initial render?

Hope that makes sense,
Cheers
Chris

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

2012-04-13 Thread netdawg
The index page of the T5 tutorial.  

Not sure of component.  



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637774.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-13 Thread Lance Java
I wonder if this has something to do with how tomcat 7 is trying to serve
the root.

Are you able to hit
http://localhost:8080/newapp/about


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

2012-04-13 Thread Lance Java
So, I think that eliminates the problem that howard was mentioning on his
blog.

Can you paste the page / component that is trying to run? I'm trying to
think of where a "jsp" component would be references inside the tapestry
archetype.


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

2012-04-13 Thread netdawg
Thanks for suggestion.  No luck, though.  

Same error in Tomcat 7 with exploded war approach

BUT...war file works in Tomcat 5.5.31 ...JDK 1.6.0_03...  

Go figure...

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637743.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-13 Thread Lance Java
I know it's not ideal but you could deploy an exploded war.


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

2012-04-13 Thread netdawg
Found this little nugget: 

http://tapestryjava.blogspot.com/2007/02/fighting-with-tomcat.html
http://tapestryjava.blogspot.com/2007/02/fighting-with-tomcat.html 

Unfortunately, our production is tomcat.  Have to comply.  Jetty will not
do.  



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637652.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



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

2012-04-13 Thread netdawg
To Reproduce (using Tomcat 7.0.4 with jdk1.6.0_22 64-bit), follow "Getting
Started" at 

http://tapestry.apache.org/getting-started.html

Specifically, 

1.  mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org
2.  Create newapp, change to newapp directory (verify works in jetty, stop
it by CTRL+C)
3.  mvn package
4.  Startup tomcat, use manager to deploy the war file generated under
newapp/target
5.  No errors  
6.  Click on http://localhost:8080/newapp (ERROR, see below)

Expecting to see something like: 

http://tapestry.apache.org/getting-started.data/getting-started.png


BUT, Chrome Browser shows (View Source):

Application Exception
An unexpected application exception has occurred.
Component Index does not contain embedded component
'jsp'.

Tomcat Console stacktrace (after deployment) is: 

Application 'app' (version 1.0-SNAPSHOT) startup time: 208 ms to build IoC
Regis
try, 674 ms overall.

 __  __ 
/_  __/__   ___ ___ / /___ __  / __/
 / / / _ `/ _ \/ -_|_-http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637647.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



Serving images outisde of war in tapestry

2012-04-13 Thread Lance Java
I always keep a copy of the tapestry source code handy. If I search
"*Module.java" for AssetFactory I find out how tapestry adds a
ContextAssetFactory and a ClasspathAssetFactory.

@Marker(ContextProvider.class)
public AssetFactory buildContextAssetFactory(ApplicationGlobals
globals, AssetPathConstructor assetPathConstructor, AssetPathConverter
converter)
{
return new ContextAssetFactory(assetPathConstructor,
globals.getContext(), converter);
}

@Marker(ClasspathProvider.class)
public AssetFactory buildClasspathAssetFactory(ResourceDigestManager
resourceDigestManager, ClasspathAssetAliasManager aliasManager,
AssetPathConverter converter)
{
ClasspathAssetFactory factory = new
ClasspathAssetFactory(resourceDigestManager, aliasManager, converter);

resourceDigestManager.addInvalidationListener(factory);

return factory;
}

public void contributeAssetSource(MappedConfiguration configuration, @ContextProvider AssetFactory
contextAssetFactory, @ClasspathProvider AssetFactory classpathAssetFactory)

{
configuration.add(AssetConstants.CONTEXT, contextAssetFactory);
configuration.add(AssetConstants.CLASSPATH, classpathAssetFactory);
}