Re: Tapestry 5 + JS framework

2014-07-27 Thread Kristian Marinkovic
Hi,


Tapestry 5.4 (beta) built-in require js support makes it really easy to add
other javascript frameworks cleanly. I'm currently working on T5.4 projects
that integrate with angularjs and backbone/marionette js.

g,
Kris


On Sun, Jul 27, 2014 at 2:46 PM, Chung Khanh Duy <
chungkhanhduy1...@gmail.com> wrote:

> Hi Jan,
>
> I am using tapestry combined with Jquery , it looks great. If you are
> interested in with that, please refer at http://tapestry5-jquery.com/ for
> more details.
>
> Thanks,
> Duy.
>
>
> On Sun, Jul 27, 2014 at 5:17 PM, Jan Fryblik 
> wrote:
>
> >
> >
> > Hi guys,
> >
> > i haven't used Tapestry for a few months so I want to ask again if
> > something has changed. Do you have experience with combination of
> Tapestry
> > and any JS framework? How difficult is to integrate it together? Are
> there
> > any tutorials? I need something to create highly dynamic web forms.
> > Something like AjaxFormLoop inside AjaxFormLoop etc. Thanks for help.
> >
> > Best Regards,
> > Jan Fryblík
> >
> > *eBrothers Software s.r.o. | www.ebrothers.cz *
> >
>
>
>
> --
> Chung Khánh Duy
> Project Support Manager
> Formos
>


Re: [5.4-beta-10] providedChecksum is always different from the actualChecksum for a specific asset

2014-06-12 Thread Kristian Marinkovic
how are you running your app? i'm using run-jetty-run in Eclipse and never
experienced the problem you describe. the etag is based on the content of
the file. maybe there is another eclipse plugin changing your resources

g,
Kris


On Tue, Jun 10, 2014 at 11:12 AM, Muhammad Gelbana 
wrote:

> I places an asset file in my *META-INF/assets/js* folder beneath my
> resources folder
>
> This file name is *jquey.min.map* (It doesn't end with a .js)
>
> I made sure multiple times that the asset is in place and that its even
> transferred to maven's target/classes folder, but I'm still facing an issue
> that its not found.
>
> I debugged tapestry's code and found that the following method always
> returns *false*
>
>
> org.apache.tapestry5.internal.services.ResourceStreamerImpl.streamResource(StreamableResource,
> > String, Set)
>
>
> Exactly out of this boolean check
>
> if (providedChecksum.length() > 0 &&
> > !providedChecksum.equals(actualChecksum)){
> > return false;
> > }
>
>
> The *providedChecksum* and *actualChecksum* are always different. I tried
> to debug more and found that the checksum in the asset's URL doesn't match
> the actualChecksum value.
>
> Here the URL's checksum was *z24c89e49* while it was expected to be
> *764b65d5*
> http://localhost:8080/adminlte/assets/meta/*z24c89e49*/js/jquery.min.map
>
> So manually I tried this URL
> http://localhost:8080/adminlte/assets/meta/*764b65d5*/js/jquery.min.map
>
> But then it didn't work either and the *actualChecksum* had another
> different checksum !...so I manually tried the new *actualChecksum*
> http://localhost:8080/adminlte/assets/meta/*1d517a92*/js/jquery.min.map
>
> And it worked !! I tried debugging again from the beginning and I had the
> same scenario going.
>
> A considerable change I've made is that I disabled the built-in bootstrap
> module
>
> configuration.override(SymbolConstants.BOOTSTRAP_ROOT,
> > "classpath:/META-INF/assets");
>
>
> ...and found that tapestry was looking for some files that I didn't have
> like *transition.js* but I can't remember if it asked for more new files.
> But I know that I created an empty file called *transtion.js* empty, and I
> renamed bootstrap's JS and CSS file to be *bootstrap.css* and
> *bootstrap.js*
> instead of the template's original *bootstrap.min.css* and
> *bootstrap.min.js* (I had to fix their names in Layout.java too)
>
> I can't remember exactly the changed files because the template I'm trying
> to apply using tapestry has numerous files. How further can investigate
> this behavior ? Did I override disable Tapestry's bootstrap in a wrong way
> ?
>
> *-*
> *Muhammad Gelbana*
> http://www.linkedin.com/in/mgelbana
>


Re: Forms require that the request method be POST

2014-05-19 Thread Kristian Marinkovic
Hi,

check if it is the same client. i once had the same problem. After several
hours of investigation it was a developer with a browser plugin (web
developer) which enabled converting form post requests to get requests.

hope this helps.

g,
Kris


On Mon, May 19, 2014 at 5:55 PM, George Christman
wrote:

> Let me do some more homework now that I at least now how it's thrown.
> Thanks Thiago.
>
>
> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > gchrist...@cardaddy.com> wrote:
> >
> >  In this particular case the application sits behind a firewall with no
> >> public access so I don't believe this is bot activity.  Do you have any
> >> other thoughts?
> >>
> >
> > Do you have any information on when this exception actually happens?
> > Otherwise, we can only guess. That exception usually happens when a
> > Tapestry form URL is requested without the form fields, hence the bot
> > suspicion.
> >
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Tapestry, Java and Hibernate consultant and developer
> > http://machina.com.br
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>


Re: QName::=(NCName':')?NCName error when tml is parsed

2014-05-10 Thread Kristian Marinkovic
Hi Jens,

never seen an exception like that but i'd guess a namespace is missing.
either tapestry or xml

http://www.w3.org/1999/xhtml";
  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";
xmlns:p="tapestry:parameter">

cheers,
Kris


On Tue, May 6, 2014 at 12:42 AM, Jens Breitenstein wrote:

> Hi T5 Users!
>
> I am struggling with an strange error in T5.3.7 and hopefully one of you
> can give me a hint how to track it down..
>
> I wrote a "Icon" component to show bootstrap glyphicons:
>
> public class Icon
> {
> @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
> @Property private String _name;
>
> boolean beginRender(final MarkupWriter writer)
> {
> // 
> writer.element("span", "class", "glyphicon glyphicon-" + _name);
> writer.end();
> return true;
> }
> }
>
>
> So it's possible to show a glyphicon in a page by
>
> 
>
> Everthing worked fine until I moved to component to a "common library
> package". After starting Jetty and accessing a page which uses this
> component I get:
>
> Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
> Failure parsing template 
> classpath:de/xyz/application/client/pages/DataManaging.tml:
> Element or attribute do not match QName production:
> QName::=(NCName':')?NCName.  [at 
> classpath:de/xyz/application/pages/DataManaging.tml,
> line 9]
> at org.apache.tapestry5.internal.services.SaxTemplateParser.
> parse(SaxTemplateParser.java:173)
> at org.apache.tapestry5.internal.services.TemplateParserImpl$1.
> invoke(TemplateParserImpl.java:61)
> at org.apache.tapestry5.internal.services.TemplateParserImpl$1.
> invoke(TemplateParserImpl.java:58)
> at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.
> invoke(OperationTrackerImpl.java:74)
> ... 98 more
> Caused by: org.xml.sax.SAXParseException: Element or attribute do not
> match QName production: QName::=(NCName':')?NCName.
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.apache.tapestry5.internal.services.XMLTokenStream.parse(
> XMLTokenStream.java:317)
> at org.apache.tapestry5.internal.services.SaxTemplateParser.
> parse(SaxTemplateParser.java:163)
>
>
> Even more confusing is the fact the error never appears again it only
> occurs on first access.
>
>
> Thanks in advance
>
>
> Jens
>
>
>


Re: Use cases for the "any" component

2014-03-03 Thread Kristian Marinkovic
i use it if i need unique clientIds for certain dom elements to access it
with my javascripts.
g,
Kris


On Mon, Mar 3, 2014 at 8:18 AM, Lance Java wrote:

> I've used option 2 and I've also extended "any" to make new components.
>


Re: Tapestry with Jetty behind https frontend

2014-02-20 Thread Kristian Marinkovic
hi all,

going through the posts i realized there is an easier solution missing.

What i do is to contribute a HttpServletRequestHandler that checks for the
X-Forwarded-Proto header and - in case its set - wraps the
HttpServletRequest with overrides to isSecure(), getScheme() and
getServerPort(). All the other stuff in Tapestry regarding https works
unchanged.

g,
Kris

public final class HttpsFilter implements HttpServletRequestHandler
{
private final HttpServletRequestHandler delegateServletHandler;

public HttpsFilter(HttpServletRequestHandler delegateServletHandler)
{
this.delegateServletHandler = delegateServletHandler;
}

@Override
public boolean service(HttpServletRequest request, HttpServletResponse
response) throws IOException
{
return delegateServletHandler.service(wrapRequest(request),
response);
}

private HttpServletRequest wrapRequest(final HttpServletRequest request)
{
final String protocolHeaderValue =
request.getHeader("X-Forwarded-Proto");

if ("HTTPS".equalsIgnoreCase(protocolHeaderValue))
return new HttpServletRequestWrapper(request)
{
@Override
public boolean isSecure()
{
return true;
}

@Override
public String getScheme()
{
return "https";
}

@Override
public int getServerPort()
{
return 443;
}
};

return request;
}
}


On Thu, Feb 20, 2014 at 1:17 AM, Ilya Obshadko wrote:

> On Thu, Feb 20, 2014 at 9:58 AM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
> By the way, is there any reason preventing Tapestry team from incorporating
> >> X-Forwarded-* headers support into Tapestry itself? This kind of
> >> configuration is pretty standard nowadays.
> >>
> >
> > Feel free to post a JIRA about that.
>
>
> I have created public gist https://gist.github.com/xfyre/9104238 and
> posted
> https://issues.apache.org/jira/browse/TAP5-2291
>
> Thank you!
>
> --
> Ilya Obshadko
>


Re: Content Security Policy without unsafe-inline

2014-02-05 Thread Kristian Marinkovic
i also think it's up to the development team to decide how they want to
develop (inline-scripts vs. no inline-scripts). sometimes inline-scripts
make things easier. having a choice is good anyways.

still, do you think it is worth moving the requriejs specific
inline-scripts into a dynamically generated js file?



On Wed, Feb 5, 2014 at 9:49 AM, Lance Java wrote:

> Kristian, I'm still not sure you get the need for the inline script /
> JavaScriptSupport.
>
> Let's consider a Google map component with markers on it.
>
> With inline scripts, we can include the empty div and the markers in a
> single request.
>
> Without inline scripts you would need to either:
>
> 1. Include the markers in the markup somehow using data attributes or
> hidden html elements and then use a selector to populate the Google map
> with markers as it loads
>
> 2. Fire an AJAX request to get the markers.
>
> Option 1 can get a bit messy and option 2 has a delay. I don't think we
> need to deprecate javascriptsupport. I like having an option 3 :)
>


Re: Content Security Policy without unsafe-inline

2014-02-05 Thread Kristian Marinkovic
looking at my migrated Tapestry 5.4-beta-2 app i can only see two inline
scripts. The requirejs configuration (shim, ...) and the require call
itself.

Is it possible to move those into a dynamically generated js instead,
that's included with a script tag? the requirejs config could by cached.
And the require call would be page specific. Should we create a jira ticket?

removing the javascriptsupport methods is not a good idea as it breaks
backwards compatibility. on the other hand removing in 5.5 would be nice :)

g,
Kris




On Tue, Feb 4, 2014 at 8:52 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 04 Feb 2014 17:45:37 -0200, Christian Köberl <
> tapestry.christian.koeb...@gmail.com> wrote:
>
>  2014-02-04 Lance Java :
>>
>>> I happen to be a fan of tapestry's multi-page approach and serverside
>>> markup generation.
>>>
>> Me too - but I think there would be a big chance in 5.4 to clean up
>> the JS stuff and I think inline JS is no good idea. The core
>> components could all be refactored to work without inline JS - like
>> the new DateField (a good example how to do it).
>>
>
> I don't know a politer way of saying this, but I already said that
> Tapestry 5.4 is already doing that at least twice. I'm having a really
> unlucky day. :(
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

2014-01-20 Thread Kristian Marinkovic
+1 to that.

Btw. I just realized that the ETag value is double quoted (""56633""). Is
that on purpose?
 Am 21.01.2014 02:28 schrieb "Howard Lewis Ship" :

> That's an interesting trade-off: bandwidth (gzip better) vs. cost of
> unzipping (gzip worse). Good thing Tapestry does a good job of letting the
> client cache the assets!
>
>
> On Sun, Jan 19, 2014 at 1:04 AM, Kristian Marinkovic <
> kristian.marinko...@gmail.com> wrote:
>
> > Thank you for all your responses and references.
> >
> > What i want to activate is the SIMPLE_OPTIMIZATIONS level that activates
> > whitespace removal and renaming (shortening) of variables and functions.
> my
> > webapp is getting used more by mobile clients (tablets, phonse) than
> > desktop clients. during testing and optimization i realized that the form
> > of the js -  eg. whitespaces - has an impact on the execution
> performance.
> > gzip does a great job in shrinking the file sizes but unzipping on a
> mobile
> > client has a performance toll which is noticeable on app startup leaving
> > the user with the perception the app were slow.
> >
> > cheers,
> > Kris
> >
> >
> > On Fri, Jan 17, 2014 at 8:46 PM, Howard Lewis Ship 
> > wrote:
> >
> > > That said, in a HTTP 2.0 world, there isn't such an advantage to
> > > aggregation, especially with Tapestry's asset URLs (e.g., the encoding
> of
> > > the content hash into the URL).
> > >
> > >
> > > On Fri, Jan 17, 2014 at 11:45 AM, Howard Lewis Ship  > > >wrote:
> > >
> > > > Google Closure is best in a situation where *all* the JavaScript that
> > > will
> > > > be part of the page is known statically; it goes beyond other
> > minimizers
> > > in
> > > > that, if you follow certain rules, it can perform real optimizations,
> > > such
> > > > as dead-code analysis and function inlining.  It can work with a
> couple
> > > of
> > > > stable libraries outside its domain, as long as you tell it about
> them,
> > > but
> > > > doesn't fit well with non-aggregated modules loading dynamically ...
> > that
> > > > defeats dead-code analysis, etc.
> > > >
> > > >
> > > > On Fri, Jan 17, 2014 at 3:06 AM, Thiago H de Paula Figueiredo <
> > > > thiag...@gmail.com> wrote:
> > > >
> > > >> On Fri, 17 Jan 2014 07:12:14 -0200, Massimo Lusetti <
> > mluse...@gmail.com
> > > >
> > > >> wrote:
> > > >>
> > > >>  BTW as a side note I'm not completely sure all these minimization
> and
> > > >>> concatenation are a good thing. Let's think about this a little bit
> > > more.
> > > >>>
> > > >>> Some resources may help:
> > > >>>
> > > >>> http://rubyrogues.com/135-rr-http-2-0-with-ilya-grigorik/
> > > >>>
> > > >>
> > > >> From Wikipedia: "HTTP 2.0 is the next planned version of the HTTP
> > > network
> > > >> protocol used by the World Wide Web.". That'll take some time until
> we
> > > can
> > > >> really assume most users are using it, maybe years. Regarding large
> > > files,
> > > >> I think that if you manage to make the browser cache the files and
> you
> > > >> don't change them much, that won't be a problem. Tapestry, with
> > stacks,
> > > >> let's you choose what JS and CSS files will be bundled together.
> And,
> > of
> > > >> course, JavaScript and CSS combination can be configured to be
> turned
> > > off.
> > > >> Regarding minimization, as long as the minimized version works in
> > > exactly
> > > >> the same way as the non-minimized version, and current minimizers do
> > > that,
> > > >> I can see no downside.
> > > >>
> > > >> --
> > > >> Thiago H. de Paula Figueiredo
> > > >> Tapestry, Java and Hibernate consultant and developer
> > > >> http://machina.com.br
> > > >>
> > > >>
> -
> > > >> 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
> > > >
> > >
> > >
> > >
> > > --
> > > 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
> > >
> >
>
>
>
> --
> 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
>


Re: session management and threads synchronization

2014-01-19 Thread Kristian Marinkovic
hi,

maybe this "ancient" article by Brian Goetz may help you:
http://www.ibm.com/developerworks/library/j-jtp09238/index.html :)

cheers,
Kris


On Sat, Jan 18, 2014 at 8:39 AM, Ilya Obshadko wrote:

> Hello,
>
> I have implemented persistent session management in my application (using
> cookies and session IDs in the database). Everything works fine, but
> sometimes I see Hibernate errors "Batch update returned unexpected row
> count from update" when committing database changes after setting up a new
> session.
>
> It turns out that it happens when user starts a request and then quickly
> initiates reload of the same page. So I suppose this is a threading issue
> (one thread has already started creating session ID record, then user
> interrupts the connection and starts another request while the previous one
> hasn't been completed). I have implemented simple synchronization, but not
> yet sure if it's done correctly.
>
> So the question is: how do I synchronize method that creates the session?
>
> Currently it's implemented inside my authentication service:
>
> public void setupSessionForUser ( User user ) {
>
> synchronized ( this ) {
>
> user.clearSessions ();
>
>
>
> SessionToken newSessionToken = SessionToken.create ();
>
> user.addSessionToken ( newSessionToken );
>
> hibernateSession.save ( newSessionToken );
>
> asm.set ( User.class, (User) hibernateSession.merge ( user ) );
>
> cookies.writeCookieValue ( "authcookiename",
> newSessionToken.toString () );
>
> logger.info ( "set up new session {} for {}",
> newSessionToken.toString (), user.getEmail () );
>
> }
>
> }
>
> Is that correct to synchronize on *this*? Or should I synchronize on HTTP
> Session instance instead?
>
> Thanks in advance.
>
> --
> Ilya Obshadko
>


Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

2014-01-19 Thread Kristian Marinkovic
Thank you for all your responses and references.

What i want to activate is the SIMPLE_OPTIMIZATIONS level that activates
whitespace removal and renaming (shortening) of variables and functions. my
webapp is getting used more by mobile clients (tablets, phonse) than
desktop clients. during testing and optimization i realized that the form
of the js -  eg. whitespaces - has an impact on the execution performance.
gzip does a great job in shrinking the file sizes but unzipping on a mobile
client has a performance toll which is noticeable on app startup leaving
the user with the perception the app were slow.

cheers,
Kris


On Fri, Jan 17, 2014 at 8:46 PM, Howard Lewis Ship  wrote:

> That said, in a HTTP 2.0 world, there isn't such an advantage to
> aggregation, especially with Tapestry's asset URLs (e.g., the encoding of
> the content hash into the URL).
>
>
> On Fri, Jan 17, 2014 at 11:45 AM, Howard Lewis Ship  >wrote:
>
> > Google Closure is best in a situation where *all* the JavaScript that
> will
> > be part of the page is known statically; it goes beyond other minimizers
> in
> > that, if you follow certain rules, it can perform real optimizations,
> such
> > as dead-code analysis and function inlining.  It can work with a couple
> of
> > stable libraries outside its domain, as long as you tell it about them,
> but
> > doesn't fit well with non-aggregated modules loading dynamically ... that
> > defeats dead-code analysis, etc.
> >
> >
> > On Fri, Jan 17, 2014 at 3:06 AM, Thiago H de Paula Figueiredo <
> > thiag...@gmail.com> wrote:
> >
> >> On Fri, 17 Jan 2014 07:12:14 -0200, Massimo Lusetti  >
> >> wrote:
> >>
> >>  BTW as a side note I'm not completely sure all these minimization and
> >>> concatenation are a good thing. Let's think about this a little bit
> more.
> >>>
> >>> Some resources may help:
> >>>
> >>> http://rubyrogues.com/135-rr-http-2-0-with-ilya-grigorik/
> >>>
> >>
> >> From Wikipedia: "HTTP 2.0 is the next planned version of the HTTP
> network
> >> protocol used by the World Wide Web.". That'll take some time until we
> can
> >> really assume most users are using it, maybe years. Regarding large
> files,
> >> I think that if you manage to make the browser cache the files and you
> >> don't change them much, that won't be a problem. Tapestry, with stacks,
> >> let's you choose what JS and CSS files will be bundled together. And, of
> >> course, JavaScript and CSS combination can be configured to be turned
> off.
> >> Regarding minimization, as long as the minimized version works in
> exactly
> >> the same way as the non-minimized version, and current minimizers do
> that,
> >> I can see no downside.
> >>
> >> --
> >> Thiago H. de Paula Figueiredo
> >> Tapestry, Java and Hibernate consultant and developer
> >> http://machina.com.br
> >>
> >> -
> >> 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
> >
>
>
>
> --
> 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
>


