Re: T5: Form using Zone with two submits - possible bug?

2008-08-08 Thread Angelo Chen

a solution is documented on the wiki page:
http://wiki.apache.org/tapestry/Tapestry5HowToUseForms
look for "Dealing with multiple submits"


Mike Leonardo wrote:
> 
> Hello,
> I have a form that uses the zone parameter so that the submission is
> handled as an Ajax reload.
> The problem is that my form has two submit buttons, but Tapestry seems to
> always trigger the "selected" event for the first button, regardless of
> which one I click. 
> 
> I've created this small test page to prove it to myself:
> 
> MyTestPage.tml
> --
> 
> 
> Value: ${value}
> 
> 
>  />
> 
> 
> 
> 
> MyTestPage.java
> ---
> public class MyTestPage {
>   @Property private int value;
>   @InjectComponent private Form form;
>   
>   void onSelectedFromFirstButton() {
>   System.out.println("Reached First Button");
>   }
>   
>   void onSelectedFromSecondButton() {
>   System.out.println("Reached Second Button");
>   }
> }
> 
> Only my method "OnSelectedFromFirstButton" is visited, never the
> "OnSelectedFromSecondButton".
> I also tried an onchange javascript event to just submit the form (i.e.
> not pushing any buttons) and it still triggers the first button event.
> Is this is a bug, or do I not understand how this works?
> 
> Thanks for any help!
> - Mike
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Form-using-Zone-with-two-submits---possible-bug--tp18898971p18902318.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] How to handle DAOs?

2008-08-08 Thread Onno Scheffers
Hi,

I am having some troubles figuring out the proper way to use DAO services
using tapestry-hibernate. The documentation describes how to write the DAO
service interfaces and how to register them, but it doesn't show an example
of an actual DAO implementation.

As far as I know I cannot inject a Hibernate Session into the DAO service
implementation, so I must create a constructor for that.
If I do that it works fine, but every example I was able to find (not many!)
seem to use the default scope for the DAO service, which is singleton. It
works on my local machine, but I don't quite understand how this would work
in a multi-user, multi-threaded environment. Shouldn't the scope be
perthread?

Does anyone have a bit of example code for a DAO interface, its
implementation and the way they are registered in the AppModule?


regards,

Onno


Re: T5: Trigger zone reload with just javascript?

2008-08-08 Thread Lutz Hühnken
Hi Mike,

I faced the same task, I solved it using the onEvent mixin from
Tapestry 5 components -
http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/mixins/OnEvent.html

In more detail - say you have two selects, sel1 and sel2, and you want
sel2 to be updated when sel1 changes.

Add the mixin to sel1:

...


...

In your component class, implement a method that returns the options
all in one string, seperated by some characters not otherwise used in
your labels or options. For example, you could use ";" between labels
and options, and "||" between the label - option pairs.

 @OnEvent(component = "sel1", value = "change")
public StreamResponse selectionChanged(final YourClass parameter) {
   ... do something with parameter..
  ... build list of label - option pairs..
for (i...) {
  pair[i] = label + ";" + option;
}
return new TextStreamResponse("text/html",
StringUtils.join(pairs, "||"));
   }

Tapestry type coercion works for your parameter, but the return string
you have to build yourself.

Finally, the callback function in Javascript looks like this:

function populateSel2(response) {
document.getElementById('sel2').options.length = 0;
// Split the response
returnElements = response.split("||")
// Process each of the elements
for ( var i = 0; i < returnElements.length; i++) {
valueLabelPair = returnElements[i].split(";")
document.getElementById('sel2').options[i] = new Option(
valueLabelPair[0], valueLabelPair[1]);
}
}

I should mention that I picked that function up somewhere on the
internet, i didn't write it myself.

Anyway, hope this helps,

Lutz

On Thu, Aug 7, 2008 at 10:06 PM, Mike Leonardo <[EMAIL PROTECTED]> wrote:
> Hey All,
>
> I have a form where I want to be able to change one value and have the other 
> values in the form update. I have a zone around the whole form, and I'd like 
> to use the onchange event to reload the Zone, but what javascript I use to 
> trigger the reloading?
>
> Thanks for any help!
> - Mike
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 pagelink and http - >https redirect

