Re: Component that displays additional containing Page markup

2012-12-15 Thread bogdan_cm
Grid is much more powerful than I knew. Thank you guys for nudge in the right direction. I will be sticking with my component for this particular page, but I am replacing allot of other code with Grid. t:body/ did the trick and works like a charm. Cannot believe I didn't see it earlier.

Re: Component that displays additional containing Page markup

2012-12-15 Thread Lance Java
Looks like you're doing the same thing as my gallery component with rows=2 and columns=4. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Component-that-displays-additional-containing-Page-markup-tp5718622p5718743.html Sent from the Tapestry - User mailing list archive

Re: Best way to prevent page to be accessed without context?

2012-12-15 Thread bhorvat
Thiago H de Paula Figueiredo wrote On Fri, 14 Dec 2012 21:43:17 -0200, bhorvat lt; horvat.z.boris@ gt; wrote: So what would be the best way to prevent a page to be accessed without some context? Object onActivate(EventContext context) { if (context.getCount() == 0) {

Re: Best way to prevent page to be accessed without context?

2012-12-15 Thread bhorvat
One other question. Is it possible to return the user to the place from which it came? In other words I dont want to return it to specific place but to what ever place it came from? -- View this message in context:

[5.3.6] Listening to native tapestry ajax events

2012-12-15 Thread Muhammad Gelbana
Some tapestry components do fire ajax events and reach out to the server and it get's handy sometimes to listen to those events. For instance the datefield event fired to format the selected date. Side question, why does the date field have to reach out to the server to format the selected date,

Re: [5.3.6] Listening to native tapestry ajax events

2012-12-15 Thread Geoff Callender
On 16/12/2012, at 10:14 AM, Muhammad Gelbana wrote: Some tapestry components do fire ajax events and reach out to the server and it get's handy sometimes to listen to those events. For instance the datefield event fired to format the selected date. Side question, why does the date field have

Re: [5.3.6] Listening to native tapestry ajax events

2012-12-15 Thread Geoff Callender
This may help: http://localhost:8080/jumpstart/examples/component/eventbubbling Wrong. I meant this: http://jumpstart.doublenegative.com.au/jumpstart/examples/component/eventbubbling

RE: custom edit page not possible

2012-12-15 Thread Ken in Nashua
Well after tinkering and tinkering... this works public Object onActivate(String id) { if (beanType == null) return Utils.new404(messages); this.bean = contextValueEncoder.toValue(beanType, id); if (bean == null) return

RE: custom edit page not possible

2012-12-15 Thread Ken in Nashua
This doesnt work... public Object onActivate(Class clazz, String id) { if (clazz == null) return Utils.new404(messages); this.bean = contextValueEncoder.toValue(clazz, id); this.beanType = clazz; if (bean == null) return

RE: custom edit page not possible

2012-12-15 Thread Ken in Nashua
public Object onActivate(String id) { if (bean == null) return Utils.new404(messages); this.bean = contextValueEncoder.toValue(beanType, id); if (bean == null) return Utils.new404(messages); return null; } so this is

Re: custom edit page not possible

2012-12-15 Thread Geoff Callender
I'd suggest you use a single activate event handler, with a signature like this: public Object onActivate(EventContext ec) You can see it being used in here: http://jumpstart.doublenegative.com.au/jumpstart/together/onepagecrud/persons Doco is here:

RE: custom edit page not possible

2012-12-15 Thread Ken in Nashua
Thanks Geoff, I will cook down and give that a shot.

RE: custom edit page not possible

2012-12-15 Thread Ken in Nashua
Well I cannot go with what I thought I could go with... If I add any code to propagate logic in my page... I get different results... which I attribute are affecting the runtime... @Property(write = false) private TynamoClassDescriptor classDescriptor; @Property private

RE: custom edit page not possible

2012-12-15 Thread Ken in Nashua
if I comment out the lines of code... My event handler gets invoked... and I stop at my breakpoint.. /* @Property(write = false) private TynamoClassDescriptor classDescriptor; @Property private BeanModel beanModel; @Inject private BeanModelSource

RE: custom edit page not possible

2012-12-15 Thread Ken in Nashua
I was able to get my java running and override a property on the BeanEditor component The commented out code is what prevents the event handler from being invoked... I dont have the answer to why though // @OnEvent(EventConstants.ACTIVATE) // Object activate(Class clazz, String id)