Tapestry 5.4-beta-2 GoogleClosureCompiler

2014-01-13 Thread Kristian Marinkovic
Hi all,

how do i set additional GoogleClosureMinimizer options? The current
implementation in tapestry-webresources doesn't seem to offer any
configuration possibilities besides replacing the whole service.

cheers,
Kris


Tapestry 5.4 require.js modules

2014-01-13 Thread Kristian Marinkovic
Hi all,

why are tapestry's requirejs modules nested in an anonymous javascript
function:

(function() {
   define(['jquery'], function($) {
   })
}).call(this);

isn't it enough to just write define(, function() {})? Is there a
reason for this additional scope?

cheers,
Kris



BTW, i just migrated an existing T5.3.7 application to T5.4-beta-2 with
almost no hassle. i'm really impressed.


Re: Keep the same form id after the zone refresh

2014-01-01 Thread Kristian Marinkovic
Try creating a simple tapestry page with just a form (submit + textfield)
in a zone and test it. All of my applications wouldn't work if this didn't
work :)
Am 01.01.2014 22:03 schrieb "Boris Horvat" :

> but that event handler wont work correctly once zone updates it to
> MyForm_123bashas
>
> (at least it doesnt work for me :))
>
>
> On Wed, Jan 1, 2014 at 9:42 PM, Kristian Marinkovic <
> kristian.marinko...@gmail.com> wrote:
>
> > in tapestry your server side event handlers are not related to the client
> > side html ids. the client side html ids happen to use the server side
> > component id for convenience. An onValidateFromMyForm() handler will we
> > triggered even if the MyForm form is nested and updated in a zone.
> >
> >
> >
> >
> >
> > On Tue, Dec 31, 2013 at 7:15 PM, Boris Horvat  > >wrote:
> >
> > > I have tried to create a method that will set the id every time,
> however
> > > this has filed with an exception refusing to set the id vie a method.
> > >
> > > I am a bit surprised that there is no way to catch form submission once
> > > zone is refreshed. I understand that id is changed but it would be nice
> > if
> > > I could catch this change.
> > >
> > > Than,
> > >
> > > I am not sure I understand your idea. If I have a form with id *formID
> > *my
> > > method in java side will wait for that, if zone is updated then the new
> > > form will be *formID_1233123 *how can I catch this event then? The
> > > javascript you wrote $("form[id^=form]") - would help me to catch this
> on
> > > client side not on server
> > >
> > > Cheers and happy new year :D
> > >
> > >
> > > On Tue, Dec 31, 2013 at 4:06 PM, Boris Horvat <
> horvat.z.bo...@gmail.com
> > > >wrote:
> > >
> > > > Well I did used this before, and it worked fine... Also I believe
> that
> > I
> > > > have read somewhere that I can use a property and pass it to the id
> > field
> > > > and in this way to fix the form id. I will try that to see if it
> works
> > > >
> > > > tnx
> > > >
> > > >
> > > > On Tue, Dec 31, 2013 at 5:28 AM, Thai Tran 
> wrote:
> > > >
> > > >> No, you misunderstood my answer. You need to keep the same id which
> is
> > > >> generated by tapestry in order to let tapestry processes underneath
> > its
> > > >> hood. If you want to use javascript to handle the DOM elements, you
> > > need to
> > > >> use wildcard, regular expression to select the tapestry generated ID
> > > >>
> > > >>
> > > >> On 12/30/2013 9:14 PM, Boris Horvat wrote:
> > > >>
> > > >>> Yea that was my idea, to use javascript code to modify the id in
> > order
> > > >>> for
> > > >>> the java side to be able to process the correct form, however this
> > > seems
> > > >>> like ugly solution :)
> > > >>>
> > > >>>
> > > >>> On Mon, Dec 30, 2013 at 3:10 AM, Thai Tran 
> > wrote:
> > > >>>
> > > >>>  It is better to use class for CSS stuffs and $("form[id^=form]")
> > > (select
> > > >>>> the form with the id started with "form") for javascript stuffs.
> > > >>>> Tapestry
> > > >>>> creates a new id not only on the client side but also keep track
> the
> > > >>>> new id
> > > >>>> underneath the hood (for security purpose, I guess)
> > > >>>>
> > > >>>>
> > > >>>> On 12/30/2013 4:02 AM, Boris Horvat wrote:
> > > >>>>
> > > >>>>  Hi everyone,
> > > >>>>>
> > > >>>>> I have a zone around my form (pseudo code below)
> > > >>>>>
> > > >>>>> 
> > > >>>>>
> > > >>>>>  // some fields
> > > >>>>>
> > > >>>>> 
> > > >>>>>
> > > >>>>> After the zone is submitted the value is saved, the zone is
> > refreshed
> > > >>>>> and
> > > >>>>> my form is broken.
> > > >>>>> I believe that I could write a javascript code that will capture
> > this
> > > >>>>> event
> > > >>>>> and override the id back to the original, but is there any better
> > way
> > > >>>>> to
> > > >>>>> resolve this?
> > > >>>>>
> > > >>>>> Cheers
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > >  -
> > > >>>> 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
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > Sincerely
> > > > *Boris Horvat*
> > > >
> > >
> > >
> > >
> > > --
> > > Sincerely
> > > *Boris Horvat*
> > >
> >
>
>
>
> --
> Sincerely
> *Boris Horvat*
>


Re: Keep the same form id after the zone refresh

2014-01-01 Thread Kristian Marinkovic
in tapestry your server side event handlers are not related to the client
side html ids. the client side html ids happen to use the server side
component id for convenience. An onValidateFromMyForm() handler will we
triggered even if the MyForm form is nested and updated in a zone.





On Tue, Dec 31, 2013 at 7:15 PM, Boris Horvat wrote:

> I have tried to create a method that will set the id every time, however
> this has filed with an exception refusing to set the id vie a method.
>
> I am a bit surprised that there is no way to catch form submission once
> zone is refreshed. I understand that id is changed but it would be nice if
> I could catch this change.
>
> Than,
>
> I am not sure I understand your idea. If I have a form with id *formID *my
> method in java side will wait for that, if zone is updated then the new
> form will be *formID_1233123 *how can I catch this event then? The
> javascript you wrote $("form[id^=form]") - would help me to catch this on
> client side not on server
>
> Cheers and happy new year :D
>
>
> On Tue, Dec 31, 2013 at 4:06 PM, Boris Horvat  >wrote:
>
> > Well I did used this before, and it worked fine... Also I believe that I
> > have read somewhere that I can use a property and pass it to the id field
> > and in this way to fix the form id. I will try that to see if it works
> >
> > tnx
> >
> >
> > On Tue, Dec 31, 2013 at 5:28 AM, Thai Tran  wrote:
> >
> >> No, you misunderstood my answer. You need to keep the same id which is
> >> generated by tapestry in order to let tapestry processes underneath its
> >> hood. If you want to use javascript to handle the DOM elements, you
> need to
> >> use wildcard, regular expression to select the tapestry generated ID
> >>
> >>
> >> On 12/30/2013 9:14 PM, Boris Horvat wrote:
> >>
> >>> Yea that was my idea, to use javascript code to modify the id in order
> >>> for
> >>> the java side to be able to process the correct form, however this
> seems
> >>> like ugly solution :)
> >>>
> >>>
> >>> On Mon, Dec 30, 2013 at 3:10 AM, Thai Tran  wrote:
> >>>
> >>>  It is better to use class for CSS stuffs and $("form[id^=form]")
> (select
>  the form with the id started with "form") for javascript stuffs.
>  Tapestry
>  creates a new id not only on the client side but also keep track the
>  new id
>  underneath the hood (for security purpose, I guess)
> 
> 
>  On 12/30/2013 4:02 AM, Boris Horvat wrote:
> 
>   Hi everyone,
> >
> > I have a zone around my form (pseudo code below)
> >
> > 
> >
> >  // some fields
> >
> > 
> >
> > After the zone is submitted the value is saved, the zone is refreshed
> > and
> > my form is broken.
> > I believe that I could write a javascript code that will capture this
> > event
> > and override the id back to the original, but is there any better way
> > to
> > resolve this?
> >
> > Cheers
> >
> >
> >
>  -
>  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
> >>
> >>
> >
> >
> > --
> > Sincerely
> > *Boris Horvat*
> >
>
>
>
> --
> Sincerely
> *Boris Horvat*
>


Re: Passing blocks as component parameters

2013-12-01 Thread Kristian Marinkovic
Yes it is possible. Usually you use a Delegate component to render a Block.

Cheers
Kris
Am 01.12.2013 23:53 schrieb "Boris Horvat" :

> Is there any way to pass a block as a parameter and then to render it?
>
> I have checked a tree component and I have seen it renders it manually. Is
> there any way to achieve this by simply passing few parameters around?
>
> Cheers
>
> --
> Sincerely
> *Boris Horvat*
>


Re: T5.1 -> T5.3 migration question

2013-07-02 Thread Kristian Marinkovic
Hi,

Tapestry over time added additional checks to detect whether the classes in
the Tapestry specific packages are really only relevant to Tapestry. Not
doing so can cause unexpected exceptions due to classloading issues.

in other words: only page, component and mixin classes go into the
respective packages. everything else should be moved outside (eg. base or
services)

not a big deal, just a precaution.

g,
Kris




On Tue, Jul 2, 2013 at 10:38 AM, Dmitriy Vsekhvalnov  wrote:

> Hi everyone,
>
> doing app migration from 5.1 to 5.3, currently face with weird exception:
>
>
> Caused by: org.apache.tapestry5.ioc.internal.OperationException: Base class
> java.lang.Enum (super class of xxx.xx.xx) is not in a controlled package
> and is therefore not valid. You should try moving the class to package
> xxx.base.
>
>
> What does it mean?
>


Re: Sessions getting mixed up

2013-06-17 Thread Kristian Marinkovic
can you post some code? the page with the annotated field and the methods
that manipulate that fields?


On Mon, Jun 17, 2013 at 10:49 AM, Nathan Quirynen <
nat...@pensionarchitects.be> wrote:

> Hi,
>
> I'm having some weird issues with sessions that are getting mixed up, for
> example:
>
> I open a page in both Firefox and Safari (so they are a different
> HttpSession).
> I do something in Firefox that sets a value in an object that is annotated
> with @SessionState.
> Apparently this change also affected the value in my Safari session.
>
> What could be affecting this? Could this be a code problem, or maybe a
> configuration/Tomcat problem?
> I have no idea on where to start searching, so any pointers are welcome!
>
> Thanks,
> Nathan
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Tapestry 5.4-alpha-2

2013-01-03 Thread Kristian Marinkovic
hi Howard,

i am already testing and exploring the possibilities. Would you
consider fixing  https://issues.apache.org/jira/browse/TAP5-2040 as a
5.4-alpha-3?

g,
Kris



On Thu, Jan 3, 2013 at 11:01 PM, Howard Lewis Ship  wrote:
> I've created a new preview release, available from the Maven repository at
>
> https://repository.apache.org/content/repositories/orgapachetapestry-096/
>
> this includes the new jQuery support I recently blogged about.
>
> Feedback desperately desired!
>
> --
> 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



Re: T5.4-alpha-1 is missing SystemPropertiesSymbolProvider

2012-12-27 Thread Kristian Marinkovic
hi Howard,

created Ticket https://issues.apache.org/jira/browse/TAP5-2040

g,
Kris

On Thu, Dec 27, 2012 at 6:45 PM, Howard Lewis Ship  wrote:
> Interesting; that could be a bug then.
>
>
> On Thu, Dec 27, 2012 at 9:05 AM, Kristian Marinkovic <
> kristian.marinko...@gmail.com> wrote:
>
>> Hi Howard,
>>
>> yes the SystemPropertySymbolProvider is in place but in Tapestry 5.3.6
>> the TapestryFilter used it to resolve system properties but now it
>> doesn't. As a consequence properties like
>> tapestry.disable-default-modules that are accessed within the
>> TapestryAppInitializer cannot be read and therefore have no effect.
>>
>> The code in T5.4 looks like this:
>> SymbolProvider contextProvider = new ServletContextSymbolProvider(context);
>> SymbolProvider contextPathProvider = new
>> SingleKeySymbolProvider(SymbolConstants.CONTEXT_PATH,
>> context.getContextPath());
>> SymbolProvider combinedProvider = new
>> DelegatingSymbolProvider(contextPathProvider, contextProvider);
>>
>>   String executionMode =
>> System.getProperty(SymbolConstants.EXECUTION_MODE, "production");
>>
>>   TapestryAppInitializer appInitializer = new
>> TapestryAppInitializer(logger, combinedProvider,
>> filterName, executionMode);
>>
>>
>> And the code in T5.3.6:
>> SymbolProvider provider = new SymbolProvider()
>> {
>>   SymbolProvider contextProvider = new
>> ServletContextSymbolProvider(context);
>>   SymbolProvider systemProvider = new SystemPropertiesSymbolProvider();
>>
>>   public String valueForSymbol(String symbolName)
>>   {
>>String contextValue =
>> contextProvider.valueForSymbol(symbolName);
>>if (contextValue != null) return contextValue;
>>
>>return systemProvider.valueForSymbol(symbolName);
>>}
>> };
>>
>> String executionMode =
>> System.getProperty(SymbolConstants.EXECUTION_MODE, "production");
>>
>> TapestryAppInitializer appInitializer = new
>> TapestryAppInitializer(logger, provider, filterName, executionMode);
>>
>>
>> g,
>> Kris
>>
>> On Thu, Dec 27, 2012 at 5:47 PM, Howard Lewis Ship 
>> wrote:
>> > I think you are mistaken:
>> >
>> > @Contribute(SymbolSource.class)
>> > public static void
>> > setupStandardSymbolProviders(OrderedConfiguration
>> > configuration,
>> > @ApplicationDefaults
>> > SymbolProvider
>> > applicationDefaults,
>> >
>> > @FactoryDefaults
>> > SymbolProvider
>> > factoryDefaults)
>> > {
>> > configuration.add("SystemProperties", new
>> > SystemPropertiesSymbolProvider(), "before:*");
>> > configuration.add("EnvironmentVariables", new
>> > SystemEnvSymbolProvider());
>> > configuration.add("ApplicationDefaults", applicationDefaults);
>> > configuration.add("FactoryDefaults", factoryDefaults);
>> > }
>> >
>> > Whatever you are seeing is caused by something else: a typo perhaps, or
>> > something preventing the system property from being visible to the
>> running
>> > application.
>> >
>> >
>> > On Thu, Dec 27, 2012 at 8:44 AM, Howard Lewis Ship 
>> wrote:
>> >
>> >> If that is true, it is an accident, possibly a bad merge.
>> >>
>> >>
>> >> On Thu, Dec 27, 2012 at 3:00 AM, Kristian Marinkovic <
>> >> kristian.marinko...@gmail.com> wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> i was just testing the 5.4-alpha-1 release and realized that the
>> >>> SystemPropertiesSymbolProvider is not used anymore by the
>> >>> TapestryFilter.
>> >>>
>> >>> I'm not sure whether it happened accidentally or on purpose?
>> >>>
>> >>> g,
>> >>> Kris
>> >>>
>> >>> -
>> >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> >>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> >>>
>> >>>
>> >>

Re: T5.4-alpha-1 is missing SystemPropertiesSymbolProvider

2012-12-27 Thread Kristian Marinkovic
Hi Howard,

yes the SystemPropertySymbolProvider is in place but in Tapestry 5.3.6
the TapestryFilter used it to resolve system properties but now it
doesn't. As a consequence properties like
tapestry.disable-default-modules that are accessed within the
TapestryAppInitializer cannot be read and therefore have no effect.

The code in T5.4 looks like this:
SymbolProvider contextProvider = new ServletContextSymbolProvider(context);
SymbolProvider contextPathProvider = new
SingleKeySymbolProvider(SymbolConstants.CONTEXT_PATH,
context.getContextPath());
SymbolProvider combinedProvider = new
DelegatingSymbolProvider(contextPathProvider, contextProvider);

  String executionMode =
System.getProperty(SymbolConstants.EXECUTION_MODE, "production");

  TapestryAppInitializer appInitializer = new
TapestryAppInitializer(logger, combinedProvider,
filterName, executionMode);


And the code in T5.3.6:
SymbolProvider provider = new SymbolProvider()
{
  SymbolProvider contextProvider = new
ServletContextSymbolProvider(context);
  SymbolProvider systemProvider = new SystemPropertiesSymbolProvider();

  public String valueForSymbol(String symbolName)
  {
   String contextValue = contextProvider.valueForSymbol(symbolName);
   if (contextValue != null) return contextValue;

   return systemProvider.valueForSymbol(symbolName);
   }
};