2008-08-08 Thread Howard Lewis Ship
Please add a bug in JIRA.

On Fri, Aug 8, 2008 at 3:17 PM, Lutz Hühnken
<[EMAIL PROTECTED]> wrote:
> I fell into that same trap once. Although it does it good job in
> teaching a lesson about not just copying & pasting code from a web
> page, it would really be nice if someone could correct the incorrect
> code samples on
>
> http://tapestry.apache.org/tapestry5/guide/secure.html
>
> Samples (plural) because it seems the snippets above the one with the
> mixed up ports also don't work anymore, I think it has to be
> configuration.add instead of configuration.put.
>
> Lutz
>
>
>
> On Fri, Aug 8, 2008 at 4:34 AM, tapestry5 <[EMAIL PROTECTED]> wrote:
>>
>> It should not be
>>
>> String protocol = secure ? "https" : "http";
>> int port = secure ? 8080 : 8443;
>>
>> but
>>
>> String protocol = secure ? "https" : "http";
>> int port = secure ? 8443 : 8080;
>>
>>
>>
>>
>> Argo Vilberg wrote:
>>>
>>> hi,
>>>
>>>
>>> I have one page with http protocol and pagelink in it.
>>> Pagelink points https @secure page.
>>>
>>> But problem is that pagelink generate https://localhost/digi/newpage link,
>>> and not with alias localhost:8443.
>>>
>>> http page is in port 8080, but pagelink do not understand that https port
>>> is
>>> 8443.
>>>
>>> I also tried do add
>>> public void contributeAlias(Configuration
>>> configuration)
>>>{
>>>BaseURLSource source = new BaseURLSource()
>>>{
>>>   public String getBaseURL(boolean secure)
>>> {
>>> String protocol = secure ? "https" : "http";
>>>
>>> int port = secure ? 8080 : 8443;
>>>
>>> return String.format("%s://localhost:%d",
>>> protocol,
>>> port);
>>> }
>>> };
>>>
>>> configuration.add(AliasContribution.create(BaseURLSource.class,source));
>>>
>>>}
>>>
>>>
>>> in AppModule.java
>>>
>>> But this does not help.
>>>
>>> Any ideas?
>>>
>>> Argo
>>>
>>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/T5-pagelink-and-http---%3Ehttps-redirect-tp18873545p18884134.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 pagelink and http - >https redirect

2008-08-08 Thread Lutz Hühnken
I fell into that same trap once. Although it does it good job in
teaching a lesson about not just copying & pasting code from a web
page, it would really be nice if someone could correct the incorrect
code samples on

http://tapestry.apache.org/tapestry5/guide/secure.html

Samples (plural) because it seems the snippets above the one with the
mixed up ports also don't work anymore, I think it has to be
configuration.add instead of configuration.put.

Lutz



On Fri, Aug 8, 2008 at 4:34 AM, tapestry5 <[EMAIL PROTECTED]> wrote:
>
> It should not be
>
> String protocol = secure ? "https" : "http";
> int port = secure ? 8080 : 8443;
>
> but
>
> String protocol = secure ? "https" : "http";
> int port = secure ? 8443 : 8080;
>
>
>
>
> Argo Vilberg wrote:
>>
>> hi,
>>
>>
>> I have one page with http protocol and pagelink in it.
>> Pagelink points https @secure page.
>>
>> But problem is that pagelink generate https://localhost/digi/newpage link,
>> and not with alias localhost:8443.
>>
>> http page is in port 8080, but pagelink do not understand that https port
>> is
>> 8443.
>>
>> I also tried do add
>> public void contributeAlias(Configuration
>> configuration)
>>{
>>BaseURLSource source = new BaseURLSource()
>>{
>>   public String getBaseURL(boolean secure)
>> {
>> String protocol = secure ? "https" : "http";
>>
>> int port = secure ? 8080 : 8443;
>>
>> return String.format("%s://localhost:%d",
>> protocol,
>> port);
>> }
>> };
>>
>> configuration.add(AliasContribution.create(BaseURLSource.class,source));
>>
>>}
>>
>>
>> in AppModule.java
>>
>> But this does not help.
>>
>> Any ideas?
>>
>> Argo
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/T5-pagelink-and-http---%3Ehttps-redirect-tp18873545p18884134.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 How to tell T5 to send 301 (moved permanently)

