Re: How to provide a tapestry method to be access from another application?

2019-09-04 Thread Eugen
Hi,
is Your method exposed as event? Or You have a CORS exception? What is the
error on client side?

Regards
Eugen

Rbsn Lbk  schrieb am Mi., 4. Sep. 2019, 21:28:

> Hi,
>
> I have developed a Tapestry application. Inside of that application I have
> a method that process the login. I would to access/call this method from
> another non-tapestry application.
>
> I've tried to access the method via ajax, exactly the way I would access
> from inside of the tapestry application. The issue is, tapestry does not
> recognize the request as ajax. Any idea how to solve this?
>
> Thanks a lot for your help.
>


Re: Bootsrtap 4.x with Tapestry 5.4.x

2018-09-19 Thread Eugen
Hi,
I have integrated bs 4.1 with actual tapestry version.
Some components and core modules have to be overriden to work properly with
bs 4.1, also Glyphicons (if You are using it) should be imported manually.

Best regards
Eugen

ср, 19 сент. 2018 г. в 11:32, Balázs Palcsó :

> Hi All,
>
> Has anybody used Bootstrap 4 with Tapestry?
> Was it working properly with Tapestry components?
> I am interested solely in the Tapestry generated HTML. (Project specific
> TMLs are a different story)
>
> There are a bunch of breaking chamges according to
> https://getbootstrap.com/docs/4.0/migration/
>
> Is there any plan to upgrade to Bootstrap 4 in Tapestry 5.5?
>
> Many thanks,
> Balazs
>


Re: ServerSocket from within Tapestry

2018-06-12 Thread Eugen
Hi Christopher,
By decorating a Tapestry Service by @ServerEndPoint You can use all
Tapestry benefits like Injection etc.
You don't need to start any additional servers.. the application is already
deployed on Tomcat and Tomcat will serve classes decorated by
@ServerEndPoint. Important is to exclude the WS Pats from Tapestry's filter.
The code avove is usefull when You use the server standalone (without
Tomcat). Ffrom the Java-Websocket Docs: A WebSocket server by itself
doesn't do anything except establish socket connections though HTTP. After
that it's up to *your* subclass to add purpose.

kind regards
Eugen

пн, 11 июн. 2018 г. в 13:45, Christopher Dodunski <
chrisfromtapes...@christopher.net.nz>:

> I like the look of the WebSocket library below:
>
> https://github.com/TooTallNate/Java-WebSocket
>
> It is 100% Java, and includes example code for both server and client.
> Also, it supports multi-threading 'out of the box'.
>
> If I were to use this library's server code, placed in the Tapestry
> 'services' directory, must I still decorate the server class with
> @ServerEndPoint for Tomcat/Tapestry to direct WebSocket connections to it?
>
> Also, where would you recommend placing the below lines of start up code
> in order to run the WebSocket server inside the 'services' directory?
>
>   WebSocketServer server = new SimpleServer(new InetSocketAddress(host,
> port));
>   server.run();
>
> Thanks,
>
> Chris.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: ServerSocket from within Tapestry

2018-06-07 Thread Eugen
Hi Christopher,
In my case the annotation @ServerEndpoint decorates an Service
implementation class.