String executionMode =
System.getProperty(SymbolConstants.EXECUTION_MODE, "production");

TapestryAppInitializer appInitializer = new
TapestryAppInitializer(logger, provider, filterName, executionMode);


g,
Kris

On Thu, Dec 27, 2012 at 5:47 PM, Howard Lewis Ship  wrote:
> I think you are mistaken:
>
> @Contribute(SymbolSource.class)
> public static void
> setupStandardSymbolProviders(OrderedConfiguration
> configuration,
> @ApplicationDefaults
> SymbolProvider
> applicationDefaults,
>
> @FactoryDefaults
> SymbolProvider
> factoryDefaults)
> {
> configuration.add("SystemProperties", new
> SystemPropertiesSymbolProvider(), "before:*");
> configuration.add("EnvironmentVariables", new
> SystemEnvSymbolProvider());
> configuration.add("ApplicationDefaults", applicationDefaults);
> configuration.add("FactoryDefaults", factoryDefaults);
> }
>
> Whatever you are seeing is caused by something else: a typo perhaps, or
> something preventing the system property from being visible to the running
> application.
>
>
> On Thu, Dec 27, 2012 at 8:44 AM, Howard Lewis Ship  wrote:
>
>> If that is true, it is an accident, possibly a bad merge.
>>
>>
>> On Thu, Dec 27, 2012 at 3:00 AM, Kristian Marinkovic <
>> kristian.marinko...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> i was just testing the 5.4-alpha-1 release and realized that the
>>> SystemPropertiesSymbolProvider is not used anymore by the
>>> TapestryFilter.
>>>
>>> I'm not sure whether it happened accidentally or on purpose?
>>>
>>> g,
>>> Kris
>>>
>>> -
>>> 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
>>
>
>
>
> --
> 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



Re: T5 Embedded Components

2012-12-07 Thread Kristian Marinkovic
Hi,

first remove the id parameter from the @Component annotation; this is
only needed if the field name in the java class is different from the
t:id attribute in the template.

second because you already defined your component in the template you
don't have to declare it in your java class; so you should remove the
TextField fields from your java class; if you still want to access the
component from within java use the @InjectComponent annotation

g,
kris

On Fri, Dec 7, 2012 at 1:51 PM, captain_rhino
 wrote:
> Embedded components
>
> I have a page (welcome) in which I am looking to use a custom
> simpletextfiled component to display numerous text fields (in the future I
> envisage simpledate and simple select components,  The simpleTextfield
> contains numerous other divs, css and other components).
>
> public class Welcome{
>
> @Persist
> private String field1,field2,field3;
>
> @Component(id = "field1")
> private TextField field1Field;
>
> @Component(id = "field2")
> private TextField field2Field;
>
> @Component(id = "field3")
> private TextField field2Field;
>
> }
>
> welcome.tml
> uses
> 
>
>
> where   SimpleTextField.tml is as follows
> http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
>
>  label="message:field1Field-label"  name="field1Field" size="35"
> class="height10Px"  />
>  (a custom component for helptext)
>
> 
>
> When I run this I recieved the following error
>
> Embedded component(s) field1Field are defined within component class
> com.axa.cao.pages.partner.Welcome (or a super-class of Welcome), but are not
> present in the component template
> (classpath:com/axa/cao/pages/partner/Welcome.tml).
>
> How can I pass the Text field component to the SimpleTextField Component to
> avoid the above error or is there a different approach I should be taking?
> Thanks in advance.
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-Embedded-Components-tp5718541.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



Re: What is @ApplicationScoped for tapestry?

2012-11-16 Thread Kristian Marinkovic
use @SessionState in T5

g,
kris

On Fri, Nov 16, 2012 at 5:16 PM, membersound  wrote:
> Hi,
>
> how can I make an @ApplicationScoped within tapestry? Is there any pendant
> to share the same data within one single class across the application in T5?
>
> Thanks
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/What-is-ApplicationScoped-for-tapestry-tp5718048.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



Re: Tapestry JPA + Stored Procedures

2012-11-07 Thread Kristian Marinkovic
Hi,
you can inject the session directly. please take a look at the
documentation.

G,
Kris
Am 07.11.2012 09:31 schrieb "John" :

> I got the JPA(with eclipselink) to work and have been using
> @NamedStoredProcedureQuery annotations in entities to obtain entity classes
> successully from SQLServer. This technique doesn't seem to work well or fit
> the situation where the stored proc just returns output parameters (no
> entity class required). For this I think I need a Session to do a more
> programatic solution to call the stored proc.
>
> Does Tapestry help obtain this object with an injection?
>
> John
>


Re: Problems integrating backbone.js with T5.3.6

2012-11-05 Thread Kristian Marinkovic
i knew that would come :)  i 'm watching the progress closely; it'll
be a great leap forward in developing js heavy applications.

sometimes there is an easier solution... i just added window._ = T5._
into my copy of backbone.js. i think i was looking to hard to add it
without modifying the original file and using the JavascriptSupport
service for that purpose.

thank you
g,
kris




On Mon, Nov 5, 2012 at 8:47 PM, Howard Lewis Ship  wrote:
> Needless to say, this will not be a problem in 5.4.
>
>
> On Mon, Nov 5, 2012 at 11:47 AM, Howard Lewis Ship  wrote:
>
>> I had to put in place a shim before the import of backbone, to fix this:
>>
>> /**
>>  * T5 is nice enough to use Underscore in noConflict() mode, but Backbone
>> expects it to be visible as window._, so we hack that.
>>  */
>> window._ = T5._;
>>
>>
>> On Mon, Nov 5, 2012 at 11:35 AM, Kristian Marinkovic <
>> kristian.marinko...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> i need some advice on how to properly integrate backbone.js in my T5
>>> application.
>>>
>>> Adding backbone.js with the @Import annotation results in an console
>>> error because it can't find the global underscore object _. The reason
>>> for that is the mapping of underscore to the T5 namespace in
>>> t5-core.js. When i tried to replace the core javascript stack i
>>> realized that it was already overridden by tapestry5-jquery. My quick
>>> workaround is to add the assets underscore.js and backbone.js manually
>>> using JavascriptSupport; this way i can control the order and _ is
>>> initialized globally again, but underscore is included twice in my
>>> pages.
>>>
>>> void afterRender()
>>> {
>>> jsSupport.importJavaScriptLibrary(underscore);
>>> jsSupport.importJavaScriptLibrary(backbone);
>>> }
>>>
>>> How could i solve this problem differently? Is anyone using T5 with
>>> backbone already? I'd be interested how the view templates are
>>> handled.
>>>
>>> g,
>>> Kris
>>>
>>> -
>>> 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
>>
>
>
>
> --
> 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



Problems integrating backbone.js with T5.3.6

2012-11-05 Thread Kristian Marinkovic
Hi,

i need some advice on how to properly integrate backbone.js in my T5
application.

Adding backbone.js with the @Import annotation results in an console
error because it can't find the global underscore object _. The reason
for that is the mapping of underscore to the T5 namespace in
t5-core.js. When i tried to replace the core javascript stack i
realized that it was already overridden by tapestry5-jquery. My quick
workaround is to add the assets underscore.js and backbone.js manually
using JavascriptSupport; this way i can control the order and _ is
initialized globally again, but underscore is included twice in my
pages.

void afterRender()
{
jsSupport.importJavaScriptLibrary(underscore);
jsSupport.importJavaScriptLibrary(backbone);
}

How could i solve this problem differently? Is anyone using T5 with
backbone already? I'd be interested how the view templates are
handled.

g,
Kris

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



Re: Displaying UploadedFile in the browser

2012-10-30 Thread Kristian Marinkovic
Hi,

i just implemented an ajax upload using the AjaxUpload component from
the tapestry5-jquery project. And i had to dive deeper into the
documentation and code of the JS file-uploader component used by the
AjaxUpload.

There are examples in the documentation that almost solve your needs:
http://fineuploader.com/fine-uploader-demo.html

g,
kris



On Tue, Oct 30, 2012 at 11:07 PM, bhorvat  wrote:
> Hi all,
>
> I would like to use the ajax to upload several images and once the user
> clicks the button he can then submit them, my question is how can I achieve
> this? Is it possible to return UploadedFile somehow so that I can get an
> image to display in the img tag?
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Displaying-UploadedFile-in-the-browser-tp5717442.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



Re: Why ActionLink Click is not working?

2012-10-18 Thread Kristian Marinkovic
Hi,

check the value of the context; if it is not set (null) only
onActionFromPlay() will be called; use the EventContext if you want to
catch this use case;

g,
Kris

On Thu, Oct 18, 2012 at 9:14 AM, dinesh707  wrote:
> Follofwing are some of my code parts. The system.out even do not create any
> output on ActionLink click. what am i doing wrong?
>
> Object onActionFromPlay(int videoId){
> System.out.println("onActionFromPlay(int videoId) CLICKED
> ===");
> Video _v;
> for (int i=0; i _v = videos.get(i);
> if (_v.getId() == videoId)
> currentVideo = _v;
> }
>
> if(request.isXHR())
> return videoZone.getBody();
> else
> return null;
>
> }
>
>
> 

t:id="play" > context="video.id" > t:zone="videoZone">Play Video > > > The Video I = ${currentvideo.name} > > > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Why-ActionLink-Click-is-not-working-tp5717030.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


Re: Tapestry-Portlet status?

2012-10-16 Thread Kristian Marinkovic
I think you have to answer this question yourself by checking if your
requirements are met. you can see on github that it is being actively
developed. there is even a mention of Typestry 5.4-alpha in the
readme.


On Tue, Oct 16, 2012 at 5:19 PM, Markus Feindler  wrote:
> Hm, it's hard to say since there are some basic features which don't
> function in the "bridge" (like returning a page or stream response in
> onactivate).
>
> I wouldn't recommend using it.
>
>>
>>  Original-Nachricht 
>> Datum: Tue, 16 Oct 2012 11:09:59 -0400
>> Von: Lenny Primak 
>> An: "Tapestry users" 
>> Betreff: Re: Tapestry-Portlet status?
>>
>> Thanks, I know it exists, but not sure it's ready for
>> production use,
>> hence the question if T5-portlet is something I should be using in
>> production
>>
>> On Oct 16, 2012, at 10:56 AM, Lenny Primak wrote:
>>
>> > I heard something about Tapestry supporting the Portlet spec.
>> > Is Tapestry going to support it out of the box or is Tapestry-Portlet
>> ready to use in production?
>>
>>
>> -
>> 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: Tapestry-Portlet status?

2012-10-16 Thread Kristian Marinkovic
did you take a look at https://github.com/got5/tapestry5-portlet?


On Tue, Oct 16, 2012 at 4:56 PM, Lenny Primak  wrote:
> I heard something about Tapestry supporting the Portlet spec.
> Is Tapestry going to support it out of the box or is Tapestry-Portlet ready 
> to use in production?
>
>
> -
> 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: Tapestry website down?

2012-10-15 Thread Kristian Marinkovic
online for me as well in austria

On Mon, Oct 15, 2012 at 8:57 PM, Jon Williams
 wrote:
> Negative. Working fine here in Canada.
>
> On Mon, Oct 15, 2012 at 11:43 AM, Russell John-Baptistr 
> wrote:
>
>> Is the tapestry.apache.org site down?
>>
>>
>> -
>> 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: Component taken from pool in T5.3?!

2012-09-15 Thread Kristian Marinkovic
Could you post some code.
Am 15.09.2012 14:10 schrieb "tompeter" :

> Hi everyone,
>
> I have a component in a Tapestry page that is displayed via Ajax renderer
> returning a block.
> Displaying the conponent the second time should show different data then
> the
> first time. I am logging that in the java-class which logs correct data.
> However, when the component is displayed, it shows all data from the first
> time.
>
> I am not reloading the page at all, just updating a zone with the block on
> click.
>
> Do you have any idea what the problem could be?
>
> Thanks a lot for your help, really appreciate!
>
> Cheers,
> Tom
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Component-taken-from-pool-in-T5-3-tp5716304.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: URL to the current page

2012-08-21 Thread Kristian Marinkovic
@Inject
private Request request;

in your page or component should be able to provide you with the desired data.

g,
kris

On Tue, Aug 21, 2012 at 12:38 PM, ksrijith  wrote:
> Hi,
> My current clients want to use the facebook comments widget on their site
> and have it available on every page that comes up. So I want to add the same
> in the Layout component so that its available on every page. But I'm facing
> an issue with finding the current URL with the context and request
> parameters which needs to be populated to allow comments for each specific
> page to be shown (eg: In the Details page for each item the store sells the
> would like to have the comments posted by the users.).
>
> If you could please guide me as to how I could find the current Page URL
> with the Base Urls that would really help me out.
>
> Thanks,
> Srijith
>
>
>
> -
> --
> Don't Forget to Rate
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/URL-to-the-current-page-tp5715655.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



Re: Missing 11 Build Path Entries

2012-07-24 Thread Kristian Marinkovic
Try a mvn clean install in your console. It should download whatever it
needs

Or use an maven plugin for your IDE
Am 24.07.2012 21:38 schrieb "Thiago H de Paula Figueiredo" <
thiag...@gmail.com>:

> On Tue, 24 Jul 2012 16:16:43 -0300, netdawg  wrote:
>
>  Problem/Question:  Is there a quick fix to get these files?  Or is it
>> manually install each?  Jetty will not launch without the plastic jar and
>> I did not even find plastic 5.3.4, just 5.3.3.  The maven dialogue allows
>> only 5.3.4
>>
>
> If you're using Eclipse, use the Maven integration plugin instead of
> command line. File -> New Project -> Project ... -> Maven Project -> Next
> -> type 'tapestry5' in the search box -> chosse artifact
> org.apache.tapestry quickstart -> change the version in the generated
> pom.xml to 5.3.4 or any other specific version you want.
>
> --
> Thiago H. de Paula Figueiredo
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: How to have every second value in the t:loop different

2012-07-05 Thread Kristian Marinkovic
hi geoff,

Even Odd is extremely elegant; never thought of such a solution

g,
kris

On Thu, Jul 5, 2012 at 7:32 AM, Geoff Callender
 wrote:
> ...which is why injecting EvenOdd is such a good solution. It just works,
> everywhere.
>
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/alternatingloop
>
>
> Cheers,
>
> Geoff
>
> On 5 July 2012 10:49, Bob Harner  wrote:
>
>> Remember that ":nth-child()" selector doesn't work in IE 8 and
>> earlier, if that matters.
>>
>> On Wed, Jul 4, 2012 at 5:47 PM, bhorvat  wrote:
>> > Yea I totally agree with that. I have implemented using the css which
>> worked
>> > for me.
>> > cheers all
>> >
>> > --
>> > View this message in context:
>> http://tapestry.1045711.n5.nabble.com/How-to-have-every-second-value-in-the-t-loop-different-tp5714278p5714289.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
>>
>>

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



Re: How to have every second value in the t:loop different

2012-07-04 Thread Kristian Marinkovic
if it is only visual, and just about setting an css class: -> use the
css selector mentioned by dusko; no duplication

On Wed, Jul 4, 2012 at 10:22 PM, bhorvat  wrote:
> My problem is that I have a lot of code duplication, also this seems to me as
> a simple display problem so I dont like the fact that I have to create logic
> in the java page for this just so that I can put one extra css class in one
> place.
>
> Apart from that the 2 blocks in your case would be exactly the same. In php
> it would be easier to solve this (wow I am actually saying something is
> better to solve in php :) ) as I could just suround the class with simple
> if, but here I cant put the if logic in the middle of a tag so I have to
> duplicate html.
>
> Hope this explains it a bit better
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/How-to-have-every-second-value-in-the-t-loop-different-tp5714278p5714281.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



Re: How to have every second value in the t:loop different

2012-07-04 Thread Kristian Marinkovic
it would be easier to give you an advice if you'd outline the problem
you are having a little more.

but if you ask me i'd put a delegate inside the loop and let the "to"
binding decide what component/block to render. i use this approach to
render a list of "item" (types) that may have completely different
representations.










as always it depends on what you wanna achieve

g,
kris

On Wed, Jul 4, 2012 at 10:04 PM, bhorvat  wrote:
> So here is the annoying problem, I have a loop and I need to make every even
> rows different then odd rows. So the way I do this is I have a index and a
> methods isEvenRow that returns if the row is even. Then based on that I have
> one if withe else section. The only difference between content of both is in
> one single tiny class called itrEven.
>
>t:index="index">
>
>  itrEven*">
>  
>   
>  
>
>   
>
> So how do I make this less verbose. I dont like the fact that I need to have
> one extra field and methos in the page, as well as having the duplication of
> the html code (there is a lot of code in between if else section I have just
> removed it since it is not important)
>
> Is there a better solution?
>
> And yes I know that I am being pedantic about this, but it is really
> annoying :)
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/How-to-have-every-second-value-in-the-t-loop-different-tp5714278.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



Re: Non Maven project Tapestry 5.3

2012-06-21 Thread Kristian Marinkovic
not allowed to use ant? many of us are still forced to use ant :)

On Thu, Jun 21, 2012 at 12:51 PM, Muhammad Gelbana  wrote:
> In case these policies prohibits ant as well. I guess all you need is to
> create tapestry's layout manually, include tapestry's libraries in your
> classpath and you are good to go. To be clear I haven't tried that before
> although I was thinking about it.
>
> This should be helpful
> http://tapestry.apache.org/project-layout.html
>
> On Thu, Jun 21, 2012 at 12:11 PM, Chris Mylonas  wrote:
>
>> jumpstart.doublenegative.com.au
>>
>> all of it downloadable and instructions on how to set it up in eclipse.
>> it is ant scripts, not maven.
>>
>> On 21/06/2012, at 7:45 PM, captain_rhino wrote:
>>
>> > For complicated company polictical reasons  I need to demonstrate a non
>> maven
>> > eclipse project.
>> >
>> > Does any have a good example of this they could share?  An axample
>> project
>> > or typical non-maven project structure.  I am basically just looking to
>> > produce a tapestry war using eclispe export functionality.  I have a
>> > standard maven project so I already have the dependencies downloaded.
>>  Any
>> > advice much appreciated in advance.
>> >
>> > --
>> > View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Non-Maven-project-Tapestry-5-3-tp5714005.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
>>
>>
>
>
> --
> *Regards,*
> *Muhammad Gelbana
> Java Developer*

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