2008-08-08 Thread Lutz Hühnken
I haven't tried it, but I think it should work with the approach described in

http://www.nabble.com/Index-page-context-and-404-response-to16649174.html#a16649174

It works fine for 404, you might have to extend it to include the URL
to the page you are redirecting to.

Hth,

Lutz


On Thu, Aug 7, 2008 at 3:16 PM, Martin Grotzke
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> when I return a link in some method T5 send a 302. I want to send a 301
> to the client. Is this possible with tapestry, without using the servlet
> stuff?
>
> Thanx && cheers,
> Martn
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Trigger zone reload with just javascript?

2008-08-08 Thread Toby Hobson
Hi Mike,

Ok it soundsl like there are a few options here but the best option is
probably going to be an AJAX request that is fired when the field is
changed. The source code for the autocomplete mixin should give you some
idea how to do this. Basically I would make the ajax request which is then
handled by an event handler on your page/component. The handler could return
xml or JSON and the JS code on your page/component will use this data to
update the other values in the form.

Toby

2008/8/8 Mike Leonardo <[EMAIL PROTECTED]>

> Hey Toby,
>
> I did try that out and it works - but the problem is that I want the
> ability to actually submit the form normally with a submit button and do
> something else on that submit. If I use the form's zone parameter then there
> is no way to actually submit / reload the page. At least from what I
> understand.
>
> - Mike
>
>
> - Original Message -
> From: "Toby Hobson" <[EMAIL PROTECTED]>
> To: "Tapestry users" 
> Sent: Thursday, August 7, 2008 5:53:20 PM (GMT-0500) America/New_York
> Subject: Re: T5: Trigger zone reload with just javascript?
>
> Hi Mike,
>
> Have you tried using the t:zone parameter in your form? then you can
> perform
> a submit in your onchange handler e.g.
>
>
>
> onchange="document.forms[0].submit()" />
>
>
>
> Toby
>
> 2008/8/7 Mike Leonardo <[EMAIL PROTECTED]>
>
> > Hey All,
> >
> > I have a form where I want to be able to change one value and have the
> > other values in the form update. I have a zone around the whole form, and
> > I'd like to use the onchange event to reload the Zone, but what
> javascript I
> > use to trigger the reloading?
> >
> > Thanks for any help!
> > - Mike
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


T5: Form using Zone with two submits - possible bug?

2008-08-08 Thread Mike Leonardo
Hello,
I have a form that uses the zone parameter so that the submission is handled as 
an Ajax reload.
The problem is that my form has two submit buttons, but Tapestry seems to 
always trigger the "selected" event for the first button, regardless of which 
one I click. 

I've created this small test page to prove it to myself:

MyTestPage.tml
--


Value: ${value}







MyTestPage.java
---
public class MyTestPage {
@Property private int value;
@InjectComponent private Form form;

void onSelectedFromFirstButton() {
System.out.println("Reached First Button");
}

void onSelectedFromSecondButton() {
System.out.println("Reached Second Button");
}
}

Only my method "OnSelectedFromFirstButton" is visited, never the 
"OnSelectedFromSecondButton".
I also tried an onchange javascript event to just submit the form (i.e. not 
pushing any buttons) and it still triggers the first button event.
Is this is a bug, or do I not understand how this works?

Thanks for any help!
- Mike



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5: checkboxes for selecting a sub group of hibernate entities

2008-08-08 Thread Chris Lewis
Hello,

I have a collection of entities that need to be displayed in a form. A
user must be able to indicate any number of these entities in which they
have interest  by checking the box, and I'm at a bit of a loss at how to
handle this elegantly. I've dealt with a variable number of inputs
before, where I used a loop index to update values in a list by
implementing a faux property setter accessed by the loop, but that won't
work with checkboxes because they are boolean. Here's a quick summary:

I have a table PropertyTypes that has a few records (Condo, Single
Family, Land / Lot, etc). In a form I'd present all of these to the user
as check boxes, and they could select any number of them indicating
their interest:

[ x ] Condo
[ x ] Single Family
[   ] Land / Lot

