Re: best way to integrate a page or component to keep modular

2013-05-20 Thread Dmitry Gusev
On Tue, May 21, 2013 at 7:29 AM, Ken in Nashua  wrote:

> ok good answers guys... thanks...
>
> I cant say I am happy about it.
>
> I have to write a component just to embed a page ?
>
>
No, you don't have to. You can use HTML  or  to embed pages.


> Shouldn't there be a generic tapestry component to already do this ?
>


Not sure about yours but my pages usually have headers (with navigation and
login/logout links) and footers (with links to social networks etc) (and
some of them has sidebars, with help tips and advertising maybe).


If I embed one of this page to another then what would I have? Two footers,
two headers and 2x sidebars?

I doubt this is something that my users will like.

But, if implement my pages with blocks, like:

Page1.tml:



   Page1



Page2.tml



   Page2



Then on page3 I can embed contents of mainBlocks from page1 and page2 like
this:

Page3.tml








I think this is something you want to do, isn't it?



> ░▒█▓░
> ░░░▓██▒░░
> ░▒▓▒░░▒▓▒
> ▒▒░░░
> ░░░███▒▒███░░
> ░░██████░
> ░██▓░░███
> ██▓▓██░░░
> ░░░██▓░░███░░
> ░░███░▒░▒░▒░░░▒░▒░▒░▒██▓░
> ░▒██░▒░▒░▒░▒░▒░▒░▒░▒░▒██░
> ░██░░░▒░▒░▒░▒░▒░▒░▒██
> ██▓░░▒░██▒░░░
> ██░▒▒░░░██░░░
> ░░░██▒░▒▒▒░░▓█▓░░
> ░░░██░▒▒███░░██░░
> ░░▓█▒░▒▒▒░░░▒██▓░▓█▒░
> ░░██░▒▒░░░▒░▒▒▒░░░▓█▓░██░
> ░░██░░▒▓▒▒░░░▒▒▒███▓▒░██░
> ░▓█▒░░▓▒░░▒░░░▓██▒░░▒░▓█░
> ░██░░█▓▒█▓▒█▓
> ░██░▓▓▒█▒░░░█▓░██
> ▒█▓░▒▓▓██░░▒██▒█▒░░░█▓░██
> ▓█▒░▒░▒██░░░███▓█▓░█▒▓█░▓███▒░░░█▓▒▓█
> ██▒██░░░██░░▓▓░▓▓░█▓░░░▒█▒▒▒█
> ██░██░░░▓█▓░█▒░▓█░▒███▓▓█▒▒▒█
> ██░▒▒▒░██▓███▓░░█▒▒▒█▒▒█▓▒▒▒█
> ██░▓█▒▒▒▒░░▓█░▒▒▓█▒░░░██░▒▒▒█
> ██░▒██▒█░▓█▓▒██▒█
> ██▒░▒██░░▒█▓▒░▒██▓▓██▓░▒█
> ██▒▒░▓██▓█▓░▒▒░▒▒▓▓▒░░▒▓█
> ▓█▓▒▒░▒▓▓▒░▒▒░░░▒▒▒██
> ░██▒▒▒░░░▒░██
> ░██░▒░▒█▓
> ░▓█▒▒▒▓█░
> ░░██▒▓▓▒▒▒██░
> ░░██▒▒██░▒░▓▓▒██░
> ░░▒██▒▒██▓░░▒▒██▒▒██░
> ░░░██▒▒▒███▒░▒▒▒▓███▒▓██░
> █████▒▒▒██░░░
>>
>> ▓██▒▒▒░▒▓█▓▒░▒▒██▒░░░
> ░███▒░░▒▒▒██▓

░░██████░
> ░░░███▓▓███░░
> ▒▓███▓░░░
> ░▒▓▓░
> ░░░▓█▓▒▒▓█▓░░
> ░▓██▒
> ▒███▓▒░░░
>




-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: help constructing a page activation context

2013-05-20 Thread Dmitry Gusev
Hi Ken,


On Tue, May 21, 2013 at 7:25 AM, Ken in Nashua  wrote:

> tHANKS gEOFF...
>
> bUT it tell sme I have a serious problem onmy hands
>
> the output is not matching the input
>
> I dont know what to do
>
>
Just make the output match the input:

Here's your output:

 @OnEvent(EventConstants.PASSIVATE)
Object[] passivate() {
return new Object[] { team, team.getId(), this };
}

and your input should be:

void onActivate(Object team, Long teamId, Object someInstance)
{
 ...
}

But, you don't need all this, because you don't understand something...