Re: How do you feel about requiring JRE 1.6 for Tapestry 5.4?

2012-05-02 Thread Kristian Marinkovic
+1

let's switch to 1.6 as many new/modern frameworks already require it anyways.

g,
kris

On Wed, May 2, 2012 at 8:05 AM, Kalle Korhonen
 wrote:
> When in doubt, let's ask the community: would you object to requiring
> JRE 1.6 for running Tapestry 5.4? So far, T5 has run on JRE 1.5 but
> the time for requiring 1.6 will come at some point. Not necessarily
> yet - we can likely work around this - but current Hibernate 4.x
> releases are built with 1.6.
>
> Kalle
>
> -
> 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: Upgrading to Hibernate Core 4.1.1 Final

2012-04-27 Thread Kristian Marinkovic
open the pom.xml of your main application in the eclipse pom editor
and switch to the dependency tab. there you can see all the direct and
transitive dependencies. and do a clean install of all your modules..
or parent project.

On Fri, Apr 27, 2012 at 11:03 AM, netdawg  wrote:
> Yes, basically the exception is a compile exception saying the following
> "could not be resolved":
>
> import org.hibernate.Session;
>
>
> And, finally, I also tried this:
>
>    
>            org.apache.tapestry
>            tapestry-hibernate
>            ${tapestry-release-version}
>            
>             
>              org.apache.tapestry
>                  tapestry-hibernate-core
>                 
>           
>        
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5669761.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



Re: Upgrading to Hibernate Core 4.1.1 Final

2012-04-27 Thread Kristian Marinkovic
can you post your exception?

On Fri, Apr 27, 2012 at 10:45 AM, netdawg  wrote:
> Neither did this work...
>
>    
>            org.apache.tapestry
>            tapestry-hibernate
>            ${tapestry-release-version}
>            
>             
>              org.hibernate
>              hibernate-core
>           
>             
>              org.hibernate
>              hibernate-search
>           
>         
>        
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5669713.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



Re: Upgrading to Hibernate Core 4.1.1 Final

2012-04-27 Thread Kristian Marinkovic
you have to add exclusions to your tapestry-hibernate dependency

g,
kris

On Fri, Apr 27, 2012 at 10:19 AM, Chris Mylonas  wrote:
> i think tapestry-hibernate pulls in hibernate jars, so you can remove it from 
> your pom
> doing it how you've done is how to break it
>
>
> On 27/04/2012, at 6:15 PM, netdawg wrote:
>
>> Issue:  Current (5.3.2) versions of Tapestry-Hibernate seem to clash with
>> latest 4.1.1 Final of Hibernate core.  Specifically, import
>> org.hibernate.Session can no longer be resolved after introducing the 4.1.1
>> Final dependency in pom.
>>
>> Anyone else experience this, have a convenient workaround?  I would like to
>> avoid messing around in framework code, if I can get away with it...;-)...
>>
>> My pom.xml (partial)
>>
>>
>>
>>        
>>            org.apache.tapestry
>>            tapestry-hibernate
>>            ${tapestry-release-version}
>>        
>>
>>        
>>          org.hibernate
>>          hibernate-search
>>          4.1.0.CR2
>>        
>>
>>   
>>       org.hibernate
>>       hibernate-core
>>       4.1.1.Final
>>   
>>
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5669640.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
>

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



How do i trigger a zone update in the parent component or page?

2012-04-26 Thread Kristian Marinkovic
Hi,

i have a loop in my page that renders some "rows" whereas each row is
a zone component. Each row represents some special data type that has
different properties when edited. Because i don't know in advance how
many data types will be supported (and i want to stay as flexible as
possible) i just return an instance of the data type in my event
handler method and contribute a data type specific
ComponentEventResultProcessor to the
AjaxComponentEventResultProcessor. There i use a name convention to
identify the page and component that is suited to render a specific
form for the specific data type and eventually return the component
for rendering. The benefit is that i can drop in new modules later to
support new data types without changing the existing page.

The problem i'm having is that i was not able to figure out how to
trigger a zone update of the very same row after i save or cancel the
data type specific form component. after rendering the edit component
i lost the zoneid that was associated with the edit link.

Does anyone have an idea how to solve this? Do i have to persist the
generated zoneId somehow to call some JS function manually?

g,
kris

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



Re: T5 Using DAO within a DAO causes NPE.

2011-06-09 Thread kristian marinkovic
i also prefer constructor injection over anything else :)

On Thu, Jun 9, 2011 at 8:05 AM, Taha Hafeez wrote:

> Yes, but wherever possible I find it a better option as using constructor
> injection ensures the bean is created properly even if you yourself create
> it, so minimal NPEs,  just like the above case.
>
> regards
> Taha
>
> On Thu, Jun 9, 2011 at 10:36 AM, kristian marinkovic <
> kristian.marinko...@gmail.com> wrote:
>
> > Constructor injection does not work on pages, components and mixins.
> Works
> > only on services.
> > G,
> > Kris
> > Am 2011 6 9 01:49 schrieb "ael" :
> > > I always make life complicated.
> > >
> > > Well just inject the DAO within pages. problem solved.
> > > But still i want to make my page class neat though.
> > >
> > > Also contructor injection is another solution.
> > >
> > > Thanks :)
> > >
> > > --
> > > View this message in context:
> >
> >
> http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4471238.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: T5 Using DAO within a DAO causes NPE.

2011-06-08 Thread kristian marinkovic
Constructor injection does not work on pages, components and mixins. Works
only on services.
G,
Kris
Am 2011 6 9 01:49 schrieb "ael" :
> I always make life complicated.
>
> Well just inject the DAO within pages. problem solved.
> But still i want to make my page class neat though.
>
> Also contructor injection is another solution.
>
> Thanks :)
>
> --
> View this message in context:
http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4471238.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: T5 Using DAO within a DAO causes NPE.

2011-06-07 Thread kristian marinkovic
did you configure AuthenticationDAOHibernate as Tapestry Service (bind via
bind method or build method)?

On Wed, Jun 8, 2011 at 8:35 AM, ael  wrote:

> No, i did not use javax.
>
> Its
> import org.apache.tapestry5.ioc.annotations.Inject;
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4467432.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: T5 Using DAO within a DAO causes NPE.

2011-06-07 Thread kristian marinkovic
Hi,
Which inject annotation are you using? Chances are that you use the javax
annotation that will be supported in 5.3

G, Kris
Am 2011 6 8 08:06 schrieb "ael" :


Plastic: nondeterministic PlasticManager behavior

2011-04-24 Thread kristian marinkovic
Hi,

i'm taking a deep dive into plastic and came across a behavior i cannot explain.

If i create a ClassInstantiator from a PlasticManager that was created
with the transformers and packages in the constructor, i get the
PlasticClass in my transformer where i can e.g. assert that the class
under test has only one method. But if i instantiate a PlasticManager
with the empty constructor and call createClass() with the class under
test and the transformer, the transformer will always return an empty
list if i ask the PlasticClass for the number of methods. Can somebody
explain why?

g,
kris