The only way I can think to do this is back that selection by a
collection of booleans, and then compare that list to the list of
entities from the table assuming that the collection sizes are identical
and that the indexes correspond exactly. I don't feel like that is
elegant and am wondering if anyone has ideas on a cleaner / simpler way
of doing this. Thanks!

-- 
http://thegodcode.net


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Trigger zone reload with just javascript?

2008-08-08 Thread Mike Leonardo
Hey Toby,

I did try that out and it works - but the problem is that I want the ability to 
actually submit the form normally with a submit button and do something else on 
that submit. If I use the form's zone parameter then there is no way to 
actually submit / reload the page. At least from what I understand. 

- Mike


- Original Message -
From: "Toby Hobson" <[EMAIL PROTECTED]>
To: "Tapestry users" 
Sent: Thursday, August 7, 2008 5:53:20 PM (GMT-0500) America/New_York
Subject: Re: T5: Trigger zone reload with just javascript?

Hi Mike,

Have you tried using the t:zone parameter in your form? then you can perform
a submit in your onchange handler e.g.







Toby

2008/8/7 Mike Leonardo <[EMAIL PROTECTED]>

> Hey All,
>
> I have a form where I want to be able to change one value and have the
> other values in the form update. I have a zone around the whole form, and
> I'd like to use the onchange event to reload the Zone, but what javascript I
> use to trigger the reloading?
>
> Thanks for any help!
> - Mike
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: help with self developed imagemap component

2008-08-08 Thread Toby Hobson
Sorry Gregor ... I wrote my reply just as you wrote yours! It's a while
since I used T4 but I'll look through some of my old code and try to find
out how I did this

Toby

2008/8/8 Gregor Burger <[EMAIL PROTECTED]>

> Hi Toby,
>
> As i mentioned earlier I can't use Tapestry5 (old Servlet container) which
> would
> be a big help. So, is ComponentResource or anything equivalent
> available in Tapestry 4?
>
> thanks
> Gregor
>
> On Fri, Aug 8, 2008 at 3:32 PM, Toby Hobson <[EMAIL PROTECTED]>
> wrote:
> > Hi Gregor,
> >
> > Basically you inject ComponentResources into your page then use
> > componentResurces.createActionLink() method to generate a Link object.
> Then
> > call toAbsoluteURI() on the link to get the url.
> >
> > N.B. if you are planning to use ajax and zones you have to do a little
> bit
> > more ...  I'll happily explain it if you want to know.
> >
> > Toby
> >
> > 2008/8/8 Gregor Burger <[EMAIL PROTECTED]>
> >
> >> hi,
> >>
> >> I would like to develop a component which renders an imagemap
> >> produced by graphviz, so I can click on the graph elements.
> >> graphviz provides me the html map which i render using
> >> an raw Insert component. I've also developed a service which provides
> >>  me the images from graphviz. This works fine, which is really cool.
> >>
> >> BUT:
> >>
> >> I need to specify the link targets in the graphviz script before the
> >> component gets rendered. So my question: How could I generate
> >> DirectLinks so i can embed the urls of the links in the graphviz script.
> >>
> >> I hope my explanations aren't to confusing and that somebody can
> >> help me.
> >>
> >> thanks in advance
> >>
> >> gregor
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Setting the GridPager range

2008-08-08 Thread Davor Hrg
this looks like a bug,
please post a JIRA issue

Davor Hrg

On Fri, Aug 8, 2008 at 3:13 PM, Radoslav Bielik <[EMAIL PROTECTED]> wrote:

> Thanks - it should be, but it ain't that simple :)
> It was actually one of the first things I tried...
>
> If you check the Grid component reference, it doesn't have a parameter
> for "range" that it would pass on to its pager. That means that when
> you use it - it will just ignore it...
>
> Thanks,
> Rado
>
>
> Friday, August 8, 2008, 3:09:45 PM, you wrote:
> > it should be as simple as this:
>
> > ...
>
>
>
> > On Fri, Aug 8, 2008 at 2:57 PM, <[EMAIL PROTECTED]> wrote:
> > I just noticed that my reply went out as a response to my
> > original question, rather than a reply to your question. I don't
> > want to clog the mailinglist so just in case you didn't receive it,
> > here is what I meant:
>
> > Just check the GridPager
> > reference:
> >
> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/GridPager.html
>
>
> > range: Number of pages before and after the current page in the range.
> The
> > pager always displays links for 2 * range + 1 pages, unless that's more
> than
> > the total number of available pages.
>
> > The default is 5, and I can't find a way to change it when using the Grid
> > component.
>
>
>
> > Davor Hrg wrote:
> >>
> >> I don't understand what you mean by "range" ?
> >>
> >> Davor Hrg
> >>
>
>
> >> On Thu, Aug 7, 2008 at 3:16 PM, immutability <[EMAIL PROTECTED]>
> wrote:
> >>
> >>>
> >>> Hi everyone! I'm still a little new to Tapestry5, and before starting a
> >>> large
> >>> project we've decided to develop a small internal application using
> >>> Tapestry5. I was working on this for some 3 weeks now, and so far I'm
> >>> impressed! I was able to resolve most of my issue using Google,
> Tapestry
> >>> reference and Wiki, or the archives of this mailinglist, but this time
> I
> >>> ran
> >>> into a few things that I can't figure out. Here's the first one:
> >>>
> >>> I'm using the Grid component to display a list of some entities. The
> Grid
> >>> itself has a few parameters to adjust paging behavior (namely
> >>> pagerPosition
> >>> and rowsPerPage) but there's no parameter to configure GridPager's
> >>> "range"
> >>> parameter. Now, I searched wherever I could, but didn't find a single
> >>> example on how to adjust the default values of "range" which is 5. I
> have
> >>> tried to do this declaratively, programmatically in the page's backing
> >>> class, but just couldn't find the way to do this.
> >>>
> >>> So my question is: is there an easy way to do this? And if not - is
> there
> >>> a
> >>> hard way to do this? :) I think I mainly need some pointers to get me
> >>> started.
> >>>
> >>> Thanks in advance!
> >>> Rado
> >>> --
> >>> View this message in context:
>
>
> >>>
> http://www.nabble.com/Setting-the-GridPager-range-tp18870199p18870199.html
> >>> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>
> >>
>
> > Quoted from:
> >
> http://www.nabble.com/Setting-the-GridPager-range-tp18870199p18890782.html
>
>
>
>
>
>
>
>
>
>
>
>
>


Re: help with self developed imagemap component

2008-08-08 Thread Gregor Burger
Hi Toby,

As i mentioned earlier I can't use Tapestry5 (old Servlet container) which would
be a big help. So, is ComponentResource or anything equivalent
available in Tapestry 4?

thanks
Gregor

On Fri, Aug 8, 2008 at 3:32 PM, Toby Hobson <[EMAIL PROTECTED]> wrote:
> Hi Gregor,
>
> Basically you inject ComponentResources into your page then use
> componentResurces.createActionLink() method to generate a Link object. Then
> call toAbsoluteURI() on the link to get the url.
>
> N.B. if you are planning to use ajax and zones you have to do a little bit
> more ...  I'll happily explain it if you want to know.
>
> Toby
>
> 2008/8/8 Gregor Burger <[EMAIL PROTECTED]>
>
>> hi,
>>
>> I would like to develop a component which renders an imagemap
>> produced by graphviz, so I can click on the graph elements.
>> graphviz provides me the html map which i render using
>> an raw Insert component. I've also developed a service which provides
>>  me the images from graphviz. This works fine, which is really cool.
>>
>> BUT:
>>
>> I need to specify the link targets in the graphviz script before the
>> component gets rendered. So my question: How could I generate
>> DirectLinks so i can embed the urls of the links in the graphviz script.
>>
>> I hope my explanations aren't to confusing and that somebody can
>> help me.
>>
>> thanks in advance
>>
>> gregor
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: help with self developed imagemap component

2008-08-08 Thread Toby Hobson
Hi Gregor,

Basically you inject ComponentResources into your page then use
componentResurces.createActionLink() method to generate a Link object. Then
call toAbsoluteURI() on the link to get the url.

N.B. if you are planning to use ajax and zones you have to do a little bit
more ...  I'll happily explain it if you want to know.

Toby

2008/8/8 Gregor Burger <[EMAIL PROTECTED]>