I don't invoke any threads in WS Methods, but, i think You can use the
Tapestry's ParralelExecutor Service to optimize the processing of client
requests (see https://tapestry.apache.org/parallel-execution.html)

As WebSocket Client I use this library -
https://github.com/TooTallNate/Java-WebSocket

Regards
Eugen


2018-06-07 8:10 GMT+02:00 Christopher Dodunski <
chrisfromtapes...@christopher.net.nz>:

> Thanks Eugen, and where did you place the server-side class decorated with
> @ServerEndpoint("/ws")?  Perhaps it doesn't matter whether it is placed in
> 'pages' or 'services', as Tomcat finds it regardless.
>
> Is it necessary to invoke new threads (multi-threading) within each of the
> methods decorated with @OnOpen, @OnClose, @OnMessage and @OnError, or does
> Tomcat automatically handle cases of multiple, simultaneous client
> connections?
>
> I found the below 'howto' on using Tomcat WebSockets, but the client side
> code is implemented in HTML and JavaScript, not Java.  It would be useful
> to find some sample, client-side Java code for connecting and
> communicating via a Tomcat WebSocket.
>
> https://examples.javacodegeeks.com/enterprise-java/tomcat/apache-tomcat-
> websocket-tutorial/
>
> Regards,
>
> Chris.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: ServerSocket from within Tapestry

2018-06-06 Thread Eugen
Hi Christopher,
to do somewhat similar I`m using Tomcat WebSockets (the Software are
deployed allways on Tomcat Server).
The Desktop application communicates over Java WS Client, WebPages over
JavaScript implementation. Transmitted Data is serialized into JSON Strings.
On Server-Side the @ServerEndpoint is a Tapestry Service what implements
specific WebSocket Functions (I'm using annotations, e.g. @OnMessage etc)

The ws Path should be added to IgnorePathFilter in AppModule:

public static void contributeIgnoredPathsFilter(Configuration
configuration) {
   configuration.add("/ws");
}

Regards
Eugen

2018-06-06 14:30 GMT+02:00 Christopher Dodunski <
chrisfromtapes...@christopher.net.nz>:

> Hi team,
>
> I'm in the final stages of developing a Tapestry webapp for a
> multi-contractor worksite.  Most user interactions will be via webpage
> forms, with state displayed on a dashboard page, involving mostly text
> (though done attractively).
>
> To support this application I've also developed a small desktop
> application to reflect state in a more graphical way, using Java 2D
> graphics.  Communication between server and client would be socket-based
> transmission of objects: ObjectOutputStream + ObjectInputStream.
>
> My question is how best to implement and launch this serverside Java
> networking code from inside a Tapestry application.  Ideally I'd like to
> generate data for a client using CrudServiceDAO, in much the same way as I
> would generate an HTTP response within a Tapestry page.  The server code
> should start on launching the Tapestry application, and immediately start
> listening on a given port.
>
> Any suggestions would be much appreciated.
>
> Regards,
>
> Chris.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [5.3.7] Application stops working after some time

2016-02-26 Thread Eugen
Hi,
do You have some session persistencies in the Index page? Is it the time of
SessionTimeout?

2016-02-26 10:47 GMT+01:00 Nathan Quirynen :

> Forgot to say that this error is thrown when trying to access any page.
>
>
>
> On 26/02/16 10:37, Nathan Quirynen wrote:
>
>> Hi,
>>
>> I have a weird problem where an application stops working after some
>> random time. A restart of Tomcat "fixes" it temporarily.
>>
>> Anyone know where the problem could be?
>>
>> [ERROR] ioc.Registry java.lang.ArrayIndexOutOfBoundsException
>> [ERROR] ioc.Registry Operations trace:
>> [ERROR] ioc.Registry [ 1] Constructing instance of page class
>> [hidden].pages.Index
>> [ERROR] ioc.Registry [ 2] Creating ComponentAssembler for
>> [hidden].pages.Index
>> [ERROR] ioc.Registry [ 3] Parsing component template
>> classpath:[hidden]/pages/Index.tml
>> [ERROR] TapestryModule.RequestExceptionHandler Unexpected runtime
>> exception: null
>> org.apache.tapestry5.ioc.internal.OperationException
>>
>>   at
>> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
>>
>>   at
>> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
>>
>>   at
>> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
>>
>>   at
>> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
>>
>>   at
>> org.apache.tapestry5.internal.services.TemplateParserImpl.parseTemplate(TemplateParserImpl.java:57)
>>
>>   at $TemplateParser_42d7f228eb.parseTemplate(Unknown Source)
>>
>>   at
>> org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.parseTemplate(ComponentTemplateSourceImpl.java:175)
>>
>>   at
>> org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.getTemplate(ComponentTemplateSourceImpl.java:147)
>>
>>   at $ComponentTemplateSource_42d7f228ea.getTemplate(Unknown Source)
>>
>>   at
>> org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:229)
>>
>>   at
>> org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:222)
>>
>>   at
>> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>>
>>   at
>> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
>>
>>   at
>> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
>>
>>   at
>> org.apache.tapestry5.internal.pageload.PageLoaderImpl.createAssembler(PageLoaderImpl.java:221)
>>
>>   at
>> org.apache.tapestry5.internal.pageload.PageLoaderImpl.getAssembler(PageLoaderImpl.java:211)
>>
>>   at
>> org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:183)
>>
>>   at
>> org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:178)
>>
>>   at
>> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>>
>>   at
>> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
>>
>>   at
>> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
>>
>>   at
>> org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:177)
>>
>>   at $PageLoader_42d7f228d4.loadPage(Unknown Source)
>>
>>   at
>> org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:104)
>>
>>   at $PageSource_42d7f228d1.getPage(Unknown Source)
>>
>>   at
>> org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:82)
>>
>>   at $RequestPageCache_42d7f228d0.get(Unknown Source)
>>
>>   at $RequestPageCache_42d7f228cb.get(Unknown Source)
>>
>>   at
>> org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55)
>>
>>   at
>> org.apache.tapestry5.services.TapestryModule$38.handle(TapestryModule.java:)
>>
>>   at $PageRenderRequestHandler_42d7f228cf.handle(Unknown Source)
>>
>>   at $PageRenderRequestHandler_42d7f228c9.handle(Unknown Source)
>>
>>   at
>> org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
>>
>>   at
>> org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
>>
>>   at $ComponentRequestHandler_42d7f228ca.handlePageRender(Unknown Source)
>>
>>   at $ComponentRequestHandler_42d7f22886.handlePageRender(Unknown Source)
>>
>>   at
>> org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
>>
>>   at $Dispatcher_42d7f22889.dispatch(Unknown Source)
>>
>>   at $Dispatcher_42d7f22882.dispatch(Unknown Source)
>>
>>   at
>> org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302)
>>
>> 
>>
>>
>
> -
> To unsub

Re: Mixin's AfterRender method isn't called after ajax update

2015-10-28 Thread Eugen
Hi,
try to put a Trigger component inside your Zone, this will ensure Your
function is called each time the zone renders

Regards
Eugen

2015-10-28 11:21 GMT+01:00 Poggenpohl, Daniel <
daniel.poggenp...@isst.fraunhofer.de>:

> Hello,
>
> we have a zone containing an element with a Mixin. An Ajax update reloads
> the zone contents and so should, if I understand it right, re-render the
> elements in the zone. So it should re-render the element with the Mixin.
>
> So basically, we have a
>
> 
> 
> 
>
> The Mixin has a method
> @AfterRender
> doSomething() {
> [...]
> }
>
> Why isn't the method called?
>
> Regards,
> Daniel
>


Re: How to generate URL's from the context

2015-03-23 Thread Eugen
Hi Daniel,
take also a look also to usage of StreamResponse
http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile

2015-03-23 20:06 GMT+01:00 Chris Poulsen :

> http://tapestry.apache.org/assets.html
>
> I think the context variant is what you are looking for.
>
> On Mon, Mar 23, 2015 at 6:34 PM, Poggenpohl, Daniel <
> daniel.poggenp...@isst.fraunhofer.de> wrote:
>
> > Hello,
> >
> > the day has been long, I am kinda stumped now.
> >
> > I have some documents lying in the webapp/resources folder. I want to
> > embed a pdf in a page, so I need a value for the src attribute for the
> tag.
> >
> > Can somebody help me?
> >
> > Regards,
> > Daniel P.
> >
> > --
> > Dipl. Inf. Daniel Poggenpohl, Fraunhofer-Institut für Software- und
> > Systemtechnik ISST
> > Compliance- und Sicherheitslösungen
> > Emil-Figge-Straße 91, 44227 Dortmund, Germany
> > Telefon: +49 (0) 231 / 9 76 77-323
> > mailto: daniel.poggenp...@isst.fraunhofer.de > daniel.poggenp...@isst.fraunhofer.de>
> > http://www.isst.fraunhofer.de
> >
> >
>


List of embedded components

2014-11-27 Thread Eugen
Hello,
is there any way in Tapestry 5.4 to list all components embedded in a page
or component (defined in template file)?

The goal is to implement an annotation, @UpdateParentZone, that would
search for the first Zone in the parent components and add the found zone
to AjaxResponseRenderer to be updated after annotated function executed.

Thanks
Best regards
Eugen


Re: Problem in using Bootstrap Modal component

2014-09-23 Thread Eugen
Hi,
put in Your modal-body, around the image, a zone and attach js function to
the 'show.bs.modal' event of modal. In the function refesh the zone.

best regards
Eugen

2014-09-23 19:31 GMT+02:00 akshay :

> Hi Sir,
>
> Thanks for your response,
>
> I believe post over a forum , expects a more polite response than yours.
>
> Coming to the point suggested by you, I tried using the remote option
> before posting into the forum and it didnt work the way, it is supposed to
> be.
>
> So rather than putting a complex code snippet, I jotted down the naive
> approach, so that someone can really help me in knowing the feasible
> solution.
>
> Regarding the effort, I tried the possibilities and has asked the question,
> hoping to get a better response.
>
>
> Thanks and Best Regards
> Akshay
>
>
>
> On Tue, Sep 23, 2014 at 6:48 PM, Chris Poulsen 
> wrote:
>
> > I doubt there is any magic going on. If your html output is correct then
> it
> > should work like advertised. You seem to be talking about the modal
> remote
> > option, but that is not used in your pasted code (which is close to
> > absolutely useless anyway, please put in an effort if you expect others
> to
> > try and help you).
> >
> > I suggest you read the docs for bootstrap modal, and then make sure that
> > your html is correct.
> >
> > --
> > Chris
> >
> > On Tue, Sep 23, 2014 at 6:12 PM, akshay 
> wrote:
> >
> > > Hi,
> > >
> > > I am trying to use bootstrap component modal.js. I intend to change to
> > > content of the modal( i.e image in my case) for every execution of
> this
> > > conditional block given below. But I see that , the content of the
> modal
> > > ("${imageUrl}") in the image tag,  is only loaded once and I get to see
> > the
> > > same image for each and every input field, where this block is
> executed.
> > >
> > > Code snippet :-
> > >
> > > 
> > >  > > data-target="#basicModal">Show Example
> > >
> > >  > > aria-labelledby="basicModal" aria-hidden="true">
> > > 
> > > 
> > >
> > > 
> > >  > > width="500px">
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > >
> > > I read over the internet that modal loads the content only once, and
> for
> > > this didnt find any solution that would fit my need.
> > >
> > > Any kind of help would be highly appreciated.
> > >
> > > --
> > > Cheers!!
> > > Akshay
> > >
> >
>
>
>
> --
> Cheers!!
> Akshay
>


Re: Simpler Hello World

2014-08-02 Thread Eugen
Hi,
if You don't like to use the template (.tml) files the entire job is to be
done in page class using the MarkupWriter,
a simple example:

public class Home{
void beginRender(MarkupWriter writer) {
writer.element("html");
writer.write("test");
writer.end();
}
}
this will write to the output html the text "test".
in this case, important is to start the page with the  element.

Best regards
Eugen

2014-08-02 23:21 GMT+02:00 Net Dawg :

> Here is the simplest Hello World, according to jump start:
> http://jumpstart.doublenegative.com.au/jumpstart/helloworld
>
>
> I would like to do something simpler.  No html, body tags etc, just pure
> streaming content.  Comlpletely do away with templates and components, just
> use the page
> class to stream "Hello World" to browser.
>
>
> In above example, I tried to set HelloWorld.tml as just
>
>
> ${username}
>
> the idea being getUserName can be XML, PDF or whatever...but get the
> following error:
>
>   Content is not allowed in prolog


Re: Tapestry-csrf-protection with Tapestry-Spring-Security.

2014-07-15 Thread Eugen
Yes, this is the "normal" way, another way is to make a tapestry form, f.e.:






and in OnSuccess event something like:

@inject
AuthenticationManager authenticationManager;

void onSuccess() {
Authentication authentication = new
UsernamePasswordAuthenticationToken(username, password);
Authentication authResult =
authenticationManager.authenticate(authentication);
SecurityContextHolder.getContext().setAuthentication(authResult);
}
this code throws an AuthenticationException if authentication fails.

Eugen


2014-07-15 19:09 GMT+02:00 TNO :

> Thanks, but
>
> This is a form with an action value
>
>  class="line">
>
> This is not a tapestry form (t:form), I don't think I can use the onSuccess
>
> Thomas
>
> Le 15/07/2014 18:49, Eugen a écrit :
>
>  Hi,
>> You can login programatically in onSucces function of a tapestry form.
>> Best regards
>> Eugen
>> Am 15.07.2014 16:16 schrieb "TNO" :
>>
>>  Hello,
>>>
>>> Is there anybody who already use tapestry-csrf-protection with
>>> Tapestry-Spring-Security ?
>>>
>>> tapestry-csrf-protection works out of the box with t:form, but
>>> Tapestry-Spring-Security works with is a simple html form and uses the
>>> Spring HttpServletRequestFilter.
>>>
>>> I'm using  in the login form but I can't
>>> check the token value in the filters...
>>>
>>> Thanks for any help
>>>
>>> Cheers, Thomas
>>>
>>>
>>> -
>>> 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-csrf-protection with Tapestry-Spring-Security.

2014-07-15 Thread Eugen
Hi,
You can login programatically in onSucces function of a tapestry form.
Best regards
Eugen
Am 15.07.2014 16:16 schrieb "TNO" :

> Hello,
>
> Is there anybody who already use tapestry-csrf-protection with
> Tapestry-Spring-Security ?
>
> tapestry-csrf-protection works out of the box with t:form, but
> Tapestry-Spring-Security works with is a simple html form and uses the
> Spring HttpServletRequestFilter.
>
> I'm using  in the login form but I can't
> check the token value in the filters...
>
> Thanks for any help
>
> Cheers, Thomas
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Forms require that the request method be POST

2014-05-19 Thread Eugen
Hi, I have had this kind of exception then i tried to submit a form
programmatically from an Applet (HttpClient) without sending the
formData field.

2014-05-19 22:31 GMT+02:00 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
>>

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



Re: @CommitAfter for GenericDao

2014-05-06 Thread Eugen
Thanks to all for detailed explanations,

The facade pattern looks good for me ;-)
I'll change my architecture to met it...

beste regards
Eugen

2014-05-05 19:43 GMT+02:00 Tony Nelson :
> The problem we ran into was explicitly what I documented in my original 
> e-mail.  In our Spring based implementation all  of our @Transactional 
> annotations we in our "logic" layer, and it worked well.  I started out using 
> @CommitAfter exactly the same way, until I ran into methods like:
>
> public void saveSomething(Something something) {
>   // add a bunch of validations
>   // and maybe a bunch of business rules
>   // and then updates to other objects
>   // and then finally
>   dao.save(something);
>
>   // oh and maybe some post processing
> }
>
> public void saveAListOfSomethings(List somethings) {
>for (Something something : somethings) { saveSomething(something); }
> }
>
> After running into this too many times in our codebase, we made the decision 
> to remove all @CommitAfter annotation from our logic layer (even wrote a test 
> case) and push them out to where the actual transaction logically existed.  
> For us this includes web pages, REST endpoints, and even command line 
> programs.  This has worked very well for us.
>
> I'm also not sure I completely agree with your separation of concerns 
> argument either.  Granted, I would never allow anyone to @Inject Session into 
> a page class, that definitely belongs in the DAO layer, but a simple 
> annotation the demarks a transaction doesn't feel out of place to me in a 
> page class.
>
>> -Original Message-
>> From: John [mailto:j...@quivinco.com]
>> Sent: Monday, May 05, 2014 1:10 PM
>> To: Tapestry users
>> Subject: Re: @CommitAfter for GenericDao
>>
>> At the risk of sounding like a fanatic...
>>
>> I would avoid using @CommitAfter or anything similar to do with
>> persistence in page classes, it contravenes the OO "seperation of
>> concerns" principle. (For the same reasons @CommitAfter should also not
>> be in interface definitions as suggested in the Tapestry docs' because
>> it's implementation specific.)
>>
>> A better place would be a facade layer* between your DAOs and your page
>> classes. This might not be justified if you want to keep your
>> application architecture minimal, but even so it represents best
>> practice and is a great place to code your business logic. Your page
>> classes can then focus exclusively on delivery of page content and your
>> DAOs on pure data access.
>>
>> regards,
>> John
>>
>> *http://en.wikipedia.org/wiki/Facade_pattern
>>   - Original Message -
>>   From: Tony Nelson
>>   To: Tapestry users
>>   Sent: Wednesday, April 30, 2014 9:59 PM
>>   Subject: RE: @CommitAfter for GenericDao
>>
>>
>>   From my experience, you really don't want to put CommitAfter on a
>> generic method like that.
>>
>>   It really doesn't do what you expect in code like this:
>>
>>   void saveSomeData(List widgets) {
>> for (Widget w: widgets) {
>>   widgetDao.saveWidget(widget);
>> }
>>   }
>>
>>   In that case, assuming saveWidget is annotated with @CommitAfter,
>> every iteration of the loop will commit separately, which is likely not
>> what you want.
>>
>>   The @CommitAfter annotation is much better used in your page classes
>> to commit transactions after a logical unit of work is complete.
>>
>>   Tony
>>
>>   > -Original Message-
>>   > From: Eugen [mailto:eugens...@gmail.com]
>>   > Sent: Wednesday, April 30, 2014 4:48 PM
>>   > To: Tapestry users
>>   > Subject: @CommitAfter for GenericDao
>>   >
>>   > Hi,
>>   > I try to use the CommitAfter on a GenericDao, but the method does
>> not
>>   > commit the transaction. Does it exists a worcaround to do that?
>>   >
>>   > This is the code:
>>   >
>>   > public interface GenericDao {
>>   > @CommitAfter
>>   > public void save(T entity);
>>   > }
>>   >
>>   > public abstract class GenericDaoImpl {
>>   > @Override
>>   > public void save(T entity) {
>>   > entityManager.persist(entity);
>>   > }
>>   > }
>>   >
>>   > public interface UserDao extends GenericDao { }
>>   >
>>   > public class UserDaoImpl extends GenericDaoImpl implements
>>   > UserDao { }
>>   >
>>   > and respective 

@CommitAfter for GenericDao

2014-04-30 Thread Eugen
Hi,
I try to use the CommitAfter on a GenericDao, but the method does not
commit the transaction. Does it exists a worcaround to do that?

This is the code:

public interface GenericDao {
@CommitAfter
public void save(T entity);
}

public abstract class GenericDaoImpl {
@Override
public void save(T entity) {
entityManager.persist(entity);
}
}

public interface UserDao extends GenericDao {
}

public class UserDaoImpl extends GenericDaoImpl implements UserDao {
}

and respective advisor in AppModule:

@Match("*Dao")
public static void adviseTransactions(JpaTransactionAdvisor advisor,
MethodAdviceReceiver receiver) {
advisor.addTransactionCommitAdvice(receiver);
}

if I place the save() function into the UserDao all works fine.

Thanks in advice
Eugen

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



Re: componenent or mixin to trigger event when visible

2014-03-23 Thread Eugen
Hi John,
in this mailing list it was a discussion about js events and zone
update. I think it is that You need. Search for discussion "5.4
tutorial/documentation for building jquery ajax request.", specially
the message from Geoff Callender on 12.03 (he points to this example:
http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/onevent)

Best regards
Eugen

2014-03-23 10:36 GMT+01:00 John :
> I want to update a zone when the top of a scrollable div becomes visible. The 
> use case is to display older messages in a list of messages as the user 
> sctolls up.
>
> I'm thinking of using the tapestry jquery bind mixin. Any other suggestions?
>
> John
>
> ---
> This email is free from viruses and malware because avast! Antivirus 
> protection is active.
> http://www.avast.com

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



Re: [5.4] update zone with javascript

2013-12-17 Thread Eugen
Hi Matthias,
how do You define the myModule?
It should be a javascript file in META-INF/modules/myModule.js to be
automatically loaded as module.
alternatively You can contribute the ModuleManager in Yout AppModule
to laod desired JS file as module:
@Contribute(ModuleManager.class)
public static void loadExtraModules(MappedConfiguration configuration,
@Path("META-INF/assets/js/myModule.js") Resource myModule)
throws IOException {
configuration.add("myModule", new
JavaScriptModuleConfiguration(myModule));
}

2013/12/15 Matthias :
> Hi Eugen,
>
> thanks a lot, I got the zone updates now :). There is only one problem with
> the initialisation at startup.
> When I use the invoke method require js prints an error: RequireJS error:
> require: moduleLib is undefined
>
> @AfterRender
> public void afterRender() {
> javaScriptSupport.require("myModule").invoke("moduleFunc");
> }
>
> When I debug the javascript code it looks like my module is not loaded
> correctly by require js, but I have no idea why:
>
> t5/core/pageinit (line 63)
>
> return require([moduleName], function(moduleLib) {
>   // moduleLib is undefined here
> });
>
> The moduleName is "myModule", but when the function is executed the
> moduleLib is "undefined" and cannot call
> the moduleFunc function.
>
>
>
> On 12.12.2013 21:34, Eugen wrote:
>>
>> Hi Matthias,
>> as second parameter of deferredZoneUpdate() function You need to
>> provide a event link to a function that returns a block or a
>> Zone.Body, something like:
>>
>>  @OnEvent("update-zone-event")
>>  Object myEvent() {
>> return request.isXHR()?zone.getBody():null;
>>  }
>>
>> the event Link, that should be passed to js Module can be created as
>> follow:
>>
>> public String getZoneUpdateLink() {
>>   componentResources.createEventLink("update-zone-event",
>> context).toAbsoluteURI();
>> }
>>
>> JavaScript, something like
>> require([ "jquery", "t5/core/zone" ], function($, zoneManager) {
>>  var moduleFunc, exports;
>>  moduleFunc = function(myController, myZoneId, url){
>>  $('#'+myControllerId).on("myEvent", function(e) {
>>  zoneManager.deferredZoneUpdate(myZoneId, url);
>>  }
>>  };
>>  return exports = {
>>  moduleFunc: moduleFunc
>>  };
>> });
>> }).call(this);
>>
>> and initialization call in page/component:
>>
>>
>> javaScriptSupport.require("myModule").invoke("moduleFunc").with(myControllerId,
>> zone.getClientId(), getZoneUpdateLink());
>>
>>
>> 2013/12/12 Matthias :
>>>
>>> Thanks to both of you, I tried Howard's approach but I think I missing
>>> something fundamental.
>>> Heres my new code:
>>>
>>> JavaScript
>>> require([ "jquery", "t5/core/zone" ], function($, zoneManager) {
>>>
>>>  // #1 with zone.update
>>>  var myZone = $("#myZone");
>>>  // why do I have to set the data-update-zone attribute?
>>>  myZone.attr("data-update-zone", "myZone");
>>>  var zone = zoneManager.findZone(myZone);
>>>  // this works, but just with a string. should I get the dom elements
>>> via
>>> ajax?
>>>  zone.update("some string");
>>>
>>>  // #2 refresh - there is no refresh method on the zone?
>>>  // zone.refresh();
>>>
>>>  // #3 defferedZoneUpdate
>>>  // the java method is called - maybe this can work
>>>  zoneManager.deferredZoneUpdate("myZone",
>>> "http://localhost:8080/search.myZone";);
>>> });
>>>
>>> Java
>>> public class Search {
>>>
>>>  // the method is called successfully, but my zone is not updated in
>>> any
>>> way.
>>>  JSONArray onActionFromDriverZone() {
>>>  JSONArray arr = new JSONArray();
>>>  JSONObject d = new JSONObject();
>>>  d.put("id", "2");
>>>  arr.put(d);
>>>  return arr;
>>>
>>>  }
>>> }
>>>
>>>
>>> On 12.12.2013 12:56, Howard Lewis Ship wrote:
>>>>
>>>> The short form is:  trigger an events.zone.update event on the zone's
>>>>

Re: Excluding the last element in List during sorting

2013-12-13 Thread Eugen
Oh sorry, it was a wrong tip,...
You can provide an own GridDataSource, in getAvailableRows() return
your list size+1 (the empty row) and in getRowValue(index) return an
emty object for the index out of the list size.
The empty row will not be included in sort.

Regards

2013/12/13 Eugen :
> Hi,
> have You tried to provide an own sortModel?
>
> 2013/12/13 Thai Tran :
>> Hi all,
>>
>> On my grid, each cell contains a textbox in order to let user edit the data.
>> The last row of the grid is cells which contains empty textbox in order to
>> let user insert the new data. In order to create the last row, I manually
>> add a new element during retrieving data from database
>> /
>> //public void setupRender() {//
>> //List docs = documentDAO.getAll();//
>> //docs.add(new Document());//
>> .
>> //}/
>>
>> /public BeanModel getDocumentModel(){//
>> //BeanModel model =
>> getBeanModelSource().createDisplayModel(Document.class, getMessages());//
>> //model.include("name", "shortDescription");//
>> //model.add("delete", null);//
>> //
>> //return model;//
>> //}/
>>
>> and the tml file:
>>
>> ///
>> //> />//
>> 
>> 
>> 
>> ////
>> ///
>> .
>>
>> Everything work great; however, when I sort a column of the grid, the last
>> row will jump into the first position, since the empty document (row
>> /element) is included during sorting. How can I override the sorting
>> function to exclude the last element in the list ?
>>
>> Regards
>>
>>

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



Re: Excluding the last element in List during sorting

2013-12-13 Thread Eugen
Hi,
have You tried to provide an own sortModel?

2013/12/13 Thai Tran :
> Hi all,
>
> On my grid, each cell contains a textbox in order to let user edit the data.
> The last row of the grid is cells which contains empty textbox in order to
> let user insert the new data. In order to create the last row, I manually
> add a new element during retrieving data from database
> /
> //public void setupRender() {//
> //List docs = documentDAO.getAll();//
> //docs.add(new Document());//
> .
> //}/
>
> /public BeanModel getDocumentModel(){//
> //BeanModel model =
> getBeanModelSource().createDisplayModel(Document.class, getMessages());//
> //model.include("name", "shortDescription");//
> //model.add("delete", null);//
> //
> //return model;//
> //}/
>
> and the tml file:
>
> ///
> // />//
> 
> 
> 
> ////
> ///
> .
>
> Everything work great; however, when I sort a column of the grid, the last
> row will jump into the first position, since the empty document (row
> /element) is included during sorting. How can I override the sorting
> function to exclude the last element in the list ?
>
> Regards
>
>

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



Re: [5.4] update zone with javascript

2013-12-12 Thread Eugen
Hi Matthias,
as second parameter of deferredZoneUpdate() function You need to
provide a event link to a function that returns a block or a
Zone.Body, something like:

@OnEvent("update-zone-event")
Object myEvent() {
   return request.isXHR()?zone.getBody():null;
}

the event Link, that should be passed to js Module can be created as follow:

public String getZoneUpdateLink() {
 componentResources.createEventLink("update-zone-event",
context).toAbsoluteURI();
}

JavaScript, something like
require([ "jquery", "t5/core/zone" ], function($, zoneManager) {
var moduleFunc, exports;
moduleFunc = function(myController, myZoneId, url){
$('#'+myControllerId).on("myEvent", function(e) {
zoneManager.deferredZoneUpdate(myZoneId, url);
}
};
return exports = {
moduleFunc: moduleFunc
};
});
}).call(this);

and initialization call in page/component:

javaScriptSupport.require("myModule").invoke("moduleFunc").with(myControllerId,
zone.getClientId(), getZoneUpdateLink());


2013/12/12 Matthias :
> Thanks to both of you, I tried Howard's approach but I think I missing
> something fundamental.
> Heres my new code:
>
> JavaScript
> require([ "jquery", "t5/core/zone" ], function($, zoneManager) {
>
> // #1 with zone.update
> var myZone = $("#myZone");
> // why do I have to set the data-update-zone attribute?
> myZone.attr("data-update-zone", "myZone");
> var zone = zoneManager.findZone(myZone);
> // this works, but just with a string. should I get the dom elements via
> ajax?
> zone.update("some string");
>
> // #2 refresh - there is no refresh method on the zone?
> // zone.refresh();
>
> // #3 defferedZoneUpdate
> // the java method is called - maybe this can work
> zoneManager.deferredZoneUpdate("myZone",
> "http://localhost:8080/search.myZone";);
> });
>
> Java
> public class Search {
>
> // the method is called successfully, but my zone is not updated in any
> way.
> JSONArray onActionFromDriverZone() {
> JSONArray arr = new JSONArray();
> JSONObject d = new JSONObject();
> d.put("id", "2");
> arr.put(d);
> return arr;
>
> }
> }
>
>
> On 12.12.2013 12:56, Howard Lewis Ship wrote:
>>
>> The short form is:  trigger an events.zone.update event on the zone's
>> client-side element to update it immediately, using available content (a
>> string, or DOM elements).
>>
>> Or, trigger events.zone.refresh event when you know a URL and additional
>> parameters; Tapestry will run the Ajax request and update the zone when
>> the
>> content is available.
>>
>> I think Geoff's example is actually a bit complicated.  Take a peek at the
>> t5/core/zone module to see how simple it can be:
>> http://people.apache.org/~hlship/t5api/coffeescript/zone.html
>>
>>
>> On Thu, Dec 12, 2013 at 1:47 AM, Geoff Callender <
>> geoff.callender.jumpst...@gmail.com> wrote:
>>
>>> This should give you the clues you need: it's the ZoneUpdater mixin from
>>> the upcoming preview of JumpStart 7. It uses a dependency on
>>> "t5/core/zone".
>>>
>>> Example usage:
>>>
>>> >> event="firstNameChanged" zone="nameZone"/>
>>>
>>>
>>> ZoneUpdater.java:
>>>
>>> /**
>>>   * A simple mixin for attaching javascript that updates a zone on any
>>> client-side event.
>>>   * Based on
>>> http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html
>>>   */
>>> package jumpstart.web.mixins;
>>>
>>> import org.apache.tapestry5.BindingConstants;
>>> import org.apache.tapestry5.ClientElement;
>>> import org.apache.tapestry5.ComponentResources;
>>> import org.apache.tapestry5.annotations.Environmental;
>>> import org.apache.tapestry5.annotations.InjectContainer;
>>> import org.apache.tapestry5.annotations.Parameter;
>>> import org.apache.tapestry5.ioc.annotations.Inject;
>>> import org.apache.tapestry5.services.javascript.JavaScriptSupport;
>>>
>>> public class ZoneUpdater {
>>>
>>>  // Parameters
>>>
>>>  /**
>>>   * The event to listen for on the client. If not specified, zone
>>> update can only be triggered manually through
>>>   * calling updateZone on the JS object.
>>>   */
>>>  @Parameter(name = "clientEvent", defaultPrefix =
>>> BindingConstants.LITERAL)
>>>  private String clientEvent;
>>>
>>>  /**
>>>   * The event to listen for in your component class
>>>   */
>>>  @Parameter(name = "event", defaultPrefix =
>>> BindingConstants.LITERAL, required = true)
>>>  private String event;
>>>
>>>  @Parameter(name = "prefix", defaultPrefix =
>>> BindingConstants.LITERAL, value = "default")
>>>  private String prefix;
>>>
>>>  @Parameter(name = "context")
>>>  private Object[] context;
>>>
>>>  /**
>>>   * The zone to be updated by us.
>>>   */
>>>  @Parameter(name = "zone", defaultPrefix =
>>> BindingConstants.LITERAL, required = true)
>>> 

Re: tapestry-bootstrap question

2013-12-06 Thread Eugen
Hi,
which vewrsion of Tapestry are You using?
for 5.4 You don't need to user fwtype, just 'class' attribute

Eugen

2013/12/5 Nicolas Barrera :
> Hi,
>
> Just wandering why should I use the fwtype parameter as in the jumpstart
> bootstrap example (
> http://jumpstart.doublenegative.com.au/jumpstart/examples/styling/bootstrap/1
> )
>
>  href="#">Refresh
>
>
> I 've been using the tapestry-bootstrap library and using the class
> parameter instead and obtained same results
>
>
>  href="#">Refresh
>
>
>
>
> Nicolás.-

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



Re: 'bootstrap/popover' Module

2013-11-25 Thread Eugen
Thanks Howard,
last commit solved this issue

Best regards
Eugen

2013/11/18 Eugen :
> Good day
> I've tried it with the last version from staging repository (tapestry
> 5-alpha-25) and last version from Git repo (5-alpha-26).
> I use Eclipse 4.4.0 with maven-jetty-plugin 9.0.4.v20130625 (tested
> also with 6.1.16 in an new Quickstart Project)
> Browsers: Popover Failed in Waterfox 24.0 and Chrome 31.0.1650.57, but
> today tryed it with IE 10 and.. it's work fine
>
> Best regards
> Eugen
>
> 2013/11/17 Howard Lewis Ship :
>> What's you environment, including exact version of Tapestry?
>>
>>
>> On Thu, Nov 14, 2013 at 1:26 PM, Eugen  wrote:
>>
>>> Good day,
>>> when I try to require the bootstrap/popover Module I become an error
>>> in Firefox console:
>>>
>>> [22:05:14.435] "RequireJS error: scripterror: Script error for:
>>> bootstrap/popover
>>> http://requirejs.org/docs/errors.html#scripterror, modules
>>> bootstrap/popover"
>>>
>>> the tml file:
>>>  >> class="btn" data-content="Content">Complete»
>>>
>>> the java call failed:
>>> void afterRender(){
>>>
>>> javaScriptSupport.require("test").invoke("PopOver").with("complete");
>>> }
>>>
>>> this call works fine:
>>> void afterRender(){
>>>
>>> javaScriptSupport.require("test").invoke("ToolTip").with("complete");
>>> }
>>>
>>> the wrapper for ToolTip and PopoOver test.js module:
>>> (function() {
>>> define ("test", ["jquery", "t5/core/console", "require"] ,
>>> function( $, console, require) {
>>> var ToolTip, PopOver, exports;
>>>
>>> ToolTip = function(elementId, params) {
>>> require(["bootstrap/tooltip"], function(){
>>> var element = $("#"+elementId);
>>> if (!element) {
>>> console.error("Element "+elementId+" not found");
>>> return;
>>> }
>>> if (params)
>>> element.tooltip(params);
>>> else
>>> element.tooltip();
>>> });
>>> };
>>>
>>> PopOver = function(elementId, params) {
>>> require(["bootstrap/popover"], function(){
>>> var element = $("#"+elementId);
>>> if (!element) {
>>> console.error("Element "+elementId+" not found");
>>> return;
>>> }
>>> if (params)
>>> element.popover(params);
>>> else
>>> element.popover('show');
>>> });
>>> }
>>>
>>> return exports = {
>>> ToolTip : ToolTip,
>>> PopOver: PopOver
>>> };
>>> });
>>>
>>> }).call(this);
>>>
>>> If the PopOver module is contributed manually in Appmodule all works
>>> fine (the module name should be other name that popover!):
>>> @Contribute(ModuleManager.class)
>>> public static void setupBaseModules(MappedConfiguration>> Object> configuration,
>>> @Path("${" +
>>> SymbolConstants.BOOTSTRAP_ROOT + "}/js/popover.js")
>>> Resource popover)
>>> {
>>> configuration.add("bootstrap/popovers", new
>>> JavaScriptModuleConfiguration(popover).dependsOn("bootstrap/tooltip"));
>>>  }
>>>
>>> Is something wrong in my code or it is a Jira issue?
>>>
>>> Thanks
>>> Eugen
>>>
>>> -
>>> 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

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



Re: 'bootstrap/popover' Module

2013-11-18 Thread Eugen
Good day
I've tried it with the last version from staging repository (tapestry
5-alpha-25) and last version from Git repo (5-alpha-26).
I use Eclipse 4.4.0 with maven-jetty-plugin 9.0.4.v20130625 (tested
also with 6.1.16 in an new Quickstart Project)
Browsers: Popover Failed in Waterfox 24.0 and Chrome 31.0.1650.57, but
today tryed it with IE 10 and.. it's work fine

Best regards
Eugen

2013/11/17 Howard Lewis Ship :
> What's you environment, including exact version of Tapestry?
>
>
> On Thu, Nov 14, 2013 at 1:26 PM, Eugen  wrote:
>
>> Good day,
>> when I try to require the bootstrap/popover Module I become an error
>> in Firefox console:
>>
>> [22:05:14.435] "RequireJS error: scripterror: Script error for:
>> bootstrap/popover
>> http://requirejs.org/docs/errors.html#scripterror, modules
>> bootstrap/popover"
>>
>> the tml file:
>>  > class="btn" data-content="Content">Complete»
>>
>> the java call failed:
>> void afterRender(){
>>
>> javaScriptSupport.require("test").invoke("PopOver").with("complete");
>> }
>>
>> this call works fine:
>> void afterRender(){
>>
>> javaScriptSupport.require("test").invoke("ToolTip").with("complete");
>> }
>>
>> the wrapper for ToolTip and PopoOver test.js module:
>> (function() {
>> define ("test", ["jquery", "t5/core/console", "require"] ,
>> function( $, console, require) {
>> var ToolTip, PopOver, exports;
>>
>> ToolTip = function(elementId, params) {
>> require(["bootstrap/tooltip"], function(){
>> var element = $("#"+elementId);
>> if (!element) {
>> console.error("Element "+elementId+" not found");
>> return;
>> }
>> if (params)
>> element.tooltip(params);
>> else
>> element.tooltip();
>> });
>> };
>>
>> PopOver = function(elementId, params) {
>> require(["bootstrap/popover"], function(){
>> var element = $("#"+elementId);
>> if (!element) {
>> console.error("Element "+elementId+" not found");
>> return;
>> }
>> if (params)
>> element.popover(params);
>> else
>> element.popover('show');
>> });
>> }
>>
>> return exports = {
>> ToolTip : ToolTip,
>> PopOver: PopOver
>> };
>> });
>>
>> }).call(this);
>>
>> If the PopOver module is contributed manually in Appmodule all works
>> fine (the module name should be other name that popover!):
>> @Contribute(ModuleManager.class)
>> public static void setupBaseModules(MappedConfiguration> Object> configuration,
>> @Path("${" +
>> SymbolConstants.BOOTSTRAP_ROOT + "}/js/popover.js")
>> Resource popover)
>> {
>> configuration.add("bootstrap/popovers", new
>> JavaScriptModuleConfiguration(popover).dependsOn("bootstrap/tooltip"));
>>  }
>>
>> Is something wrong in my code or it is a Jira issue?
>>
>> Thanks
>> Eugen
>>
>> -
>> 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

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



'bootstrap/popover' Module

2013-11-14 Thread Eugen
Good day,
when I try to require the bootstrap/popover Module I become an error
in Firefox console:

[22:05:14.435] "RequireJS error: scripterror: Script error for:
bootstrap/popover
http://requirejs.org/docs/errors.html#scripterror, modules bootstrap/popover"

the tml file:
 Complete»

the java call failed:
void afterRender(){
javaScriptSupport.require("test").invoke("PopOver").with("complete");
}

this call works fine:
void afterRender(){
javaScriptSupport.require("test").invoke("ToolTip").with("complete");
}

the wrapper for ToolTip and PopoOver test.js module:
(function() {
define ("test", ["jquery", "t5/core/console", "require"] ,
function( $, console, require) {
var ToolTip, PopOver, exports;

ToolTip = function(elementId, params) {
require(["bootstrap/tooltip"], function(){
var element = $("#"+elementId);
if (!element) {
console.error("Element "+elementId+" not found");
return;
}
if (params)
element.tooltip(params);
else
element.tooltip();
});
};

PopOver = function(elementId, params) {
require(["bootstrap/popover"], function(){
var element = $("#"+elementId);
if (!element) {
console.error("Element "+elementId+" not found");
return;
}
if (params)
element.popover(params);
else
element.popover('show');
});
}

return exports = {
ToolTip : ToolTip,
PopOver: PopOver
};
});

}).call(this);

If the PopOver module is contributed manually in Appmodule all works
fine (the module name should be other name that popover!):
@Contribute(ModuleManager.class)
public static void setupBaseModules(MappedConfiguration configuration,
@Path("${" +
SymbolConstants.BOOTSTRAP_ROOT + "}/js/popover.js")
    Resource popover)
{
configuration.add("bootstrap/popovers", new
JavaScriptModuleConfiguration(popover).dependsOn("bootstrap/tooltip"));
 }

Is something wrong in my code or it is a Jira issue?

Thanks
Eugen

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



Re: Service Injection in @EntityListeners class

2013-11-13 Thread Eugen
Hi Thiago,
thanks for the quick reply
how to manage the instantiation of listener classes?
I'm contributing now the EntityManagerSource with custom
PersistenceUnitConfigurer (to avoid XML configuration) and tried to
add a ClassTransformer instance, but it is never called.

2013/11/13 Thiago H de Paula Figueiredo :
> On Wed, 13 Nov 2013 08:38:05 -0200, Eugen  wrote:
>
>> Hi,
>
>
> Hi!
>
>
>> it is possible to user service injections inside a @EntityListeners
>> annotated class?
>
>
> If you manage to get it instantiated through Tapestry-IoC, yes.
>
> --
> 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
>

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



Service Injection in @EntityListeners class

2013-11-13 Thread Eugen
Hi,
it is possible to user service injections inside a @EntityListeners
annotated class?
I've tried to put the class in app.base, app.entites and app.service
packages, but the injected field is always null.

My code looks like:

public class EntityJpaListener {
@Inject
private SomeServiceservice;

@PrePersist
public void onPrePersist(Object entity) {
if (entity instanceof SomeEntity) {
System.err.println(service); // allways is null
}
}
}

@Entity
@EntityListeners(EntityJpaListener .class)
public class SomeEntity extends EntitySuperclass { // EntitySuperclass
is a @MappedSuperclass
...
}

Thanks
Eugen

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



Re: JPA

2013-10-11 Thread Eugen
ok, You need @Inject in services, in a page @PersistenceContext is enought..

2013/10/11 Andreas Ernst :
> Am 11.10.13 13:13, schrieb Eugen:
>
>> Hi, if You defined more persistence units in Your persistence.xml file
>> you should inject the EntityManager
>>   by
>> @Inject
>> @PersistenceContext(unitName = "unitname")
>
>
> public class Customers {
>
>   @Property
>   private Customer customer;
>   private EntityManagerFactory factory;
>   @Inject
>   @PersistenceContext(unitName = "de.aeits_TapestryWeb_war_1.0-SNAPSHOTPU")
>   private EntityManager entityManager;
>
>
>   @Log
>   public List getCustomers() {
> return
> entityManager.createNamedQuery("Customer.findAll").getResultList();
>   }
> }
>
> org.apache.tapestry5.ioc.internal.OperationException: Field entityManager of
> class de.aeits.tapestryweb.pages.Customers can not be claimed by
> @javax.persistence.PersistenceContext as it is already claimed by @Inject.
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:47)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:76)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java:1116)
>
>
> --
> ae | Andreas Ernst | IT Spektrum
> Postfach 5, 65612 Beselich
> Schupbacher Str. 32, 65614 Beselich, Germany
> Tel: +49-6484-91002 Fax: +49-6484-91003
> a...@ae-online.de | www.ae-online.de
> www.tachyon-online.de
>
> -
> 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: JPA

2013-10-11 Thread Eugen
Hi, if You defined more persistence units in Your persistence.xml file
you should inject the EntityManager
 by
@Inject
@PersistenceContext(unitName = "unitname")

2013/10/11 Andreas Ernst :
> Am 11.10.13 12:55, schrieb Dmitry Gusev:
>
>> Have you read this?
>> http://tapestry.apache.org/integrating-with-jpa.html
>>
>> You should @Inject EntityManager, if you do things right you won't have to
>> create EntityManager instances yourself.
>>
>> Also, saying that you have NPE, it would be nice if you provide us a
>> stacktrace.
>>
>>
>> On Fri, Oct 11, 2013 at 2:48 PM, Andreas Ernst  wrote:
>>
>>> Hi,
>>>
>>> i am playing with JPA, but there is no useful information about that. A
>>> simple example to display a database table.
>>>
>>> The entities class is in the right package entities. I did not added
>>> something to the AppModule class. The persistence.xml exists.
>>>
>>> Customer.tml
>>>
>>> >>
>>> xmlns:t="http://tapestry.**apache.org/schema/tapestry_5_**3.xsd
>>> "
>>>xmlns:p="tapestry:parameter">
>>>
>>> 
>>>
>>>
>>> Customers.class
>>>
>>> public class Customers {
>>>
>>>@Property
>>>private Customer customer;
>>>private EntityManagerFactory factory;
>>>private EntityManager entityManager;
>>>@Inject
>>>private Logger logger;
>>>@Inject
>>>private BeanModelSource beanModelSource;
>>>@Inject
>>>private Messages messages;
>>>
>>>@Log
>>>public List getCustomers() {
>>>  factory = Persistence.**createEntityManagerFactory("**
>>> de.aeits_TapestryWeb_war_1.0-**SNAPSHOTPU");
>>>  entityManager = factory.createEntityManager();
>>>  return entityManager.**createNamedQuery("Customer.**
>>> findAll").getResultList();
>>>}
>>> }
>>>
>>>
>>> What about the DAO and DAOImpl there are no informations how to use this
>>> classes with a simple query page.
>>>
>>> In all docus i found only
>>> 'entityManager.**createNamedQuery("Customer.**findAll").getResultList();'
>>> is needed, but i get a null pointer expection.
>
>
> Yes, i read that.
>
>
> public class Customers {
>
>   @Property
>   private Customer customer;
>   @Inject
>   private EntityManager entityManager;
>
>   public List getCustomers() {
> return
> entityManager.createNamedQuery("Customer.findAll").getResultList();
>   }
> }
>
> java.lang.RuntimeException: Unable to locate a single EntityManager. You
> must provide the persistence unit name as defined in the persistence.xml
> using the @PersistenceContext annotation.
> at
> org.apache.tapestry5.internal.jpa.JpaInternalUtils.getEntityManager(JpaInternalUtils.java:92)
> at
> org.apache.tapestry5.internal.jpa.EntityManagerObjectProvider$1.createObject(EntityManagerObjectProvider.java:62)
>
>
> --
> ae | Andreas Ernst | IT Spektrum
> Postfach 5, 65612 Beselich
> Schupbacher Str. 32, 65614 Beselich, Germany
> Tel: +49-6484-91002 Fax: +49-6484-91003
> a...@ae-online.de | www.ae-online.de
> www.tachyon-online.de
>
> -
> 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: Method de.aeits.tapestryweb.pages.Index.onActionFromStart() references component id 'Start' which does not exist.

2013-10-08 Thread Eugen
Hi,
post Your Index.tml file,
do You have something like

  start guessing

in Your page?

2013/10/8 Andreas Ernst :
> Hi,
>
> i just start with Tapestry:
>
> http://tapestry.apache.org/implementing-the-hi-lo-guessing-game.html
>
>
> package de.aeits.tapestryweb.pages;
>
> import java.util.Date;
> import org.apache.tapestry5.annotations.*;
> import org.apache.tapestry5.ioc.annotations.*;
> import org.apache.tapestry5.corelib.components.*;
> import org.apache.tapestry5.SymbolConstants;
> import org.apache.tapestry5.alerts.AlertManager;
>
> /**
>  * Start page of application TapestryWeb.
>  */
> public class Index {
>
>   [...]
>
>   void onActionFromStart() {
>   }
> }
>
> After adding the method onActionFromStart() i got this error:
>
> An unexpected application exception has occurred.
>
> Method de.aeits.tapestryweb.pages.Index.onActionFromStart() references
> component id 'Start' which does not exist.
>
> --
> ae | Andreas Ernst | IT Spektrum
> Postfach 5, 65612 Beselich
> Schupbacher Str. 32, 65614 Beselich, Germany
> Tel: +49-6484-91002 Fax: +49-6484-91003
> a...@ae-online.de | www.ae-online.de
> www.tachyon-online.de
>
> -
> 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: many checklist's with one selected list

2013-10-06 Thread Eugen
Hi Thiago,
thanks for Your help!!!
the checklists works fine now, each checklist has its own list of
enums and in processSubmission() of the parent component all list are
merged and copied back  to desired list.


Best regards
Eugen

2013/9/28 Thiago H de Paula Figueiredo :
> On Fri, 27 Sep 2013 18:39:46 -0300, Eugen  wrote:
>
>> The mean of the grouping is only for display: each group becomes a
>> caption and is placed in a separate column, but the selected list to
>> persist should be unique
>> All would be nice if the checklist would append to the list and not empty
>> it...
>
>
> Then you're asking for a component (Checklist) to do what it was never
> supposed to do.
>
>
>> One option would be to to have separate lists for each group and to
>> merge they all in one list by form submition, but I would like to make
>> a component from the checklists and inject it in a form, in this case
>> the componet should be parametrized with more lists parameters that is
>> redundant...
>
>
> It wouldn't be redundant. You need one parameter for the list to be set and
> another for the options. Inside your component, you'll have three different
> lists edited by different Checklist component instances.
>
>
>> what would be an alternative to do that?
>
>
> I don't think so. You have a very specific requirement.
>
>
> --
> Thiago H. de Paula Figueiredo
>
> -
> 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: many checklist's with one selected list

2013-09-27 Thread Eugen
The mean of the grouping is only for display: each group becomes a
caption and is placed in a separate column, but the selected list to
persist should be unique
All would be nice if the checklist would append to the list and not empty it...

One option would be to to have separate lists for each group and to
merge they all in one list by form submition, but I would like to make
a component from the checklists and inject it in a form, in this case
the componet should be parametrized with more lists parameters that is
redundant...

what would be an alternative to do that?

the complete example:

public enum RiskType {
NONE, AGE, SEX, SMOKING, LIPID_METHABOLISM, GENETIC, ADIPOSIS,
GLUCOSE_INTOLERANCE, HYPERTROPHY, SCLEROSIS, HIGH_CREATININ,
ALBUMINURIA, CREATININCLEARANCE, HIGH_PULSWAVE, HIGH_ABI_INDEX,
DIABETES, CEREBROVASCULAR_DISEASE, CARDIAC_DISEASE, KIDNEY_DISEASE,
VASCULAR_DISEASE, RETINOPATHY}

public enum RiskGroup {
CARDIOVASCULAR_NO_RISK(new RiskType[] { RiskType.NONE }),
CARDIOVASCULAR_SIMPLE_RISK(new RiskType[] { RiskType.AGE,
RiskType.SEX, RiskType.SMOKING, RiskType.LIPID_METHABOLISM,
RiskType.GENETIC, RiskType.ADIPOSIS, RiskType.GLUCOSE_INTOLERANCE }),
CARDIOVASCULAR_TARGET_ORGAN(new RiskType[] { RiskType.HYPERTROPHY,
RiskType.SCLEROSIS, RiskType.HIGH_CREATININ ,RiskType.ALBUMINURIA
,RiskType.CREATININCLEARANCE, RiskType.HIGH_PULSWAVE,
RiskType.HIGH_ABI_INDEX}),
CARDIOVASCULAR_DIABETES(new RiskType[] { RiskType.DIABETES}),
CARDIOVASCULAR_ACC(new RiskType[]
{RiskType.CEREBROVASCULAR_DISEASE, RiskType.CARDIAC_DISEASE,
RiskType.KIDNEY_DISEASE, RiskType.VASCULAR_DISEASE,
RiskType.RETINOPATHY});

private final Listrisks;

RiskGroup(RiskType[] risks) {
this.risks = Arrays.asList(risks);
}
public RiskType[] getRisks() {
return this.risks.toArray(new RiskType[] {});
}
}

RiskSelect.tml


${message:no-risk-group-label}




${message:simple-risk-group-label}




${message:target-organ-group-label}




${message:diabetes-group-label}




${message:acc-group-label}



RiskSelect.java
@Property
@Parameter
Patientpatient;

@Inject
TypeCoercertypeCoercer;

@Inject
Messagesmessages;

@Environmental
private FormSupportformSupport;

public ValueEncoder getEncoder() {
return new EnumValueEncoder(typeCoercer, RiskType.class);
}

public SelectModel getRiskModel(String riskGroup) {
List optionModel = new ArrayList();
for (RiskType riskType : RiskGroup.valueOf(riskGroup).getRisks()) {
optionModel.add(new
OptionModelImpl(messages.get(riskType.name() + "-label"), riskType));
}
return new SelectModelImpl(null, optionModel);
}

And the page tml:

...




The next step would be render the checklists in a loop based on
groups, so any changes in the Enums would be displayed automatically

2013/9/27 Thiago H de Paula Figueiredo :
> On Fri, 27 Sep 2013 17:24:36 -0300, Eugen  wrote:
>
>> Hi,
>
>
> Hi!
>
>
>> it is possible to bind the same list of enums to many checklist
>> components inside one form?
>
>
> Why do you want to do that? I'm not sure how editing three times the same
> list in the same form makes sense. Why don't you have three different list
> instances to edit, all them having the same
>
>
>> Actually on form submit all selected values froun GroupB and C are
>> ignored and the listOfA contains only values from GroupD.
>
>
> That's the expected behavior. The first Checklist instance sets the list,
> then the second sets the same list, then the third does the same. It's the
> same as this:
>
> List selected = ...;
> List list = ...;
> list = selected;
> list = selected;
> list = selected;
>
> --
> Thiago H. de Paula Figueiredo
>
> -
> 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



many checklist's with one selected list

2013-09-27 Thread Eugen
Hi,
it is possible to bind the same list of enums to many checklist
components inside one form?
My scenario is follow:
1 given are an enum:
enum A{ BA, BB, CA, CB, DA, DB}
2. the second enum split the enum A in more groups
private List enums;
enum Group(A[]) {
   B({BA, BB}},
   C({CA,CB}),
   D({DA,DB})};
3. Form:
 
 
 

Actually on form submit all selected values froun GroupB and C are
ignored and the listOfA contains only values from GroupD.

Thanks
Eugen

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



Re: dynamically revealing a block

2013-09-27 Thread Eugen
Hi,
see bootstrap collapse module http://getbootstrap.com/javascript/#collapse

2013/9/27 John :
> Hi,
>
> I'd like to display a division and then when the user clicks in it have am 
> inner part of it appear/expand.
>
> It's for use in a mail reader style page where the user sees the last message 
> from someone but can click to see the whole conversation.
>
> Any ideas how to Tapestry this?
>
> regards,
> John

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



Re: Renaming options in select menu using .properties

2013-09-19 Thread Eugen
Hi,
which select model are You using?
if You use an EnumSelectModel the client side caption is build as follow:
Enum.class.getSimpleName()+"."+Enum.name()


2013/9/19 George Christman :
> Hello, I'm wondering if anybody knows how to rename the options in a select
> menu using .properties or some other method. I currently have true false in
> the menu and that needs to be changed to Y N.
>
> Thanks,
> George

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



Re: Redirection afer ajax call when session timeout.

2013-09-18 Thread Eugen
if the client should be redirected on an event (click) after timeout
happen, You can try to contribute the MasterDispatcher to do a refresh
(or a redirect) if session not exists. See
http://stackoverflow.com/questions/3733277/session-timeout-ajax-error-in-tapestry-application

2013/9/18 ANDRE Christophe :
> I tried with href but same thing.
>
> Yes the method is called (checked with firebug). But nothing happens.
> I don't know if this has to do with it, but I got the same kind of weird 
> behavior when I do a javascript callback to show an alert from a java applet. 
> The method is called but the alert is never shown.
>
> I have no idea how to debug this.
> This is a pity cause this is exactly what I need.
>
> Ce message et toutes les pieces jointes (ci apres le message) sont etablis a 
> l intention exclusive de leurs destinataires.
> Si vous recevez ce message par erreur, merci de le detruire et d en avertir 
> immediatement l expediteur par e mail.
> Toute utilisation de ce message non conforme a sa destination, toute 
> diffusion ou toute publication, totale ou partielle, est interdite, sauf 
> autorisation expresse de l expediteur.
> Les communications sur Internet n etant pas securisees, DOCAPOST BPO informe 
> qu elle ne peut accepter aucune responsabilite quant au contenu de ce message.

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



Re: Redirection afer ajax call when session timeout.

2013-09-18 Thread Eugen
try
window.location.href = xhr.getResponseHeader("Location");

2013/9/18 ANDRE Christophe :
> I tryed with this:
>
>
>
> $(document).ajaxComplete(function(event, xhr, options){
>
>  if (xhr && xhr.getResponseHeader("Location")) {
>
>  window.location = xhr.getResponseHeader("Location");
>
>  }
>
> });
>
>
>
> When I look at the request I get the following :
>
>
>
> 00:02:29.263  0.073 2319  343 POST 302 
> Redirect to: https://127.0.0.1/MyAppli/deconnexion
> https://127.0.0.1/MyAppli/index.myform;jsessionid=6376670D522BEF74BD713B8270144A61
>
> 00:02:29.352  0.007 652 984 GET200 
> text/htmlhttps://127.0.0.1/MyAppli/deconnexion
>
>
>
> It’s looks pretty good but nothing happens on m web page, and I can’t see my 
> deconnexion page.
>
> Ce message et toutes les pieces jointes (ci apres le message) sont etablis a 
> l intention exclusive de leurs destinataires.
> Si vous recevez ce message par erreur, merci de le detruire et d en avertir 
> immediatement l expediteur par e mail.
> Toute utilisation de ce message non conforme a sa destination, toute 
> diffusion ou toute publication, totale ou partielle, est interdite, sauf 
> autorisation expresse de l expediteur.
> Les communications sur Internet n etant pas securisees, DOCAPOST BPO informe 
> qu elle ne peut accepter aucune responsabilite quant au contenu de ce message.

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



Re: Redirection afer ajax call when session timeout.

2013-09-18 Thread Eugen
Hi,
another option is to manage the Timeout in Javascript
on each render of the layout component Yout pass to a Javascript
function the maxInactiveInterval of the session and on Javascript side
starts an Timer with count down function. When the maxInactiveInterval
value is 0, a window.location.href = "/timeout"; is called.

Javascript module:
(function() {
define ([] , function() {
var exports, timeout, tick, init;
var remaining = 0;
var timer;

timeout = function() {
window.location.href = "/timeout";
};

tick = function() {
remaining = Number(remaining);

remaining = remaining - 1;
if (remaining <= 0) {
window.clearInterval(timer);
timeout();
};
};

init = function(timeoutInterval){
remaining = timeoutInterval;
timer = window.setInterval(tick, 1000);
 };

return exports = {
init : init
};

});
}).call(this);

Layout component:
@AfterRender
void afterRender() {
Session session = request.getSession(false);
if (session != null) {

javaScriptSupport.require("SessionInfo").invoke("init").with(session.getMaxInactiveInterval());
}
}

2013/9/18 Michael Gagauz :
> Another options to return from page/component event:
> 1. Link object
> 2. String with page url
> 3. JSON containing {redirectURL:"/desired/location"}
>
>
> 18.09.2013 16:22, ANDRE Christophe пишет:
>>
>> Hi,
>>
>>
>> I have an application that use a lot of Ajax.
>> When my session has expired, my server redirect me on my deconnexion page.
>> (Spring web do it)
>> The problem is if I get redirected after an Ajax call, nothing happens. (I
>> guess the client wait for an ajax answer and not for a redirection)
>>
>> How could I solve this?
>>
>> Thx,
>>
>> Christophe
>>
>> Ce message et toutes les pieces jointes (ci apres le message) sont etablis
>> a l intention exclusive de leurs destinataires.
>> Si vous recevez ce message par erreur, merci de le detruire et d en
>> avertir immediatement l expediteur par e mail.
>> Toute utilisation de ce message non conforme a sa destination, toute
>> diffusion ou toute publication, totale ou partielle, est interdite, sauf
>> autorisation expresse de l expediteur.
>> Les communications sur Internet n etant pas securisees, DOCAPOST BPO
>> informe qu elle ne peut accepter aucune responsabilite quant au contenu de
>> ce message.
>>
>
> -
> 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 do I @Import a core css library?

2013-09-13 Thread Eugen
Hi,
the core css library are imported automatically, if You want to override
some styles, you should import it after importing of Autocomplete.css, it
could be made in CleanupRender phase:
@CleanupRender
@Import(stylesheet = {
"classpath:/META-INF/assets/MyAutocompleteOverrides.css" })
void cleanupRender() {
}

Regards
Eugen


2013/9/13 George Christman 

> Hello, I'm using t5.4.20 and I'm working on building a custom autocomplete
> component and I'm looking to import the autocomplete.css in the core. Does
> anybody know how to access this library?
>


Re: [5.4] LinkSubmit Client-side Validation Broken

2013-09-04 Thread Eugen
Hi,
For me the client side validation by LinkSubmit also does not work. I use
the last version of tapestry - 5.4-alpha-16


Eugen


2013/9/4 Boris Horvat 

> For me everything works as it should
>
>
> On Wed, Sep 4, 2013 at 12:08 PM, Peter Hvass  wrote:
>
> > Hello,
> >
> >
> > Just wanted to follow up on this; we're still experiencing this issue,
> > wondering if anyone has a moment to
> > try and reproduce this on their end too?
> >
> >
> > Thanks,
> > Peter
> >
> > - Original Message -
> >
> > From: "Peter Hvass" 
> > To: "Tapestry users" 
> > Sent: Thursday, August 29, 2013 4:02:03 PM
> > Subject: [5.4] LinkSubmit Client-side Validation Broken
> >
> > Hello,
> >
> >
> > Just wanted to check if anyone else can reproduce this before I post an
> > issue;
> >
> >
> > Example tml;
> >
> > 
> > http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
> > 
> > Bob
> > 
> > 
> > 
> > 
> > Link Submit
> > 
> > 
> > 
> > 
> >
> >
> > Example java;
> > @Property
> >
> > private String bob_;
> >
> >
> > Clicking the linksubmit causes a POST regardless of the client-side
> > validation on textfield bob, and when the page reloads we see the
> > validation message.
> > Clicking the submit causes no POST and client-side validation appears
> > immediately.
> >
> >
> > Hope someone can help confirm this as an issue!
> >
> >
> > Thanks,
> > Peter
> >
>
>
>
> --
> Sincerely
> *Boris Horvat*
>


Re: Autocomplete Mixin with bootstrap3

2013-09-04 Thread Eugen
ups...
i uploaded the image to: http://imagesup.net/?di=913782968996

Thanks


2013/9/4 Thiago H de Paula Figueiredo 

> **
> On Wed, 04 Sep 2013 04:57:43 -0300, Eugen  wrote:
>
> Hi all,
>
>
> Hi!
>
> a have a layout problem with an TextField decorated with Autocomplete
> mixin.
> The .tml:
>
>   
>   State
>   
>   
>   
>  Country
>t:mixins="autocomplete" />
>   
>  
> The mixin is working fine, but follow layout is produced:
> [image: Встроенное изображение 1]
>
>
> The image wasn't included in the message.
>
> How can this be fixed?
>
>
> CSS, very probably.
>
> --
> Thiago H. de Paula Figueiredo
>


Autocomplete Mixin with bootstrap3

2013-09-04 Thread Eugen
Hi all,
a have a layout problem with an TextField decorated with Autocomplete mixin.
The .tml:
   
  
  State
  
  
  
 Country
  
  
 
The mixin is working fine, but follow layout is produced:
[image: Встроенное изображение 1]
How can this be fixed?

Thanks
Eugen