Re: Howto render a block and put it into a JSON reply?

2012-11-09 Thread Rural Hunter
hmm...This is an event handler for ajax action. I access it via ajax('/somepage:event') at client side. I don't see any problem for Tapestry to handle the json return value. And it works if I skip the getMarkup for the block. The client receives the json string without problem. 于 2012/11/10 1

Re: Shorten CSS selector styles for table grid?

2012-11-09 Thread Pavel Vodenski
You can use a richer language like LESS or SASS to write e. g.: .a { color: red; .b { font-weight: bold; } .c { height: 1px; } } instead of .a { c: r; } .a .b { f-w: b; } .a .c { h: 1px; } Cheers, - P On Fri, Nov 9, 2012 at 5:43 AM, membersound wrote: > OK I thought it whe

RE: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread nhhockeyplayer nashua
kool... love to spark up some competition... But my gallery is tynamo... |\___/| / \ |/\__/| ||\ <.><.> | _ > ) \ / | -\/ / \ Anything generic I will drop into my prototype package and refer to it. I have grown fond of my gallery. Thanks for the help

Re: Trigger multiple fragments from one event?

2012-11-09 Thread Muhammad Gelbana
Check the "TriggerFragment" mixin source code. You can make a similar mixin to do the same that it does but for multiple components. I'm not sure how to accept an array of components as a parameter mixin though. There still may be an easier way but I thought this might help a bit. I'd like to know

Re: Negate a triggerfragment?

2012-11-09 Thread Muhammad Gelbana
It's in the docs: http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/TriggerFragment.html The "invert" attribute On Fri, Nov 9, 2012 at 7:03 PM, membersound wrote: > Hi, > > how can I negate a triggerfragment? So that it only shows up if checkbox is > /un/checked? >

Trigger multiple fragments from one event?

2012-11-09 Thread membersound
Can I somehow trigger to formfragments with one component? My goal is to swap two fragments on a checkbox click, where one is initially shown, and on checkbox click it is hidden an another one is shown. But as I cannot assign the same t:id to two fragments, how can I trigger two fragment-id's at

Re: setupRender(): redirecting to different page