> hi,
>
> I would like to develop a component which renders an imagemap
> produced by graphviz, so I can click on the graph elements.
> graphviz provides me the html map which i render using
> an raw Insert component. I've also developed a service which provides
>  me the images from graphviz. This works fine, which is really cool.
>
> BUT:
>
> I need to specify the link targets in the graphviz script before the
> component gets rendered. So my question: How could I generate
> DirectLinks so i can embed the urls of the links in the graphviz script.
>
> I hope my explanations aren't to confusing and that somebody can
> help me.
>
> thanks in advance
>
> gregor
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: help with self developed imagemap component

2008-08-08 Thread Gregor Burger
the problem is that i can't really use tapestry5. It runs on a j2ee
container which
doesn't support java 5.

Is there an equivalent for ComponentResources in tapestry 4?

thanks

On Fri, Aug 8, 2008 at 3:02 PM, Lance Java <[EMAIL PROTECTED]> wrote:
> @see
> http://wiki.apache.org/tapestry/Tapestry5HowToCreateASimpleGraphComponent
>
> Where a link is created for the "chart" event and handeled by onChart()
>
> On 08/08/2008, Gregor Burger <[EMAIL PROTECTED]> wrote:
>>
>> hi,
>>
>> I would like to develop a component which renders an imagemap
>> produced by graphviz, so I can click on the graph elements.
>> graphviz provides me the html map which i render using
>> an raw Insert component. I've also developed a service which provides
>> me the images from graphviz. This works fine, which is really cool.
>>
>> BUT:
>>
>> I need to specify the link targets in the graphviz script before the
>> component gets rendered. So my question: How could I generate
>> DirectLinks so i can embed the urls of the links in the graphviz script.
>>
>> I hope my explanations aren't to confusing and that somebody can
>> help me.
>>
>> thanks in advance
>>
>> gregor
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: help with self developed imagemap component

2008-08-08 Thread Lance Java
@see
http://wiki.apache.org/tapestry/Tapestry5HowToCreateASimpleGraphComponent

Where a link is created for the "chart" event and handeled by onChart()

On 08/08/2008, Gregor Burger <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> I would like to develop a component which renders an imagemap
> produced by graphviz, so I can click on the graph elements.
> graphviz provides me the html map which i render using
> an raw Insert component. I've also developed a service which provides
> me the images from graphviz. This works fine, which is really cool.
>
> BUT:
>
> I need to specify the link targets in the graphviz script before the
> component gets rendered. So my question: How could I generate
> DirectLinks so i can embed the urls of the links in the graphviz script.
>
> I hope my explanations aren't to confusing and that somebody can
> help me.
>
> thanks in advance
>
> gregor
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Setting the GridPager range

2008-08-08 Thread immutability

Just check the GridPager reference:
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/GridPager.html
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/GridPager.html
 

range: Number of pages before and after the current page in the range. The
pager always displays links for 2 * range + 1 pages, unless that's more than
the total number of available pages. 

The default is 5, and I can't find a way to change it when using the Grid
component.



immutability wrote:
> 
> Hi everyone! I'm still a little new to Tapestry5, and before starting a
> large project we've decided to develop a small internal application using
> Tapestry5. I was working on this for some 3 weeks now, and so far I'm
> impressed! I was able to resolve most of my issue using Google, Tapestry
> reference and Wiki, or the archives of this mailinglist, but this time I
> ran into a few things that I can't figure out. Here's the first one:
> 
> I'm using the Grid component to display a list of some entities. The Grid
> itself has a few parameters to adjust paging behavior (namely
> pagerPosition and rowsPerPage) but there's no parameter to configure
> GridPager's "range" parameter. Now, I searched wherever I could, but
> didn't find a single example on how to adjust the default values of
> "range" which is 5. I have tried to do this declaratively,
> programmatically in the page's backing class, but just couldn't find the
> way to do this.
> 
> So my question is: is there an easy way to do this? And if not - is there
> a hard way to do this? :) I think I mainly need some pointers to get me
> started. 
> 
> Thanks in advance!
> Rado
> 

-- 
View this message in context: 
http://www.nabble.com/Setting-the-GridPager-range-tp18870199p18891170.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



help with self developed imagemap component

2008-08-08 Thread Gregor Burger
hi,