public class PlasticManagerExperiment
{
private final PlasticClassTransformer transformer = new
PlasticClassTransformer()
{
@Override
public void transform(PlasticClass plasticClass)
{
assert plasticClass.getMethods().size() == 1;
}
};

@Test
public void instantiate_without_packages()
{
PlasticManager m = new PlasticManager();

m.createClass(ClassUnderTest.class, transformer);
}

@Test
public void instantiate_with_packages()
{
PlasticManager m = new
PlasticManager(Thread.currentThread().getContextClassLoader(),
new StandardDelegate(transformer),
new 
HashSet(Arrays.asList(ClassUnderTest.class.getPackage().getName(;

m.getClassInstantiator(ClassUnderTest.class.getName());

}
}

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



Re: IllegalAccessError in IoC

2011-04-14 Thread Kristian Marinkovic
Hi Peter, 

we do have the same problem here. 

there are two solutions we use to circumvent this problem: 

1) keep your modules (projects) closed; Tapestry 5.2 will only create 
proxies for services without a interface only if it can find the class 
file in the local filesytem (not in jar file)
2) create a patched tapestry 5.2.5 version that does not create proxies 
for services without a interface:

 AbstractConfigurationImpl -> if (contributionType.isInterface() && 
InternalUtils.isLocalFile(clazz))

remove the isLocalFile part; it is not possible to make it configurable 
via a SymbolSource due to recursions.


g,
kris



Von:p.stavrini...@albourne.com
An: Tapestry Mailing List 
Datum:  14.04.2011 11:56
Betreff:IllegalAccessError in IoC



Hi Howard et al,

We are using Tapestry 5 IoC in all our applications (both standalone and 
web), and have a very sizeable IoC code base. We have tried a couple of 
times now to upgrade it from 5.1 and 5.2.4, but it seems backwards 
compatibility is broken... The problem we are stuck on now is whenever a 
non-public method is called from within a service we are getting the 
dreaded IllegalAccessError. I have not dug very deep into Tapestrys 
internals to figure out why this is happening yet, but I am certain that 
in Tapestry 5.1 this is not the case. 

You might suggest to simply change the scope of these methods and classes 
but we can't easily re-factor our library modules because of the sheer 
scale, and even if it were an option, and we did consider it for a time, 
these errors produce runtime exceptions, which makes it is very difficult 
to find every occurrence in the code, so for us to change the scope for 
our entire IoC codebase is not a practical solution. This seems like a big 
change from 5.1, and is a real blocker for us, I would greatly appreciate 
any assistance.

Thanks,
Peter 





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




Re: Components communication with nested components

2011-04-12 Thread Kristian Marinkovic
there are two phases in tapestry: the action phase and the render phase. 
for every phase you have to set your environmental services explicitly. 

i often have services that use the ApplicationStateManager service 
directly to access the persisted data, so my components are only aware of 
the service interface. this way i can reload the data whenever i need it 
lazily without coupling the components to my data objects. i hope this 
gives you some ideas.

g,
kris



Von:Taha Hafeez 
An: Tapestry users 
Datum:  12.04.2011 12:24
Betreff:Re: Components communication with nested components



I am also using @Environmental but it is not availiable at all times. e.g.
when the nested component contains a form and that form is submitted... So
in order to deal with it I use @Persist, first time around and on form
submission I use the persisted value as the environment does not contain 
the
context...

What i was asking is, whether what I am doing is the way to go or there is
any other alternative.

regards
Taha


On Tue, Apr 12, 2011 at 3:47 PM, Kristian Marinkovic <
kristian.marinko...@porscheinformatik.at> wrote:

> Declaring all possible values as parameters leads to high coupling. Just
> imagine declaring the parameters in a hierarchy of 5 components just to
> have it.
>
> I'd use Environmental services to pass data between different component
> hierarchies. You can also apply the MVC pattern: create a service 
(thread
> scoped service or SSO) that acts as the model that the components can 
use
> to pull data from it. the service interface acts as the contract between
> component and model
>
> g,
> kris
>
>
>
> Von:Taha Hafeez 
> An: Tapestry users 
> Datum:  11.04.2011 18:00
> Betreff:Re: Components communication with nested components
>
>
>
> But my problem is parent does not have any knowledge of the child. Child
> is
> either contained in the body somewhere or in an override block
>
> e.g
>
> Parent
>
> 
>   
> 
>
> Later in use
>
> 
>   
> 
>
> so, parameters is not an option
>
> regards
> Taha
>
>
> On Mon, Apr 11, 2011 at 9:04 PM, Christian Köberl <
> tapestry.christian.koeb...@gmail.com> wrote:
>
> > You could use parameters - Tapestry keeps them always in sync:
> >
> > public class Parent
> > {
> >  // here Parent's state is bound to Child's state
> >  @Component(parameters = "state=state")
> >  private Child child;
> >
> >  @Property
> >  private String state;
> > }
> >
> > public class Child
> > {
> >  @Parameter
> >  private String state;
> > }
> >
> > see also http://tapestry.apache.org/component-parameters.html
> >
> > --
> > Chris
> >
> > --
> > View this message in context:
> >
>
> 
http://tapestry-users.832.n2.nabble.com/Components-communication-with-nested-components-tp6261431p6261909.html

>
> > Sent from the Tapestry Users 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: Components communication with nested components

2011-04-12 Thread Kristian Marinkovic
Declaring all possible values as parameters leads to high coupling. Just 
imagine declaring the parameters in a hierarchy of 5 components just to 
have it.

I'd use Environmental services to pass data between different component 
hierarchies. You can also apply the MVC pattern: create a service (thread 
scoped service or SSO) that acts as the model that the components can use 
to pull data from it. the service interface acts as the contract between 
component and model

g,
kris



Von:Taha Hafeez 
An: Tapestry users 
Datum:  11.04.2011 18:00
Betreff:Re: Components communication with nested components



But my problem is parent does not have any knowledge of the child. Child 
is
either contained in the body somewhere or in an override block

e.g

Parent


   


Later in use


   


so, parameters is not an option

regards
Taha


On Mon, Apr 11, 2011 at 9:04 PM, Christian Köberl <
tapestry.christian.koeb...@gmail.com> wrote:

> You could use parameters - Tapestry keeps them always in sync:
>
> public class Parent
> {
>  // here Parent's state is bound to Child's state
>  @Component(parameters = "state=state")
>  private Child child;
>
>  @Property
>  private String state;
> }
>
> public class Child
> {
>  @Parameter
>  private String state;
> }
>
> see also http://tapestry.apache.org/component-parameters.html
>
> --
> Chris
>
> --
> View this message in context:
> 
http://tapestry-users.832.n2.nabble.com/Components-communication-with-nested-components-tp6261431p6261909.html

> Sent from the Tapestry Users 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: Session State not setting user?

2011-03-15 Thread Kristian Marinkovic
just declare it in your constructor and create your service with tapestry 
ioc.

take a look at the tapestry ioc documentation to see how injection works

g,
kris



Von:robnangle 
An: users@tapestry.apache.org
Datum:  15.03.2011 12:49
Betreff:Re: Session State not setting user?



Cheers.. Is that difficult done?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Session-State-not-setting-user-tp3698456p3699526.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: Session State not setting user?

2011-03-15 Thread Kristian Marinkovic
@SessionState/@Property only works in Pages, Components and Mixins.

To access session state objects in your services you need to inject the 
ApplicationStateManager

g,
kris



Von:robnangle 
An: users@tapestry.apache.org
Datum:  15.03.2011 12:28
Betreff:Session State not setting user?



Hi,
I am using at session state throughout my application but in one class it
does not seem to be setting/getting the user in one class?

Any idea's?

public class JoinLeague {
 private Connection conn;
 private PreparedStatement prep;
 
 @Property
 @SessionState
 private User user;
 
 private PrivateLeague temp;
 private String user2;
 private String user3;
 private String user4;
 private String user5;
 private String user6;
 private String user7;
 private String user8;
 private String user9;
 private String user10;
 
 public JoinLeague() throws Exception {
 createDb();
 conn.close();
 }
 
 public void createDb() throws Exception {
 Handler handler = new Handler();
 conn = handler.getConnection();
 prep = handler.getPreparedStatement();
 }
 
 public void assignUsers() throws Exception {
 try {
 createDb();
 String statement = 
"select * from private";
 prep = 
conn.prepareStatement(statement);
 ResultSet rs = 
(ResultSet) prep.executeQuery();

 while(rs.next()) {
 temp = 
new PrivateLeague();
 temp.setMem2(rs.getString("user2")); 
 user2 = 
temp.getMem2();
 temp.setMem3(rs.getString("user3")); 
 user3 = 
temp.getMem3();
 temp.setMem4(rs.getString("user4")); 
 user4 = 
temp.getMem4();
 temp.setMem5(rs.getString("user5")); 
 user5 = 
temp.getMem5();
 temp.setMem6(rs.getString("user6")); 
 user6 = 
temp.getMem6();
 temp.setMem7(rs.getString("user7")); 
 user7 = 
temp.getMem7();
 temp.setMem8(rs.getString("user8")); 
 user8 = 
temp.getMem8();
 temp.setMem9(rs.getString("user9")); 
 user9 = 
temp.getMem9();
 temp.setMem10(rs.getString("user10")); 
 user10 = 
temp.getMem10();
 }
 conn.close();

 } catch (Exception e) {
 e.printStackTrace();
 } 
 }
 
 public void updateUsers() throws Exception {
 createDb();
 if(user2 == null) {
 String statement1 = "Update private set 
user2=?;"; 
 prep = conn.prepareStatement(statement1);
 prep.setString(1, user.getUsername());
 prep.executeUpdate();
 }
 else if(user3 == null){
 String statement2 = 
"Update private set user3=?;"; 
 prep = 
conn.prepareStatement(statement2);
 prep.setString(1, 
user.getUsername());
 prep.executeUpdate();
 }
 else if(user4 == null){
 String statement3 = 
"Update private set user4=?;"; 
 prep = 
conn.prepareStatement(statement3);
 prep.setString(1, 
user.getUsername());
 prep.executeUpdate();
 }

RE: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Kristian Marinkovic
override the toString() implementation of your user entity... you can use 
apache-commons ToStringBuilder.



Von:robnangle 
An: users@tapestry.apache.org
Datum:  01.03.2011 15:44
Betreff:RE: org.apache.tapestry5.runtime.ComponentEventException



Im probably wording the question wrong but that returns something like a
memory address: Entities.User@12e7cb6

I want to find the user_id of that user?

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/org-apache-tapestry5-runtime-ComponentEventException-tp3404853p3405030.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: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Kristian Marinkovic
where is your connection (field conn) set?



Von:robnangle 
An: users@tapestry.apache.org
Datum:  01.03.2011 13:53
Betreff:Re: org.apache.tapestry5.runtime.ComponentEventException



Yes stupidly I forgot to set the connection but the errors remain. The
onSuccess():

public String onSuccess() throws Exception {
 createDb();
 String statement = "INSERT INTO 
teams(user_id, team_name, keeper,
fullBack1, fullBack2, fullBack3, halfBack1, halfBack2, halfBack3, 
midfield1,
midfield2, halfForward1, halfForward2, halfForward3, fullForward1,
fullForward2, fullForward3) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?,
?, ?, ?)";
 prep = conn.prepareStatement(statement);
 prep.setObject(1, team.getUser_id());
 prep.setString(2, team.getTeam_name());
 prep.setString(3, team.getKeeper());
 prep.setString(4, team.getFullBack1());
 prep.setString(5, team.getFullBack2());
 prep.setString(6, team.getFullBack3());
 prep.setString(7, team.getHalfBack1());
 prep.setString(8, team.getHalfBack2());
 prep.setString(9, team.getHalfBack3());
 prep.setString(10, team.getMidfield1());
 prep.setString(11, team.getMidfield2());
 prep.setString(12, 
team.getHalfForward1());
 prep.setString(13, 
team.getHalfForward2());
 prep.setString(14, 
team.getHalfForward3());
 prep.setString(15, 
team.getFullForward1());
 prep.setString(16, 
team.getFullForward2());
 prep.setString(17, 
team.getFullForward3());
 prep.executeUpdate();
 return "index";  
 }

I know its not a great idea to have the code in here, once working it will
be moved to the correct package.

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/org-apache-tapestry5-runtime-ComponentEventException-tp3404853p3404886.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: Hello,Can anyone tell how to use servlet session Listener with tapestry IoC services ?

2011-02-23 Thread Kristian Marinkovic
hi thiage, 

you're right HttpSessionActivationListener is another possibility :) 

i dont recreate the registry in my HttpSessionListener, i just reuse the 
one created by my tapestry listener

My TapestryListener snippet (could be a filter):

public class TapestryListener implements ServletContextListener
{
public static final String REGISTRY_CONTEXT_NAME = 
"org.apache.tapestry5.application-registry";

public void contextInitialized(ServletContextEvent sce)
{
 
  // same code as in TapestryFilter

registry = appInitializer.createRegistry();

  // set registry in context
context.setAttribute(REGISTRY_CONTEXT_NAME, registry);
...
  // same code as in TapestryFilter
}
}

My HttpSessionListener:

public final class MyHttpSessionListener implements HttpSessionListener
{
...
public void sessionDestroyed(HttpSessionEvent event)
{
HttpSession httpSession = event.getSession();
... 
Registry registry = (Registry) 
httpSession.getServletContext().getAttribute(TapestryListener.
REGISTRY_CONTEXT_NAME);
 
if(registry == null)
throw new RuntimeException("No Tapestry registry 
found. Please check that TapestryListener or -Filter is added as 
");

... //do something 
}
}

g,
kris



Von:"Thiago H. de Paula Figueiredo" 
An: "Tapestry users" , "Kristian 
Marinkovic" 
Datum:  23.02.2011 12:15
Betreff:Re: Hello,Can anyone tell how to use servlet session 
Listener with tapestry IoC services ?



On Wed, 23 Feb 2011 06:18:24 -0300, Kristian Marinkovic 
 wrote:

> we've written an own listener (you can create a filter as well) that
> starts tapestry. this listener saves the registry in the servlet context
> so another serlvet listener can then access it. we use it in a
> HttpSessionListener to clear lock if the user session expires.

My approach was to use a RequestFilter to put in the session an object 
that implements HttpSessionActivationListener. It will be notified when 
the session is created and when its destroyed. No need to create the 
Registry manually. :)

-- 
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: Hello,Can anyone tell how to use servlet session Listener with tapestry IoC services ?

2011-02-23 Thread Kristian Marinkovic
we've written an own listener (you can create a filter as well) that 
starts tapestry. this listener saves the registry in the servlet context 
so another serlvet listener can then access it. we use it in a 
HttpSessionListener to clear lock if the user session expires.

g,
kris






Von:jqzone 
An: Tapesty 
Datum:  23.02.2011 08:10
Betreff:Hello,Can anyone tell how to use servlet session Listener 
with tapestry IoC services ?







Antwort: Tapestry 5 error "Caused by: java.lang.RuntimeException: Literal values are not updateable"

2011-02-07 Thread Kristian Marinkovic
Pages usually don't have parameters. Components do!

g,
kris



Von:m!g 
An: users@tapestry.apache.org
Datum:  07.02.2011 15:38
Betreff:Tapestry 5 error "Caused by: java.lang.RuntimeException: 
Literal values are not updateable"




Hi everyone.
Here is a simple test application:

public class Test {
 @Parameter(value="false")
 @Property
 private boolean test;

 @Component
 private Form form;

 @Inject
 private Request request;

 Object onSubmitFromForm() {
 test=true;
 return null;
 }
}

http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xml:space="preserve">



${test}






When I try to submit form I get error:


org.apache.tapestry5.runtime.ComponentEventException: Failure writing
parameter 'test' of component Test: Literal values
 are not updateable. [at classpath:ru/kupivip/pages/Test.tml, line 4]
 at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.jav
a:1152)


Is it right behaviour of T5? Why I can't update parameter values?
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-error-Caused-by-java-lang-RuntimeException-Literal-values-are-not-updateable-tp3374330p3374330.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: Nothing happens when overriding default validation messages

2011-02-02 Thread Kristian Marinkovic
there are two question that pop up in my mind:

1. has your Module been loaded?

2.  is there another override of the ValidationMessagesSource

g,
kris



Von:Igor Drobiazko 
An: Tapestry users 
Datum:  02.02.2011 11:27
Betreff:Re: Nothing happens when overriding default validation 
messages



Your code should definitely work with 5.2.4. Your should see either an
overriden message or a message about a missing key.

On Wed, Feb 2, 2011 at 11:08 AM, Stephan Windmüller <
stephan.windmuel...@tu-dortmund.de> wrote:

> Hi!
>
> I am trying to override the default validation messages with this:
>
> 
>
> public void contributeValidationMessagesSource(
>OrderedConfiguration configuration) {
>configuration.override("Default",
>"myclasspath/ValidationMessages",
>"before:*");
> }
>
> 
>
> In short: It does nothing. There are still the default validation
> messages printed. I am not even getting an error when I rename my
> ValidationMessages.properties to something different.
>
> What am I doing wrong?
>
> Thanks
>  Stephan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de



Re: Question on Tapesry Services IoC

2011-01-25 Thread Kristian Marinkovic
Hi Nicolas,

you can't contribute if you only have a string or no parameter. it has to 
be either a map, a list or a collection. 

you can contribute a ServiceOverride to replace a service with another 
implementation (see documentation)

g,
kris





Von:Nicolas Barrera 
An: Tapestry users 
Datum:  21.01.2011 17:27
Betreff:Re: Question on Tapesry Services IoC



Thanks Kristian,

first I want to ask a conceptual question:

if a build method receives for example a String value not a map,... can I
contribute to that build method using Configuration/OrderedConfiguration?

what if the build method has no parameters?, is it possible to contribute?


in practice...,
now I 'm facing this problem:

I need to override a property from the service
AuthenticationProcessingFilter, (this is from tapestry-spring-security.. I
can't modify that code):

here's it's build method

@Marker(SpringSecurityServices.class)
> public static AuthenticationProcessingFilter
> buildRealAuthenticationProcessingFilter(
> @SpringSecurityServices
> final AuthenticationManager manager, @SpringSecurityServices
> final RememberMeServices rememberMeServices, @Inject
> @Value("${spring-security.check.url}")
> final String authUrl, @Inject
> @Value("${spring-security.target.url}")
> final String targetUrl, @Inject
> @Value("${spring-security.failure.url}")
> final String failureUrl) throws Exception {
> AuthenticationProcessingFilter filter = new
> AuthenticationProcessingFilter();
> filter.setAuthenticationManager(manager);
> filter.setAuthenticationFailureUrl(failureUrl);
> filter.setDefaultTargetUrl(targetUrl);
> filter.setFilterProcessesUrl(authUrl);
> filter.setRememberMeServices(rememberMeServices);
> filter.afterPropertiesSet();
> return filter;
> }
>
What I 'd like to do is to have something like filter.set
AlwaysUseDefaultTargetUrl(true) in my own AppModule as a contribution


Here, for example is another build method from the same library module,
which uses that object:

@Marker(SpringSecurityServices.class)
> public static HttpServletRequestFilter
> buildAuthenticationProcessingFilter(
> final AuthenticationProcessingFilter filter) throws 
Exception {
> return new HttpServletRequestFilterWrapper(filter);
> }
>


I 'd need some advice on how to "contribute" and set that property to the
required value in my AppModule, I guess that in the 
tapestry-spring-security
site they say something about overriding values using contributeAlias, but
as I 'ver read that this type of contribution is going to be deprecated on
5.3 I didn't try that way yet.

hope I was clear,

thanks as usual...

Nicolás.-


On Thu, Jan 20, 2011 at 9:01 AM, Kristian Marinkovic <
kristian.marinko...@porscheinformatik.at> wrote:

> hi nicloas,
>
> you could use a builder method to decouple tapestry ioc from 3rd party
> libraries/constructors
>
> public SomethingManager buildSomethinManager(Map<> map, ...)
> {
> return new SomethingManger(map, ... );
> }
>
> public void contributeSomethingManager(MappedConfiguration<> map)
> {}
>
> g,
> kris
>
>
> Von:Nicolas Barrera 
> An: Tapestry users 
> Datum:  20.01.2011 12:55
> Betreff:Re: Question on Tapesry Services IoC
>
>
>
> Thanks Josh,
>
> sorry for my verbosity
>
> So in order to use contributions to a Service (SomethingManager) through 
a
> MappedConfiguration,
>
> this SomethingManager should have a constructor that receives the
> corresponding Map, and tapestry will inject the contributed
> MappedConfiguration into it?
>
> ok i got it..., tomorrow  I m going to test it on code.., the thing is
> that
> in my case SomethingManager is a 3rd party class
> (tapestry-spring-security)
> but i think i can handle it with this information.
>
> thanks for the concept.
>
> Do you know why will Alias Contributions be deprecated? I guess that 
what
> you explained me will be the defacto way of contributing and overriding
> contributions?
>
> thanks again and cheers
>
> Nicolás.-
>
>
> On Wed, Jan 19, 2011 at 8:04 PM, Josh Canfield
> wrote:
>
> > You had me all the way up until you started talking about what you
> > wanted to do. Here is a short primer:
> >
> > You have a service that manages a collection of Something:
> >
> > private Map allMyConfiguredSomethings;
> >
> > // I get my Somethings in the constructor
> > public SomeThingManagerImpl(Map somethingMap) {
> >this.allMy

Re: Question on Tapesry Services IoC

2011-01-20 Thread Kristian Marinkovic
hi nicloas,

you could use a builder method to decouple tapestry ioc from 3rd party 
libraries/constructors

public SomethingManager buildSomethinManager(Map<> map, ...)
{
 return new SomethingManger(map, ... );
}

public void contributeSomethingManager(MappedConfiguration<> map)
{}

g,
kris


Von:Nicolas Barrera 
An: Tapestry users 
Datum:  20.01.2011 12:55
Betreff:Re: Question on Tapesry Services IoC



Thanks Josh,

sorry for my verbosity

So in order to use contributions to a Service (SomethingManager) through a
MappedConfiguration,

this SomethingManager should have a constructor that receives the
corresponding Map, and tapestry will inject the contributed
MappedConfiguration into it?

ok i got it..., tomorrow  I m going to test it on code.., the thing is 
that
in my case SomethingManager is a 3rd party class 
(tapestry-spring-security)
but i think i can handle it with this information.

thanks for the concept.

Do you know why will Alias Contributions be deprecated? I guess that what
you explained me will be the defacto way of contributing and overriding
contributions?

thanks again and cheers

Nicolás.-


On Wed, Jan 19, 2011 at 8:04 PM, Josh Canfield 
wrote:

> You had me all the way up until you started talking about what you
> wanted to do. Here is a short primer:
>
> You have a service that manages a collection of Something:
>
> private Map allMyConfiguredSomethings;
>
> // I get my Somethings in the constructor
> public SomeThingManagerImpl(Map somethingMap) {
>this.allMyConfiguredSomethings = somethingMap;
> }
>
> // In your app module you tell tapestry about your SomethingManager
> service.
>
>  public static void bind(ServiceBinder binder) {
>binder.bind(SomethingManager.class, SomethingManagerImpl.class);
>  }
>
> // and  tell the something manager which somethings it's going to manage
>
> public static void
> contributeSomethingManager(MappendConfiguration
> configuration) {
>  // put items in that eventually end up in SomethingManager
> }
>
> MappedConfiguration has an override method which you can use to set a
> value on top of another from within your contribute method.
>
> Josh
>
> On Wed, Jan 19, 2011 at 12:09 PM, Nicolas Barrera 
> wrote:
> > Hi,
> >
> > I 'm trying to understand how does Tapestry IoC works.., I 'm 
currently
> > reading the new docs and I 'm also putting my hands on an example I 
got
> on a
> > working application.
> >
> > What I can't understand yet is how does contribution works,
> >
> > I got that you can define a Service like:
> >
> > public static SaltSourceService buildXxx(...) {
> >>
> >
> > and that you can configure Xxx's dependencies contributing with:
> >
> > public static void contributeXxx(final MappedConfiguration String>
> >> configuration) {
> >>
> >
> > where you add entries to the parameter received map, but... in the
> example I
> > 'm looking at, I only see values being put in the map but never
> retrieved,
> >
> > would I be looking at an incomplete example or there's some tapestry
> magic
> > over this?
> >
> >
> > The example I mention is an application which uses
> tapestry-spring-security
> > and I want to override a property value from a service,
> > I want to set service AuthenticationProcessingFilter's property
> > alwaysUseDefaultTargetUrl to true in my AppModule.
> >
> > hope someone throws some light on this one as it usually happens here 
in
> the
> > ml :)
> >
> > cheers,
> > Nicolás.-
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



Re: Actionlinks with the same t:id

2010-12-06 Thread Kristian Marinkovic
i guess you are using a loop to generate a unordered list. 
just place the eventlink into the loop and everything should be fine :)

g,
kris


Von:Richard Hill 
An: Tapestry users 
Datum:  06.12.2010 16:16
Betreff:Re: Actionlinks with the same t:id




Hi Kris,

Thanks for the response. Using EventLink I need to have:

private EventLink menuItem1, menuItem2, menuItem3

with t:id="menuItem1" etc in the tml. So still a declaration for each
link in java and a different t:id each time but yes it does mean only
one handler method.

Cheers



-Original Message-----
From: Kristian Marinkovic 
Reply-to: "Tapestry users" 
To: Tapestry users 
Subject: Re: Actionlinks with the same t:id
Date: Mon, 6 Dec 2010 12:22:38 +0100

Use a EventLink instead and define a custom event.

@Component(parameters= {"event=menu", "context=menuContext"}
private EventLink link;


somewhere else (a parent component):

onMenu()
{}

The t:ids within a component/page have to be unique. 

g,
kris



Von:Richard Hill 
An: Tapestry users 
Datum:  06.12.2010 12:15
Betreff:Actionlinks with the same t:id




Hi,

I have a menu, with 5 to 10 links, each of which I'd like to be an
actionlink to trigger a zone update. 

I'd like to have just one event handler for the menu, something like:


public Object onActionFromMenu(int context) {
 
... get new results per the context...
 
   return resultsZone.getBody();
}


with my menu like:



  ...


  ...

...


However Tapestry complains, saying that t:id should be unique. If t:id
has to be unique, that means I have to have separate event handlers for
each menu item, which is a little verbose. 

Is there a way of having multiple actionlinks in a page, each triggering
the same event handler? This is also useful if I want to have the same
link more than once in the page.

Thanks

Richard.




 




-
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: Actionlinks with the same t:id

2010-12-06 Thread Kristian Marinkovic
Use a EventLink instead and define a custom event.

@Component(parameters= {"event=menu", "context=menuContext"}
private EventLink link;


somewhere else (a parent component):

onMenu()
{}

The t:ids within a component/page have to be unique. 

g,
kris



Von:Richard Hill 
An: Tapestry users 
Datum:  06.12.2010 12:15
Betreff:Actionlinks with the same t:id




Hi,

I have a menu, with 5 to 10 links, each of which I'd like to be an
actionlink to trigger a zone update. 

I'd like to have just one event handler for the menu, something like:


public Object onActionFromMenu(int context) {
 
... get new results per the context...
 
   return resultsZone.getBody();
}


with my menu like:



  ...


  ...

...


However Tapestry complains, saying that t:id should be unique. If t:id
has to be unique, that means I have to have separate event handlers for
each menu item, which is a little verbose. 

Is there a way of having multiple actionlinks in a page, each triggering
the same event handler? This is also useful if I want to have the same
link more than once in the page.

Thanks

Richard.




 




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




Re: dynamic component id?

2010-12-03 Thread Kristian Marinkovic
i guess it is about the dynamically generated id of the html element ... 
the component should implement the interface ClientElement.
If it does you can call the method getClientId to obtain the id that is 
used in the generated html.

g,
kris




Von:Everton Agner 
An: Tapestry users 
Datum:  03.12.2010 12:57
Betreff:Re: dynamic component id?



I believe he didn't misunderstood... the real problem is "which approach
should he get to work with dynamic components?".

Actually, I didn't need to use this yet but always wondered too.

___
Everton Agner Ramos


2010/12/3 Joost Schouten (ml) 

>  It sounds like you are confusing the t:id with the html dom id. I think
> you are looking for:
>
>
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd
> ">
>
> t:type="calendar/timeSlot"/>
>
> 
>
> Cheers,
> Joost
>
>
>
>
> On 3/12/10 12:54 PM, Christian Koller wrote:
>
>> I have the following template:
>>
>> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>>
>>
>>
>> 
>>
>> But Tapestry calls out:
>> Component id 'prop:index' is not valid; component ids must be valid 
Java
>> identifiers: start with a letter, and consist of letters, numbers and
>> underscores.
>>
>> Is it not possible to use a property as id?
>>
>> If I use a literal as the id, then it works, but then all the generated
>> timeSlot components within the loop will have the same id.
>> If I use afterwards the persist annotation within the timeSlot 
component
>> all the generated timeSlots share this session value because the id is 
the
>> same.
>>
>> Any ideas how to solve this?
>> Thank you
>> 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: First Tapestry app with Hibernate

2010-11-30 Thread Kristian Marinkovic
you have to add the tapestry-hibernate-core dependency to your classpath 
as well... it contains the annotation CommitAfter

g,
kris



Von:robnangle 
An: users@tapestry.apache.org
Datum:  30.11.2010 11:27
Betreff:First Tapestry app with Hibernate




Hi all,
Sorry if this has been posted before.

Ive been trying to get going with a few examples of hibernate with 
tapestry
with no success.

The two main errors i keep gettin are:

org.apache.tapestry5.internal.services.TransformationException:
java.lang.ClassNotFoundException:
org.apache.tapestry5.hibernate.annotations.CommitAfter

org.apache.tapestry5.internal.services.TransformationException:
javassist.NotFoundException: org.hibernate.Session (when i take out the
commit after)

HbAction.java:


package hb.pages;

import java.util.List;

import org.apache.tapestry5.hibernate.annotations.CommitAfter;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.hibernate.Session;
import Entities.Hello;

public class HbAction {

 @Inject
 private Session _session;

 private Hello   current;

 @CommitAfter
 public void onAction() {
 Hello h = new Hello();
 h.setMessage("Hello World");
 _session.save(h);
 }

 public List getList() {
 return 
_session.createCriteria(Hello.class).list();
 }

 public Hello getCurrent() {
 return current;
 }

 public void setCurrent(Hello current) {
 this.current = current;
 }

}

Hello.java:


package Entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;



@Entity
@Table(name="hello")
public class Hello {

 @Id
 @GeneratedValue
 private long id;
 private String message;

 public long getId() { return id;}

 private void setId(long id) { this.id = id; }

 public String getMessage() { return message;}

 public void setMessage(String message) { this.message = 
message;}
} 

HbAction.tml:

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

Hibernate example app



${current.message}

add




Cheere if anybody can help..
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/First-Tapestry-app-with-Hibernate-tp3285845p3285845.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: contribute mystery

2010-11-15 Thread Kristian Marinkovic
Hi Jens, 

the contribute methods are used for configuration... therefore there are 
only executed once on startup (... or on lazy load)
once your dispatcher is in place only your dispatcher will be called.

please re-read the tapestry-ioc documentation.

g,
kris




Von:"Jens Reufsteck" 
An: "'Tapestry users'" 
Datum:  15.11.2010 09:32
Betreff:contribute mystery



Hi,
 
I’m having some mystery going on when contributing a dispatcher. The 
dispatcher is always instantiated (according to the logs), but it’s used 
only sometimes. In some cases, when I start jetty (or tomcat), the 
dispatcher is used and then consequently it’s always used. But after a 
restart it’s not used, though I haven’t changed anything in the code.
 
Most puzzling to me: I’ve inserted 2 calls to System.out.println() in the 
contribute-method – and voila, the dispatcher is always used. As soon as I 
comment the two lines, it’s again like described above. See code below 
(this is T5.1).
 
Any help is much appreciated, no idea, where to look at.
 
 
public static void contributeMasterDispatcher(
OrderedConfiguration dispatchers,
PageRenderRequestHandler renderer,
AuthenticationService auth,
Sitemap sitemap,
@Inject @Symbol ("loginPage") String loginPage) {

Dispatcher authorizationDispatcher = new 
AuthorizationDispatcher(
   renderer,
   auth,
   sitemap,
   loginPage);

//System.out.println("x Dispatcher initialized");

dispatchers.add("AuthorizationDispatcher", 
authorizationDispatcher, "after:ComponentEvent", "before:PageRenderer");

//System.out.println("xx Dispatcher contributed");  
}
 
 
Many thanks
Jens
 
-- 
Jens Reufsteck
Marketing & Online Director 
Staufenbiel Institut GmbH
Events & Recruiting Solutions

Wildunger Straße 6, 60487 Frankfurt am Main
www.staufenbiel.de www.mba-master.de www.absolventenkongress.de

Tel.:+49 (0)69 25537-140
Fax:+49 (0)69 25537-2140

Employer Branding mit Effekt: Treffen Sie Ihre Zielgruppe auf 
staufenbiel.de, dem Karriereportal mit Relevanz – Download Mediadaten
Die reelle Bewerber-Plattform: Ihr Stand auf dem Absolventenkongress am 
24./25. November 2010 – Download Ausstellerunterlagen



Geschäftsführer: Judith Oppitz, Birgit Giesen, Graham Storey, Martin 
Halliday
Amtsgericht Köln HRB 9301

Internet communications are not secure and therefore Staufenbiel Institut 
GmbH does not accept legal responsibility 
for the contents of this message. Any views or opinions presented are 
solely those of the author and do not 
necessarily represent those of Staufenbiel Institut GmbH unless otherwise 
specifically stated. 



Re: Antwort: Strange Type Coercion Exception

2010-10-11 Thread Kristian Marinkovic
no problem. be my guest.

just had the same problem with one of our junior programmers last friday 
:)

g,
kris




Von:Christian Koller 
An: "Tapestry users" 
Datum:  11.10.2010 13:35
Betreff:Re: Antwort: Strange Type Coercion Exception



Thank you very much.


On 11.10.2010, at 12:42, Kristian Marinkovic wrote:

> move your DisplayContentItemStyle to a package that is not within a 
pages, 
> components or mixins package. eg. services
> 
> T5 loads all classes in the before mentioned packages for enhancement 
with 
> another classloader. that's why your class (enum) cant be found.
> 
> g,
> kris
> 
> 
> 
> Von:Christian Koller 
> An: Tapestry users 
> Datum:  11.10.2010 12:39
> Betreff:Strange Type Coercion Exception
> 
> 
> 
> Hi all
> 
> Today I faced a very strange exception (tapestry version 5.2)
> 
> The Exception sais not possible to find the coercion string -> 
> 
net.netm.platform.client.tapestry.common.components.style.DisplayContentItemStyle
> but if I check the configured coercion, then I can find:
> String --> 
> 
net.netm.platform.client.tapestry.common.components.style.DisplayContentItemStyle
> 
> Any ideas?
> 
> 
> org.apache.tapestry5.ioc.util.UnknownValueException
> Could not find a coercion from type java.lang.String to type 
> 
net.netm.platform.client.tapestry.common.components.style.DisplayContentItemStyle.
> availableValues
> Configured coercions:
> 
> Double --> Float
> Float --> Double
> Long --> Boolean
> Long --> Byte
> Long --> Double
> Long --> Integer
> Long --> Short
> Number --> Long
> Object --> Object[]
> Object --> String
> Object --> java.util.List
> Object[] --> java.util.List
> String --> Boolean
> String --> Double
> String --> Long
> String --> java.io.File
> String --> java.math.BigDecimal
> String --> java.math.BigInteger
> String --> java.text.DateFormat
> String --> java.util.regex.Pattern
> String --> 
> 
net.netm.platform.client.tapestry.common.components.style.DisplayContentItemStyle
> String --> org.apache.tapestry5.Renderable
> String --> org.apache.tapestry5.SelectModel
> String --> org.apache.tapestry5.corelib.LoopFormState
> String --> org.apache.tapestry5.corelib.SubmitMode
> String --> org.apache.tapestry5.corelib.data.BlankOption
> String --> org.apache.tapestry5.corelib.data.GridPagerPosition
> String --> org.apache.tapestry5.corelib.data.InsertPosition
> String --> org.apache.tapestry5.ioc.Resource
> String --> org.apache.tapestry5.ioc.util.TimeInterval
> boolean[] --> java.util.List
> byte[] --> java.util.List
> char[] --> java.util.List
> double[] --> java.util.List
> float[] --> java.util.List
> int[] --> java.util.List
> java.math.BigDecimal --> Double
> java.util.Collection --> Boolean
> java.util.Collection --> Object[]
> java.util.Collection --> org.apache.tapestry5.grid.GridDataSource
> java.util.Date --> java.util.Calendar
> java.util.List --> org.apache.tapestry5.SelectModel
> java.util.Map --> org.apache.tapestry5.SelectModel
> long[] --> java.util.List
> null --> Boolean
> null --> org.apache.tapestry5.grid.GridDataSource
> org.apache.tapestry5.ComponentResources --> 
> org.apache.tapestry5.PropertyOverrides
> org.apache.tapestry5.PrimaryKeyEncoder --> 
> org.apache.tapestry5.ValueEncoder
> org.apache.tapestry5.Renderable --> org.apache.tapestry5.Block
> org.apache.tapestry5.Renderable --> 
> org.apache.tapestry5.runtime.RenderCommand
> org.apache.tapestry5.ioc.util.TimeInterval --> Long
> org.apache.tapestry5.runtime.ComponentResourcesAware --> 
> org.apache.tapestry5.ComponentResources
> short[] --> java.util.List
> 
> 

Christian Koller
Sofwareentwickler
 
net mobile Schweiz AG
Seestrasse 45
CH ñ 8702 Zollikon
 
Tel: + 41 (0) 44 918 99 99
Fax: + 41 (0) 44 918 99 98
Direkt:  + 41 (0) 44 918 99 72

Mail: christian.kol...@net-m.ch
Web:  www.net-m.ch


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




Antwort: Strange Type Coercion Exception

2010-10-11 Thread Kristian Marinkovic
move your DisplayContentItemStyle to a package that is not within a pages, 
components or mixins package. eg. services

T5 loads all classes in the before mentioned packages for enhancement with 
another classloader. that's why your class (enum) cant be found.

g,
kris



Von:Christian Koller 
An: Tapestry users 
Datum:  11.10.2010 12:39
Betreff:Strange Type Coercion Exception



Hi all

Today I faced a very strange exception (tapestry version 5.2)

The Exception sais not possible to find the coercion string -> 
net.netm.platform.client.tapestry.common.components.style.DisplayContentItemStyle
but if I check the configured coercion, then I can find:
String --> 
net.netm.platform.client.tapestry.common.components.style.DisplayContentItemStyle

Any ideas?


org.apache.tapestry5.ioc.util.UnknownValueException
Could not find a coercion from type java.lang.String to type 
net.netm.platform.client.tapestry.common.components.style.DisplayContentItemStyle.
availableValues
Configured coercions:

Double --> Float
Float --> Double
Long --> Boolean
Long --> Byte
Long --> Double
Long --> Integer
Long --> Short
Number --> Long
Object --> Object[]
Object --> String
Object --> java.util.List
Object[] --> java.util.List
String --> Boolean
String --> Double
String --> Long
String --> java.io.File
String --> java.math.BigDecimal
String --> java.math.BigInteger
String --> java.text.DateFormat
String --> java.util.regex.Pattern
String --> 
net.netm.platform.client.tapestry.common.components.style.DisplayContentItemStyle
String --> org.apache.tapestry5.Renderable
String --> org.apache.tapestry5.SelectModel
String --> org.apache.tapestry5.corelib.LoopFormState
String --> org.apache.tapestry5.corelib.SubmitMode
String --> org.apache.tapestry5.corelib.data.BlankOption
String --> org.apache.tapestry5.corelib.data.GridPagerPosition
String --> org.apache.tapestry5.corelib.data.InsertPosition
String --> org.apache.tapestry5.ioc.Resource
String --> org.apache.tapestry5.ioc.util.TimeInterval
boolean[] --> java.util.List
byte[] --> java.util.List
char[] --> java.util.List
double[] --> java.util.List
float[] --> java.util.List
int[] --> java.util.List
java.math.BigDecimal --> Double
java.util.Collection --> Boolean
java.util.Collection --> Object[]
java.util.Collection --> org.apache.tapestry5.grid.GridDataSource
java.util.Date --> java.util.Calendar
java.util.List --> org.apache.tapestry5.SelectModel
java.util.Map --> org.apache.tapestry5.SelectModel
long[] --> java.util.List
null --> Boolean
null --> org.apache.tapestry5.grid.GridDataSource
org.apache.tapestry5.ComponentResources --> 
org.apache.tapestry5.PropertyOverrides
org.apache.tapestry5.PrimaryKeyEncoder --> 
org.apache.tapestry5.ValueEncoder
org.apache.tapestry5.Renderable --> org.apache.tapestry5.Block
org.apache.tapestry5.Renderable --> 
org.apache.tapestry5.runtime.RenderCommand
org.apache.tapestry5.ioc.util.TimeInterval --> Long
org.apache.tapestry5.runtime.ComponentResourcesAware --> 
org.apache.tapestry5.ComponentResources
short[] --> java.util.List




Re: Dynamically loading a component

2010-10-05 Thread Kristian Marinkovic
hi omar, 

this is not as horrible as it sounds ... testing gets a lot easier

i have a fairly big T5 application with many modules. within this 
application i have many master - detail views where the detail view 
depends on the type of object within the master list and those types can 
be deployed as needed. ie. if i also deploy my order module my master view 
might show some order entry and if i dont deploy it it wont show up. if i 
click on this entry i want to be directed to a order specific page that is 
defined in another (web) module. therefore i created a service that 
contains a contribution of pages to the specific detail view which is used 
to render / create the appropriate links. 

i also have a BlockService (...Registry) where i can contribute blocks 
that should be reused in multiple pages and modules. 

so you always know in advance what you are gonna render. even the possible 
combinations.

for more details take a look at the BeanEditor implementation.

g,
kris




Von:Omar Carvajal 
An: Tapestry users 
Datum:  05.10.2010 06:19
Betreff:Re: Dynamically loading a component



This is horrible news since I have no way of knowing the components that 
needs to be called at design time (other wise I would use a ).

There is no magic that can be done to achieve this at all? Even if I have 
to use the internal services.

Thanks for your quick response.

Omar

On Oct 4, 2010, at 18:41, "Thiago H. de Paula Figueiredo" 
 wrote:

> On Mon, 04 Oct 2010 19:35:38 -0300, Omar Carvajal 
 wrote:
> 
>> Hey all,
> 
> Hi!
> 
>> I am trying to dynamically load a component which must be determined at
>> run time, I figured I must use a t:delegate to render the component.
>> On the Java side of things I cannot figure out how to instantiate the
>> actual component. I saw the @Component annotation with the "type" 
parameter but this does not let me dynamically load a component from a 
function.
>> Does anybody have any idea on how to do this?
> 
> Declare the components inside a .  are not rendered 
unless you pass it to a Delegate or return it to update a Zone. You cannot 
instantiate components in Java code, as Tapestry is static structure, 
dynamic behavior (including rendering). Take a look at 
http://tapestry.apache.org/tapestry5.1/cookbook/switch.html. It shows you 
how to render blocks dynamically, but the same approach can be used for 
components as well. You'll use @InjectComponent to get access in your Java 
code to the component instances declared in templates.
> 
> -- 
> 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: T5 Internet Browser Detection?

2010-09-22 Thread Kristian Marinkovic
you'd have to implement a HttpServletRequestFilter or better a Dispatcher 
that analyzes the http headers and redirects to other pages or sets some 
global state that is used during page rendering. A Dispatcher is more 
convenient as you can use all the tapestry services and don't have to use 
the servlet api directly.

g,
kris



Von:ael 
An: users@tapestry.apache.org
Datum:  22.09.2010 09:34
Betreff:T5 Internet Browser Detection?




Is it possible that tapestry can detect web browser?

I already implement it using JQuery.
Using

script type="text/javascript">
$(document).ready(function(){

if($.browser.msie)
{
if($.browser.version == 4.0)
{
window.location = "http://www.google.com";; 
alert("Please install the latest IE Browser!");
}
}
});


But i want to use Tapestry so that it can return into another page.

Is this possible?

Any ideas? ^_^.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Internet-Browser-Detection-tp2849300p2849300.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: Redirect when session is destroyed

2010-09-22 Thread Kristian Marinkovic
you can't redirect from a SessionListener as it is called by the servlet 
container and does not involve any user interaction. 

provide a Dispatcher that checks  whether your AppModule.USER_LOGGED_IN 
attribute is available from the current HttpSession; if it is not redirect 
the current request to any page

g,
kris




Von:kamath_svk 
An: users@tapestry.apache.org
Datum:  22.09.2010 08:57
Betreff:Redirect when session is destroyed




Hi,

I found a site for session handling using Tapestry5.
http://eubauer.de/kingsware/2010/02/04/track-login-and-logout-of-users-with-tapestry-5/
 


when ever session is destroyed, sessionDestroyed() method in
SessionListener[user-defined] class which is added in services package of
tapestry is automatically called.

can any one tell me how to redirect the browser to a default page ?
if i had response object i could have redirected to some page but that
method doesn't contain response object.

i have added the code for SessionListener class.

public class SessionListener implements HttpSessionListener {
 public void sessionCreated(HttpSessionEvent se) {
 // Do nothing
 }

 public void sessionDestroyed(HttpSessionEvent se) {
 System.out.println(" *  Session is 
destroyed  *  ");
 HttpSession session = se.getSession();
 Principal principal = (Principal)
session.getAttribute(AppModule.USER_LOGGED_IN);
 session.removeAttribute(AppModule.USER_LOGGED_IN);  
 // Do some stuff here...
 }
}

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Redirect-when-session-is-destroyed-tp2849255p2849255.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: Is there any way to render the "get" method of form?

2010-09-20 Thread Kristian Marinkovic
hi lutz,

the use of the 'post' method for the form is hardcoded. the easiest way to 
change this is to have some client-side script that rewrites the method 
attribute to 'get'. an alternative you could have a heartbeat that 
rewrites the generated HTML server-side (take a look at the Label 
component for how to use a heartbeat render command)

g,
kris



Von:Lutz Hühnken 
An: Tapestry users 
Datum:  18.09.2010 12:40
Betreff:Re: Is there any way to render the "get" method of form?



I don't understand how this answers the question. I followed all of
the links and could not find instructions how to use the get method in
forms in tapestry. Must have overlooked it.. could you be more
specific maybe?


On Sun, Aug 22, 2010 at 3:03 PM, based2  wrote:
>
> http://www.cgisecurity.com/owasp/html/ch11s04.html
>
> 
http://tapestry.apache.org/tapestry5.0/tapestry-core/guide/beaneditform.html

>
> http://www.seomoz.org/blog/11-best-practices-for-urls
>
> == http://wiki.apache.org/tapestry/Tapestry5HowTos
> == http://wiki.apache.org/tapestry/Tapestry5OpensourceApps
> == http://wiki.apache.org/tapestry/Tapestry5ModuleRegistry
>
> --
> View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-there-any-way-to-render-the-get-method-of-form-tp2643651p2643760.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
>
>



-- 
altocon GmbH
http://www.altocon.de/
Software Development, Consulting
Hamburg, Germany

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




Re: [T5.2] Tapestry IoC Configuration (remove?)

2010-09-15 Thread Kristian Marinkovic
hi Michael,

there is no such method. Only MappedConfiguration and OrderedConfiguration 
have an override method that can be used to replace another contribution 
identified by the id

g,
kris




Von:Michael Dukaczewski 
An: users@tapestry.apache.org
Datum:  15.09.2010 11:23
Betreff:[T5.2] Tapestry IoC Configuration (remove?)



How can I remove something from the distributed configuration? For
example there is a default:

contributeResponseCompressionAnalyzer(Configuration configuration) 
{
configuration.add("application/json");
}

I am missing something like:

contributeResponseCompressionAnalyzer(Configuration configuration) 
{
configuration.remove("application/json");
}


Regards,
Michael

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




Re: want to setup a ${xxxx} in my input element!!!

2010-09-13 Thread Kristian Marinkovic
hi fanzhen,

try following instead:
aaa

this will work; and if your adit0 returns null the attribute wont get 
rendered.

i'd recommend to use the T5 checkbox component nevertheless.

g,
kris





Von:Fanzhen 
An: Tapestry users 
Datum:  13.09.2010 08:30
Betreff:Re: want to setup a ${} in my input element!!!




  yes, I really have read it carefully.

On 2010-9-13 14:17, Igor Drobiazko wrote:
> You should have a look at Tapestry's form components. There is a 
Checkbox
> component.
>
> On Mon, Sep 13, 2010 at 8:14 AM, Fanzhen 
wrote:
>
>>   hey, friends want to code like this:
>>
>> aaa
>> bbb
>> ccc
>> ddd
>>
>> actually, what is in my page class are:
>>
>> public String getAudit0(){
>> if()
>> return "checked=\"checked\"";
>> else
>> return "";
>> }
>> ..
>>
>> but the problem is T5 told me "Unexpected character '$' (code 36) 
(expected
>> a name start character)
>>   at [row,col {unknown-source}]: [27,56]"
>>
>> could anyone told me how to do with my checkbox or maybe and radio 
elements
>> ?
>> I just want to remember what the user input  when they do some 
searching.
>> thank you in advance !!
>>
>> Fanzhen.
>>
>>
>> -
>> 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: OT: Web Services

2010-08-30 Thread Kristian Marinkovic
hi,

i use a (JaxWS)HttpServletRequestFilter service to intercept WS calls to 
my application. it will only intercept calls that have the url pattern of 
the provided WS that can be configured. and i'm using metro too. we 
switched from cxf to metro because it was easier to work with jaxb-binding 
overrides...

g,
kris



Von:Peter Stavrinides 
An: Tapestry users 
Datum:  30.08.2010 14:59
Betreff:Re: OT: Web Services



Hi Jim

I evaluated quite a few Java WS stacks and was between CXF and Metro, but 
in the end I chose metro, but to be honest there was very little to choose 
btw the two... so I would suggest those two as the leading Java WS stacks. 
Both support maven and are very complete in terms of how much of the web 
service set of standards they support. 

Metro implements JAXWS 2.1 and JAXB2.2, so if the marketing babble is to 
be trusted its 'meant' to be higher performing and more extensible, but I 
haven't tested that claim yet. In any event it has an impressive array of 
security features. It also ships with the standard glassfish installation, 
which means no server configuration is needed if you go that route, I 
installed it though with Tomcat, it was as easy as executing a script... 
not too hard at all. 

Depending how you wish to approach you applications, you can use 
annotations for the meta programming, and avoid a lot of the messy xml. I 
found it to be really clean and the closest to Microsofts .Net platform 
implementation which is IMHO a very good implementation of Web Services 
...at least more impressive than anything I have seen in the Java 
community, but I feel the gap is closing slowly.

To integrate with Tapestry I simply overrode Tapestry filter... I am not 
aware of any more elegant approach, although I made a few inquiries on 
this list in the past. 

Cheers,
Peter

- Original Message -
From: "Jim O'Callaghan" 
To: "Tapestry users" 
Sent: Monday, 30 August, 2010 10:52:44 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: RE: OT: Web Services

Kalle, Daniel,

Thanks for the responses.  Good to know that there are positive 
experiences
with CXF.  It's probably the front-runner for me at the moment, but will
keep an ear open for any other feedback.  Looking at my original query I 
can
see that it looks like I am focusing on generating WS clients - I should
have said "providing interfaces for a system" rather than "interfacing 
with
a system".

Regards,
Jim.

-Original Message-
From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] 
Sent: 30 August 2010 03:43
To: Tapestry users
Subject: Re: OT: Web Services

Second that. CXF is the successor to XFire and its solid.

Kalle


On Sun, Aug 29, 2010 at 3:56 PM, Daniel Honig 
wrote:
> I know of many projects using CXF without complaints.  I'd say that CXF 
is
> probably a good way to go.
>
> On Sun, Aug 29, 2010 at 1:35 PM, Jim O'Callaghan
> wrote:
>
>> I'm aware this is off topic, but since there are so many people on the
list
>> with a broad skill set am hoping I can learn from their experiences /
>> heartbreak.  I am evaluating various WS stacks for interfacing with a
>> system
>> - currently I am using XFire as it requires very little configuration 
and
>> performs quite efficiently.  XFire appears to qualify every xml element
>> with
>> a namespace, bloating the payload considerably, or, if using the patch
from
>> http://jira.codehaus.org/browse/XFIRE-687 appears to have unreliable /
>> inconsistent namespace qualifiers.  Can anyone recommend a good WS 
stack
>> they have positive experience of?  My constraints are quite liberal -
java
>> 1.5 up, currently jetty as an AS, spring 3.0.2.RELEASE.  Is CXF any 
good?
>>  I
>> want to find something with good performance obviously, minimal config,
and
>> hopefully something that consistently defines package level namespaces 
at
>> an
>> envelope level and reuses them.
>>
>>
>>
>> Many thanks,
>>
>> Jim.
>>
>>
>

-
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


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




Re: Multiple Components in

2010-07-08 Thread Kristian Marinkovic
tapestry does not support dynamic component creation...  for good reason

please search the user list for "static structure, dynamic behaviour" to 
get more
information on that.

g,
kris



Von:matt22 
An: users@tapestry.apache.org
Datum:  08.07.2010 15:39
Betreff:Re: Multiple Components in  
> correct... create a block with multiple coponents 
> 
> g,
> kris
> 
> 
> 
> Von:matt22 
> An: users@tapestry.apache.org
> Datum:  08.07.2010 07:15
> Betreff:Multiple Components in  
> 
> 
> 
> Hi,
> Is it possible to render list of component in delegate?
>  
> or create new block and add component to the new block(and render the 
> block
> in delegate)?
> 
> thanks
> -- 
> View this message in context: 
> 
http://old.nabble.com/Multiple-Components-in-%3Ct%3Adelegate-...-tp29100029p29100029.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
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Multiple-Components-in-%3Ct%3Adelegate-...-tp29100029p29107138.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: Multiple Components in

2010-07-07 Thread Kristian Marinkovic
correct... create a block with multiple coponents 

g,
kris



Von:matt22 
An: users@tapestry.apache.org
Datum:  08.07.2010 07:15
Betreff:Multiple Components in http://old.nabble.com/Multiple-Components-in-%3Ct%3Adelegate-...-tp29100029p29100029.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: decorateClientInfrastructure not called anymore

2010-06-24 Thread Kristian Marinkovic
Hi Christian,

Advices have been introduced in 5.1 to replace decorators.
please see: 
http://tapestry.apache.org/tapestry5.1/tapestry-ioc/advice.html

the 5.2-SNAPSHOT documentation does not state that decorators are 
not supported anymore. the last time i was playing with 5.2 (some weeks 
ago)
my decorators worked.

g,
kris



Von:Christian Koller 
An: users@tapestry.apache.org
Datum:  23.06.2010 16:38
Betreff:decorateClientInfrastructure not called anymore



Hello everyone

Since we updated the version of tapestry from 5.1.0.5 to 5.2.0-SNAPSHOT 
the decorate methods in the module class are not called anymore.
Is there a new concept to decorate a service or is it a bug?

Please let me know if you know something.
Thanks
chris


Antwort: Re: [Taspetry IoC] Using Tapestry IoC with JavaFX

2010-05-26 Thread Kristian Marinkovic
hi, 

there was a issue that already has been fixed:
https://issues.apache.org/jira/browse/TAP5-839

g,
kris



Von:"Thiago H. de Paula Figueiredo" 
An: "Tapestry users" 
Datum:  25.05.2010 15:06
Betreff:Re: [Taspetry IoC] Using Tapestry IoC with JavaFX



On Tue, 25 May 2010 08:50:45 -0300, Antoine Mischler  
wrote:

> Hi guys,

Hi!

> followed by a bunch of unrecognized methods. I think these methods are
> automatically generated by the javafx compiler.
> So my question is: is there a way to make the registry less sensible to
> unrecognized methods?

There was the same problem with writing module classes in Scala or Groovy, 
 
I don't remember exactly. This was already addressed in Tapestry-IoC with 
some explicit checks. Post a JIRA about it so the committers can take a 
look at it. Please include a sample project to speed up the process.

-- 
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: Using / Injecting Tapestry 5 services in objects that are *not* components / pages / services

2010-05-25 Thread Kristian Marinkovic
hi markus,


contribute a HibernateConfigurer to the HibernateSessionSource
that adds a (Hibernate) PostLoadEventListner.  This listener then
uses a "InjectorService" to inject services into entities... maybe with 
some
javassist magic :)

g,
kris



Von:Markus Feindler 
An: Tapestry users 
Datum:  25.05.2010 12:55
Betreff:Re: Using / Injecting Tapestry 5 services in objects that 
are *not* components / pages / services



Hi, how would I pass services to a domain object? what do I have to 
configure? For Example if I read some objects from a database via 
hibernate, where I dont have any control of instantiation.

Martin Strand schrieb:
> On Tue, 25 May 2010 12:07:05 +0200, Andreas Berg  wrote:
>
>> The only way I
>> see so far is to pass the service as parameters or by constructor to my
>> domains objects, which is not very nice.
>
> What's bad with constructor injection?
> I would personally even prefer to have constructor injection in 
> component classes too.
>
> -
> 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: [T5]Inject a component not used in a page

2010-05-11 Thread Kristian Marinkovic
hi thomas,

tapestry 5 follows the "static structure, dynamic behaviour" philoshophy.
essentially this means that you cant use a component that is not declared
anywhere. in your case i'd create a block with the component inside and 
display this block if necessary.

please see the mailing list for more on "static structure, dynamic 
behaviour"
there. you can take a look at the BeanEditor that dynamically creates a 
input field for every field in a POJO. From the outside it appears as if 
the
components are configured dynamically but under the covers it is 
reassembling existing blocks as needed (type, ...)

g,
kris



Von:Thomas Cucchietti 
An: Tapestry users 
Datum:  11.05.2010 14:05
Betreff:[T5]Inject a component not used in a page



Hi everybody!

I'm getting a silly problem while trying to get a component from the
componentSource.

For dynamic layout purposes, i'm trying to recover a component that is not
used in any page but it seems impossible as the getComponent method of the
componentSource requires a completeId in which a page is required.

is there another way to get this component than creating a page that will 
be
never be displayed?

Thanks in advance!

Thomas.



Re: Tapestry5 template name simplification

2010-05-10 Thread Kristian Marinkovic
hi Sandeep,

you're right this solution does not work in any circumstances.
but when you learn a new framework you'll have to live with 
its features :)

if i recall correctly there have been several suggestions 
on the mailing list to make this feature configurable. i don't 
know what the current state of the discussion is... if there is 
any :)

so you could create an jira issue and/or override the 
ComponentClassResolver with a custom implementation.

g,
kris






Von:sandeepraj singh 
An: users@tapestry.apache.org
Datum:  10.05.2010 13:54
Betreff:Re: Tapestry5 template name simplification




Thanks For the reply Kris,

But thats very subjective.I can easily overrule this by having
address/EmployeeAddressList and customer/HighlyPaidCustomerList

So i was just thinking why this special take care when there is some
redundancy due to my pages being named somewhat same to my
package(address-->addresslist).

I dont want to sound too panicky, but i find it hard to explain the 
strategy
to people when i am training them.

People from JSP / Servlet background(like me and thousands here) find the
strategy very hard to understand.

Thanks
Sandeep


kristian.marinkovic wrote:
> 
> hi sandeep,
> 
> the reason to do so is to have prettier URLs.
> 
> When developing an application you tend to 
> group your pages into logical packages. lets 
> assume your application is able to change
> Customer and Address objects. So you'll have
> a bunch of pages in the respective packages.
> Its very common to have a CustomerList and a
> AddressList page that diplays the result of a search.
> not altering the URL would result in following page
> URLs:
> address/addresslist/
> customer/customerlist/
> (funny note: i really had a customer that considered
> above urls as invalid or faulty, because of the 
> duplication; he expected something like addresslist/)
> 
> T5 will recognize this pattern and change these URLs
> to: 
> address/list
> customer/list
> 
> What are the alternatives? You could rename your pages
> to List, but then you'll end up with multiple List classes in
> different packages. Or you  could add an own UrlRewriteRule
> for every list page. 
> 
> 
> i hope this helps
> g,
> kris
> 
> 
> 
> Von:sandeepraj singh 
> An: users@tapestry.apache.org
> Datum:  10.05.2010 08:35
> Betreff:Tapestry5 template name simplification
> 
> 
> 
> 
> hi,
> 
> As per the tapestry5 documentation
> "
> In certain cases, Tapestry will simplify the the logical name of a page. 

> For
> example, the page class org.example.pages.address.Create Address will be
> given a logical name of "address/Create" (the redundant "Address" is 
> removed
> as a suffix) "
> 
> 
> 
> I wanted to understand, why does tapestry5 take extra pains to do it. Is
> there a huge advantage for doing this? 
> Any explanation would help because, otherwise it looks confusing to see 
an
> altered URL.
> 
> Thanks
> Sandeep
> -- 
> View this message in context: 
> 
http://old.nabble.com/Tapestry5-template-name-simplification-tp28508162p28508162.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
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Tapestry5-template-name-simplification-tp28508162p28510604.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: Tapestry5 template name simplification

2010-05-10 Thread Kristian Marinkovic
hi sandeep,

the reason to do so is to have prettier URLs.

When developing an application you tend to 
group your pages into logical packages. lets 
assume your application is able to change
Customer and Address objects. So you'll have
a bunch of pages in the respective packages.
Its very common to have a CustomerList and a
AddressList page that diplays the result of a search.
not altering the URL would result in following page
URLs:
address/addresslist/
customer/customerlist/
(funny note: i really had a customer that considered
above urls as invalid or faulty, because of the 
duplication; he expected something like addresslist/)

T5 will recognize this pattern and change these URLs
to: 
address/list
customer/list

What are the alternatives? You could rename your pages
to List, but then you'll end up with multiple List classes in
different packages. Or you  could add an own UrlRewriteRule
for every list page. 


i hope this helps
g,
kris



Von:sandeepraj singh 
An: users@tapestry.apache.org
Datum:  10.05.2010 08:35
Betreff:Tapestry5 template name simplification




hi,

As per the tapestry5 documentation
"
In certain cases, Tapestry will simplify the the logical name of a page. 
For
example, the page class org.example.pages.address.Create Address will be
given a logical name of "address/Create" (the redundant "Address" is 
removed
as a suffix) "



I wanted to understand, why does tapestry5 take extra pains to do it. Is
there a huge advantage for doing this? 
Any explanation would help because, otherwise it looks confusing to see an
altered URL.

Thanks
Sandeep
-- 
View this message in context: 
http://old.nabble.com/Tapestry5-template-name-simplification-tp28508162p28508162.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: JSP custom tag

2010-05-10 Thread Kristian Marinkovic
Hi, 

T5 is a completley different technology and does not use JSP to render its 
view. 
You could create a JSP tag library that uses T5 to return HTML snippets 
(using 
a StreamResponse) but i don't see any reason to do so. why would you want 
to 
create JSP tags using T5 anyway? 

if you have to migrate an older application you could just configure and 
deploy
another ServletFilter or Servlet that uses Tapestry 5. and migrate the old 
JSP 
pages to tapestry.

g,
kris




Von:tarek jaifar 
An: users@tapestry.apache.org
Datum:  10.05.2010 11:49
Betreff:JSP custom tag



Salam Developer,


How are you ?

I sent this email beceause i search a answer for my question which is :

*how to write jsp  custom tag using tapestry 5*
*
*
Thanks in advance



Re: Component extension and default parameter value overriding

2010-05-10 Thread Kristian Marinkovic
hi Robin,

maybe the thread http://markmail.org/message/gwnq5npogomlk6ae helps.

the common answer in this cases is to use/favour composition over 
inheritance

maybe it is a bug afterall; i almost never use component inheritance in my 
T5 projects

g,
kris



Von:Robin Komiwes 
An: Tapestry users 
Datum:  10.05.2010 10:53
Betreff:Component extension and default parameter value overriding
Gesendet von:   odiss...@gmail.com



Hi there,


Here is my problem, please tell me if I'm missing something or if I've
encountred a bug:

Here are two components definition :

public class MyComponent
{
@Parameter(value = "literal:something")
private String myParam;
}

public class MyExtendedComponent extends MyComponent
{
@Parameter(value = "literal:newThing")
private String myParam;
}

When using MyExtendedComponent, I expected to have myParam set by default 
to
"newThing", but it is still equals to "something".

Any pointers?



Re: Heavy and long background process

2010-05-06 Thread Kristian Marinkovic
hi massimo, 

i had a similar problem a while back. 

i solved this problem by letting the long running thread
log its current state and failures into a db table (you could
also use a service and store it in memory). all the view 
needs to know is the job id to query the correct state and 
display it with an ajax updater.

the downside is that it is not that simple anymore to cancel
the thread manually... but this was needed in my case.

i guess you should always decouple the view from a long
running process anyways. especially in a web environment
that is stateless by nature.

g,
kris



Von:Massimo Lusetti 
An: Tapestry users 
Datum:  06.05.2010 12:06
Betreff:Heavy and long background process



Hi all,
  I need to process a big chunk on data uploaded from users. The whole
process takes up to 2-4 hours as involve a big change in the database.

I've implemented this as a series of Invokable from ParallelExecutor
and a "controller" service which hold a weak references to the client
responsible for the data submitted.

With a progresiveDisplay I keep the user informed of the progress of
the operation (and possibly of the errors involved), my reference is
kept in a cookie so users could still log out and come back later.

Now the Futures from my Invokables are within a MAP keyed to my
cookie-key and stored in the Service implementation.

May I ask if this solution sound reasonable to you?

I already know this doesn't fit very well in a clustered environment
but it's not a problem right now... perhaps within 6-8 months.

Thanks
-- 
Massimo
http://meridio.blogspot.com

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




Re: How to integrate Tapestry framework with Weblogic portlet?

2010-05-03 Thread Kristian Marinkovic
there is a external tapestry-portlet module/library that you can use 
to integrate with portlets:

http://code.google.com/p/tapestry5portlet/

g,
kris



Von:mcmouli 
An: users@tapestry.apache.org
Datum:  02.05.2010 19:28
Betreff:How to integrate Tapestry framework with Weblogic portlet?




Hi, 

I am planning to use Tapestry form input validation framework in my 
weblogic
10.3 portlets. Could you please let me know how to integrate Tapestry
framework with weblogic JSP portlets? 
Thanks 
Chandra
-- 
View this message in context: 
http://old.nabble.com/How-to-integrate-Tapestry-framework-with-Weblogic-portlet--tp28428220p28428220.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




Antwort: [Announce] Tapestry5 jQuery integration and Tapestry5-ClientResources

2010-04-28 Thread Kristian Marinkovic
great news.. thank you very much for the hard work!

g,
kris



Von:Robin Komiwes 
An: Tapestry users 
Datum:  28.04.2010 11:54
Betreff:[Announce] Tapestry5 jQuery integration and 
Tapestry5-ClientResources
Gesendet von:   odiss...@gmail.com



Hey there,

We are glad to introduce "tapestry5-jquery": a jQuery integration
for Tapestry 5! This integration is already available as a maven
artifact. This library fully drop out Prototype, Scriptaculous, Blackbird
and tapestry.js and replace them by jQuery.

We did our best to make this integration as transparent as possible. An
important part of components can still be used as is! We tried to stick 
the
more we can to jQuery philosophy. All code is based on official jQuery
coding style guidelines and on existing plugins.

jQuery for Tapestry 5 has been a long time request from an important part 
of
Tapestry community. There was some discussions about it and Tapestry 5.2
should provide some built in bridges for other JavaScript frameworks
integration, however there is no chance to see that for Tapestry 5.1.x.

Currently, the module is still in snapshot version and we need feedback 
from
users before releasing it. We are looking forward to find bugs (if there 
are
any) and any lack of features... Some (big) choices have been made and as
there is new features, some features that were present with
prototype/scriptaculous are not available anymore.

All source code is available on Github. Don't forget to read the README 
file
for installation instructions and How To:
http://github.com/got5/tapestry5-jquery


This module comes with a bonus module: "tapestry5-clientresources". It's a
small module also for Tapestry 5.1.0.5 that offers the possibility to
changes default JS and CSS included on each pages. When not using Tapestry 
5
default JS stack (prototype, scriptaculous...) it also fix direct calls to
Prototype functions, like already reported
bug TAP5-994 (and fixed in 5.2). Again, check Github for source code and
instructions: http://github.com/got5/tapestry5-clientresources

Of course, we are looking forward to leverage theses modules to Tapestry 
5.2
as soon as this version is released.

-- http://github.com/got5



Re: session expired error

2010-04-22 Thread Kristian Marinkovic
it took me some time to realize you're using Tapestry 4 
please add the version number next time.

there are basically two simple ways to influence the session expiration:

1) change the timeout in your web.xml

10


2) create a component, that is placed on every page that performs 
some ajax requests to a hidden page to keep the session active. 
as long as the browser is open the session wont expire.