2012-11-09 Thread Andy Pahne
Thank you. I simply remembered it wrong. For the curious: this works as expected: Object onActivate(long articleID) { this.article = articleService.getPublicArticle(articleID); if(this.article == null){ return articleUnknown;

Re: Render whole table grid row as a link?

2012-11-09 Thread membersound
Hmm I'm still stuck with a NPE @ List children = tbody.getChildren(); Which means tbody is null. But why? org.apache.tapestry5.internal.services.RenderQueueException Render queue error in AfterRender[admin/Page:mygrid]: org.apache.tapestry5.ioc.internal.util.TapestryException java.lang.NullPointe

Re: setupRender(): redirecting to different page

2012-11-09 Thread Thiago H de Paula Figueiredo
On Fri, 09 Nov 2012 17:29:16 -0200, Andy Pahne wrote: I am trying to do a simple thing, which used to work with previous versions, at least as far as I can remember. Plwase see code snippet below. The thing is: it never redirects to the "ArticleUnknown" page, even when article is null. s

setupRender(): redirecting to different page

2012-11-09 Thread Andy Pahne
I am trying to do a simple thing, which used to work with previous versions, at least as far as I can remember. Plwase see code snippet below. The thing is: it never redirects to the "ArticleUnknown" page, even when article is null. I had a look at the docs ("component rendering cheat" sheet an

Re: Context and image pulling

2012-11-09 Thread Thiago H de Paula Figueiredo
On Fri, 09 Nov 2012 16:07:02 -0200, o3005659 wrote: OK, I have tried following. private AssetSource assetSource; and in method public String getImagePath() { Asset asset; if(article.getImage() == null || article.getImag().isEmpty()) { asset=assetSource.getAsset(null,"context:/gfx/"+artic

Re: Howto render a block and put it into a JSON reply?

2012-11-09 Thread Howard Lewis Ship
In an Ajax request, returning a JSONObject is completely appropriate return value from a component event that expects a page navigation result. This will mix-and-match well with AjaxResponseRenderer (under 5.3 and 5.4); that is, you can return a JSONObject and Tapestry will add to it the keys for

Re: Context and image pulling

2012-11-09 Thread o3005659
OK, I have tried following. private AssetSource assetSource; and in method public String getImagePath() { Asset asset; if(article.getImage() == null || article.getImag().isEmpty()) { asset=assetSource.getAsset(null,"context:/gfx/"+article.getImage(),null); return asset.toClientURL(); }

Re: Howto render a block and put it into a JSON reply?

2012-11-09 Thread Lance Java
Tapestry does NOT accept JSONObject as a return value from a component event. If you want to make a JSONObject available in your javascript, you should use AjaxResponseRenderer. http://tawus.wordpress.com/2011/10/01/tapestry-5-3-new-features-part-2/ -- View this message in context: http://tape

Negate a triggerfragment?

2012-11-09 Thread membersound
Hi, how can I negate a triggerfragment? So that it only shows up if checkbox is /un/checked? Especially: why does the following not work? It initially does not show the fragment (as default value of object.bool = true). But if I uncheck the checkbox, it does not trigger the fragment. BUT if I t

RE: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread Lance Java
I've been working on a demo gallery component. The gallery uses a table to display a grid of items with links for next and prev. The GalleryDataSource ensures that only a page of data is loaded into memory at a time. The gallery accepts a block parameter to display each item. I've included a demo

Re: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread Thiago H de Paula Figueiredo
On Fri, 09 Nov 2012 14:29:15 -0200, nhhockeyplayer nashua wrote: Are you suggesting that Integer is not a good type to use for parameters too ? No. In this case, as null doesn't seem to be valid value for your parameters, you can use int without any problems. You can even enforce that

RE: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread nhhockeyplayer nashua
Lance, Are you suggesting that Integer is not a good type to use for parameters too ? I figured is might be more coercable type to use. But if its thought to be tripping things up I could change it. At first chance I feel I dont want to... because I think it should work. Thanks Ken

Re: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread Thiago H de Paula Figueiredo
On Fri, 09 Nov 2012 13:55:48 -0200, nhhockeyplayer nashua wrote: Ok so I set my flag in the eclipse preferences VM section -Dtapestry.production-mode=false and I get dev mode as expected __ __ /_ __/__ ___ ___ / /___ __ / __/ / / / _ `/

Re: Howto render a block and put it into a JSON reply?

2012-11-09 Thread Rural Hunter
Hi Lance, I also tried this. But there is some problem. I had to handle the json in this getMarkup method. Otherwise the json returned in my event handler is not rendered. Object onEventXXX() { JSONObject result=new JSONObject(); result.put("html",getMarkup(myblock) ); return result; }

Re: Howto render a block and put it into a JSON reply?

2012-11-09 Thread Rural Hunter
Thanks. I tried this and it works. One limitation is that, all the content in the block must be enclosed in a single html element. If the block is like this: ... The result only renders one tr element. I have to enclose the loop in a div to get all the rows rendered. Don't know why though.

RE: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread nhhockeyplayer nashua
Ok so I set my flag in the eclipse preferences VM section -Dtapestry.production-mode=false and I get dev mode as expected __ __ /_ __/__ ___ ___ / /___ __ / __/ / / / _ `/ _ \/ -_|_-

RE: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread nhhockeyplayer nashua
Thanks Lance... I have been beebopping back and forth between development mode and production mode... trying to observe whats really happening. For this thread though I been running in PROD mode __ __ /_ __/__ ___ ___ / /___ __ / __/ / / / _

RE: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread nhhockeyplayer nashua
Nice observation Lance... and thats exactly how I modeled the component from the start in the actual component. Gallery.JAVA @Parameter(required = true) private Class collectionType; @Property @Parameter(required = true, cache = true) private Integer itemsPerPage; @Prop

Re: onPrepare from grid?

2012-11-09 Thread Thiago H de Paula Figueiredo
On Fri, 09 Nov 2012 13:25:53 -0200, membersound wrote: Yes I know and it does what it is for. But I thought I could also make a quick adaption for checkbox... Nope, they are completely different scenarios. One is done during rendering HTML in the server. Another one, the checkboxes, happens

Re: Context and image pulling

2012-11-09 Thread Thiago H de Paula Figueiredo
On Fri, 09 Nov 2012 13:22:27 -0200, o3005659 wrote: I am pulling an image from the dB with the following method public String getImagePath(){ return "context:location/"+image.getLocation(); } and in tml file, I have <${imagePath}> When you use ${somePropertyName}, you're using the prop bind

Re: onPrepare from grid?

2012-11-09 Thread membersound
Yes I know and it does what it is for. But I thought I could also make a quick adaption for checkbox... -- View this message in context: http://tapestry.1045711.n5.nabble.com/onPrepare-from-grid-tp5717639p5717871.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Context and image pulling

2012-11-09 Thread o3005659
I am pulling an image from the dB with the following method public String getImagePath(){ return "context:location/"+image.getLocation(); } and in tml file, I have <${imagePath}> However, when I go and look up in the firebag logs, it is denoting that image source is attested as src="context:loc

Re: onPrepare from grid?

2012-11-09 Thread Charlouze
This mixin purpose is to trigger a "prepare" event before rendering a component. It has nothing to do with checking or unchecking a checkbox. 2012/11/9 membersound > OK you're right, the method is triggered without the annotation. BUT: it is > only triggered when the form is shown. There is noth

Re: onPrepare from grid?

2012-11-09 Thread membersound
OK you're right, the method is triggered without the annotation. BUT: it is only triggered when the form is shown. There is nothing happening if I check/uncheck the checkbox. Just initial on form rendering. Is something else wrong? -- View this message in context: http://tapestry.1045711.n5.na

Re: Lightweight TapestryTools update site

2012-11-09 Thread mwilliamson
Here is the text from the image. The following solutions are not available: TapestryTools (id=org.apache.tapestrytools.features.feature.group, site=http://tapestrytools.googlecode.com/svn/TapestryTools/) Michael Williamson Analyst Sr Applications Developer Phone: 816/997-5994 |> | F

Re: Lightweight TapestryTools update site

2012-11-09 Thread mwilliamson
I am having a problem install TapestryTools from the Eclipse Market Place. I am use MyEclipse and I get this when I try to install: (Embedded image moved to file: pic25175.gif) I have used TapestyTools before but when I upgraded to the latest version of MyEclipse this happened. Michael Williams

Re: onPrepare from grid?

2012-11-09 Thread Charlouze
You add the @MixinAfter annotation that defers the render state behavior of the mixin after the behavior of the component. I did not add this to my exemple. Anyway, I'm not sure but I think that there is already a prepare event for each fields (like the checkbox) of a form. 2012/11/9 membersound

Re: [t5.3.6] Tapestry.ElementEffect object on the client side is missing\renamed ?

2012-11-09 Thread Muhammad Gelbana
I'm also using Tapestry-JQuery module On Thu, Nov 8, 2012 at 9:53 PM, Muhammad Gelbana wrote: > According to the Zone component documentation page: > > http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Zone.html > > The show\update attributes could have values en

Re: onPrepare from grid?

2012-11-09 Thread membersound
Charlouze wrote > Same for me, my need was to have a specific prepare action for my grid to > display on ajax request. There is an "inPlaceUpdate" event called when > page > changes but the grid rendering process is done before calling this event > in > my component. I think it's because of the gri

Re: Shorten CSS selector styles for table grid?

2012-11-09 Thread membersound
OK I thought it where a T5 question as T somehow forces us to use those selector statements by the way the framework is build. So I thought I'd get answers on this more quickly here... -- View this message in context: http://tapestry.1045711.n5.nabble.com/Shorten-CSS-selector-styles-for-table-g

Re: Shorten CSS selector styles for table grid?

2012-11-09 Thread Thiago H de Paula Figueiredo
This is a pure CSS question, so it's off-topic here. This is actually a mailing list, not a forum (Nabble is just a forum interface for the mailing list, and a good one), so we, subscribers of the Tapestry users mailing list, we want to receive in our e-mail inboxes messages that are about

Shorten CSS selector styles for table grid?

2012-11-09 Thread membersound
I want to style serveral grid columns differently. How can I shorten these expressions? I always need the prefix "table.t-data-grid thead tr th.", followed by the specific property. Can't I just specify that prefix and after list all property classes that shoud be matched? Or do I always have to wr

Re: HibernateSessionManager

2012-11-09 Thread willbro
it's working now with the following dependencies in the pom org.apache.tapestry tapestry-core 5.3.6 org.hibernate.javax.persistence hibernate-jpa-2.0-api 1.0.1.Final mysql mysql-connector-java

Re: How to override DatePicker position? (Workaround)

2012-11-09 Thread bigcache1
Excuse me. All troubles are gone with upgrade to tapestry 5.3.6 -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-override-DatePicker-position-Workaround-tp5717610p5717857.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: How to override DatePicker position? (Workaround)

2012-11-09 Thread bigcache1
I understand that it could be prototype subject, but any suggestions would be appreciated. How could I insert my own handler which will be executed after datepicker pops up? -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-override-DatePicker-position-Workaround-tp5

RE: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread Lance Java
As for your problem with debugging. Tapestry transforms your component classes such that they no longer read/write to member variables in your class. Instead, getters and setters are generated that are backed by a thread local. When running in development mode, tapestry helps out the developer by

RE: select event handler wont hit breakpoint - quarky runtime came back

2012-11-09 Thread Lance Java
I notice that you are attempting to pass itemsPerPage, tableColumns and cursor as component parameters but your are not marking them with the @Parameter annotation. I think you want to define them as: @Parameter("literal:25") private int itemsPerPage; @Property("literal:4") priv