I would like to develop a component which renders an imagemap
produced by graphviz, so I can click on the graph elements.
graphviz provides me the html map which i render using
an raw Insert component. I've also developed a service which provides
 me the images from graphviz. This works fine, which is really cool.

BUT:

I need to specify the link targets in the graphviz script before the
component gets rendered. So my question: How could I generate
DirectLinks so i can embed the urls of the links in the graphviz script.

I hope my explanations aren't to confusing and that somebody can
help me.

thanks in advance

gregor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setting the GridPager range

2008-08-08 Thread Davor Hrg
I don't understand what you mean by "range" ?

Davor Hrg

On Thu, Aug 7, 2008 at 3:16 PM, immutability <[EMAIL PROTECTED]> wrote:

>
> Hi everyone! I'm still a little new to Tapestry5, and before starting a
> large
> project we've decided to develop a small internal application using
> Tapestry5. I was working on this for some 3 weeks now, and so far I'm
> impressed! I was able to resolve most of my issue using Google, Tapestry
> reference and Wiki, or the archives of this mailinglist, but this time I
> ran
> into a few things that I can't figure out. Here's the first one:
>
> I'm using the Grid component to display a list of some entities. The Grid
> itself has a few parameters to adjust paging behavior (namely pagerPosition
> and rowsPerPage) but there's no parameter to configure GridPager's "range"
> parameter. Now, I searched wherever I could, but didn't find a single
> example on how to adjust the default values of "range" which is 5. I have
> tried to do this declaratively, programmatically in the page's backing
> class, but just couldn't find the way to do this.
>
> So my question is: is there an easy way to do this? And if not - is there a
> hard way to do this? :) I think I mainly need some pointers to get me
> started.
>
> Thanks in advance!
> Rado
> --
> View this message in context:
> http://www.nabble.com/Setting-the-GridPager-range-tp18870199p18870199.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Display String Array

2008-08-08 Thread Davor Hrg
is it String[] or String[][]

anyhow, you can use the loop component to print the strings


header name

${str}



look for details in tapestry doc's

Davor Hrg

On Thu, Aug 7, 2008 at 4:46 PM, Mohammad Irfan <[EMAIL PROTECTED]> wrote:

> Hi, I have an array of String[]. I'd like to display it on a table.
> How am I do it? Thanks.
>
> --
> Wassalamu'alaikum wr. wb.
> Mohammad Irfan
>
> ---
> www.doktermaya.com
> www.L-Ads.com (classifieds ads, iklan baris)
> www.komplain.org (complain about product)
> www.akarprima.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [T5] Spring Security 2 Integration

2008-08-08 Thread Michael Gerzabek
Tapestry Acegi (http://www.localhost.nu/java/tapestry5-acegi/) is 
already Tapestry Spring Security. There's just one issue with how the 
PasswordEncoder is setup. It's somehow backwards to contribute a bean 
via its class name as a string when you have a full fledged IoC container.


You can checkout the source at 
http://www.localhost.nu/svn/public/tapestry-spring-security
With a mvn install you should be in the game. Just put these 
dependencies into your pom:



 org.springframework
 spring-dao
 ${spring-release-version}

  


 nu.localhost.tapestry
 tapestry-spring-security
 2.0.0-SNAPSHOT


With TSS You can secure your pages and methods with @Secured("Role Names>"). You also can secure static resources via contributions of 
RequestInvocationDefinitions


public static void contributeFilterSecurityInterceptor(
 Configuration configuration ) {

   configuration.add( new RequestInvocationDefinition( "/ltd.pdf", 
"ROLE_ADMIN" ) );

}

If you want to secure whole filesets you can also use the ant regexp 
style for your URI definitions.


This is just a short notice for you came up with that thread. An 
official release is on the horizon.



kace schrieb:
Hi fellas, 


has anyone gotten Spring Security 2 to integrate with Tapestry 5?  I have
Spring running but it seems to be ignoring the security.xml rules

I have this in my web.xml


securityFilter
   
org.springframework.web.filter.DelegatingFilterProxy


targetBeanName
springSecurityFilterChain



securityFilter
/*


app
   
org.apache.tapestry5.spring.TapestrySpringFilter



app
/*


and this is part of the security.xml file






Instead of going to the login page it defaults to the welcome-page.  Anyone
gotten this to work?

Thanks, 


..kace
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]