g,
kris



Von:asianCoolz 
An: users@tapestry.apache.org
Datum:  23.04.2010 03:40
Betreff:session expired error



Is below error caused by session expired

http://utilitybase.com/paste/29788


if yes, how to extend the tapestry user session? or better way to resolve 
this?


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




Re: Getting default validation messages from Messages service

2010-04-16 Thread Kristian Marinkovic
you have to obtain your messages object from ValidationMessagesSource

g,
kris



Von:Stephan Windmüller 
An: users@tapestry.apache.org
Datum:  16.04.2010 11:29
Betreff:Getting default validation messages from Messages service



Hello!

Since it seems to be impossible to deactivate validation for single 
buttons of a form component, I want to do validation manually in 
onValidateForm. For this I need the default validation error messages, 
but I cannot receive them through the message service.

messages.get("myTextField-required-message")

is unknown but it should be there. What am I doing wrong?

Regards
  Stephan

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




Re: Antwort: Why SubModule exported by eclipse can't auto loaded it's pages/* ? but sub module packaged by maven can be loaded?

2010-04-15 Thread Kristian Marinkovic
why doesnt the SubappModule contribute the LibraryMapping itself?
why do you have to access the resources yourself?

Tapestry 5 is enhancing component, page and mixin classes. therefore
it uses an own classloader. i guess this is the reason why you can't find
the classes.

g,
kris



Von:??? 
An: "Tapestry users" 
Datum:  15.04.2010 11:36
Betreff:Re: Antwort: Why SubModule exported by eclipse can't auto 
loaded it's pages/* ? but sub module packaged by maven can be loaded?



But I annotation it in AppModule like this:
@SubModule(com.gsww.subapp.SubappModule.class)
public class AppModule {
.
}
I trace into ComponentClassResolverImpl'class , the 
ClassLoader.getResources("com/gsww/subapp/pages") can't found
this package URLs.
I think because the jar exported by eclipse has not package entrys, just 
has 
.class entry, so search package return nothing!
Did anyone has such problem?

------
From: "Kristian Marinkovic" 
Sent: Thursday, April 15, 2010 2:26 PM
To: "Tapestry users" 
Subject: Antwort: Why SubModule exported by eclipse can't auto loaded it's 

pages/* ? but sub module packaged by maven can be loaded?

> i guess you're missing the Tapestry-Module-Classes entry in your
> META-INF/manifest.mf file
>
> see also: 
http://tapestry.apache.org/tapestry5/tapestry-ioc/autoload.html
>
> g,
> kris
>
>
>
> Von:董和平 
> An: "Tapestry users" 
> Datum:  15.04.2010 02:56
> Betreff:Why SubModule exported by eclipse can't auto loaded it's
> pages/* ? but sub module packaged by maven can be loaded?
>
>
>
>
> 

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




Antwort: Why SubModule exported by eclipse can't auto loaded it's pages/* ? but sub module packaged by maven can be loaded?

2010-04-14 Thread Kristian Marinkovic
i guess you're missing the Tapestry-Module-Classes entry in your 
META-INF/manifest.mf file

see also: http://tapestry.apache.org/tapestry5/tapestry-ioc/autoload.html

g,
kris



Von:董和平 
An: "Tapestry users" 
Datum:  15.04.2010 02:56
Betreff:Why SubModule exported by eclipse can't auto loaded it's 
pages/* ? but sub module packaged by maven can be loaded?






Re: [T5.1-Hib] Tapestry and Envers - Retrieve user information for auditing

2010-04-07 Thread Kristian Marinkovic
hi everton,

if you really can't add the RevisionListener programmatically, define a 
public
static field in your listener using the service type, eg. UserInformation.

then define a eagerload service that has the UserInformation injected and 
set the
public static field in your RevisionListener:


public class RevisionListener {
public static  UserInformation userInformation;
}

public class RevisionListenerInitializer {
public RevisionListenerInitializer (UserInformation 
userInformation)
RevisionListener.userInformation = userInformation;
}

consider this solution as the last resort if everything else fails. be 
careful
with this solution as it is considered bad coding style. i had to do this 
for 
hibernate-search too.

g,
kris



Von:Everton Agner 
An: Tapestry Users 
Datum:  07.04.2010 18:25
Betreff:[T5.1-Hib] Tapestry and Envers - Retrieve user information 
for auditing



Hi,

Has anyone succeeded in integrating Envers (http://www.jboss.org/envers) 
in a T5.1 app, to audit information HttpRequest based?

I succeeded on putting Envers to work, but I'm stuck at this point and I 
would like to know which approaches some people used to achieve that.

The problem is... I just want to use my implementation os RevisionListener 
Interface, and implement the newRevision(revision) method that needs to 
retrieve the user information and store in the 'revision' object. But, 
since that kind of information would only be available by T5 IoC's 
container, I can't use it there - Becase the RevisionListener 
implementation is instantiated by Envers (i guess so) and it's a Singleton 
per EntityManagerFactory.

This is really a big problem for me, and I would appretiate any help.

Thanks!

- Everton



 

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


Re: Suggestion: Add context to loop

2010-04-07 Thread Kristian Marinkovic
hi pierce,

don't you have the same problem if you 
put 10 eventlinks on your page. how do you
distinguish them? either you have 10 different
event links onEventFromC1() or you use the
context onEvent(String id)... or onEvent(AlmostAnyObject obj)
having a loop rendering the 10 eventlinks is
more or less the same.

if your component creates an eventlink
it should also be able to handle it and
therefore provide the corresponding event
handler. 

g,
kris



Von:"Pierce T. Wetter III" 
An: "Tapestry users" 
Datum:  07.04.2010 14:35
Betreff:Re: Suggestion: Add context to loop




>>As a new user of tapestry, loop actually bit me because I assumed it 
did this already and was surprised in my event handlers when my value 
binding was null.
>>  
> 
> Why not passing the current object as the context of the EventLink 
instead?
> 
> 
> 
> public Object onSelect(IdType id) {
>...
>> }

   1. What if the eventlink is nested several layers deep in components? 
Then value has to be passed all the way down...

   2. Now the nested component needs to know about how the value object is 
encoded, which makes the nested component less "generic" and therefore 
less reusable. In my sample, nestedcomponent doesn't know anything at all 
about "value". It doesn't need to! It's job is just to generate a "fancy" 
link. Instead, that knowledge is localized to where loop is used, which 
also happens to be where the event is processed. 

  Pierce

 

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




Res: [T5.1] Can I manually use the IoC container to obtain Objects?

2010-04-06 Thread Kristian Marinkovic
right... classes that are not controlled by Tapestry IoC cannot 
use Tapestry IoC dependency injection.

therefore you have to switch to programmatic configuration. 

g,
kris



Von:Everton Agner 
An: Tapestry users 
Datum:  06.04.2010 14:50
Betreff:Res: Res: [T5.1] Can I manually use the IoC container to 
obtain Objects?



So, if I configure at Runtime - in my own HibernateConfigurer (which I 
already have it, btw) - the listeners are added to the Tap IoC registry? 
Umm... I'll try it, it sounds pretty good.

Thanks :)

- Everton





De: Kristian Marinkovic 
Para: Tapestry users 
Enviadas: Terça-feira, 6 de Abril de 2010 9:38:48
Assunto: Res: [T5.1] Can I manually use the IoC container to obtain 
Objects?

when using tapestry-hibernate you can contribute your own
HibernateConfigurer which has access to the Hibernate Configuration.
then you can add an EventListener, build by Tapestry IOC, to the 
configuration.

i guess you'll have to do it akin.

or (not a clean solution) you set the tapestry ioc registry into a public 
static field somewhere. so you can access it from your listener.

g,
kris



Von:Everton Agner 
An: Tapestry users 
Datum:  06.04.2010 14:29
Betreff:Res: [T5.1] Can I manually use the IoC container to obtain 

Objects?



Anything?





De: Everton Agner 
Para: Tapestry Users 
Enviadas: Segunda-feira, 5 de Abril de 2010 15:42:55
Assunto: [T5.1] Can I manually use the IoC container to obtain Objects?

Hi,

As I've said before, I'm integration Envers in my T5.1 Application, and 
everything seems clear except for : How can I obtain the Request object by 

the IoC if the Enver's RevisionListener class is not controlled by the 
IoC? (it's a Singleton per EntityManagerFactory object as far as I've 
read)

So... can I manually use the IoC container to obtain Objects? I guess T5.1 

will not understand some @Inject annotations in a 
not-T5.1-IoC-controlled-Class.

If not, how can I add my RevisionListener Class to the T5.1 IoC control?

Thanks

- Everton





Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com




Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com



 

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


Res: [T5.1] Can I manually use the IoC container to obtain Objects?

2010-04-06 Thread Kristian Marinkovic
when using tapestry-hibernate you can contribute your own
HibernateConfigurer which has access to the Hibernate Configuration.
then you can add an EventListener, build by Tapestry IOC, to the 
configuration.

i guess you'll have to do it akin.

or (not a clean solution) you set the tapestry ioc registry into a public 
static field somewhere. so you can access it from your listener.

g,
kris



Von:Everton Agner 
An: Tapestry users 
Datum:  06.04.2010 14:29
Betreff:Res: [T5.1] Can I manually use the IoC container to obtain 
Objects?



Anything?





De: Everton Agner 
Para: Tapestry Users 
Enviadas: Segunda-feira, 5 de Abril de 2010 15:42:55
Assunto: [T5.1] Can I manually use the IoC container to obtain Objects?

Hi,

As I've said before, I'm integration Envers in my T5.1 Application, and 
everything seems clear except for : How can I obtain the Request object by 
the IoC if the Enver's RevisionListener class is not controlled by the 
IoC? (it's a Singleton per EntityManagerFactory object as far as I've 
read)

So... can I manually use the IoC container to obtain Objects? I guess T5.1 
will not understand some @Inject annotations in a 
not-T5.1-IoC-controlled-Class.

If not, how can I add my RevisionListener Class to the T5.1 IoC control?

Thanks

- Everton



 

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


 

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


Re: LinkSubmit with Context?

2010-03-31 Thread Kristian Marinkovic
i created https://issues.apache.org/jira/browse/TAP5-1091 by cloning 
TAP-532

i hope i can provide a patch over next monday.

g,
kris



Von:Łukasz Jazgar 
An: Tapestry users 
Datum:  31.03.2010 13:19
Betreff:Re: LinkSubmit with Context?



2010/3/31 Kristian Marinkovic 

> hi pierce,
>
> there was already the jira issue
> https://issues.apache.org/jira/browse/TAP5-532
> that was closed as duplicat of
> https://issues.apache.org/jira/browse/TAP5-194
> which was not correct.
>
> maybe we should reopen it.
>
>
Yes, we should. I also grapple with a problem of lack of context in
LinkSubmit at the moment.
This improvement would be great.
I vote for it. :)

Regards
Lukasz



Re: LinkSubmit with Context?

2010-03-31 Thread Kristian Marinkovic
hi pierce,

there was already the jira issue 
https://issues.apache.org/jira/browse/TAP5-532
that was closed as duplicat of 
https://issues.apache.org/jira/browse/TAP5-194
which was not correct.

maybe we should reopen it.

g,
kris



Von:"Pierce T. Wetter III" 
An: "Tapestry users" 
Datum:  30.03.2010 17:15
Betreff:Re: LinkSubmit with Context?




On Mar 30, 2010, at 12:46 AM, Kristian Marinkovic wrote:

> if you have multiple linksubmit components you can distinguish them
> by adding onSelectedFromSubmit1() or onSelectedFromSubmit2() 
> action handler.
> 
> the linksubmit component does not support a context parameter out of
> the box. if you really need it you have to create your own component.
> all you need is the code from the linksubmit component + the part of 
> submit that stores an action into the form that resolves the context 
> again:
> 
> formSupport.store(this, new ProcessSubmission(name));

  Do you agree that this seems like a bug? That linksubmit should support 
the same set of things as regular submit?

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




Re: Generated links in a loop

2010-03-30 Thread Kristian Marinkovic
so you want to generate a link in a grid and dependending 
on a parameter have a mixin attached.

you can solve it by using a delegate that is directed to a block 
(or component) that  in one case contains a simple eventlink and
in the other case contains a eventlink with the attached mixin




that's one of the drawbacks you have, when following the static
structure, dynamic behaviour paradigm. you always have to 
have all posibilities defined in advance. and from my point of 
view it's not always that bad.

hope it helps

g,
kris



Von:Peter Stavrinides 
An: Tapestry users 
Datum:  30.03.2010 13:05
Betreff:Re: Generated links in a loop



Hi Kristian,

Reading through what I wrote, I guess I could be clearer, here is more 
detailed explanation.

I create a model that I attach to a component (a type of custom grid), its 
populated with database records... some of the columns in the grid need to 
be links, and I can create the various types of links (event, page, action 
etc.) as I wish... so far this is all straightforward.

Occasionally I need to generate links that have a mixin attached, my links 
are obviously generated in a loop, and on the fly from the database data.

I am not using a markup writer, but I guess that could be the solution... 
only that would mean also writing out the mixins JavaScript, very 
possible, but I would like to avoid it if there is a better way. 

When generating an event link it would be nice to be able to attach an 
'attribute' (thanks for correcting) to specify a mixin, I know of no way 
to do this dynamically when generating links via Tapestry??

Cheers,
Peter


- Original Message -----
From: "Kristian Marinkovic" 
To: "Tapestry users" 
Sent: Tuesday, 30 March, 2010 13:02:51 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Generated links in a loop

hi peter,

i don't understand your problem entirely...
but have you considered using a EventLink
component instead of generating the link 
manually. then you can easily attach a mixin
that renders some javascript using the 
PagerRender service.

or do you mean a  attribute by saying link property?
in this case you can use the MarkupWriter from the render
event methods to add additional attributes... even in mixins

void beginRender(MarkupWriter writer) {
writer.element().attribute(,...);
}

i guess i'm missing something :)

g,
kris






Von:Peter Stavrinides 
An: Tapestry Mailing List 
Datum:  30.03.2010 11:47
Betreff:Generated links in a loop



Hi!

Is it possible to attach a mixin on the fly to a 'generated' link? 

I wanted to use component resources:
Link link = resources_.createEventLink(linkId, new Object[] 
{param1,param2}); for generating the link, but there doesn't appear to be 
a way to attach a link property? I feel like I am missing something 
obvious ? ...the only way I know of that might work is using 
renderInformalParameters and writing the mixin JavaScript into the page... 

hmm don't like that too much, is there a better way?

Thanks,
Peter

-
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: Generated links in a loop

2010-03-30 Thread Kristian Marinkovic
hi peter,

i don't understand your problem entirely...
but have you considered using a EventLink
component instead of generating the link 
manually. then you can easily attach a mixin
that renders some javascript using the 
PagerRender service.

or do you mean a  attribute by saying link property?
in this case you can use the MarkupWriter from the render
event methods to add additional attributes... even in mixins

void beginRender(MarkupWriter writer) {
writer.element().attribute(,...);
}

i guess i'm missing something :)

g,
kris






Von:Peter Stavrinides 
An: Tapestry Mailing List 
Datum:  30.03.2010 11:47
Betreff:Generated links in a loop



Hi!

Is it possible to attach a mixin on the fly to a 'generated' link? 

I wanted to use component resources:
Link link = resources_.createEventLink(linkId, new Object[] 
{param1,param2}); for generating the link, but there doesn't appear to be 
a way to attach a link property? I feel like I am missing something 
obvious ? ...the only way I know of that might work is using 
renderInformalParameters and writing the mixin JavaScript into the page... 
hmm don't like that too much, is there a better way?

Thanks,
Peter

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




  1   2   3   4   5   6   >