I have seen this months ago tryign to create CRUD pages.
>
> Maybe it has to do with the routing features of tynamo? I dont know...
>
> Here is the routing feature
>
> @At("/{2}/{0}/{1}")
> public class RosterQuery implements ExceptionReporter {
>
> the annotation allows me to specify which array subscript (depending on
> how many you are employing in onPassivate.. if it is an array) gets
> positioned on the URL from between transmission onPassivate and onActivate.
>
>

You don't need it, just don't use @At here.

Use tapestry defaults (at least just for now until you get all your
application working and you will want to make your urls prettier with @At).



> kool tool... but I think i uncovered a bug in it.
>

The above routing scheme gets me what I want...
>
> @OnEvent(EventConstants.PASSIVATE)
> Object[] passivate() {
> return new Object[] { team, team.getId(), this };
> }
>
>
> http://localhost:8080/org.tynamo.examples.pphl.pages.RosterQuery$00401b6140d/2/2
>
>
Most of this URL is useless.

Look at this:

org.tynamo.examples.pphl.pages.RosterQuery$00401b6140d

this is a encoding result of calling this.toString() -- which as decoded
becomes:

org.tynamo.examples.pphl.pages.RosterQuery@1b6140d

Why do you need this in URL? You can't use this anyhow in java anyway.

What do you think tapestry should do with this?

The other two parameters are 2 and 2. Not sure how you get 2 from
the "team" instance, I believe this is the work of encoders.
And you will always have these two numbers the same here.
Why don't you just remove one from activation context?

So what we have at the end is:

 @OnEvent(EventConstants.PASSIVATE)
Long passivate() {
return team.getId();
}

and your input should be:

void onActivate(Long teamId)
{
this.team = findTeamById(teamId);
// you're already in context of "this" instance, so you don't need to
pass "this" in onPassivate.
}

and that url gets me to stay on the same RosterQuery page that I intended
> to stay on after table gets rendered.
>
> Not sure what to make of the garble
>
> But I dont like the idea that everytime onActivate gets triggered... its
> formal parameter is NULL
>
>
Again, what do you expect if you don't play the rules?

You can declare your onActivate like this:

void onActivate(EventContext context)
{
// and context will never be null in this case -- why didn't you use
this?
}



>
> ░▒█▓░
> ░░░▓██▒░░
> ░▒▓▒░░▒▓▒
> ▒▒░░░
> ░░░███▒▒███░░
> ░░██████░
> ░██▓░░███
> ██▓▓██░░░
> ░░░██▓░░███░░
> ░░███░▒░▒░▒░░░▒░▒░▒░▒██▓░
> ░▒██░▒░▒░▒░▒░▒░▒░▒░▒░▒██░
> ░██░░░▒░▒░▒░▒░▒░▒░▒██
> ██▓░░▒░██▒░░░
> ██░▒▒░░░██░░░
> ░░░██▒░▒▒▒░░▓█▓░░
> ░░░██░▒▒███░░██░░
> ░░▓█▒░▒▒▒░░░▒██▓░▓█▒░
> ░░██░▒▒░░░▒░▒▒▒░░░▓█▓░██░
> ░░██░░▒▓▒▒░░░▒▒▒███▓▒░██░
> ░▓█▒░░▓▒░░▒░░░▓██▒░░▒░▓█░
> ░██░░█▓▒█▓▒█▓
> ░██░▓▓▒█▒░░░█▓░██
> ▒█▓░▒▓▓██░░▒██▒█▒░░░█▓░██
> ▓█▒░▒░▒██░░░███▓█▓░█▒▓█░▓███▒░░░█▓▒▓█
> ██▒██░░░██░░▓▓░▓▓░█▓░░░▒█▒▒▒█
> ██░██░░░▓█▓░█▒░▓█░▒███▓▓█▒▒▒█
> ██░▒▒▒░██▓███▓░░█▒▒▒█▒▒█▓▒▒▒█
> ██░▓█▒▒▒▒░░▓█░▒▒▓█▒░░░██░▒▒▒█
> ██░▒██▒█░▓█▓▒██▒█
> ██▒░▒██░░▒█▓▒░▒██▓▓██▓░▒█
> ██▒▒░▓██▓█▓░▒▒░▒▒▓▓▒░░▒▓█
> ▓█▓▒▒░▒▓▓▒░▒▒░░░▒▒▒██
> ░██▒▒▒░░░▒░██
> ░██░▒░▒█▓
> ░▓█▒▒▒▓█░
> ░░██▒▓▓▒▒▒██░

░░██▒▒██░▒░▓▓▒██░

░░▒██▒▒██▓░░▒▒██▒▒██░

░░░██▒▒▒███▒░▒▒▒▓███▒▓██░

█████▒▒▒██░░░

▓██▒▒▒░▒▓█▓▒░▒▒██▒░░░
> ░███▒░░▒▒▒██▓

RE: best way to integrate a page or component to keep modular

2013-05-20 Thread Ken in Nashua
cant I use the 

?
  

RE: best way to integrate a page or component to keep modular

2013-05-20 Thread Ken in Nashua
ok good answers guys... thanks...

I cant say I am happy about it.

I have to write a component just to embed a page ? 

Shouldn't there be a generic tapestry component to already do this ?

░▒█▓░ 
░░░▓██▒░░ 
░▒▓▒░░▒▓▒ 
▒▒░░░ 
░░░███▒▒███░░ 
░░██████░ 
░██▓░░███ 
██▓▓██░░░ 
░░░██▓░░███░░ 
░░███░▒░▒░▒░░░▒░▒░▒░▒██▓░ 
░▒██░▒░▒░▒░▒░▒░▒░▒░▒░▒██░ 
░██░░░▒░▒░▒░▒░▒░▒░▒██ 
██▓░░▒░██▒░░░ 
██░▒▒░░░██░░░ 
░░░██▒░▒▒▒░░▓█▓░░ 
░░░██░▒▒███░░██░░ 
░░▓█▒░▒▒▒░░░▒██▓░▓█▒░ 
░░██░▒▒░░░▒░▒▒▒░░░▓█▓░██░ 
░░██░░▒▓▒▒░░░▒▒▒███▓▒░██░ 
░▓█▒░░▓▒░░▒░░░▓██▒░░▒░▓█░ 
░██░░█▓▒█▓▒█▓ 
░██░▓▓▒█▒░░░█▓░██ 
▒█▓░▒▓▓██░░▒██▒█▒░░░█▓░██ 
▓█▒░▒░▒██░░░███▓█▓░█▒▓█░▓███▒░░░█▓▒▓█ 
██▒██░░░██░░▓▓░▓▓░█▓░░░▒█▒▒▒█ 
██░██░░░▓█▓░█▒░▓█░▒███▓▓█▒▒▒█ 
██░▒▒▒░██▓███▓░░█▒▒▒█▒▒█▓▒▒▒█ 
██░▓█▒▒▒▒░░▓█░▒▒▓█▒░░░██░▒▒▒█ 
██░▒██▒█░▓█▓▒██▒█ 
██▒░▒██░░▒█▓▒░▒██▓▓██▓░▒█ 
██▒▒░▓██▓█▓░▒▒░▒▒▓▓▒░░▒▓█ 
▓█▓▒▒░▒▓▓▒░▒▒░░░▒▒▒██ 
░██▒▒▒░░░▒░██ 
░██░▒░▒█▓ 
░▓█▒▒▒▓█░ 
░░██▒░░▒▒▒██░ 
░░██▒▒░▒▓█▓▒░▒██░ 
░░▒██▒█████░░ 
░░░██▒▒░▓███▒░▒▓███▒▓██░░ 
██▒██▓░░▒▒▒░░▒████░░░ 
▓██▒▒▒██░▒░▓▓▒▒██▒░░░ 
░███▒▓▓▒▒▒██▓ 
░░██████░ 
░░░███▓▓███░░ 
▒▓███▓░░░ 
░▒▓▓░ 
░░░▓█▓▒▒▓█▓░░ 
░▓██▒ 
▒███▓▒░░░
  

RE: help constructing a page activation context

2013-05-20 Thread Ken in Nashua
tHANKS gEOFF...

bUT it tell sme I have a serious problem onmy hands

the output is not matching the input

I dont know what to do

I have seen this months ago tryign to create CRUD pages.

Maybe it has to do with the routing features of tynamo? I dont know...

Here is the routing feature

@At("/{2}/{0}/{1}")
public class RosterQuery implements ExceptionReporter {

the annotation allows me to specify which array subscript (depending on how 
many you are employing in onPassivate.. if it is an array) gets positioned on 
the URL from between transmission onPassivate and onActivate.

kool tool... but I think i uncovered a bug in it.

The above routing scheme gets me what I want...

@OnEvent(EventConstants.PASSIVATE)
Object[] passivate() {
return new Object[] { team, team.getId(), this };
}

http://localhost:8080/org.tynamo.examples.pphl.pages.RosterQuery$00401b6140d/2/2

and that url gets me to stay on the same RosterQuery page that I intended to 
stay on after table gets rendered.

Not sure what to make of the garble

But I dont like the idea that everytime onActivate gets triggered... its formal 
parameter is NULL


░▒█▓░ 
░░░▓██▒░░ 
░▒▓▒░░▒▓▒ 
▒▒░░░ 
░░░███▒▒███░░ 
░░██████░ 
░██▓░░███ 
██▓▓██░░░ 
░░░██▓░░███░░ 
░░███░▒░▒░▒░░░▒░▒░▒░▒██▓░ 
░▒██░▒░▒░▒░▒░▒░▒░▒░▒░▒██░ 
░██░░░▒░▒░▒░▒░▒░▒░▒██ 
██▓░░▒░██▒░░░ 
██░▒▒░░░██░░░ 
░░░██▒░▒▒▒░░▓█▓░░ 
░░░██░▒▒███░░██░░ 
░░▓█▒░▒▒▒░░░▒██▓░▓█▒░ 
░░██░▒▒░░░▒░▒▒▒░░░▓█▓░██░ 
░░██░░▒▓▒▒░░░▒▒▒███▓▒░██░ 
░▓█▒░░▓▒░░▒░░░▓██▒░░▒░▓█░ 
░██░░█▓▒█▓▒█▓ 
░██░▓▓▒█▒░░░█▓░██ 
▒█▓░▒▓▓██░░▒██▒█▒░░░█▓░██ 
▓█▒░▒░▒██░░░███▓█▓░█▒▓█░▓███▒░░░█▓▒▓█ 
██▒██░░░██░░▓▓░▓▓░█▓░░░▒█▒▒▒█ 
██░██░░░▓█▓░█▒░▓█░▒███▓▓█▒▒▒█ 
██░▒▒▒░██▓███▓░░█▒▒▒█▒▒█▓▒▒▒█ 
██░▓█▒▒▒▒░░▓█░▒▒▓█▒░░░██░▒▒▒█ 
██░▒██▒█░▓█▓▒██▒█ 
██▒░▒██░░▒█▓▒░▒██▓▓██▓░▒█ 
██▒▒░▓██▓█▓░▒▒░▒▒▓▓▒░░▒▓█ 
▓█▓▒▒░▒▓▓▒░▒▒░░░▒▒▒██ 
░██▒▒▒░░░▒░██ 
░██░▒░▒█▓ 
░▓█▒▒▒▓█░ 
░░██▒░░▒▒▒██░ 
░░██▒▒░▒▓█▓▒░▒██░ 
░░▒██▒█████░░ 
░░░██▒▒░▓███▒░▒▓███▒▓██░░ 
██▒██▓░░▒▒▒░░▒████░░░ 
▓██▒▒▒██░▒░▓▓▒▒██▒░░░ 
░███▒▓▓▒▒▒██▓ 
░░██████░ 
░░░███▓▓███░░ 
▒▓███▓░░░ 
░▒▓▓░ 
░░░▓█▓▒▒▓█▓░░ 
░▓██▒ 
▒███▓▒░░░
  

Re: Tapestry Jquery Bind

2013-05-20 Thread Barry Books
  Here is my old test case


click OK
 

click test

@InjectComponent
@Property
private org.apache.tapestry5.corelib.components.Zone clickZone;

@Inject
private Logger logger;

@OnEvent(value="click")
Object onClick() {
return clickZone.getBody();
}



On Mon, May 20, 2013 at 11:58 AM, Boris Horvat wrote:

> Did anyone used this?
>
> I cant use the example in the tapestry5-jquery as it complains that slider
> is not a mixin, so I guess that the example is old as slider is now a
> component. Still I have tried to use
>
> 
> ${textZone}
> 
>
> 
>  event="onchange" eventType="onfocus" zone="testzone"/>
> 
>
> 
>
> @Property
> @Persist
> private String textZone;
> @InjectComponent
> private Zone zone;
>
> @OnEvent(value = "onchange")
> public Object onchange(String value) {
> textZone = "The SlideChange event was triggered.";
> return zone.getBody();
> }
>
> Does anyone know where is the problem?
>
> Cheers
> Boris
>


Re: help constructing a page activation context

2013-05-20 Thread Geoff Callender
The output of onPassivate becomes the input of onActivate. It goes out to the 
URL and in from the URL. They should match.

http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/onactivateandonpassivate/3

Cheers,

Geoff

On 21/05/2013, at 4:04 AM, Ken in Nashua wrote:

> I tried the context specified below but clazz during activation always comes 
> in as null.
> 
> is this a tapestry bug ?
> 
> @OnEvent(EventConstants.ACTIVATE)
>Object onActivate(Class clazz) {
>if (clazz == null)
>return Utils.new404(messages);
>this.beanType = clazz;
>return null;
>}
> 
>@OnEvent(EventConstants.PASSIVATE)
>Object[] passivate() {
>return new Object[] { team, team.getId(), this };
>}


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



Re: help constructing a page activation context

2013-05-20 Thread Ken in Nashua
Thanks Thiago...

The usage of THIS... is because I am operating exclusively out of 
RosterQuery.JAVA and RosterQuery.tml

This module renders ...

=
| criteria form GO |
=
|  table|
=

I select my criteria and hit GO.  The collection gets populated and table 
rendered.

So i told my onPassivate to stay on this page.  THIS

Check it out at ... ooops I cant show you its not live yet


  

Re: best way to integrate a page or component to keep modular

2013-05-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 May 2013 17:56:28 -0300, Cezary Biernacki   
wrote:



You can't render a page in another page. And you probably should not.


I'd say "You should *not* render pages in other pages. Period. Write a  
component instead.".


But you can move reusable part of one page to a component and use this  
new component on as many pages as you want just by writing
. It is the main feature of Tapestry -  
components as a way to reuse template and code.


Exactly. We can't stress this enough: Tapestry is all about components and  
making it easier to write new ones. If you want to reuse stuff in  
Tapestry, put it in a component and use it in pages or other components.  
As with any other tool, don't try to go against the philosophy of it.


--
Thiago H. de Paula Figueiredo

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



Re: best way to integrate a page or component to keep modular

2013-05-20 Thread Cezary Biernacki
You can't render a page in another page. And you probably should not.

But you can move reusable part of one page to a component and use this new
component on as many pages as you want just by writing
. It is the main feature of Tapestry - components
as a way to reuse template and code.




On Mon, May 20, 2013 at 10:44 PM, Ken in Nashua  wrote:

> Guys,
>
> I stillk dont get it though...
>
> if I have a block like
>
> 
>
> 
>
> How do I get a page rendered inside this block?
>
> I mean I have a page called RosterQuery.tml RosterQuery.java
>
> there is  
>
> How do i put this together...
>
> I still dont know how to reference my page into the above block so it will
> embed render within theblock without having to copy and paste the whole
> page and clutter up my block..
>
> All i want in my block is a one liner that will render my page.
>
> Can you tell me how this is done ?
>
> thanks
>


RE: best way to integrate a page or component to keep modular

2013-05-20 Thread Ken in Nashua
you might be thinking I am inside my layout.tml... or my home.tml...

almost... the case...

My block is within my home.tml... which is already being laid thru to 
layout.tml and  is used in layout.tml

my issue is just a surrogate tab block inside my home.tml

all I want to do is embed the rendering of a page within the block I am 
specifying inside my home.tml

any tips are very appreciated.


  

Re: best way to integrate a page or component to keep modular

2013-05-20 Thread Ken in Nashua
Guys,

I stillk dont get it though...

if I have a block like





How do I get a page rendered inside this block?

I mean I have a page called RosterQuery.tml RosterQuery.java

there is  

How do i put this together...

I still dont know how to reference my page into the above block so it will 
embed render within theblock without having to copy and paste the whole page 
and clutter up my block..

All i want in my block is a one liner that will render my page.

Can you tell me how this is done ?

thanks
  

Re: help constructing a page activation context

2013-05-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 May 2013 15:04:35 -0300, Ken in Nashua   
wrote:


I tried the context specified below but clazz during activation always  
comes in as null.


is this a tapestry bug ?


No. If you wan to get the class as the first page activation context  
value, it should be the first value in the List or array you return in  
onPassivate(). Keep in mind that the same order of values in onActivate()  
should be used in onPassivate(). By the way, including 'this' in the  
activation context makes no sense to me.




@OnEvent(EventConstants.ACTIVATE)
Object onActivate(Class clazz) {
if (clazz == null)
return Utils.new404(messages);
this.beanType = clazz;
return null;
}

@OnEvent(EventConstants.PASSIVATE)
Object[] passivate() {
return new Object[] { team, team.getId(), this };
}   



--
Thiago H. de Paula Figueiredo

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



Re: FormFragment checkbox not working

2013-05-20 Thread Nikola Vulovic
component does not work because of table tag works without it.


On Mon, May 20, 2013 at 9:45 AM, Nikola Vulovic  wrote:

> behaviour is completely the same with and with out
> (PersistenceConstant.FLASH)
>
>
> On Sun, May 19, 2013 at 11:10 PM, Nikola Vulovic wrote:
>
>> formfragment is shown when checkox "renew" is not checked
>>
>>
>>
>> On Sun, May 19, 2013 at 5:28 PM, Nikola Vulovic wrote:
>>
>>> tml file
>>> >>   xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";
>>>   xmlns:p="tapestry:parameter">
>>> 
>>>
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>  
>>> Add new expense form
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> (*):
>>> 
>>> 
>>> >> value="recepientValue"/>
>>> 
>>> 
>>> 
>>> 
>>>
>>> (*):
>>> 
>>> 
>>> >> t:id="purposeOfPayment" value="purposeOfPaymentValue"/>
>>> 
>>> 
>>> 
>>> (*):
>>> 
>>> 
>>> >> value="currencyValue"/>
>>> 
>>> 
>>> 
>>> 
>>> (*):
>>> 
>>> 
>>> >>  t:type="TextField" t:id="amount" value="amountValue"/>
>>> 
>>> 
>>> 
>>> 
>>> :
>>> 
>>> 
>>> >> t:mixins="triggerfragment"
>>> fragment="f1"/>
>>> 
>>> 
>>> >> hide="fade">
>>> 
>>> 
>>> Calculate payment from
>>> 
>>> 
>>> 
>>> 
>>> (*):
>>> 
>>> 
>>> >> t:id="dateOfPayment" value="dateOfPaymentValue" />
>>> 
>>> 
>>> 
>>> 
>>> Repeat payment every
>>> 
>>> 
>>> 
>>> 
>>> (*):
>>> 
>>> 
>>> >> t:id="number"  value="numberValue"/>
>>> 
>>> 
>>> 
>>> 
>>> (*):
>>> 
>>> 
>>> >> t:model="literal:day,week,month,year" t:value="timeUnitValue"/>
>>> 
>>> 
>>> 
>>> 
>>> Calculate payment until
>>> 
>>> 
>>> 
>>> 
>>> (*):
>>> 
>>> 
>>> >> t:id="endDate" value="endDateValue" />
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Select currency form
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> (*):
>>> 
>>> 
>>> >> value="tableCurrencyValue"/>
>>>   

RE: help constructing a page activation context

2013-05-20 Thread Ken in Nashua
This seems to help me stay on the same page...

/*
@OnEvent(EventConstants.ACTIVATE)
Object onActivate(Class clazz) {
if (clazz == null)
return Utils.new404(messages);
this.beanType = clazz;
return null;
}
*/
@OnEvent(EventConstants.PASSIVATE)
Object[] passivate() {
return new Object[] { team, team.getId(), this };
}

but I had to comment out onActivate... as it kept coming in with null CLAZZ

is this a tapestry bug ?

I could not get any parameters to come in based on the onPassivate I designed.

But this is what I get for a URL...

http://localhost:8080/org.tynamo.examples.pphl.pages.RosterQuery$0040337893/1/1

how do you explain that ?
  

RE: help constructing a page activation context

2013-05-20 Thread Ken in Nashua
I tried the context specified below but clazz during activation always comes in 
as null.

is this a tapestry bug ?

@OnEvent(EventConstants.ACTIVATE)
Object onActivate(Class clazz) {
if (clazz == null)
return Utils.new404(messages);
this.beanType = clazz;
return null;
}

@OnEvent(EventConstants.PASSIVATE)
Object[] passivate() {
return new Object[] { team, team.getId(), this };
} 

Tapestry Jquery Bind

2013-05-20 Thread Boris Horvat
Did anyone used this?

I cant use the example in the tapestry5-jquery as it complains that slider
is not a mixin, so I guess that the example is old as slider is now a
component. Still I have tried to use


${textZone}








@Property
@Persist
private String textZone;
@InjectComponent
private Zone zone;

@OnEvent(value = "onchange")
public Object onchange(String value) {
textZone = "The SlideChange event was triggered.";
return zone.getBody();
}

Does anyone know where is the problem?

Cheers
Boris


Re: Annoying scroll when a zone is updated

2013-05-20 Thread Peter Hvass
Hi Ben, 


Do you have any form fields in the zone? Those will steal focus (causing a 
'jump' in scroll location) unless you specify autofocus="false" on the form. 


Thanks, 
Peter 

- Original Message -

From: "Ben Titmarsh"  
To: users@tapestry.apache.org 
Sent: Monday, 20 May, 2013 4:41:11 PM 
Subject: Annoying scroll when a zone is updated 

Hi All, 

I have a grid and a form inside a zone. The grid can contain hundreds of rows 
and values can be updated with Ajax resulting in a zone refresh. I have a bit 
of a UX problem in that when the user changes a value in the grid, the zone is 
refreshed and the browser scrolls back up to the top of the zone. Clearly if 
you want to update lots of rows, losing the context of where you were in the 
grid is a real frustration. 

Any suggestions on a solution for this? 

Thanks, 
Ben. 





RE: User requested authorization to join users@tapestry.apache.org Mailing List Archives

2013-05-20 Thread James Tan
Subscribe

To: tapestry...@hotmail.com
Subject: Re: User requested authorization to join users@tapestry.apache.org 
Mailing List Archives
Date: Mon, 1 Apr 2013 08:24:39 -0300
From: thiag...@gmail.com




Hi!
You need to subscribe to the Tapestry users mailing list. It was never a forum 
to begin with. ;)
Cheers!
On Sat, 30 Mar 2013 16:15:52 -0300, Nabble  wrote:

Dear thiagohp,



TG requested authorization to join the users@tapestry.apache.org Mailing List 
Archives:

http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/users-tapestry-apache-org-Mailing-List-Archives-f2375125.html



Explanation from this user:

Hi, would you give me a permission to post question? Thanks!



User email:

tapestry...@hotmail.com



To accept this request, you should add this user to at least one group that has 
access to this area:

http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=change_user_groups&user=198410

Or you can ignore this email if it is better to keep this user away from that 
area.



Free Embeddable Forum powered by Nabble

http://www.nabble.com/




-- Thiago H. de Paula Figueiredo  

RE: Annoying scroll when a zone is updated

2013-05-20 Thread Ben Titmarsh
A bit more detail on this, I've found that the reason for the scroll is because 
it is focussing on a form field (a select component) above the grid when the 
zone is updated.  I have quite a few form fields inside this zone, is there a 
way to turn off autofocus for all of them?

> From: ben.titma...@hotmail.co.uk
> To: users@tapestry.apache.org
> Subject: Annoying scroll when a zone is updated
> Date: Mon, 20 May 2013 13:41:11 +
> 
> Hi All,
> 
> I have a grid and a form inside a zone.  The grid can contain hundreds of 
> rows and values can be updated with Ajax resulting in a zone refresh.  I have 
> a bit of a UX problem in that when the user changes a value in the grid, the 
> zone is refreshed and the browser scrolls back up to the top of the zone.  
> Clearly if you want to update lots of rows, losing the context of where you 
> were in the grid is a real frustration.
> 
> Any suggestions on a solution for this?
> 
> Thanks,
> Ben.
> 
> 
> 
  

help constructing a page activation context

2013-05-20 Thread Ken in Nashua
Hi Tapestry Pro's...
Good morning..

I was wondering about my page. 

Here is the link to my page... its basically a prototype I will retrofit in 
later.

http://localhost:8080/pphl/rosterquery

My page renders and everything is good. I select my criteria and hit GO 
(submit).

My tabel list gets populated and rendered...

BUT... my page keeps taking off to somewhere else like 

http://localhost:8080/team

or 

http://localhost:8080/player

or 

http://localhost:8080/pphl/rosterquery.criteriaform  with an HTTP error 404

I looked at my passivate routine and not sure what to put in it.

I wuold like to return to the same page

http://localhost:8080/pphl/rosterquery but when I return this from my submit it 
doesnt work.

any ideas ?

Thank You
Ken


@OnEvent(EventConstants.PASSIVATE)
Object[] passivate() {
return new Object[] { beanType };
}
  

RE: trying to avoid code bloat

2013-05-20 Thread Ken in Nashua
Thanks Joakim... I noticed that. I didnt believe the error... but its good to 
have a confirmation.

I will try it again in that pages dir.
  

Re: best way to integrate a page or component to keep modular

2013-05-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 May 2013 10:47:06 -0300, Ben Titmarsh  
 wrote:



Sounds like what you want is a layout component which uses t:body.


Just a reminder that any component can use  and that a Layout  
component is something like a design patter in Tapestry, as all components  
are treated in the exact same way.


--
Thiago H. de Paula Figueiredo

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



RE: best way to integrate a page or component to keep modular

2013-05-20 Thread Ben Titmarsh
Sounds like what you want is a layout component which uses t:body. 

For example:

Layout.tml



add INFORMATION description here
 



ROSTERS please select a team





MyPage.tml


 Page content


This page provides further documentation:

http://tapestry.apache.org/layout-component.html

> From: kcola...@live.com
> To: users@tapestry.apache.org
> Subject: RE: best way to integrate a page or component to keep modular
> Date: Sun, 19 May 2013 21:02:54 -0400
> 
> For instance... given this block of code.. 
> 
>  t:activePanelId="aLevelTabsIndex" >
> 
> add INFORMATION description here
> 
> 
> 
> 
> ROSTERS please select a team
> 
> 
>  />
> 
> 
> is there such a component that will do the above 
> renderthispagerighthereinplace
> ?
> 
> Thanks
> 
  

Annoying scroll when a zone is updated

2013-05-20 Thread Ben Titmarsh
Hi All,

I have a grid and a form inside a zone.  The grid can contain hundreds of rows 
and values can be updated with Ajax resulting in a zone refresh.  I have a bit 
of a UX problem in that when the user changes a value in the grid, the zone is 
refreshed and the browser scrolls back up to the top of the zone.  Clearly if 
you want to update lots of rows, losing the context of where you were in the 
grid is a real frustration.

Any suggestions on a solution for this?

Thanks,
Ben.


  

Re: trying to avoid code bloat

2013-05-20 Thread Peter Stavrinides
stick them in the base package, extend the class and it works great 

- Original Message -

From: "Barry Books"  
To: "Tapestry users"  
Sent: Monday, 20 May, 2013 2:31:18 PM 
Subject: Re: trying to avoid code bloat 

I would not use an Abstract page for this purpose. The first problem is 
protected will not work because the pages will not have the same package. I 
would create a service with these services and just inject that. So your 
page would just have 

@Inject 
private Services services; 

and your service will have a constructer and get methods: 

class Services(Service1 service1, ...) { 
this.service1 = service1; 
} 

public Service1 getService1() { 
return service1; 
} 




On Sun, May 19, 2013 at 9:59 PM, Ken in Nashua  wrote: 

> Hi Folks, 
> 
> Can i construct an abstract page and inject a bunch of services and then 
> have derived instances extend from that ? 
> 
> I tried it and seeing some weird class format errors. 
> 
> I did it with my model entities. 
> 
> trying to do it with pages and injectables. 
> 
> public abstract class AbstractPage implements 
> org.tynamo.examples.pphl.pages.interfaces.IAbstractPage, ExceptionReporter { 
> 
> /** 
> * services and injectables 
> */ 
> @Inject 
> protected Logger logger; 
> 
> @Inject 
> protected DescriptorService descriptorService; 
> 
> @Inject 
> protected HibernatePersistenceService hibernatePersistenceService; 
> 
> @Inject 
> protected Messages messages; 
> 
> @Inject 
> protected PropertyAccess adapter; 
> 
> @Inject 
> protected ValueEncoderSource valueEncoderSource; 
> 
> @Inject 
> protected ComponentDefaultProvider cdp; 
> 
> @Inject 
> protected ComponentResources resources; 
> 
> @Inject 
> protected ApplicationStateManager applicationStateManager; 
> 
> @Inject 
> protected PersistenceService persistenceService; 
> 
> @Inject 
> protected SecurityService securityService; 
> 
> 



Re: trying to avoid code bloat

2013-05-20 Thread Barry Books
I would not use an Abstract page for this purpose. The first problem is
protected will not work because the pages will not have the same package. I
would create a service with these services and just inject that. So your
page would just have

@Inject
private Services services;

and your service will have a constructer and get methods:

class Services(Service1 service1, ...) {
this.service1 = service1;
}

public Service1 getService1() {
return service1;
}




On Sun, May 19, 2013 at 9:59 PM, Ken in Nashua  wrote:

> Hi Folks,
>
> Can i construct an abstract page and inject a bunch of services and then
> have derived instances extend from that ?
>
> I tried it and seeing some weird class format errors.
>
> I did it with my model entities.
>
> trying to do it with pages and injectables.
>
> public abstract class AbstractPage implements
> org.tynamo.examples.pphl.pages.interfaces.IAbstractPage, ExceptionReporter {
>
> /**
>  * services and injectables
>  */
> @Inject
> protected Logger logger;
>
> @Inject
> protected DescriptorService descriptorService;
>
> @Inject
> protected HibernatePersistenceService hibernatePersistenceService;
>
> @Inject
> protected Messages messages;
>
> @Inject
> protected PropertyAccess adapter;
>
> @Inject
> protected ValueEncoderSource valueEncoderSource;
>
> @Inject
> protected ComponentDefaultProvider cdp;
>
> @Inject
> protected ComponentResources resources;
>
> @Inject
> protected ApplicationStateManager applicationStateManager;
>
> @Inject
> protected PersistenceService persistenceService;
>
> @Inject
> protected SecurityService securityService;
>
>


Re: FormFragment checkbox not working

2013-05-20 Thread Nikola Vulovic
behaviour is completely the same with and with out
(PersistenceConstant.FLASH)


On Sun, May 19, 2013 at 11:10 PM, Nikola Vulovic  wrote:

> formfragment is shown when checkox "renew" is not checked
>
>
>
> On Sun, May 19, 2013 at 5:28 PM, Nikola Vulovic wrote:
>
>> tml file
>> >   xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";
>>   xmlns:p="tapestry:parameter">
>> 
>>
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>  
>> Add new expense form
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> (*):
>> 
>> 
>> > value="recepientValue"/>
>> 
>> 
>> 
>> 
>>
>> (*):
>> 
>> 
>> > value="purposeOfPaymentValue"/>
>> 
>> 
>> 
>> (*):
>> 
>> 
>> > value="currencyValue"/>
>> 
>> 
>> 
>> 
>> (*):
>> 
>> 
>> >  t:type="TextField" t:id="amount" value="amountValue"/>
>> 
>> 
>> 
>> 
>> :
>> 
>> 
>> > t:mixins="triggerfragment" fragment="f1"/>
>> 
>> 
>> 
>> 
>> 
>> Calculate payment from
>> 
>> 
>> 
>> 
>> (*):
>> 
>> 
>> > t:id="dateOfPayment" value="dateOfPaymentValue" />
>> 
>> 
>> 
>> 
>> Repeat payment every
>> 
>> 
>> 
>> 
>> (*):
>> 
>> 
>> > t:id="number"  value="numberValue"/>
>> 
>> 
>> 
>> 
>> (*):
>> 
>> 
>> > t:model="literal:day,week,month,year" t:value="timeUnitValue"/>
>> 
>> 
>> 
>> 
>> Calculate payment until
>> 
>> 
>> 
>> 
>> (*):
>> 
>> 
>> > t:id="endDate" value="endDateValue" />
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Select currency form
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> (*):
>> 
>> 
>> > value="tableCurrencyValue"/>
>> 
>> 
>> 
>> 
>> > value="Select Currency"/>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>