Re: Tapestry 5.4.1 Confirm mixin prevents onSuccessFrom... event from working

2016-12-07 Thread George Ludwig
I did some experimenting and discovered that the confirm mixin works fine
for things like an actionlink, but it doesn't work on a form button. Is
this intended behavior? I was able to hack around it by styling an action
link to look like a button and putting it outside of my form. In this case
works ok given that the only time I need a confirm dialog is for the Delete
action.

But I can't help but wonder if it isn't supposed to work on a form button...

On Fri, Nov 11, 2016 at 11:44 AM, George Ludwig 
wrote:

> Hi all,
>
> I've got a pretty simple test project in Tap 5.4.1. Everything works as
> expected, but when I add the built-in Confirm mixin to a component form,
> the onSuccessFrom... event does not work. The confirm dialog works as
> expected, but when I click ok, nothing happens (Other than the confirm
> dialog going away). I also tried a confirm mixin from 5.3.8, but that
> didn't work at all (no dialog box).
>
> Anyone else experienced this? Thoughts?
>
> EventEditor.tml:
>
> http://tapestry.apache.org/schema/tapestry_5_3.xsd";
> xmlns:p="tapestry:parameter" class="EventEditor">
>
>
> 
> 
> 
>  t:model="eventModel">
> 
> 
>  t:mixins="TextboxHint" t:hintText="Event Name" t:hintColor="#d3d3d3" />
> 
> 
> 
>  t:size="16" t:mixins="TextboxHint" t:hintText="Default Phone Number"
> t:hintColor="#d3d3d3" />
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  t:id="delete"  t:mixins="Confirm" Confirm.message="Are you sure? This will
> delete this event and any other data associated with it!"/>
> 
> 
> 
>
> 
>
>
> EventEditor.java
>
> package com.hightechknowledge.components;
>
> import org.apache.tapestry5.annotations.Component;
> import org.apache.tapestry5.annotations.Parameter;
> import org.apache.tapestry5.annotations.Persist;
> import org.apache.tapestry5.annotations.Property;
> import org.apache.tapestry5.beaneditor.BeanModel;
> import org.apache.tapestry5.corelib.components.Form;
> import org.apache.tapestry5.ioc.Messages;
> import org.apache.tapestry5.ioc.annotations.Inject;
> import org.apache.tapestry5.services.BeanModelSource;
>
> import com.georgeludwigtech.CEUPDQ.data.Event;
> import com.hightechknowledge.helpers.EventDisplayWrapper;
> import com.hightechknowledge.services.EventDAO;
>
> public class EventEditor {
>
> @Inject
> private EventDAO eventDAO;
>
> @Component(id = "eventForm")
> private Form eventForm;
>
> @Property
> @Parameter
> private String eventId;
> @Parameter
> private Object returnPage;
>
>
> @Inject
> private BeanModelSource beanModelSource;
> @Inject
> private Messages messages;
> @Property
> private BeanModeleventModel;
> @Persist
> private EventDisplayWrapper event; // the current event being viewed/edited
> void setupRender() throws Exception {
> eventModel = beanModelSource.createDisplayModel(EventDisplayWrapper.class,
> messages);
> eventModel.include("name", "defaultPhoneNumber", "startDate", "endDate");
> if(eventId==null&&event==null) {
> createNewEvent();
> eventId=event.getEventId();
> } else if(event==null) {
> Event e=eventDAO.findById(eventId);
> event=new EventDisplayWrapper(e);
> }
> }
>
> public EventDisplayWrapper getEvent() {
> if(event==null)
> setEvent(new EventDisplayWrapper());
> return event;
> }
>
> public void setEvent(EventDisplayWrapper event) {
> this.event=event;
> }
>
> @Persist
> private boolean save;
>
> void onSelectedFromSave() {
> save = true;
> delete = false;
> }
>
> @Persist
> private boolean delete;
>
> void onSelectedFromDelete() {
> delete = true;
> save = false;
> }
> void onConfirm() {
> return;
> }
>
> Object onSuccessFromEventForm() throws Exception {
> if (save)
> saveEvent();
> else if (delete) {
> deleteEvent();
> return returnPage;
> }
> return null;
> }
>
> private void saveEvent() throws Exception {
> //
> Event e=new Event(event);
> eventDAO.update(e);
> }
>
> private void deleteEvent() throws Exception {
> //
> eventDAO.delete(event);
> event=null;
> eventId=null;
> }
>
> private void createNewEvent() throws Exception {
> //
> Event e=eventDAO.createNew();
> e.setName("A New Event");
> e.setStart(System.currentTimeMillis());
> e.setEnd(e.getStart()+8640);
> e.setDefaultPhoneNumber("123 555 1212");
> eventDAO.update(e);
> EventDisplayWrapper edw=new EventDisplayWrapper(e);
> setEvent(edw);
> }
>
> }
>
>
>
>


Tapestry 5.4.1 Confirm mixin prevents onSuccessFrom... event from working

2016-11-11 Thread George Ludwig
Hi all,

I've got a pretty simple test project in Tap 5.4.1. Everything works as
expected, but when I add the built-in Confirm mixin to a component form,
the onSuccessFrom... event does not work. The confirm dialog works as
expected, but when I click ok, nothing happens (Other than the confirm
dialog going away). I also tried a confirm mixin from 5.3.8, but that
didn't work at all (no dialog box).

Anyone else experienced this? Thoughts?

EventEditor.tml:

http://tapestry.apache.org/schema/tapestry_5_3.xsd";
xmlns:p="tapestry:parameter" class="EventEditor">





































EventEditor.java

package com.hightechknowledge.components;

import org.apache.tapestry5.annotations.Component;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.beaneditor.BeanModel;
import org.apache.tapestry5.corelib.components.Form;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.BeanModelSource;

import com.georgeludwigtech.CEUPDQ.data.Event;
import com.hightechknowledge.helpers.EventDisplayWrapper;
import com.hightechknowledge.services.EventDAO;

public class EventEditor {

@Inject
private EventDAO eventDAO;

@Component(id = "eventForm")
private Form eventForm;

@Property
@Parameter
private String eventId;
@Parameter
private Object returnPage;


@Inject
private BeanModelSource beanModelSource;
@Inject
private Messages messages;
@Property
private BeanModeleventModel;
@Persist
private EventDisplayWrapper event; // the current event being viewed/edited
void setupRender() throws Exception {
eventModel = beanModelSource.createDisplayModel(EventDisplayWrapper.class,
messages);
eventModel.include("name", "defaultPhoneNumber", "startDate", "endDate");
if(eventId==null&&event==null) {
createNewEvent();
eventId=event.getEventId();
} else if(event==null) {
Event e=eventDAO.findById(eventId);
event=new EventDisplayWrapper(e);
}
}

public EventDisplayWrapper getEvent() {
if(event==null)
setEvent(new EventDisplayWrapper());
return event;
}

public void setEvent(EventDisplayWrapper event) {
this.event=event;
}

@Persist
private boolean save;

void onSelectedFromSave() {
save = true;
delete = false;
}

@Persist
private boolean delete;

void onSelectedFromDelete() {
delete = true;
save = false;
}
void onConfirm() {
return;
}

Object onSuccessFromEventForm() throws Exception {
if (save)
saveEvent();
else if (delete) {
deleteEvent();
return returnPage;
}
return null;
}

private void saveEvent() throws Exception {
//
Event e=new Event(event);
eventDAO.update(e);
}

private void deleteEvent() throws Exception {
//
eventDAO.delete(event);
event=null;
eventId=null;
}

private void createNewEvent() throws Exception {
//
Event e=eventDAO.createNew();
e.setName("A New Event");
e.setStart(System.currentTimeMillis());
e.setEnd(e.getStart()+8640);
e.setDefaultPhoneNumber("123 555 1212");
eventDAO.update(e);
EventDisplayWrapper edw=new EventDisplayWrapper(e);
setEvent(edw);
}

}


Re: T5.3.8 ClassNotFound error ONLY when running on a virtualized server?!

2016-01-18 Thread George Ludwig
Andreas, yes, I am 100% certain that the specific directories are readable
and writable by Tomcat. In fact, prior to this exception being thrown, a
different file is successfully read and written.

Still scratching my head.

On Mon, Jan 18, 2016 at 12:04 PM, Andreas Fink 
wrote:

> Hi George.
>
> Are you sure the specific directory and its content is readable by Tomcat?
> Maybe some File-specific exceptions get silently catched on the way and
> substituted with 'null' instead of empty array.
>
> Just my 2c.
>
> Cheers,
> Andi.
>
> On 18 Jan 2016, at 2:06 , George Ludwig  wrote:
>
> > At that
> > time it's trying to convert a Set of files to a List of files, and I can
> > see that the directory that is being listed clearly has files, so the NPE
> > should never have been thrown.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


T5.3.8 ClassNotFound error ONLY when running on a virtualized server?!

2016-01-17 Thread George Ludwig
I'm trying to move a Tapestry app to the cloud, and came across this
confounding error. I'm running Tomcat 7 and JDK 7 on CentOS. The war file
works fine in my lab running on a bare metal CentOS 6.5 box, but when I run
it in the cloud (RackSpace) on CentOS 6.7 or 7.2 (my only CentOS options),
it blows up, showing me this error in the browser:

   type Exception report
   message Unable to locate class file for
'com.sixbuilder.ui.pages.ExceptionReport' in class load
   org.apache.tapestry5.internal.plastic.PlasticClassLoader@25f5298.

What's weird is that during Tapestry boot-up, it lists the ExceptionReport
as being an available resource, so obviously it can find the class. The
ExceptionReport is a special page to be displayed when an un-handled
exception is thrown in the UI.

Which brings me to the other weird thing, which is that Tapestry was trying
to display the ExceptionReport page as a result of a null pointer
exception, which should never have been thrown in the first place. At that
time it's trying to convert a Set of files to a List of files, and I can
see that the directory that is being listed clearly has files, so the NPE
should never have been thrown. Other parts of the app were able to access
the local file system before this exception is thrown, so it's not a simple
file permissions issue.

At this point the only thing I can think of is that Tapestry is somehow not
liking the virtualized server. Has anyone encountered this?

The entire stack trace:

[ERROR] pages.Home Render queue error in Expansion[PropBinding[expansion
Home(LastMaintenanceCompletionDate)]]:
org.apache.tapestry5.ioc.internal.util.TapestryException
org.apache.tapestry5.ioc.internal.util.TapestryException [at
classpath:com/sixbuilder/ui/pages/Home.tml, line 375]
at
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:65)
at
org.apache.tapestry5.internal.structure.ExpansionPageElement.render(ExpansionPageElement.java:45)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)
at $PageRenderQueue_96598da390b9.render(Unknown Source)
at $PageRenderQueue_96598da390b8.render(Unknown Source)
at
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at com.sixbuilder.ui.services.AppModule$2.renderMarkup(AppModule.java:171)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:1977)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1959)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1944)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1930)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at
org.got5.tapestry5.jquery.services.js.JSModule$1.renderMarkup(JSModule.java:40)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at
com.trsvax.bootstrap.services.BootstrapModule$2.renderMarkup(BootstrapModule.java:197)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1912)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1893)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at
com.trsvax.bootstrap.services.BootstrapModule$1.renderMarkup(BootstrapModule.java:188)
at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
at $MarkupRenderer_96598da390b7.renderMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
at $PageMarkupRenderer_96598da390b5.renderPageMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
at $PageResponseRenderer_96598da39018.renderPageResponse(Unknown Source)
at
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64)
at
org.apache.tapestry5.services.TapestryModule$38.handle(TapestryModule.java:2221)
at $PageRenderRequestHandler_96598da3901a.handle(Unknown Source)
at $PageRenderRequestHandler_96598da39014.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_96598da39015.handlePageRender(Unknown Source)
at $ComponentRequestHandler_96598da38fd3.handlePageRender(Un

Anyone implemented Braintree recurring payments in Tapestry?

2015-07-08 Thread George Ludwig
I'm asking, because I'm up to my elbows in it.

What's the most straightforward way to get the payment nonce back to the
server? I figure it has to do with creating an event link via javascript
support, but I'm unclear on the details.

If anyone has done anything similar and can point to an example, I'd much
appreciate it!

-George


alternative a better validation decorator?

2013-11-30 Thread George Ludwig
I've been trying to integrate Bootstrap's modal dialog as a Tapestry
validation decorator, but not having a lot of luck.

Has anyone successfully done anything similar? My goal is to have a
validation error box appear when there is a problem with the field; the
user clicks ok and it goes away. My issue with the stock validation error
box is that it inserts the box in to the page design, and the display gets
out of whack with the error div in it.

If there is a better alternative to accomplish a similar goal, I'd love to
hear about it!

-George


Re: how to configure jquery/autocomplete for ssl?

2013-09-17 Thread George Ludwig
Thanks for the tip, however that still did not resolve the issue. What I
eventually found was a ZoneUpdater mixin based on this:
http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html

Anyway, for some reason the ZoneUpdater mixin needs to be explicitly told
to use a secure transport, even though it gets the callback from component
resources:

(from the ZoneUpdater code)
 String listenerURI = componentResources.createEventLink(event,
context).toAbsoluteURI(secure);

Anyway, I fixed it by creating a page method that returns whether or not
it's in ssl mode, and use that flag for the ZoneUpdater "secure" parameter.



On Tue, Sep 17, 2013 at 5:48 AM, Michael Gagauz  wrote:

> Hi.
> Make sure you added  SymbolConstants.SECURE_ENABLED to your app
> configuration.
>
> In AppModule there should be method:
>
> protected static void contributeApplicationDefaults(**final
> MappedConfiguration configuration) {
> configuration.add(**SymbolConstants.SECURE_**ENABLED, "true");
>
>
> 17.09.2013 13:07, George Ludwig пишет:
>
>  I recently secured my webapp using an ssl certificate. Everything is
>> great,
>> except the jquery/autocomplete mixin generates an ajax url with an http
>> protocal, rather than an https protocol, causing the ajax call to fail.
>>
>> Is there an easy way to configure the protocol used?
>>
>>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


how to configure jquery/autocomplete for ssl?

2013-09-17 Thread George Ludwig
I recently secured my webapp using an ssl certificate. Everything is great,
except the jquery/autocomplete mixin generates an ajax url with an http
protocal, rather than an https protocol, causing the ajax call to fail.

Is there an easy way to configure the protocol used?


Re: What's an elegant way to set the source dir for jquery/showSource?

2013-07-28 Thread George Ludwig
Thanks so much Lance!


On Fri, Jul 26, 2013 at 1:23 PM, Lance Java wrote:

> Oh, and in your webapp, you include src/main/java as a resources directory
> and they will make it onto your classpath too
> https://github.com/uklance/tapestry-stitch-demo/blob/master/pom.xml#L46
>
>
> On 26 July 2013 21:20, Lance Java  wrote:
>
> > I do this in tapestry stitch... you're welcome to steal my code component
> >
> > Demo here:
> > http://tapestry-stitch.uklance.cloudbees.net/codedemo
> >
> > Basically, you use the maven-source-plugin to generate a source artifact
> > for your component library. You then include the source artifact as a
> > dependency in your webapp (classifier=sources). Then the source code is
> on
> > your classpath and you can reference it as a classpath asset.
> >
> > https://github.com/uklance/tapestry-stitch/blob/master/pom.xml#L73
> > https://github.com/uklance/tapestry-stitch-demo/blob/master/pom.xml#L16
> >
> >
> >
> >
> > On 25 July 2013 18:49, George Ludwig  wrote:
> >
> >> I have a few Tapestry 5.3.x component projects. As part of the test
> code,
> >> there is a webapp that uses jquery/showSource, to display the source of
> >> the
> >> test page to instruct the user on how to use the component. For example,
> >> the tapestry5-highcharts project does exactly this.
> >>
> >> My question is, is there an elegant way to set the source directory for
> >> the
> >> showSource widget? Right now I do something like this in AppModule.java,
> >> in
> >> contributeApplicationDefaults:
> >>
> >>
> >>
> configuration.add("demo-src-dir","/Users/George/Dropbox/etc../myProject/src/test");
> >>
> >> This works, but obviously it's hard-coded. How can I elegantly determine
> >> the source dir and add it to the application defaults within AppModule?
> >> I've tried it using an Asset as well as a Context, but haven't been able
> >> to
> >> make it work.
> >>
> >> -George
> >>
> >
> >
>


What's an elegant way to set the source dir for jquery/showSource?

2013-07-25 Thread George Ludwig
I have a few Tapestry 5.3.x component projects. As part of the test code,
there is a webapp that uses jquery/showSource, to display the source of the
test page to instruct the user on how to use the component. For example,
the tapestry5-highcharts project does exactly this.

My question is, is there an elegant way to set the source directory for the
showSource widget? Right now I do something like this in AppModule.java, in
contributeApplicationDefaults:

configuration.add("demo-src-dir","/Users/George/Dropbox/etc../myProject/src/test");

This works, but obviously it's hard-coded. How can I elegantly determine
the source dir and add it to the application defaults within AppModule?
I've tried it using an Asset as well as a Context, but haven't been able to
make it work.

-George


Re: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread George Ludwig
"And be the first to write an open-source component library on the top of
Raphael. "

I might just do that, I'm getting good at wrapping JS librairies :)


On Tue, Jul 23, 2013 at 2:10 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 23 Jul 2013 18:01:17 -0300, George Ludwig 
> wrote:
>
>  The jQuery stuff turns out to be fine, I just include the tap5-jquery
>> project and that seems to fix that. But since no one has ported
>> Raphael.js to Tapestry,
>>
>
> There's no such thing as porting JavaScript code to Tapestry. tap5-jquery
> goes way beyond just including jQuery in your page. It [1] rewrites the
> Tapestry components, which are written in Prototype, in jQuery, and [2]
> also provides some other interesting stuff like components and mixins built
> on the top of jQuery stuff. Of course, for Tapestry 5.4, [1] will not be
> needed anymore, but [2] will continue as interesting and useful as it's for
> T5.3.
>
>
>  I put that in my assert folder. But it makes me pause to think about how
>> to better handle these things.
>>
>
> Put it in the classpath instead, as it's a component library what you're
> saying you're doing.
> And be the first to write an open-source component library on the top of
> Raphael. This way, probably everyone who needs Raphael in a Tapestry
> application will your library. ;)
>
>
>  I suppose it's not worth worrying about until someone includes Raphael as
>> part of another project, and it causes problems...
>>
>
> For this specific concern, wait for it to happen first, as I think it
> would be very improbable of you using two different component libraries
> using a niche JS library as Raphael.
>
>
> --
> 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: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread George Ludwig
The jQuery stuff turns out to be fine, I just include the tap5-jquery
project and that seems to fix that. But since no one has ported Raphael.js
to Tapestry, I put that in my assert folder. But it makes me pause to think
about how to better handle these things.

I suppose it's not worth worrying about until someone includes Raphael as
part of another project, and it causes problems...

Thanks!

-George



On Tue, Jul 23, 2013 at 1:54 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 23 Jul 2013 17:36:09 -0300, George Ludwig 
> wrote:
>
>  I'm on 5.3...is 5.4 stable enough to use?
>>
>
> It's still an alpha, so I don't think it's ready for production for very
> serious stuff yet. Of course, if you have a process which includes lots of
> testing, automated and non-automated, the risks of using 5.4 would be
> significantly lower.
>
> Anyway, the problem you're describing is way more of a pure JavaScript one
> than a Tapestry one, as it's about how different JS stuff would deal with
> each other, so I think you're asking in the wrong place.
>
> AFAIK, stuff that uses jQuery don't usually need an specific version of
> it, specially if it jQuery one isn't too old, so I don't think you should
> worry about this until you find some actual problem (which I think it's way
> unlikely).
>
>
> --
> 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: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread George Ludwig
I'm on 5.3...is 5.4 stable enough to use?


On Tue, Jul 23, 2013 at 12:48 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> What Tapestry version? The answer will be different for 5.3 or 5.4.
>
>
> On Tue, 23 Jul 2013 15:59:16 -0300, George Ludwig 
> wrote:
>
>  I'm working on a component project that integrates a JS library with
>> Tapestry. The library has a couple of external dependencies: jQuery,
>> Raphael, as well as it's own CSS file.
>>
>> My question is, what is the best way to handle these dependencies? Do I
>> just put the .js and .css in an asset directory (that's what I'm doing
>> right now)? It makes me wonder what kind of problems I might run in to
>> later on, when the component is used in a project that includes, for
>> example, a conflicting version of jQuery.
>>
>> Should I just not worry, or is there a different way to handle it?
>>
>> -George
>>
>
>
> --
> Thiago H. de Paula Figueiredo
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Best practice for managing JS dependencies in a component project?

2013-07-23 Thread George Ludwig
I'm working on a component project that integrates a JS library with
Tapestry. The library has a couple of external dependencies: jQuery,
Raphael, as well as it's own CSS file.

My question is, what is the best way to handle these dependencies? Do I
just put the .js and .css in an asset directory (that's what I'm doing
right now)? It makes me wonder what kind of problems I might run in to
later on, when the component is used in a project that includes, for
example, a conflicting version of jQuery.

Should I just not worry, or is there a different way to handle it?

-George


Re: guidance with integrating yet another js library as custom component

2013-07-09 Thread George Ludwig
I've got this working pretty well now, but I want to take it to the next
level.

When the user clicks on a node of the graph, I want to trigger a callback
function on the java side. I assume this means attaching a click handler
method in javascript to the nodes...but how do I wire it up so when the js
click handler is invoked, it calls a server side java method?

Looking at this example: http://sigmajs.org/examples/hidden_nodes.html

When a node is clicked, I'd like to execute a server side java call that
receives the node name.

Is there a clear example of this type of integration anywhere I can take a
look at?

-George


On Tue, Jul 9, 2013 at 10:53 AM, George Ludwig wrote:

> Thanks for those links!
>
>
> On Sun, Jul 7, 2013 at 11:00 PM, Geoff Callender <
> geoff.callender.jumpst...@gmail.com> wrote:
>
>> These examples describe the pros and cons of addScript() and
>> addInitializerCall():
>>
>> -
>>
>> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/javascript
>> -
>>
>> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/reusable
>> -
>>
>> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/robust
>>
>> HTH,
>>
>> Geoff
>>
>>
>> On 3 July 2013 06:25, George Ludwig  wrote:
>>
>> > Thanks for the info Thiago!
>> >
>> > >>  Couldn't you just @Import to get the JS files included and
>> > JavaScriptSupport.addScript() to invoke JS functions?
>> >
>> > That's the route I ended up taking to import the necessary js files, but
>> > I'm still unclear on exactly how to use  JavaScriptSupport.addScript()
>> to
>> > create an instance of the sigma viewer. For example, I don't understand
>> > when it's appropriate to use JavaScriptSupport.addInitializerCall()
>> > vs. JavaScriptSupport.addScript()
>> >
>> >
>> >
>> > On Tue, Jul 2, 2013 at 12:01 PM, Thiago H de Paula Figueiredo <
>> > thiag...@gmail.com> wrote:
>> >
>> > > On Tue, 02 Jul 2013 15:35:20 -0300, George Ludwig <
>> > georgelud...@gmail.com>
>> > > wrote:
>> > >
>> > >  I'm working on a custom component of the SigmaJS visualization
>> library (
>> > >> http://sigmajs.org).
>> > >> Specifically, this example: http://sigmajs.org/examples/**
>> > >> gexf_example.html <http://sigmajs.org/examples/gexf_example.html>
>> > >>
>> > >
>> > > Interesting!
>> > >
>> > >
>> > >  I've been studying the got5 examples of js library integration, and
>> they
>> > >> are all pretty complex, and it's a challenge to figure out what I
>> really
>> > >> need to do.
>> > >>
>> > >
>> > > They are complex because the project tapestry-jquery is about
>> > > reimplementing Tapestry's built-in Java in jQuery. You're thinking
>> what
>> > you
>> > > need to do in your example is way too complex than reality. Couldn't
>> you
>> > > just @Import to get the JS files included and
>> > JavaScriptSupport.addScript()
>> > > to invoke JS functions?
>> > >
>> > >
>> > >  I've been working form this tutorial:
>> > >>
>> http://wiki.apache.org/**tapestry/**Tapestry5AndJavaScriptExplaine**d<
>> > http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained
>> >however,
>> > >> it's for a mixin and I'm unclear if there is a material difference
>> > >> between creating a component vs. a mixin.
>> > >>
>> > >
>> > > For the JavaScript part, it's absolutely the same in pages, components
>> > and
>> > > mixins.
>> > >
>> > >
>> > >
>> > >> Any guidance is much appreciated!
>> > >>
>> > >> -George
>> > >>
>> > >
>> > >
>> > > --
>> > > Thiago H. de Paula Figueiredo
>> > >
>> > >
>> --**--**-
>> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<
>> > users-unsubscr...@tapestry.apache.org>
>> > > For additional commands, e-mail: users-h...@tapestry.apache.org
>> > >
>> > >
>> >
>>
>
>


Re: guidance with integrating yet another js library as custom component

2013-07-09 Thread George Ludwig
Thanks for those links!


On Sun, Jul 7, 2013 at 11:00 PM, Geoff Callender <
geoff.callender.jumpst...@gmail.com> wrote:

> These examples describe the pros and cons of addScript() and
> addInitializerCall():
>
> -
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/javascript
> -
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/reusable
> -
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/robust
>
> HTH,
>
> Geoff
>
>
> On 3 July 2013 06:25, George Ludwig  wrote:
>
> > Thanks for the info Thiago!
> >
> > >>  Couldn't you just @Import to get the JS files included and
> > JavaScriptSupport.addScript() to invoke JS functions?
> >
> > That's the route I ended up taking to import the necessary js files, but
> > I'm still unclear on exactly how to use  JavaScriptSupport.addScript() to
> > create an instance of the sigma viewer. For example, I don't understand
> > when it's appropriate to use JavaScriptSupport.addInitializerCall()
> > vs. JavaScriptSupport.addScript()
> >
> >
> >
> > On Tue, Jul 2, 2013 at 12:01 PM, Thiago H de Paula Figueiredo <
> > thiag...@gmail.com> wrote:
> >
> > > On Tue, 02 Jul 2013 15:35:20 -0300, George Ludwig <
> > georgelud...@gmail.com>
> > > wrote:
> > >
> > >  I'm working on a custom component of the SigmaJS visualization
> library (
> > >> http://sigmajs.org).
> > >> Specifically, this example: http://sigmajs.org/examples/**
> > >> gexf_example.html <http://sigmajs.org/examples/gexf_example.html>
> > >>
> > >
> > > Interesting!
> > >
> > >
> > >  I've been studying the got5 examples of js library integration, and
> they
> > >> are all pretty complex, and it's a challenge to figure out what I
> really
> > >> need to do.
> > >>
> > >
> > > They are complex because the project tapestry-jquery is about
> > > reimplementing Tapestry's built-in Java in jQuery. You're thinking what
> > you
> > > need to do in your example is way too complex than reality. Couldn't
> you
> > > just @Import to get the JS files included and
> > JavaScriptSupport.addScript()
> > > to invoke JS functions?
> > >
> > >
> > >  I've been working form this tutorial:
> > >> http://wiki.apache.org/**tapestry/**Tapestry5AndJavaScriptExplaine**d
> <
> > http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained>however,
> > >> it's for a mixin and I'm unclear if there is a material difference
> > >> between creating a component vs. a mixin.
> > >>
> > >
> > > For the JavaScript part, it's absolutely the same in pages, components
> > and
> > > mixins.
> > >
> > >
> > >
> > >> Any guidance is much appreciated!
> > >>
> > >> -George
> > >>
> > >
> > >
> > > --
> > > Thiago H. de Paula Figueiredo
> > >
> > >
> --**--**-
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<
> > users-unsubscr...@tapestry.apache.org>
> > > For additional commands, e-mail: users-h...@tapestry.apache.org
> > >
> > >
> >
>


Re: guidance with integrating yet another js library as custom component

2013-07-09 Thread George Ludwig
Lance,

I've been using, for example:

@Inject @Path("context:/data/filename.gexf")
@Property
private Asset file;

And then I pass this to the JS function:

String ret= file.getResource().getPath();

It's working fine...but is toClientURL() the preferred method?




On Mon, Jul 8, 2013 at 4:44 AM, Lance Java wrote:

> I think you want to @Inject the AssetSource to lookup the Asset. You can
> then call Asset.toClientUrl() to get an href for the asset which you can
> pass to your js library to use.
> On 4 Jul 2013 23:32, "George Ludwig"  wrote:
>
> > Thiago,
> >
> > You're definitely right, it's now a JS issue. I figured out that somehow
> I
> > had downloaded a garbled sigma.parseGexf.js file, which was part of the
> > problem.
> >
> > Quick javascript question: when I pass the filename for parsing to the
> gexf
> > parser, I currently pass it with relationship to the webapp root...but
> > since it still does not render (and everything else looks good right
> now),
> > I'm assuming that I the JS needs a fully qualified local path.
> >
> > Thanks again for your input...
> >
> > -George
> >
> >
> > On Thu, Jul 4, 2013 at 4:22 AM, Thiago H de Paula Figueiredo <
> > thiag...@gmail.com> wrote:
> >
> > > Uncaught SyntaxError: Unexpected token < sigma.parseGexf.js:3
> > >> Uncaught TypeError: Object # has no method 'parseGexf'
> > tap5-sigma.js:24
> > >>
> > >
> > > Are you sure sigma.parseGexf.js is correct? What's in line 24 of
> > > tap5-sigma.js? Anyway, it seems that now this error is completely about
> > > Sigma and JavaScript and not about Tapestry itself. What Tapestry
> version
> > > are you using? JavaScript minification is enabled?
> > >
> > >
> > > On Thu, 04 Jul 2013 01:36:04 -0300, George Ludwig <
> > georgelud...@gmail.com>
> > > wrote:
> > >
> > >  I'm at a point where it seems to me that it really should be working,
> > yet
> > >> I
> > >> get this error in the javascript console:
> > >>
> > >>
> > >> The method it can't find, parseGexf, is in the file
> sigma.parseGexf.js,
> > >> and
> > >> I've included it in the component's java file:
> > >>
> > >> @Import(library={"classpath:**com/intuit/tapestry5/sigmajs/**
> > >> asset/sigma.min.js",
> > >>
>  "classpath:com/intuit/**tapestry5/sigmajs/asset/sigma.**parseGexf.js",
> > >>  "classpath:com/intuit/**tapestry5/sigmajs/asset/tap5-**sigma.js"})
> > >>
> > >>
> > >> Here is the complete javascript file that is being executed in order
> to
> > do
> > >> the initialization:
> > >>
> > >> var sigmajs = Class.create();
> > >> sigmajs.prototype = {
> > >> initialize : function(id, gexfFile) {
> > >>  // Instantiate sigma.js and customize rendering
> > >> var sigInst = sigma.init(document.**getElementById(id)).**
> > >> drawingProperties({
> > >>  <<--- no error is thrown here
> > >> defaultLabelColor : '#fff',
> > >> defaultLabelSize : 14,
> > >> defaultLabelBGColor : '#fff',
> > >> defaultLabelHoverColor : '#000',
> > >> labelThreshold : 6,
> > >> defaultEdgeType : 'curve'
> > >> }).graphProperties({
> > >> minNodeSize : 0.5,
> > >> maxNodeSize : 5,
> > >> minEdgeSize : 1,
> > >> maxEdgeSize : 1
> > >> }).mouseProperties({
> > >> maxRatio : 32
> > >> });
> > >>
> > >> // Parse a GEXF encoded file to fill the graph
> > >> sigInst.parseGexf(gexfFile); <<--- error is thrown
> > >> here
> > >>
> > >> // Draw the graph :
> > >> sigInst.draw();
> > >> }
> > >> }
> > >>
> > >> This seems to be a load order issue, yet I tried swapping the order of
> > >> declaration of sigma.parseGexf.js and sigma.min.js, with the same
> > result.
> > >>
> > >> Any thoughts?
> > >>
> > >> -George
> > >>
> > >>
> > >> On Tue, Jul 2, 2013 at 5:43 PM, George Ludwig  > >> >wrote:
> > >>
> > >>  Cool, thanks a lot!
> > >>>
> > >>>
> > >>

Re: guidance with integrating yet another js library as custom component

2013-07-09 Thread George Ludwig
You were totally right...my brainfart didn't notice that the data files
were in the wrong directory.


On Mon, Jul 8, 2013 at 5:09 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Sun, 07 Jul 2013 16:59:18 -0300, George Ludwig 
> wrote:
>
>  Here's my final (I hope block):
>>
>> What is happening is that when I try to load anyfile.anyextension using
>> javascript, the tapestry app always returns the contents of index page,
>> rather than the contents of the requested file.
>>
>> I also tried loading the file straight from the browser (i.e.,
>> http://localhost:8080/myfile.**ext <http://localhost:8080/myfile.ext>)
>> and it still returns the contents of the
>> index page. It returns the same thing even when I type in a URL for a
>> non-existent file.
>>
>> Is this a tapestry or jetty setting that I've missed?
>>
>
> Are you sure the files is really available at that URL? I don't think
> so.When Tapestry doesn't find a file matching a request, it treats it as a
> page request (render or event). As you probably don't have a page named
> 'myfile', Tapestry thinks you're doing an event request to the Index page.
>
> Make sure you have a correct, valid URL to the file before going ahead.
>
>
> --
> 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: guidance with integrating yet another js library as custom component

2013-07-07 Thread George Ludwig
Here's my final (I hope block):

What is happening is that when I try to load anyfile.anyextension using
javascript, the tapestry app always returns the contents of index page,
rather than the contents of the requested file.

I also tried loading the file straight from the browser (i.e.,
http://localhost:8080/myfile.ext) and it still returns the contents of the
index page. It returns the same thing even when I type in a URL for a
non-existent file.

Is this a tapestry or jetty setting that I've missed?


On Thu, Jul 4, 2013 at 3:32 PM, George Ludwig wrote:

> Thiago,
>
> You're definitely right, it's now a JS issue. I figured out that somehow I
> had downloaded a garbled sigma.parseGexf.js file, which was part of the
> problem.
>
> Quick javascript question: when I pass the filename for parsing to the
> gexf parser, I currently pass it with relationship to the webapp root...but
> since it still does not render (and everything else looks good right now),
> I'm assuming that I the JS needs a fully qualified local path.
>
> Thanks again for your input...
>
> -George
>
>
> On Thu, Jul 4, 2013 at 4:22 AM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
>> Uncaught SyntaxError: Unexpected token < sigma.parseGexf.js:3
>>> Uncaught TypeError: Object # has no method 'parseGexf'
>>> tap5-sigma.js:24
>>>
>>
>> Are you sure sigma.parseGexf.js is correct? What's in line 24 of
>> tap5-sigma.js? Anyway, it seems that now this error is completely about
>> Sigma and JavaScript and not about Tapestry itself. What Tapestry version
>> are you using? JavaScript minification is enabled?
>>
>>
>> On Thu, 04 Jul 2013 01:36:04 -0300, George Ludwig 
>> wrote:
>>
>>  I'm at a point where it seems to me that it really should be working,
>>> yet I
>>> get this error in the javascript console:
>>>
>>>
>>> The method it can't find, parseGexf, is in the file sigma.parseGexf.js,
>>> and
>>> I've included it in the component's java file:
>>>
>>> @Import(library={"classpath:**com/intuit/tapestry5/sigmajs/**
>>> asset/sigma.min.js",
>>>  "classpath:com/intuit/**tapestry5/sigmajs/asset/sigma.**parseGexf.js",
>>>  "classpath:com/intuit/**tapestry5/sigmajs/asset/tap5-**sigma.js"})
>>>
>>>
>>> Here is the complete javascript file that is being executed in order to
>>> do
>>> the initialization:
>>>
>>> var sigmajs = Class.create();
>>> sigmajs.prototype = {
>>> initialize : function(id, gexfFile) {
>>>  // Instantiate sigma.js and customize rendering
>>> var sigInst = sigma.init(document.**getElementById(id)).**
>>> drawingProperties({
>>>  <<--- no error is thrown here
>>> defaultLabelColor : '#fff',
>>> defaultLabelSize : 14,
>>> defaultLabelBGColor : '#fff',
>>> defaultLabelHoverColor : '#000',
>>> labelThreshold : 6,
>>> defaultEdgeType : 'curve'
>>> }).graphProperties({
>>> minNodeSize : 0.5,
>>> maxNodeSize : 5,
>>> minEdgeSize : 1,
>>> maxEdgeSize : 1
>>> }).mouseProperties({
>>> maxRatio : 32
>>> });
>>>
>>> // Parse a GEXF encoded file to fill the graph
>>> sigInst.parseGexf(gexfFile); <<--- error is thrown
>>> here
>>>
>>> // Draw the graph :
>>> sigInst.draw();
>>> }
>>> }
>>>
>>> This seems to be a load order issue, yet I tried swapping the order of
>>> declaration of sigma.parseGexf.js and sigma.min.js, with the same result.
>>>
>>> Any thoughts?
>>>
>>> -George
>>>
>>>
>>> On Tue, Jul 2, 2013 at 5:43 PM, George Ludwig >> >wrote:
>>>
>>>  Cool, thanks a lot!
>>>>
>>>>
>>>> On Tue, Jul 2, 2013 at 3:50 PM, Thiago H de Paula Figueiredo <
>>>> thiag...@gmail.com> wrote:
>>>>
>>>>  On Tue, 02 Jul 2013 19:47:14 -0300, George Ludwig <
>>>>> georgelud...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>  I think I got it...so to initialize my graph I need to pas it a file
>>>>>
>>>>>> name...is it most appropriate to use JavaScriptSupport.**
>>>>>>
>>>>>> addInitializerCall()
>>>>>> so that the name of the file can be pulled from the @parameter of the
>>>>>> component?
>>>>>>
>>>>>>
>>>>> For the parameter, it will make no difference. Regardless of using
>>>>> addScript() or addInitializerCall() you'll need to pass the file name
>>>>> in
>>>>> the parameters of these methods. As you've never did this before, use
>>>>> addScript(), which is easier.
>>>>>
>>>>>
>>>>> --
>>>>> Thiago H. de Paula Figueiredo
>>>>>
>>>>> --**
>>>>> --**-
>>>>> To unsubscribe, e-mail: 
>>>>> users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>>>> 
>>>>> >
>>>>>
>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>
>> --
>> 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: guidance with integrating yet another js library as custom component

2013-07-04 Thread George Ludwig
Thiago,

You're definitely right, it's now a JS issue. I figured out that somehow I
had downloaded a garbled sigma.parseGexf.js file, which was part of the
problem.

Quick javascript question: when I pass the filename for parsing to the gexf
parser, I currently pass it with relationship to the webapp root...but
since it still does not render (and everything else looks good right now),
I'm assuming that I the JS needs a fully qualified local path.

Thanks again for your input...

-George


On Thu, Jul 4, 2013 at 4:22 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Uncaught SyntaxError: Unexpected token < sigma.parseGexf.js:3
>> Uncaught TypeError: Object # has no method 'parseGexf' tap5-sigma.js:24
>>
>
> Are you sure sigma.parseGexf.js is correct? What's in line 24 of
> tap5-sigma.js? Anyway, it seems that now this error is completely about
> Sigma and JavaScript and not about Tapestry itself. What Tapestry version
> are you using? JavaScript minification is enabled?
>
>
> On Thu, 04 Jul 2013 01:36:04 -0300, George Ludwig 
> wrote:
>
>  I'm at a point where it seems to me that it really should be working, yet
>> I
>> get this error in the javascript console:
>>
>>
>> The method it can't find, parseGexf, is in the file sigma.parseGexf.js,
>> and
>> I've included it in the component's java file:
>>
>> @Import(library={"classpath:**com/intuit/tapestry5/sigmajs/**
>> asset/sigma.min.js",
>>  "classpath:com/intuit/**tapestry5/sigmajs/asset/sigma.**parseGexf.js",
>>  "classpath:com/intuit/**tapestry5/sigmajs/asset/tap5-**sigma.js"})
>>
>>
>> Here is the complete javascript file that is being executed in order to do
>> the initialization:
>>
>> var sigmajs = Class.create();
>> sigmajs.prototype = {
>> initialize : function(id, gexfFile) {
>>  // Instantiate sigma.js and customize rendering
>> var sigInst = sigma.init(document.**getElementById(id)).**
>> drawingProperties({
>>  <<--- no error is thrown here
>> defaultLabelColor : '#fff',
>> defaultLabelSize : 14,
>> defaultLabelBGColor : '#fff',
>> defaultLabelHoverColor : '#000',
>> labelThreshold : 6,
>> defaultEdgeType : 'curve'
>> }).graphProperties({
>> minNodeSize : 0.5,
>> maxNodeSize : 5,
>> minEdgeSize : 1,
>> maxEdgeSize : 1
>> }).mouseProperties({
>> maxRatio : 32
>> });
>>
>> // Parse a GEXF encoded file to fill the graph
>> sigInst.parseGexf(gexfFile); <<--- error is thrown
>> here
>>
>> // Draw the graph :
>> sigInst.draw();
>> }
>> }
>>
>> This seems to be a load order issue, yet I tried swapping the order of
>> declaration of sigma.parseGexf.js and sigma.min.js, with the same result.
>>
>> Any thoughts?
>>
>> -George
>>
>>
>> On Tue, Jul 2, 2013 at 5:43 PM, George Ludwig > >wrote:
>>
>>  Cool, thanks a lot!
>>>
>>>
>>> On Tue, Jul 2, 2013 at 3:50 PM, Thiago H de Paula Figueiredo <
>>> thiag...@gmail.com> wrote:
>>>
>>>  On Tue, 02 Jul 2013 19:47:14 -0300, George Ludwig <
>>>> georgelud...@gmail.com>
>>>> wrote:
>>>>
>>>>  I think I got it...so to initialize my graph I need to pas it a file
>>>>
>>>>> name...is it most appropriate to use JavaScriptSupport.**
>>>>>
>>>>> addInitializerCall()
>>>>> so that the name of the file can be pulled from the @parameter of the
>>>>> component?
>>>>>
>>>>>
>>>> For the parameter, it will make no difference. Regardless of using
>>>> addScript() or addInitializerCall() you'll need to pass the file name in
>>>> the parameters of these methods. As you've never did this before, use
>>>> addScript(), which is easier.
>>>>
>>>>
>>>> --
>>>> Thiago H. de Paula Figueiredo
>>>>
>>>> --**
>>>> --**-
>>>> To unsubscribe, e-mail: 
>>>> users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>>> 
>>>> >
>>>>
>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>>
>>>>
>>>>
>>>
>
> --
> 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: guidance with integrating yet another js library as custom component

2013-07-03 Thread George Ludwig
I'm at a point where it seems to me that it really should be working, yet I
get this error in the javascript console:

Uncaught SyntaxError: Unexpected token < sigma.parseGexf.js:3
Uncaught TypeError: Object # has no method 'parseGexf' tap5-sigma.js:24

The method it can't find, parseGexf, is in the file sigma.parseGexf.js, and
I've included it in the component's java file:

@Import(library={"classpath:com/intuit/tapestry5/sigmajs/asset/sigma.min.js",
 "classpath:com/intuit/tapestry5/sigmajs/asset/sigma.parseGexf.js",
 "classpath:com/intuit/tapestry5/sigmajs/asset/tap5-sigma.js"})


Here is the complete javascript file that is being executed in order to do
the initialization:

var sigmajs = Class.create();
sigmajs.prototype = {
initialize : function(id, gexfFile) {
 // Instantiate sigma.js and customize rendering
var sigInst = sigma.init(document.getElementById(id)).drawingProperties({
 <<--- no error is thrown here
defaultLabelColor : '#fff',
defaultLabelSize : 14,
defaultLabelBGColor : '#fff',
defaultLabelHoverColor : '#000',
labelThreshold : 6,
defaultEdgeType : 'curve'
}).graphProperties({
minNodeSize : 0.5,
maxNodeSize : 5,
minEdgeSize : 1,
maxEdgeSize : 1
}).mouseProperties({
maxRatio : 32
});

// Parse a GEXF encoded file to fill the graph
sigInst.parseGexf(gexfFile); <<--- error is thrown here

// Draw the graph :
sigInst.draw();
}
}

This seems to be a load order issue, yet I tried swapping the order of
declaration of sigma.parseGexf.js and sigma.min.js, with the same result.

Any thoughts?

-George


On Tue, Jul 2, 2013 at 5:43 PM, George Ludwig wrote:

> Cool, thanks a lot!
>
>
> On Tue, Jul 2, 2013 at 3:50 PM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
>> On Tue, 02 Jul 2013 19:47:14 -0300, George Ludwig 
>> wrote:
>>
>>  I think I got it...so to initialize my graph I need to pas it a file
>>> name...is it most appropriate to use JavaScriptSupport.**
>>> addInitializerCall()
>>> so that the name of the file can be pulled from the @parameter of the
>>> component?
>>>
>>
>> For the parameter, it will make no difference. Regardless of using
>> addScript() or addInitializerCall() you'll need to pass the file name in
>> the parameters of these methods. As you've never did this before, use
>> addScript(), which is easier.
>>
>>
>> --
>> 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: guidance with integrating yet another js library as custom component

2013-07-02 Thread George Ludwig
Cool, thanks a lot!


On Tue, Jul 2, 2013 at 3:50 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 02 Jul 2013 19:47:14 -0300, George Ludwig 
> wrote:
>
>  I think I got it...so to initialize my graph I need to pas it a file
>> name...is it most appropriate to use JavaScriptSupport.**
>> addInitializerCall()
>> so that the name of the file can be pulled from the @parameter of the
>> component?
>>
>
> For the parameter, it will make no difference. Regardless of using
> addScript() or addInitializerCall() you'll need to pass the file name in
> the parameters of these methods. As you've never did this before, use
> addScript(), which is easier.
>
>
> --
> 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: guidance with integrating yet another js library as custom component

2013-07-02 Thread George Ludwig
I think I got it...so to initialize my graph I need to pas it a file
name...is it most appropriate to use JavaScriptSupport.addInitializerCall()
so that the name of the file can be pulled from the @parameter of the
component?


On Tue, Jul 2, 2013 at 3:42 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 02 Jul 2013 17:25:14 -0300, George Ludwig 
> wrote:
>
>  Thanks for the info Thiago!
>>
>>   Couldn't you just @Import to get the JS files included and
>>>>
>>> JavaScriptSupport.addScript() to invoke JS functions?
>>
>> That's the route I ended up taking to import the necessary js files, but
>> I'm still unclear on exactly how to use  JavaScriptSupport.addScript() to
>> create an instance of the sigma viewer.
>>
>
> Whatever you pass to addScript() is added inside a  tag
> inside the HTML as is. So, if the function that sets up your code in
> JavaScript is initializeGraphs(), for example, call
> JavaScriptSupport.addScript("**initializeGraphs()");. If you need to pass
> some data to it, remember that addScript() follows the String.format()
> format.
>
>
>  For example, I don't understand
>> when it's appropriate to use JavaScriptSupport.**addInitializerCall()
>> vs. JavaScriptSupport.addScript()
>>
>
> Initializer calls are just another way of doing the same, a better one
> than addScript(), but in a harder way. addScript() takes raw JavaScript and
> adds it to the page. An initializer is a function added to the
> Tapestry.Initializer object. addInitializerCall() takes the name of this
> function and the value of the parameters you'll pass to it.
>
>
> --
> 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: guidance with integrating yet another js library as custom component

2013-07-02 Thread George Ludwig
Thanks for the info Thiago!

>>  Couldn't you just @Import to get the JS files included and
JavaScriptSupport.addScript() to invoke JS functions?

That's the route I ended up taking to import the necessary js files, but
I'm still unclear on exactly how to use  JavaScriptSupport.addScript() to
create an instance of the sigma viewer. For example, I don't understand
when it's appropriate to use JavaScriptSupport.addInitializerCall()
vs. JavaScriptSupport.addScript()



On Tue, Jul 2, 2013 at 12:01 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 02 Jul 2013 15:35:20 -0300, George Ludwig 
> wrote:
>
>  I'm working on a custom component of the SigmaJS visualization library (
>> http://sigmajs.org).
>> Specifically, this example: http://sigmajs.org/examples/**
>> gexf_example.html <http://sigmajs.org/examples/gexf_example.html>
>>
>
> Interesting!
>
>
>  I've been studying the got5 examples of js library integration, and they
>> are all pretty complex, and it's a challenge to figure out what I really
>> need to do.
>>
>
> They are complex because the project tapestry-jquery is about
> reimplementing Tapestry's built-in Java in jQuery. You're thinking what you
> need to do in your example is way too complex than reality. Couldn't you
> just @Import to get the JS files included and JavaScriptSupport.addScript()
> to invoke JS functions?
>
>
>  I've been working form this tutorial:
>> http://wiki.apache.org/**tapestry/**Tapestry5AndJavaScriptExplaine**d<http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained>however,
>> it's for a mixin and I'm unclear if there is a material difference
>> between creating a component vs. a mixin.
>>
>
> For the JavaScript part, it's absolutely the same in pages, components and
> mixins.
>
>
>
>> Any guidance is much appreciated!
>>
>> -George
>>
>
>
> --
> Thiago H. de Paula Figueiredo
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


guidance with integrating yet another js library as custom component

2013-07-02 Thread George Ludwig
I'm working on a custom component of the SigmaJS visualization library (
http://sigmajs.org).

Specifically, this example: http://sigmajs.org/examples/gexf_example.html

I'm starting with the simplest use case, which is to create a sigma viewer,
passing it a single parameter, which is the name of a GEXF file for it to
parse and display.

I've been studying the got5 examples of js library integration, and they
are all pretty complex, and it's a challenge to figure out what I really
need to do.

I've been working form this tutorial:
http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained however,
it's for a mixin and I'm unclear if there is a material difference between
creating a component vs. a mixin.

Any guidance is much appreciated!

-George


Re: CompnentEventException while updating zone (HiddenFieldPositioner.getElement may no longer be invoked)

2013-06-02 Thread George Ludwig
Boris, thanks for the suggestion. Tried that, and now get a slightly
different exception:

Method
org.apache.tapestry5.corelib.internal.HiddenFieldPositioner.getElement(HiddenFieldPositioner.java:83)
may no longer be invoked.

What I suspect is going on is this...

On the page, there is a composite component that is in the middle of doing
its own zone update. During its update, it invokes a method on the
containing page to notify it that it needs to do yet another zone update on
the rest of the page.
I think Tapestry's rendering internals get confused when I initiate the
second zone update before the first has completed.

I've addressed the issue by using the ZoneRefresh mixin, however that seems
a little too brutish...my original approach was entirely synchronous; i.e.
zones only get updated when necessary. Using the ZoneRefresh mixin is going
to create a lot of unnecessary server traffic, and I won't know if that's a
big deal until after it goes into production.

I had also tried another approach where, when the page is notified of an
update, it kicks off a custom zone update thread that runs only once after
a delay...but I was encountering similar exceptions. I'm going to look at
the ZoneRefresh mixin code to see what I can learn there...

On Sun, Jun 2, 2013 at 2:40 AM, Boris Horvat wrote:

> try
> ajaxResponseRenderer.addRender("myZone",myZone.getBody());
> --
> Sincerely
> *Boris Horvat*
>


Re: CompnentEventException while updating zone (HiddenFieldPositioner.getElement may no longer be invoked)

2013-06-01 Thread George Ludwig
I changed my code to this:

ajaxResponseRenderer.addRender("myZone",myZone);

and now I get this:

Method
org.apache.tapestry5.corelib.internal.HiddenFieldPositioner.discard(HiddenFieldPositioner.java:105)
may no longer be invoked.

Still scratching my head...



On Sat, Jun 1, 2013 at 3:03 PM, George Ludwig wrote:

> I'm getting this exception while updating a zone:
>
> Method
> org.apache.tapestry5.corelib.internal.HiddenFieldPositioner.getElement(HiddenFieldPositioner.java:83)
> may no longer be invoked
>
> My code does this:
>
> ajaxResponseRenderer.addRender(myZone);
>
> This is called when a page component calls an update method of the page.
>
> Any thoughts?
>
> full stack trace:
>
>-
>   -
>   
> org.apache.tapestry5.ioc.internal.util.OneShotLock.innerCheck(OneShotLock.java:58)
>   -
>   
> org.apache.tapestry5.ioc.internal.util.OneShotLock.lock(OneShotLock.java:71)
>   -
>   
> org.apache.tapestry5.corelib.internal.HiddenFieldPositioner.getElement(HiddenFieldPositioner.java:83)
>   -
>   
> org.apache.tapestry5.internal.services.ajax.AjaxFormUpdateControllerImpl.cleanupAfterPartialZoneRender(AjaxFormUpdateControllerImpl.java:122)
>   -
>   
> org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.renderMarkup(RenderCommandComponentEventResultProcessor.java:80)
>   -
>   
> org.apache.tapestry5.internal.services.PageRenderQueueImpl$Bridge.renderMarkup(PageRenderQueueImpl.java:62)
>   -
>   
> org.apache.tapestry5.internal.services.ajax.SingleZonePartialRendererFilter.renderMarkup(SingleZonePartialRendererFilter.java:98)
>   -
>   
> org.apache.tapestry5.internal.services.PageRenderQueueImpl$Bridge.renderMarkup(PageRenderQueueImpl.java:62)
>   -
>   
> org.apache.tapestry5.internal.services.PageRenderQueueImpl.renderPartial(PageRenderQueueImpl.java:159)
>   -
>   
> org.apache.tapestry5.internal.services.PartialMarkupRendererTerminator.renderMarkup(PartialMarkupRendererTerminator.java:45)
>   -
>   
> org.got5.tapestry5.jquery.services.js.JSModule$2.renderMarkup(JSModule.java:58)
>   -
>   
> org.apache.tapestry5.services.TapestryModule$37.renderMarkup(TapestryModule.java:2141)
>   -
>   
> org.apache.tapestry5.services.TapestryModule$36.renderMarkup(TapestryModule.java:2125)
>   -
>   
> org.apache.tapestry5.services.TapestryModule$35.renderMarkup(TapestryModule.java:2107)
>   -
>   
> org.apache.tapestry5.services.TapestryModule$34.renderMarkup(TapestryModule.java:2091)
>   -
>   
> org.apache.tapestry5.services.TapestryModule$33.renderMarkup(TapestryModule.java:2073)
>   -
>   
> org.apache.tapestry5.services.TapestryModule$32.renderMarkup(TapestryModule.java:2048)
>   -
>   
> com.trsvax.bootstrap.services.BootstrapModule$3.renderMarkup(BootstrapModule.java:219)
>   -
>   
> org.apache.tapestry5.internal.services.AjaxPartialResponseRendererImpl.renderPartialPageMarkup(AjaxPartialResponseRendererImpl.java:89)
>   -
>   
> org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.processResultValue(RenderCommandComponentEventResultProcessor.java:58)
>   -
>   
> org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.processResultValue(RenderCommandComponentEventResultProcessor.java:34)
>   -
>   
> org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler$1.processResultValue(AjaxComponentEventRequestHandler.java:80)
>   -
>   
> org.apache.tapestry5.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:47)
>   -
>   
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$6.handleResult(ComponentPageElementImpl.java:1084)
>   -
>   
> org.apache.tapestry5.internal.services.EventImpl$1.invoke(EventImpl.java:89)
>   -
>   
> org.apache.tapestry5.internal.services.EventImpl$1.invoke(EventImpl.java:86)
>   -
>   
> org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
>   -
>   
> org.apache.tapestry5.internal.services.EventImpl.storeResult(EventImpl.java:84)
>   -
>   
> com.intuit.sts.valuesource.components.AutocompleteTextField.dispatchComponentEvent(AutocompleteTextField.java)
>   -
>   
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:935)
>   -
>   
> org.apache.tapestry5.internal.structure.

CompnentEventException while updating zone (HiddenFieldPositioner.getElement may no longer be invoked)

2013-06-01 Thread George Ludwig
I'm getting this exception while updating a zone:

Method
org.apache.tapestry5.corelib.internal.HiddenFieldPositioner.getElement(HiddenFieldPositioner.java:83)
may no longer be invoked

My code does this:

ajaxResponseRenderer.addRender(myZone);

This is called when a page component calls an update method of the page.

Any thoughts?

full stack trace:

   -
  -
  
org.apache.tapestry5.ioc.internal.util.OneShotLock.innerCheck(OneShotLock.java:58)
  -
  
org.apache.tapestry5.ioc.internal.util.OneShotLock.lock(OneShotLock.java:71)
  -
  
org.apache.tapestry5.corelib.internal.HiddenFieldPositioner.getElement(HiddenFieldPositioner.java:83)
  -
  
org.apache.tapestry5.internal.services.ajax.AjaxFormUpdateControllerImpl.cleanupAfterPartialZoneRender(AjaxFormUpdateControllerImpl.java:122)
  -
  
org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.renderMarkup(RenderCommandComponentEventResultProcessor.java:80)
  -
  
org.apache.tapestry5.internal.services.PageRenderQueueImpl$Bridge.renderMarkup(PageRenderQueueImpl.java:62)
  -
  
org.apache.tapestry5.internal.services.ajax.SingleZonePartialRendererFilter.renderMarkup(SingleZonePartialRendererFilter.java:98)
  -
  
org.apache.tapestry5.internal.services.PageRenderQueueImpl$Bridge.renderMarkup(PageRenderQueueImpl.java:62)
  -
  
org.apache.tapestry5.internal.services.PageRenderQueueImpl.renderPartial(PageRenderQueueImpl.java:159)
  -
  
org.apache.tapestry5.internal.services.PartialMarkupRendererTerminator.renderMarkup(PartialMarkupRendererTerminator.java:45)
  -
  
org.got5.tapestry5.jquery.services.js.JSModule$2.renderMarkup(JSModule.java:58)
  -
  
org.apache.tapestry5.services.TapestryModule$37.renderMarkup(TapestryModule.java:2141)
  -
  
org.apache.tapestry5.services.TapestryModule$36.renderMarkup(TapestryModule.java:2125)
  -
  
org.apache.tapestry5.services.TapestryModule$35.renderMarkup(TapestryModule.java:2107)
  -
  
org.apache.tapestry5.services.TapestryModule$34.renderMarkup(TapestryModule.java:2091)
  -
  
org.apache.tapestry5.services.TapestryModule$33.renderMarkup(TapestryModule.java:2073)
  -
  
org.apache.tapestry5.services.TapestryModule$32.renderMarkup(TapestryModule.java:2048)
  -
  
com.trsvax.bootstrap.services.BootstrapModule$3.renderMarkup(BootstrapModule.java:219)
  -
  
org.apache.tapestry5.internal.services.AjaxPartialResponseRendererImpl.renderPartialPageMarkup(AjaxPartialResponseRendererImpl.java:89)
  -
  
org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.processResultValue(RenderCommandComponentEventResultProcessor.java:58)
  -
  
org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.processResultValue(RenderCommandComponentEventResultProcessor.java:34)
  -
  
org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler$1.processResultValue(AjaxComponentEventRequestHandler.java:80)
  -
  
org.apache.tapestry5.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:47)
  -
  
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$6.handleResult(ComponentPageElementImpl.java:1084)
  -
  
org.apache.tapestry5.internal.services.EventImpl$1.invoke(EventImpl.java:89)
  -
  
org.apache.tapestry5.internal.services.EventImpl$1.invoke(EventImpl.java:86)
  -
  
org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
  -
  
org.apache.tapestry5.internal.services.EventImpl.storeResult(EventImpl.java:84)
  -
  
com.intuit.sts.valuesource.components.AutocompleteTextField.dispatchComponentEvent(AutocompleteTextField.java)
  -
  
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:935)
  -
  
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1112)
  -
  
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61)
  -
  
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1057)
  -
  
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1054)
  -
  
org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
  -
  
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1053)
  -
  
org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler.handle(AjaxComponentEventRequestHandler.java:110)
  -
  
org.apache.tapestry5.internal.

Re: loop component only reads 'value" once, renders same object each time?

2013-06-01 Thread George Ludwig
As I noted above, I created getters/setters to more easily monitor access
to the property. In any event, I resolved the issue...it seems like every
time I write to the list for help, I figure out the problem in the next 5
minutes :)


On Sat, Jun 1, 2013 at 12:51 PM, Boris Horvat wrote:

> Is there any reason why you are not using @Property annotation on the
> currentObject?
>
> Try it maybe it will help
>
>
> On Sat, Jun 1, 2013 at 9:35 PM, George Ludwig  >wrote:
>
> > This used to work, and now it doesn't and I'm at a loss.
> >
> > What I see happening is that setCurrentObject is called the correct
> number
> > of times (4), with the correct value each time.
> >
> > However, getCurrentObject is only called once.
> >
> > The list is rendered the correct number of times (4x), but it renders the
> > same object each time.
> >
> > I stepped through the Tapestry source for the Loop component (v5.3.7),
> and
> > at line 386 the loop appears to get the correct JSON 4 times at the top
> > level of the render loop (which surprises me since it only calls
> > getCurrentObject once), but when it renders the object, somehow it only
> > "sees" the first JSONObject.
> >
> > This is such a simple use case, it's driving me nuts that it doesn't
> work.
> > It used to work, and I am unable to identify any differences from when it
> > worked until now.
> >
> > tml:
> >
> > 
> >
> >   
> >
> > 
> >
> >> "allfields" />
> >
> > 
> >
> >   
> >
> > 
> >
> > java:
> >
> > public ListgetFIList() throws IOException {
> >
> >   // reads JSON from a file and returns ArrayList of size 4
> >
> > }
> >
> > // created getters/setters to set breakpoints
> >
> > private JSONObject currentObject;
> >
> > public JSONObject getCurrentObject() {
> >
> >   return currentObject;
> >
> > }
> >
> > public void setCurrentObject(JSONObject o) {
> >
> >   this.currentObject=o;
> >
> > }
> >
>
>
>
> --
> Sincerely
> *Boris Horvat*
>


loop component only reads 'value" once, renders same object each time?

2013-06-01 Thread George Ludwig
This used to work, and now it doesn't and I'm at a loss.

What I see happening is that setCurrentObject is called the correct number
of times (4), with the correct value each time.

However, getCurrentObject is only called once.

The list is rendered the correct number of times (4x), but it renders the
same object each time.

I stepped through the Tapestry source for the Loop component (v5.3.7), and
at line 386 the loop appears to get the correct JSON 4 times at the top
level of the render loop (which surprises me since it only calls
getCurrentObject once), but when it renders the object, somehow it only
"sees" the first JSONObject.

This is such a simple use case, it's driving me nuts that it doesn't work.
It used to work, and I am unable to identify any differences from when it
worked until now.

tml:



  



  



  



java:

public ListgetFIList() throws IOException {

  // reads JSON from a file and returns ArrayList of size 4

}

// created getters/setters to set breakpoints

private JSONObject currentObject;

public JSONObject getCurrentObject() {

  return currentObject;

}

public void setCurrentObject(JSONObject o) {

  this.currentObject=o;

}


Re: how to trigger onValueChanged from AutoComplete mixin?

2013-05-28 Thread George Ludwig
Dusko, thanks for the response. I'm actually using the jQuery autocomplete,
so controls.js is irrelevant. It looks like it happens in
jquery.ui.autocomplete.js around line 273.

What I don't get is, why does the onValueChanged event NOT get triggered
when the value is changed via a mouse click on the autocomplete list? It
seems like a bug to me...


On Tue, May 28, 2013 at 1:38 AM, Dusko Jovanovski  wrote:

> Autocomplete only triggers the EventConstants.PROVIDE_COMPLETIONS event.
> Take a look at the onClick function in controls.js (line 183) (Tapestry
> 5.3). That's the place that you need to modify to get the desired behavior.
>
>
> On Mon, May 27, 2013 at 11:25 PM, George Ludwig  >wrote:
>
> > I've got a custom textfield that uses the autocomplete mixin. Everything
> is
> > working great except that when the user clicks on an item in the
> matchlist,
> > the onValueChanged event is not triggered.
> >
> > I'm it's possible, but I'm in over my head. As far as I can tell, I would
> > need to trigger an event based on a clicked or mouseup event from the
> > matchlist. The problem is, the matchlist is generated dynamically, so I
> > don't know how to dynamically attach a callback to something that is
> itself
> > dynamically generated.
> >
> > Any ideas??
> >
>


Re: jQuery/bind mixin does not submit field value onChange

2013-05-28 Thread George Ludwig
Is that tap5-jquery 3.3.7-SNAPSHOT? I just checked my local copy, and it's
at 4.0.0-SNAPSHOT. Just a little confused...


On Tue, May 28, 2013 at 10:25 AM, Boris Horvat wrote:

> Hi,
>
> I recently reported a bug whcih I think could be what you are talking
> about. This was fixed in the new version 3.3.7-SNAPSHOT, are you using
> this?
>
> Cheers,
> Boris
>
>


how to trigger onValueChanged from AutoComplete mixin?

2013-05-27 Thread George Ludwig
I've got a custom textfield that uses the autocomplete mixin. Everything is
working great except that when the user clicks on an item in the matchlist,
the onValueChanged event is not triggered.

I'm it's possible, but I'm in over my head. As far as I can tell, I would
need to trigger an event based on a clicked or mouseup event from the
matchlist. The problem is, the matchlist is generated dynamically, so I
don't know how to dynamically attach a callback to something that is itself
dynamically generated.

Any ideas??


Re: Extend a mixin class as a component?

2013-05-22 Thread George Ludwig
>>Have you tried implementing that as another mixin, say NiceAutcomplete,
subclassing from Autocomplete?

I considered that approach, however it seemed that I would need to modify
the autocomplete javascript in order to insert an element to contain the
greyed out text, which would then pose even more challenges with regard to
making sure it was all visually consistent when designers start adding CSS.
I'm doing my best to avoid re-writing the jQuery stuff, that's why I took
the approach of stacking text fields and wiring it together. However this
is proving to be yet another challenge as far as making it all behave
exactly the way it should.


On Wed, May 22, 2013 at 12:30 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Wed, 22 May 2013 15:57:29 -0300, George Ludwig 
> wrote:
>
>  @Thiago: The goal was not to apply a component as a mixin.
>>
>
> I'm sorry for misunderstanding you.
>
>
>  I'm working on a fancy AutocompleteTextfield class that acts like
>> Google's search text field, i.e. as you type, you get a greyed out
>> completion of the top result in the autocomplete list. If you open gmail
>> and type in to the
>> search field, you'll see exactly what I mean.
>>
>
> Interesting!
>
>
>  It works pretty good, but it still needs some tweaks, which is why I
>> asked the original question. It occurred to me that I may be able to
>> simplify the code if I could extend the existing Autocomplete mixin.
>> Perhpas it's a bad idea, but it was just a thought.
>>
>
> Have you tried implementing that as another mixin, say NiceAutcomplete,
> subclassing from Autocomplete?
>
>
>  BTW, I believe I have permission to release this component as open source
>> once it's completed, so any help would be much appreciated :)
>>
>
> Yay! :)
>
>
> --
> 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: Extend a mixin class as a component?

2013-05-22 Thread George Ludwig
@Thiago: The goal was not to apply a component as a mixin.

I'm working on a fancy AutocompleteTextfield class that acts like Google's
search text field, i.e. as you type, you get a greyed out completion of the
top result in the autocomplete list. If you open gmail and type in to the
search field, you'll see exactly what I mean.

I've got a working version that stacks 3 different text fields
together: one that defines the viewable area, one for the greyed out text,
and the last one is the actual text field that the user types in to...it's
this text field that currently uses the autocomplete mixin.

It works pretty good, but it still needs some tweaks, which is why I asked
the original question. It occurred to me that I may be able to simplify the
code if I could extend the existing Autocomplete mixin. Perhpas it's a bad
idea, but it was just a thought.

BTW, I believe I have permission to release this component as open source
once it's completed, so any help would be much appreciated :)



On Wed, May 22, 2013 at 5:28 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 21 May 2013 23:52:49 -0300, George Ludwig 
> wrote:
>
>  Why don't you create a component which uses the mixin instead of one that
>>>>
>>> extends the mixin?
>>
>> Well, I've already got that component. I'd like to simplify it and have
>> better control over it, and am exploring my options. My thought would be
>> to subclass it and apply its behavior to a textfield within the subclassed
>> .tml
>>
>
> You cannot apply a component to another component like you can with
> mixins. Or I really didn't undertand what you described above, as what you
> describe, IMHO, doesn't need to involve a component subclassing a mixin,
> just mixin applied to a component.
>
>
> --
> 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: Extend a mixin class as a component?

2013-05-21 Thread George Ludwig
>>Why don't you create a component which uses the mixin instead of one that
extends the mixin?

Well, I've already got that component. I'd like to simplify it and have
better control over it, and am exploring my options. My thought would be to
subclass it and apply its behavior to a textfield within the subclassed .tml


Extend a mixin class as a component?

2013-05-21 Thread George Ludwig
If I wanted to extend the Autocomplete mixin, can I extend it as a
component?

I.e., my new class would extend autocomplete, but it would be in the
components package.

Just wondering if this is good Tapestry form or not...


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

2013-05-21 Thread George Ludwig
I should probably look at more Tapestry source :)


On Tue, May 21, 2013 at 4:02 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 21 May 2013 19:33:02 -0300, George Ludwig 
> wrote:
>
>  Dmitry,
>>
>> Thanks for that, I didn't realize you could delegate to blocks from other
>> pages!
>>
>
> The BeanModel-based components (Grid, BeanEditor, etc) are based on
> exactly that.
>
>
> --
> 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: best way to integrate a page or component to keep modular

2013-05-21 Thread George Ludwig
Dmitry,

Thanks for that, I didn't realize you could delegate to blocks from other
pages!

-George

On Mon, May 20, 2013 at 11:30 PM, Dmitry Gusev wrote:

>
> But, if implement my pages with blocks, like:
>
> Page1.tml:
> 
> 
> 
>Page1
> 
> 
>
> Page2.tml
> 
> 
> 
>Page2
> 
> 
>
> Then on page3 I can embed contents of mainBlocks from page1 and page2 like
> this:
>
> Page3.tml
> 
>
> 
> 
>
> 
>
>
> I think this is something you want to do, isn't it?
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>


Re: Customize autocomplete mixin match list?

2013-05-21 Thread George Ludwig
Thanks for the replies...still working on this

@Lance: Did you mean override protected JSONArray generateResponseJSON(List
matches)? This method already works as I'd like it to...it calls the
toString() method on every element of the list:

protected JSONArray generateResponseJSON(List matches)

{

JSONArray array = new JSONArray();

for (Object o : matches)

{

if (o instanceof JSONObject) array.put(o);

else array.put(o.toString());

}

return array;

}


I'm already able to supply a list of objects that outputs the desired html
when generateResponseJSON is invoked, however the output is treated as a
string literal when displayed. I.e., I want each element in the list to be
like this, and to be rendered as html:

someTextsomeOtherText

But when the list is displayed, is shows the html markup as literal text,
i.e. I get this:

"someTextsomeOtherText"

when I want this:

"someText  someOtherText"

I looked at the autocomplete code in the debugger, and saw that it seems to
care about the content type. In the autocomplete method, it does this:

ContentType contentType = responseRenderer.findContentType(this);

which sets the content type to text/html. I would think that as such, it
would properly render the html. But it h=behaves as if the content type
were text/plain.

In other words, it seem that I can override that method all I want, but the
mixin would still treat my markup as literal text.

@Emmanuel: I looked at your example, and while it works great for your use
case, my use case is more complex. I've created a composite textfield
component, that includes the autocomplete mixin. I want people to be able
to use my component and easily customize the output. In another case, I
have subclassed that original component in to a self-contained object that
requires its own customization, and trying to bundle the javascript
override with it doesn't fly. Finally, I need to be able to have more than
one of these components on the screen, so once again the javascript
override doesn't work.

What I'd really like to be able to do is override Autocomplete's javascript
"_renderItem: function( ul, item )" method, so I can handle it in java.
I've been playing around with the Bind mixin to do this, but without
success.




On Thu, May 16, 2013 at 1:43 AM, Emmanuel DEMEY wrote:

> Or you can use the one provided by the Tapestry jQuery project. I have
> already customized the rendering by using this jQuery UI configuration :
> http://jqueryui.com/autocomplete/#custom-data
>
> Manu
>
>
> 2013/5/16 Lance Java 
>
> > You could extend the AutoComplete mixin and override
> > generateResponseMarkup.
> >
>
>
>
> --
> Emmanuel DEMEY
> Ingénieur Etude et Développement
> ATOS Worldline
> +33 (0)6 47 47 42 02
> demey.emman...@gmail.com
> http://emmanueldemey.fr/
>
> Twitter : @EmmanuelDemey
>


Customize autocomplete mixin match list?

2013-05-15 Thread George Ludwig
I want customize the look of each item in the list created by the
Autocomplete mixin.

Currently, I just return an id for each object. But I'd rather return
HTML-formatted output.

For example, right now I just return a simple String to populate the match
list:

return getName();

But I want to add more complex output. For example this:

return ""+getNam()+""+getUrl()+"";

The problem is, the Autocomplete mixin treats it as a literal String.

Is there any way to really customize the presentation of each row in the
match list?


Re: How to dynamically specify the template for the Dynamic component?

2013-05-07 Thread George Ludwig
Thanks Thiago, I'll try that. I did first look at the Tapestry docs, and
saw that the template parameter was of type org.apache.tapestry5.services.
dynamic.DynamicTemplate and I had not idea what to do what that.


On Tue, May 7, 2013 at 11:22 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 07 May 2013 14:12:52 -0300, George Ludwig 
> wrote:
>
>  I'm trying to use the Dynamic component so I can specify the tml at
>> runtime.
>>
>
> Notice the template parameter is of type Asset, so that's what you should
> pass to it. The default binding is 'asset', and I guess you overlooked this
> important fact. Use the AssetSource service instead. Something like this:
>
> @Inject
> private AssetSource assetSource;
>
> public Asset getTemplate() {
> // use AssertSource to get the Asset
> }
>
> 
>
>
>  These work:
>>
>> >
>> >
>>
>> But I need to read the template name from a property. Unfortunately, these
>> do not work:
>>
>> > property)
>>
>
> It won't work because the default binding of the parameter is Asset.
>
>
>  > property)
>>
>
> Never, never, never ever use expansions when passing component parameter
> values.
>
>
>  > String property)
>>
>
> It won't work because the default binding of the parameter is Asset.
>
>
>  > String property)
>>
>
> The asset binding doesn't support properties.
>
>
>  > a
>> String property)
>>
>
> The asset binding doesn't support ${}
>
> --
> Thiago H. de Paula Figueiredo
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


How to dynamically specify the template for the Dynamic component?

2013-05-07 Thread George Ludwig
I'm trying to use the Dynamic component so I can specify the tml at runtime.

These work:



Example of using the Dynamic component?

2013-05-03 Thread George Ludwig
Is there an example online anywhere? I don't see one on jumpstart, and
google comes up dry...

TIA!

-George


Re: Acces page properties file within a component?

2013-04-08 Thread George Ludwig
I got a chance to look in to this a little more. Thiago, from your email,
it sounded like you were saying that there was an automatic hierarchical
reading of properties, but testing indicates that reading the message
catalog within a component only gives access to the component level
properties.

I.e., the following code within a component will only "see" the component
properties:

@Inject
private Messages messages;
...
messages.get(someKey);


I looked in the code for the BeanEditForm, and it's doing this, which makes
perfect sense and works fine:

@Inject

private ComponentResources resources;
...
resources.getContainerMessages().get(someKey);

Just posting this in case someone else comes looking for a solution.



On Fri, Apr 5, 2013 at 1:08 PM, George Ludwig wrote:

> Thanks!
>
>
> On Fri, Apr 5, 2013 at 12:52 PM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
>> On Fri, 05 Apr 2013 16:16:58 -0300, George Ludwig 
>> wrote:
>>
>>  I'm building a custom component, and want to render field labels similar
>>> to how the Tapestry components do, by reading a .
>>> parameter from the page's .properties file.
>>>
>>
>> When in a component, messages will be read from the component .properties
>> file first (if it exists), then the page one, then the global one (usually
>> app.properties).
>>
>>
>>  Is there an easy way to read the properties file from within a component?
>>>
>>
>> @Inject
>> private Messages messages;
>>
>>
>>  I can get ComponentResources, and that will get me the MessageCatalogue,
>>> but that's not the same thing, is it?
>>>
>>
>> It is (at least when the message you're using isn't defined in the
>> component's property file).
>>
>> --
>> 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: Acces page properties file within a component?

2013-04-05 Thread George Ludwig
Thanks!


On Fri, Apr 5, 2013 at 12:52 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Fri, 05 Apr 2013 16:16:58 -0300, George Ludwig 
> wrote:
>
>  I'm building a custom component, and want to render field labels similar
>> to how the Tapestry components do, by reading a .
>> parameter from the page's .properties file.
>>
>
> When in a component, messages will be read from the component .properties
> file first (if it exists), then the page one, then the global one (usually
> app.properties).
>
>
>  Is there an easy way to read the properties file from within a component?
>>
>
> @Inject
> private Messages messages;
>
>
>  I can get ComponentResources, and that will get me the MessageCatalogue,
>> but that's not the same thing, is it?
>>
>
> It is (at least when the message you're using isn't defined in the
> component's property file).
>
> --
> Thiago H. de Paula Figueiredo
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Acces page properties file within a component?

2013-04-05 Thread George Ludwig
I'm building a custom component, and want to render field labels similar to
how the Tapestry components do, by reading a . parameter
from the page's .properties file.

Is there an easy way to read the properties file from within a component? I
can get ComponentResources, and that will get me the MessageCatalogue, but
that's not the same thing, is it?


tapestry5 highstock integration?

2013-03-13 Thread George Ludwig
Obviously there's the highcharts integration, but I really want the built
in date range features they have in highstock.

Has someone already done such a project? I'm about to do it myself, but
thought I'd check here first. I searched the web obviously, and came up
with nothing.

-George


Re: How to get a lot of data in to highcharts?

2013-03-09 Thread George Ludwig
@Shing: Thanks that's super helpful!!


On Sat, Mar 9, 2013 at 3:10 PM, Shing Hing Man  wrote:

>
> I have an example that builds the entire  JSONObject in Java.
>
>
> http://lombok.demon.co.uk/tapestry5Demo/test/highcharts/hcdemotwosource
>
>
> Th following specifies  part of the chart in Javascript and part of the
> charts in Java.
>
>
> http://lombok.demon.co.uk/tapestry5Demo/test/highcharts/hcdemothree
>
>
>
> Shing
>
> - Original Message -
> From: Jay Ginete 
> To: Tapestry users 
> Cc:
> Sent: Saturday, March 9, 2013 10:01 PM
> Subject: Re: How to get a lot of data in to highcharts?
>
> On 3/10/2013 5:40 AM, George Ludwig wrote:
> > I've been reviewing the tapestry5/highcharts integration code, and I see
> > that the data for the charts has been hardcoded in to a javascript file.
> >
> > What is the best way to display a lot of data from the server? For
> example,
> > I have a series with hundreds or thousands of data points, and I need to
> > calculate them on the server, and somehow get them in to highcharts.
> >
> > I haven't done a lot of work with Tapestry's javascript support, so
> forgive
> > me if this is obvious...
> >
> > -George
> >
> Write a public function that returns a JSONObject
> (
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/json/JSONObject.html
> )
> in the page class.
>
> -
> 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: Has anyone gotten the tapestry 5 highcharts demo webapp to run?

2013-03-09 Thread George Ludwig
Just a quick note...the difference may have been how I imported the
project. Yesterday, I got caught up in importing it in to Eclipse using
EGit's import function. Today, just before everything worked, I used
Eclipse's native import, and imported EGit's working directory for the
project.

If anyone else is experiencing similar issues, it's worth a try.


On Sat, Mar 9, 2013 at 12:31 PM, George Ludwig wrote:

> @Francois: Thanks for reminding me to run it from the command line with
> maven...that works fine.
>
> @Shing: I got the same excluded entry, but in my run configuration, it
> showed it as being included. I set/unset the path, restarted Eclipse, and
> now it runs as expected.
>
> This is just weird, and I don't know where the issue came from. Was it
> related to EGit (which seems extremely flaky)? Was it Eclipse? No have no
> idea, and it makes me really nervous when I can't explain why something was
> failing, and then magically starts working...
>
>
> On Sat, Mar 9, 2013 at 3:28 AM, Shing Hing Man  wrote:
>
>>
>>
>> I had the same problem a few weeks ago.
>>
>> I was using the following Jetty Eclipse plugin.
>>
>> http://wiki.eclipse.org/Jetty_WTP_Plugin
>>
>>
>> In the console,  I got the following message :
>> Excluded
>> entry=/home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes
>>
>>
>> To fix above,  In Eclipse, I did
>>
>> Run configuration -> Web app class path  ->
>> add
>> /home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes
>>
>> to the user custom classpath.
>>
>> (The  above path is already in under  default project path. Somehow, it
>> is not being picked up.)
>>
>> Shing
>>
>>
>>
>>
>> 
>> From: George Ludwig 
>> To: Tapestry users 
>> Sent: Saturday, March 9, 2013 1:33 AM
>> Subject: Has anyone gotten the tapestry 5 highcharts demo webapp to run?
>>
>> I've been trying to get the demo webapp running using run jetty run in
>> Eclipse, but the best I've managed is to get jetty to boot, but all it
>> does
>> is serve a directory listing under
>> http://localhost:8080/tapestry5-highcharts/
>>
>> Has anyone managed to get this to run in Eclipse using Jetty?
>>
>> -George
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Re: Has anyone gotten the tapestry 5 highcharts demo webapp to run?

2013-03-09 Thread George Ludwig
@Francois: Thanks for reminding me to run it from the command line with
maven...that works fine.

@Shing: I got the same excluded entry, but in my run configuration, it
showed it as being included. I set/unset the path, restarted Eclipse, and
now it runs as expected.

This is just weird, and I don't know where the issue came from. Was it
related to EGit (which seems extremely flaky)? Was it Eclipse? No have no
idea, and it makes me really nervous when I can't explain why something was
failing, and then magically starts working...


On Sat, Mar 9, 2013 at 3:28 AM, Shing Hing Man  wrote:

>
>
> I had the same problem a few weeks ago.
>
> I was using the following Jetty Eclipse plugin.
>
> http://wiki.eclipse.org/Jetty_WTP_Plugin
>
>
> In the console,  I got the following message :
> Excluded
> entry=/home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes
>
>
> To fix above,  In Eclipse, I did
>
> Run configuration -> Web app class path  ->
> add
> /home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes
>
> to the user custom classpath.
>
> (The  above path is already in under  default project path. Somehow, it is
> not being picked up.)
>
> Shing
>
>
>
>
> 
> From: George Ludwig 
> To: Tapestry users 
> Sent: Saturday, March 9, 2013 1:33 AM
> Subject: Has anyone gotten the tapestry 5 highcharts demo webapp to run?
>
> I've been trying to get the demo webapp running using run jetty run in
> Eclipse, but the best I've managed is to get jetty to boot, but all it does
> is serve a directory listing under
> http://localhost:8080/tapestry5-highcharts/
>
> Has anyone managed to get this to run in Eclipse using Jetty?
>
> -George
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: OLark script block

2013-03-01 Thread George Ludwig
I'm dealing with this exact issue right now, and it makes me wonder why the
UserVoice script works fine, but Olark does not.

Harry, did you have to put this code on every page, or did you put it in
the layout? Also, did you hard-code the script, or load it from a file?

-George


On Sun, Feb 26, 2012 at 7:26 PM, harry  wrote:

> Iprimak,
>
> It worked like a charm!  Thank you.
>
> So it turns out using the JavaScriptSupport @Environmental and a call to
> its
> addScript in the layout page's afterRender does the trick.  Wonder why
> that's the case.
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/OLark-script-block-tp5517659p5517890.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: How to disable bootstrap label/button hover behavior?

2013-03-01 Thread George Ludwig
Thanks for the info!


On Wed, Feb 20, 2013 at 11:56 PM, Ivan Khalopik  wrote:

> // Hover/focus state, but only for links
> a {
>   &.label:hover,
>   &.label:focus,
>   &.badge:hover,
>   &.badge:focus {
> color: @white;
> text-decoration: none;
> cursor: pointer;
>   }
>
> }
>
> This lines are from the latest bootstrap sources. It adds hover behaviour
> only for links with label/badge class.
> Hover behaviour was fixed by this commit starting from version 2.0.3:
>
>
> https://github.com/twitter/bootstrap/commit/d7af2714c66ce19ba63e0871837f35dac73ecf66#less/labels-badges.less
>
> So, you can try to upgrade your bootstrap css.
>
> On Thu, Feb 21, 2013 at 1:20 AM, George Ludwig  >wrote:
>
> > What approach did you take to the over ride? AFAIK, I would need to over
> > ride a lot of CSS in order to remove that functionality for all the badge
> > and label types.
> >
> > For now, I did my over ride in the page CSS, but it's only. Thankfully,
> I'm
> > only using one badge and one labelfor now at least.
> >
> >
> > On Wed, Feb 20, 2013 at 5:37 AM, trsvax  wrote:
> >
> > > I think the hover behavior was added in a latter version of 2.x
> bootstrap
> > > than is included by default in the bootstrap module. I usually just
> > include
> > > the latest css and then override the parts I want to change in the
> > > layout.tml file.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://tapestry.1045711.n5.nabble.com/How-to-disable-bootstrap-label-button-hover-behavior-tp5720108p5720120.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
> > >
> > >
> >
>
>
>
> --
> BR
> Ivan
>


Re: deployment of images

2013-02-20 Thread George Ludwig
Ken,

>But my app fails because somehoe the images for the tapestry component
never made it. they dont exist inside my war file.

This is a maven issue...you need to configure it to include the images.

Your pom should have something like this in it:



  
   src/main/resources 
  
   **/*.png 
  
  
  
...


On Wed, Feb 20, 2013 at 8:31 PM, Ken in Nashua  wrote:

> Thanks Bob... that worked out terrific.
>


Re: How to disable bootstrap label/button hover behavior?

2013-02-20 Thread George Ludwig
What approach did you take to the over ride? AFAIK, I would need to over
ride a lot of CSS in order to remove that functionality for all the badge
and label types.

For now, I did my over ride in the page CSS, but it's only. Thankfully, I'm
only using one badge and one labelfor now at least.


On Wed, Feb 20, 2013 at 5:37 AM, trsvax  wrote:

> I think the hover behavior was added in a latter version of 2.x bootstrap
> than is included by default in the bootstrap module. I usually just include
> the latest css and then override the parts I want to change in the
> layout.tml file.
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/How-to-disable-bootstrap-label-button-hover-behavior-tp5720108p5720120.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: Spinner - Prototype to JQuery (ie tapestry5-jquery)

2013-02-18 Thread George Ludwig
Why bother converting it? You can run Prototype along with jQuery.


On Mon, Feb 18, 2013 at 1:04 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Mon, 18 Feb 2013 17:54:25 -0300, bhorvat 
> wrote:
>
>  Probably not the best place to ask (and probably not the best question as
>> well)
>>
>
> Yep, this is really the wrong place to ask. This is completely unrelated
> to Tapestry. You'll probably should post this on the jQuery mailing lists
> or some site like Stack Overflow. Or maybe just reading the jQuery API
> documentation will be enough.
>
> --
> 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: css layout problems, strange runtime behavior - help

2013-02-18 Thread George Ludwig
"Unless your CSS files aren't included or included in the wrong order, this
isn't a Tapestry issue at all."

Exactly. So the OP needs to find out exactly which CSS rules are being
followed, and where they came from...


On Mon, Feb 18, 2013 at 9:03 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Mon, 18 Feb 2013 13:13:30 -0300, George Ludwig 
> wrote:
>
>  In CSS, the problem is almost always that some unexpected rule is being
>> followed rather than the one you think. I've found Chrome to be an
>> invaluable tool in locating the exact source of the CSS rule being
>> followed, plus it enables you to play around with
>> changing the value.
>>
>
> Firefox add-on Firebug is also very good for this.
>
> By the way, the original message in this thread seems to be a
> misunderstanding of how CSS works. Tapestry doesn't change CSS files: it
> just includes them. Unless your CSS files aren't included or included in
> the wrong order, this isn't a Tapestry issue at all.
>
> --
> 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: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-13 Thread George Ludwig
@Ken: Thanks for the in-depth example! I actually have my own Artifactory
repository running...if something is not available from a public
repository, I manually upload it there and everything works out.

@Thiago: Thanks for the reassurance!

In any event, I've now got this totally resolved. For the sake of others
who follow in my footsteps, here is what I learned:

If you're using Maven 2.0 (I don't know about 3), I had to explicitly
include the tapestry-wrapped yuicompressor:

 
org.apache.tapestry
tapestry-yuicompressor
${tapestry-release-version}
  

Maven usually finds these dependencies, not sure why it did not find it
this time. Using a maven dependency exclude also worked, but I prefer to
have the compression.

If you include bootstrap/jquery, you MUST add these lines to your
AppModule.java in the method contributeApplicationDefaults if you want to
stay sane:

configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false");
configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$j");

If you don't, strange things happen. For example, my Confirm mixin (the
only prototype-based mixin I have that I'm aware of) would not work, and
the mere presence of that mixin on a page  potentially interfered with
other things (i.e., the progressiveDisplay not working). The other thing I
noticed was that my Ajax Zone updates would not work until I put those
entries in. Which makes me wonder if there was something going on "under
the hood" with tapestry still referencing prototype in order to make that
work.

That about sums it up. Right now, things are working amazingly well, and my
progress on re-skinning my UI has been phenomenal.

Now, if only I can figure out why the pagination ellipsis appears in the
wrong spot!



On Wed, Feb 13, 2013 at 3:29 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Sat, 09 Feb 2013 02:08:17 -0200, George Ludwig 
> wrote:
>
>  @Lenny: so running my app with the bootstrap stuff in it, the first thing
>> I notice is that none of my onProgressiveDisplay events are getting
>> triggered, and I have no idea if this is related to the yuicompressor, or
>> if it's something else.
>>
>
> It's not related to yuicompressor at all. It just minimizes JavaScript,
> nothing beyond that.
>
> --
> 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: What is the syntax for multiple progressiveDisplay blocks on a page using tapestry5-jquery?

2013-02-12 Thread George Ludwig
Emmanuel,

Yes, the mixin was based on Prototype.

I'm not sure what your second question is...during testing, my app included
the jQuery library, but it was not being used as far as I could tell. I
simply added it to my pom, ran mvn ecipse:eclipse, and that was enough to
cause things to break.

I don't get a javascript error, or any other error.

-George




On Tue, Feb 12, 2013 at 1:29 AM, Emmanuel DEMEY wrote:

> Hi,
>
> The confirm mixin is based on Prototype ?
>
> Is Tapestry5-jQuery application a full jQuery application ? or a prototype
> + jQuery application ?
>
> Do you have a JavaScript error ?
>
> Manu
>
>
> 2013/2/12 George Ludwig 
>
> > Emmanuel,
> >
> > This is what I found. In the .tml before the progressiveDisplay blocks, I
> > have this at the top of the page:
> >
> > 
> >  t:mixins="confirm"
> > >
> > 
> >
> > I had to do this to ensure that tapestry properly loaded the confirm
> mixin
> > (written by Chris Lewis) before it displayed the page; at one point it
> was
> > causing errors due to some timing issue. If I remove the eventlink from
> the
> > block, then the progressiveDisplay blocks work correctly. This is %100
> > reproducible.
> >
> > As I said, this error only occurs when tapestry5-jquery is in the
> > classpath.
> >
> > I find this very strange!
> >
> > -George
> >
> >
> >
> > On Mon, Feb 11, 2013 at 5:46 PM, George Ludwig  > >wrote:
> >
> > > Emmanuel,
> > >
> > > I resolved the issue...thanks for your help!
> > >
> > > -George
> > >
> > >
> > > On Mon, Feb 11, 2013 at 5:34 PM, George Ludwig  > >wrote:
> > >
> > >> I created an empty project using the tapestry prototype and imported
> > >> jquery, and sure enough, progressive display works. I guess I'm going
> to
> > >> have to start paring my app down until I discover what is causing the
> > >> problem...
> > >>
> > >>
> > >> On Mon, Feb 11, 2013 at 4:10 PM, George Ludwig <
> georgelud...@gmail.com
> > >wrote:
> > >>
> > >>> Emmanuel,
> > >>>
> > >>> Much appreciated. Here's my situation...
> > >>>
> > >>> I've got a page with 3 progressiveDisplay blocks...and it works fine
> > >>> until I add tapestry5-jquery in to my classpath. With jquery in my
> > >>> classpath, the progressive display events never fire on the server,
> > and all
> > >>> I get are the spinning ajax icons. I have done nothing to my project
> > other
> > >>> than adding the jquery jar to my classpath...i.e., didn't add
> anything
> > to
> > >>> my layouts or anything other than simply adding it to the classpath.
> > >>>
> > >>> At first I thought there must have been a change in the syntax, based
> > on
> > >>> this: http://tapestry5-jquery.com/core/docsprogressivedisplay It
> shows
> > >>> a different syntax than what I'm used to. But I'm not able to make
> that
> > >>> syntax work either, even for a single progressive display.
> > >>>
> > >>> Finally, I took a closer look at the jumpstart project, which
> > presumably
> > >>> has jquery in the classpath, and the syntax he is using for
> progressive
> > >>> display is identical to what I'm using.
> > >>>
> > >>> I'm dead in the water here...any help is much appreciated!
> > >>>
> > >>> -George
> > >>>
> > >>> Here is a simplified version of my tml and class files:
> > >>>
> > >>> .tml:
> > >>>
> > >>> 
> > >>> Acquisition Info
> > >>>  > >>> t:initial="block:genericBlock" t:update="show" style="margin-left:
> > 10px;">
> > >>>  
> > >>>  
> > >>>  
> > >>> 
> > >>> 
> > >>>
> > >>> 
> > >>>  Marketing Info
> > >>>  > >>> t:initial="block:genericBlock" t:update="show" style="margin-left:
> > 10px;">
> > >>>  
> > >>>  
> > >>>  
> > >>> 
> > >>> 
> > >>>
> > >>> 
> > >>>  Twee

Re: What is the syntax for multiple progressiveDisplay blocks on a page using tapestry5-jquery?

2013-02-11 Thread George Ludwig
Emmanuel,

This is what I found. In the .tml before the progressiveDisplay blocks, I
have this at the top of the page:





I had to do this to ensure that tapestry properly loaded the confirm mixin
(written by Chris Lewis) before it displayed the page; at one point it was
causing errors due to some timing issue. If I remove the eventlink from the
block, then the progressiveDisplay blocks work correctly. This is %100
reproducible.

As I said, this error only occurs when tapestry5-jquery is in the classpath.

I find this very strange!

-George



On Mon, Feb 11, 2013 at 5:46 PM, George Ludwig wrote:

> Emmanuel,
>
> I resolved the issue...thanks for your help!
>
> -George
>
>
> On Mon, Feb 11, 2013 at 5:34 PM, George Ludwig wrote:
>
>> I created an empty project using the tapestry prototype and imported
>> jquery, and sure enough, progressive display works. I guess I'm going to
>> have to start paring my app down until I discover what is causing the
>> problem...
>>
>>
>> On Mon, Feb 11, 2013 at 4:10 PM, George Ludwig wrote:
>>
>>> Emmanuel,
>>>
>>> Much appreciated. Here's my situation...
>>>
>>> I've got a page with 3 progressiveDisplay blocks...and it works fine
>>> until I add tapestry5-jquery in to my classpath. With jquery in my
>>> classpath, the progressive display events never fire on the server, and all
>>> I get are the spinning ajax icons. I have done nothing to my project other
>>> than adding the jquery jar to my classpath...i.e., didn't add anything to
>>> my layouts or anything other than simply adding it to the classpath.
>>>
>>> At first I thought there must have been a change in the syntax, based on
>>> this: http://tapestry5-jquery.com/core/docsprogressivedisplay It shows
>>> a different syntax than what I'm used to. But I'm not able to make that
>>> syntax work either, even for a single progressive display.
>>>
>>> Finally, I took a closer look at the jumpstart project, which presumably
>>> has jquery in the classpath, and the syntax he is using for progressive
>>> display is identical to what I'm using.
>>>
>>> I'm dead in the water here...any help is much appreciated!
>>>
>>> -George
>>>
>>> Here is a simplified version of my tml and class files:
>>>
>>> .tml:
>>>
>>> 
>>> Acquisition Info
>>> >> t:initial="block:genericBlock" t:update="show" style="margin-left: 10px;">
>>>  
>>>  
>>>  
>>> 
>>> 
>>>
>>> 
>>>  Marketing Info
>>> >> t:initial="block:genericBlock" t:update="show" style="margin-left: 10px;">
>>>  
>>>  
>>>  
>>> 
>>> 
>>>
>>> 
>>>  Tweet Info
>>> >> t:update="show" style="margin-left: 10px;">
>>>  
>>>  
>>>  
>>> 
>>> 
>>>
>>> class:
>>>
>>> void onProgressiveDisplayFromGetAcquisitionInfo() throws Exception {
>>> // a bunch of calculations to set up an acquisitionInfo data structure
>>> that is referenced by the tml
>>> }
>>>
>>> void onProgressiveDisplayFromGetTweets() throws Exception {
>>> // a bunch of calculations to set up a tweets data structure that is
>>> referenced by the tml
>>> }
>>>
>>> void onProgressiveDisplayFromGetMarketingInfo() {
>>> // a bunch of calculations to set up a marketingInfo data structure that
>>> is referenced by the tml
>>> }
>>>
>>>
>>> On Mon, Feb 11, 2013 at 12:57 AM, Emmanuel DEMEY <
>>> demey.emman...@gmail.com> wrote:
>>>
>>>> Hi George,
>>>>
>>>> I have seen your post on the Tapestry5-jQuery mailing list. If it is OK
>>>>  for you, we will try to find a solution for your problem on the
>>>> Tapestry5
>>>> ML.
>>>>
>>>> What exactly you want to do with multiple blocks ?
>>>>
>>>> Emmanuel
>>>>
>>>>
>>>> 2013/2/10 George Ludwig 
>>>>
>>>> > I found the docs here:
>>>> > http://tapestry5-jquery.com/core/docsprogressivedisplay however,
>>>> looking
>>>> > at
>>>> > the code examples, I am unable to infer how to do multiple blocks on a
>>>> > page.
>>>> >
>>>> > Can anyone point me to an example?
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Emmanuel DEMEY
>>>> Ingénieur Etude et Développement
>>>> ATOS Worldline
>>>> +33 (0)6 47 47 42 02
>>>> demey.emman...@gmail.com
>>>> http://emmanueldemey.fr/
>>>>
>>>> Twitter : @EmmanuelDemey
>>>>
>>>
>>>
>>
>


Re: What is the syntax for multiple progressiveDisplay blocks on a page using tapestry5-jquery?

2013-02-11 Thread George Ludwig
Emmanuel,

I resolved the issue...thanks for your help!

-George


On Mon, Feb 11, 2013 at 5:34 PM, George Ludwig wrote:

> I created an empty project using the tapestry prototype and imported
> jquery, and sure enough, progressive display works. I guess I'm going to
> have to start paring my app down until I discover what is causing the
> problem...
>
>
> On Mon, Feb 11, 2013 at 4:10 PM, George Ludwig wrote:
>
>> Emmanuel,
>>
>> Much appreciated. Here's my situation...
>>
>> I've got a page with 3 progressiveDisplay blocks...and it works fine
>> until I add tapestry5-jquery in to my classpath. With jquery in my
>> classpath, the progressive display events never fire on the server, and all
>> I get are the spinning ajax icons. I have done nothing to my project other
>> than adding the jquery jar to my classpath...i.e., didn't add anything to
>> my layouts or anything other than simply adding it to the classpath.
>>
>> At first I thought there must have been a change in the syntax, based on
>> this: http://tapestry5-jquery.com/core/docsprogressivedisplay It shows a
>> different syntax than what I'm used to. But I'm not able to make that
>> syntax work either, even for a single progressive display.
>>
>> Finally, I took a closer look at the jumpstart project, which presumably
>> has jquery in the classpath, and the syntax he is using for progressive
>> display is identical to what I'm using.
>>
>> I'm dead in the water here...any help is much appreciated!
>>
>> -George
>>
>> Here is a simplified version of my tml and class files:
>>
>> .tml:
>>
>> 
>> Acquisition Info
>> > t:initial="block:genericBlock" t:update="show" style="margin-left: 10px;">
>>  
>>  
>>  
>> 
>> 
>>
>> 
>>  Marketing Info
>> > t:initial="block:genericBlock" t:update="show" style="margin-left: 10px;">
>>  
>>  
>>  
>> 
>> 
>>
>> 
>>  Tweet Info
>> > t:update="show" style="margin-left: 10px;">
>>  
>>  
>>  
>> 
>> 
>>
>> class:
>>
>> void onProgressiveDisplayFromGetAcquisitionInfo() throws Exception {
>> // a bunch of calculations to set up an acquisitionInfo data structure
>> that is referenced by the tml
>> }
>>
>> void onProgressiveDisplayFromGetTweets() throws Exception {
>> // a bunch of calculations to set up a tweets data structure that is
>> referenced by the tml
>> }
>>
>> void onProgressiveDisplayFromGetMarketingInfo() {
>> // a bunch of calculations to set up a marketingInfo data structure that
>> is referenced by the tml
>> }
>>
>>
>> On Mon, Feb 11, 2013 at 12:57 AM, Emmanuel DEMEY <
>> demey.emman...@gmail.com> wrote:
>>
>>> Hi George,
>>>
>>> I have seen your post on the Tapestry5-jQuery mailing list. If it is OK
>>>  for you, we will try to find a solution for your problem on the
>>> Tapestry5
>>> ML.
>>>
>>> What exactly you want to do with multiple blocks ?
>>>
>>> Emmanuel
>>>
>>>
>>> 2013/2/10 George Ludwig 
>>>
>>> > I found the docs here:
>>> > http://tapestry5-jquery.com/core/docsprogressivedisplay however,
>>> looking
>>> > at
>>> > the code examples, I am unable to infer how to do multiple blocks on a
>>> > page.
>>> >
>>> > Can anyone point me to an example?
>>> >
>>>
>>>
>>>
>>> --
>>> Emmanuel DEMEY
>>> Ingénieur Etude et Développement
>>> ATOS Worldline
>>> +33 (0)6 47 47 42 02
>>> demey.emman...@gmail.com
>>> http://emmanueldemey.fr/
>>>
>>> Twitter : @EmmanuelDemey
>>>
>>
>>
>


Re: What is the syntax for multiple progressiveDisplay blocks on a page using tapestry5-jquery?

2013-02-11 Thread George Ludwig
I created an empty project using the tapestry prototype and imported
jquery, and sure enough, progressive display works. I guess I'm going to
have to start paring my app down until I discover what is causing the
problem...


On Mon, Feb 11, 2013 at 4:10 PM, George Ludwig wrote:

> Emmanuel,
>
> Much appreciated. Here's my situation...
>
> I've got a page with 3 progressiveDisplay blocks...and it works fine until
> I add tapestry5-jquery in to my classpath. With jquery in my classpath, the
> progressive display events never fire on the server, and all I get are the
> spinning ajax icons. I have done nothing to my project other than adding
> the jquery jar to my classpath...i.e., didn't add anything to my layouts or
> anything other than simply adding it to the classpath.
>
> At first I thought there must have been a change in the syntax, based on
> this: http://tapestry5-jquery.com/core/docsprogressivedisplay It shows a
> different syntax than what I'm used to. But I'm not able to make that
> syntax work either, even for a single progressive display.
>
> Finally, I took a closer look at the jumpstart project, which presumably
> has jquery in the classpath, and the syntax he is using for progressive
> display is identical to what I'm using.
>
> I'm dead in the water here...any help is much appreciated!
>
> -George
>
> Here is a simplified version of my tml and class files:
>
> .tml:
>
> 
> Acquisition Info
>  t:initial="block:genericBlock" t:update="show" style="margin-left: 10px;">
>  
>  
>  
> 
> 
>
> 
>  Marketing Info
>  t:initial="block:genericBlock" t:update="show" style="margin-left: 10px;">
>  
>  
>  
> 
> 
>
> 
>  Tweet Info
>  t:update="show" style="margin-left: 10px;">
>  
>  
>  
> 
> 
>
> class:
>
> void onProgressiveDisplayFromGetAcquisitionInfo() throws Exception {
> // a bunch of calculations to set up an acquisitionInfo data structure
> that is referenced by the tml
> }
>
> void onProgressiveDisplayFromGetTweets() throws Exception {
> // a bunch of calculations to set up a tweets data structure that is
> referenced by the tml
> }
>
> void onProgressiveDisplayFromGetMarketingInfo() {
> // a bunch of calculations to set up a marketingInfo data structure that
> is referenced by the tml
> }
>
>
> On Mon, Feb 11, 2013 at 12:57 AM, Emmanuel DEMEY  > wrote:
>
>> Hi George,
>>
>> I have seen your post on the Tapestry5-jQuery mailing list. If it is OK
>>  for you, we will try to find a solution for your problem on the Tapestry5
>> ML.
>>
>> What exactly you want to do with multiple blocks ?
>>
>> Emmanuel
>>
>>
>> 2013/2/10 George Ludwig 
>>
>> > I found the docs here:
>> > http://tapestry5-jquery.com/core/docsprogressivedisplay however,
>> looking
>> > at
>> > the code examples, I am unable to infer how to do multiple blocks on a
>> > page.
>> >
>> > Can anyone point me to an example?
>> >
>>
>>
>>
>> --
>> Emmanuel DEMEY
>> Ingénieur Etude et Développement
>> ATOS Worldline
>> +33 (0)6 47 47 42 02
>> demey.emman...@gmail.com
>> http://emmanueldemey.fr/
>>
>> Twitter : @EmmanuelDemey
>>
>
>


Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Lenny: so running my app with the bootstrap stuff in it, the first thing I
notice is that none of my onProgressiveDisplay events are getting
triggered, and I have no idea if this is related to the yuicompressor, or
if it's something else.

That's what I hate about workaround...the throw way to much entropy in to
the solution  matrix.


On Fri, Feb 8, 2013 at 7:33 PM, Lenny Primak  wrote:

> It's optional. If you aren't using it and its causing you problems don't
> worry about it. there are tons of issues with it. You can google past
> discussions about how to make it work if you really need of. I suspect you
> don't.
>
> On Feb 8, 2013, at 10:27 PM, George Ludwig  wrote:
>
> > @Lenny: I excluded tapestry-yuicompressor, and maven is happy, but I
> can't
> > help but wonder if something is actually going to need that compressor!
> >
> >
> > On Fri, Feb 8, 2013 at 7:25 PM, Lenny Primak 
> wrote:
> >
> >> Yes. Exactly right.  Find out what includes it via mvn dependency:tree
> and
> >> add exclusions for every one of them.
> >>
> >> On Feb 8, 2013, at 10:23 PM, George Ludwig 
> wrote:
> >>
> >>> @Lenny: I get the maven exclusion, but what exactly should I exclude?
> Is
> >> it
> >>> safe to exclude tapestry-yuicompressor on version 5.3.6?
> >>>
> >>>
> >>> On Fri, Feb 8, 2013 at 7:21 PM, Lenny Primak 
> >> wrote:
> >>>
> >>>> Maven exclusion is the key thing.  Use Google for more details.
> >>>>
> >>>> On Feb 8, 2013, at 10:19 PM, George Ludwig wrote:
> >>>>
> >>>>> @Chris: I tried downgrading to tapestry 5.3.4, and it made no
> apparent
> >>>>> difference.
> >>>>>
> >>>>> Also, the maven error tells me that the missing dependency is
> >>
> bootstrap-2.1.3->tapestry-yuicompressor-5.3.4->...yahoo.platform.yuicompressor-2.4.7
> >>>>>
> >>>>> Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I
> don't
> >>>> see
> >>>>> either tapestry-yuicompressor-5.3.4 or
> >>>>> ...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only
> >> wonder
> >>>>> how this is possible.
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak  >
> >>>> wrote:
> >>>>>
> >>>>>> This is really a maven question.
> >>>>>> Just put an exclusion in your bootstrap dependency and then
> >>>>>> add your own tapestry dependency.
> >>>>>> This way you control what versions you get.
> >>>>>>
> >>>>>> On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:
> >>>>>>
> >>>>>>> I've been running in circles trying to make Eclipse and Maven happy
> >>>> with
> >>>>>>> the dependencies, but I've had no luck.
> >>>>>>>
> >>>>>>> My final play was to download Jumpstart 6.6.5 and run the build,
> then
> >>>>>>> upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar
> to
> >>>> my
> >>>>>>> artifact repository.
> >>>>>>>
> >>>>>>> I then ad those to my pom.xml, but when I run mvn:eclipse, it still
> >>>>>>> complains:
> >>>>>>> Project 'ui' is missing required library:
> >>
> '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
> >>>>>>> '
> >>>>>>>
> >>>>>>> I've read a thread about problems relating to yuicompressor, but I
> >> have
> >>>>>> no
> >>>>>>> idea what to do about it, or why the jumpstart project is seemingly
> >>>> able
> >>>>>> to
> >>>>>>> get away without it.
> >>>>>>>
> >>>>>>> Any help is much appreciated!
> >>>>>>>
> >>>>>>> -George
> >>>>>>
> >>>>>>
> >>>>>>
> -
> >>>>>> 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
> >>
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Lenny: I excluded tapestry-yuicompressor, and maven is happy, but I can't
help but wonder if something is actually going to need that compressor!


On Fri, Feb 8, 2013 at 7:25 PM, Lenny Primak  wrote:

> Yes. Exactly right.  Find out what includes it via mvn dependency:tree and
> add exclusions for every one of them.
>
> On Feb 8, 2013, at 10:23 PM, George Ludwig  wrote:
>
> > @Lenny: I get the maven exclusion, but what exactly should I exclude? Is
> it
> > safe to exclude tapestry-yuicompressor on version 5.3.6?
> >
> >
> > On Fri, Feb 8, 2013 at 7:21 PM, Lenny Primak 
> wrote:
> >
> >> Maven exclusion is the key thing.  Use Google for more details.
> >>
> >> On Feb 8, 2013, at 10:19 PM, George Ludwig wrote:
> >>
> >>> @Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent
> >>> difference.
> >>>
> >>> Also, the maven error tells me that the missing dependency is
> >>
> bootstrap-2.1.3->tapestry-yuicompressor-5.3.4->...yahoo.platform.yuicompressor-2.4.7
> >>>
> >>> Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I don't
> >> see
> >>> either tapestry-yuicompressor-5.3.4 or
> >>> ...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only
> wonder
> >>> how this is possible.
> >>>
> >>>
> >>>
> >>> On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak 
> >> wrote:
> >>>
> >>>> This is really a maven question.
> >>>> Just put an exclusion in your bootstrap dependency and then
> >>>> add your own tapestry dependency.
> >>>> This way you control what versions you get.
> >>>>
> >>>> On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:
> >>>>
> >>>>> I've been running in circles trying to make Eclipse and Maven happy
> >> with
> >>>>> the dependencies, but I've had no luck.
> >>>>>
> >>>>> My final play was to download Jumpstart 6.6.5 and run the build, then
> >>>>> upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to
> >> my
> >>>>> artifact repository.
> >>>>>
> >>>>> I then ad those to my pom.xml, but when I run mvn:eclipse, it still
> >>>>> complains:
> >>>>> Project 'ui' is missing required library:
> >>
> '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
> >>>>> '
> >>>>>
> >>>>> I've read a thread about problems relating to yuicompressor, but I
> have
> >>>> no
> >>>>> idea what to do about it, or why the jumpstart project is seemingly
> >> able
> >>>> to
> >>>>> get away without it.
> >>>>>
> >>>>> Any help is much appreciated!
> >>>>>
> >>>>> -George
> >>>>
> >>>>
> >>>> -
> >>>> 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: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Lenny: I get the maven exclusion, but what exactly should I exclude? Is it
safe to exclude tapestry-yuicompressor on version 5.3.6?


On Fri, Feb 8, 2013 at 7:21 PM, Lenny Primak  wrote:

> Maven exclusion is the key thing.  Use Google for more details.
>
> On Feb 8, 2013, at 10:19 PM, George Ludwig wrote:
>
> > @Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent
> > difference.
> >
> > Also, the maven error tells me that the missing dependency is
> >
> bootstrap-2.1.3->tapestry-yuicompressor-5.3.4->...yahoo.platform.yuicompressor-2.4.7
> >
> > Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I don't
> see
> > either tapestry-yuicompressor-5.3.4 or
> > ...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only wonder
> > how this is possible.
> >
> >
> >
> > On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak 
> wrote:
> >
> >> This is really a maven question.
> >> Just put an exclusion in your bootstrap dependency and then
> >> add your own tapestry dependency.
> >> This way you control what versions you get.
> >>
> >> On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:
> >>
> >>> I've been running in circles trying to make Eclipse and Maven happy
> with
> >>> the dependencies, but I've had no luck.
> >>>
> >>> My final play was to download Jumpstart 6.6.5 and run the build, then
> >>> upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to
> my
> >>> artifact repository.
> >>>
> >>> I then ad those to my pom.xml, but when I run mvn:eclipse, it still
> >>> complains:
> >>> Project 'ui' is missing required library:
> >>>
> >>
> '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
> >>> '
> >>>
> >>> I've read a thread about problems relating to yuicompressor, but I have
> >> no
> >>> idea what to do about it, or why the jumpstart project is seemingly
> able
> >> to
> >>> get away without it.
> >>>
> >>> Any help is much appreciated!
> >>>
> >>> -George
> >>
> >>
> >> -
> >> 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: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent
difference.

Also, the maven error tells me that the missing dependency is
bootstrap-2.1.3->tapestry-yuicompressor-5.3.4->...yahoo.platform.yuicompressor-2.4.7

Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I don't see
either tapestry-yuicompressor-5.3.4 or
...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only wonder
how this is possible.



On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak  wrote:

> This is really a maven question.
> Just put an exclusion in your bootstrap dependency and then
> add your own tapestry dependency.
> This way you control what versions you get.
>
> On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:
>
> > I've been running in circles trying to make Eclipse and Maven happy with
> > the dependencies, but I've had no luck.
> >
> > My final play was to download Jumpstart 6.6.5 and run the build, then
> > upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to my
> > artifact repository.
> >
> > I then ad those to my pom.xml, but when I run mvn:eclipse, it still
> > complains:
> > Project 'ui' is missing required library:
> >
> '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
> > '
> >
> > I've read a thread about problems relating to yuicompressor, but I have
> no
> > idea what to do about it, or why the jumpstart project is seemingly able
> to
> > get away without it.
> >
> > Any help is much appreciated!
> >
> > -George
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
I've been running in circles trying to make Eclipse and Maven happy with
the dependencies, but I've had no luck.

My final play was to download Jumpstart 6.6.5 and run the build, then
upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to my
artifact repository.

I then ad those to my pom.xml, but when I run mvn:eclipse, it still
complains:
Project 'ui' is missing required library:
'/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
'

I've read a thread about problems relating to yuicompressor, but I have no
idea what to do about it, or why the jumpstart project is seemingly able to
get away without it.

Any help is much appreciated!

-George


Re: Appropriate use of ProgressiveDisplay?

2012-08-17 Thread George Ludwig
ProgressiveDisplay does almost exactly what I need, with a small exception.
On the same page, some actionlinks should trigger it, while others should
not. So today I hacked it to work the way I wanted...I'd appreciate it if
someone can tell me if I did something monumentally stupid!

I copied ProgressiveDisplay and all its resources in to my project, renamed
to MyProgressiveDisplay.

In MyProgressiveDisplay.java I added a persistent boolean called "skip".

I then modified the last few lines of beginRender:

// do everything normally
// check if we should skip the progress message
if(isSkip())

 return null;

return initial;


In onAction I did something similar:

if(!isSkip())

 resources.triggerContextEvent(EventConstants.PROGRESSIVE_DISPLAY,
context, eventCallback);


Those were the only hacks I did to ProgressiveDisplay. In my page code, I
did this:

@InjectComponent

private MyProgressiveDisplay myProgressiveDisplay;

Then at the appropriate points in my code, I
called myProgressiveDisplay.setSkip(true) and myProgressiveDisplay(false).

The end result is that it works exactly the way I wanted it to. My
questions is, did I do anything that will cause issues when multiple users
are on the system? I.e., is MyProgressiveDisplay a singleton? Because that
would screw things up.


-George


Re: Appropriate use of ProgressiveDisplay?

2012-08-16 Thread George Ludwig
Thanks Taha and Michael! I actually understand HTML/CSS/JavaScript fairly
well...it's understanding how to crosswire JS with Tapestry that has had me
ripping out my hair.

Plenty to read here...

On Thu, Aug 16, 2012 at 7:04 PM, Michael Prescott <
michael.r.presc...@gmail.com> wrote:

> So, here's a sketch of a process for making a form that, when you submit
> it, replaces its surrounding zone with a loading message.  I haven't done
> this, so I might be wrong on a few key points.
>
> Pop open a basic Javascript tutorial and learn how to show/hide a .
>  Learn enough CSS and HTML to style that div the way you want it.  (This
> might be a day's time.)
>
> Tapestry bundles Prototype and Scriptaculous, so (if you feel like it), you
> can the special effects those frameworks offer for smoother fading in and
> out - those libraries' sites have tutorials that will show you how to do
> that.
>
> Then, read all the docs associated with Tapestry Zones, and then read the
> code for Zone and its attendant JavaScript.  (At this point you may find it
> useful to cross-reference with how Tapestry lets you incorporate JS
> libraries through annotations, and a bit about how client-side and
> server-side events are wired together.)
>
> The Zone spinner might be some sort of animated GIF (you could use Chrome's
> right-click 'Inspect Element' to probe), so that's a good thing to look
> for, since that's what you're trying to replace.  Most of the components
> render themselves in code, with a MarkupWriter, rather than having a .tml
> template, so the HTML you're looking for will be slightly obfuscated in
> that regard.
>
> Or.. whatever Taha just sent. :-)
>
> Michael
>
> On 16 August 2012 21:39, George Ludwig  wrote:
>
> > Michael,
> >
> > Ideally, the "please wait" message would appear over the existing layout,
> > and would go away after the operation is complete and the new data is
> > available. But I've already Wasted so many hours on this topic, I don't
> > really give a crap anymore how it works. I'll take whatever I can get.
> >
> > "being prepared to roll up your
> > sleeves a bit and learn how to show/hide a few blocks of HTML in response
> > to events is a good idea"
> >
> > I would love to do this, and have spent a fair number of hours searching
> > for resources on that very subject, and have yet to find any solid
> starting
> > point. I'm actually fairly blown away by how completely fruitless the
> > search has been. If you have suggestions, pelase let me know!
> >
> > -George
> >
> >
> > On Thu, Aug 16, 2012 at 6:15 PM, Michael Prescott <
> > michael.r.presc...@gmail.com> wrote:
> >
> > > Can you describe the layout of your page in a bit more detail?
> > >
> > > I'm imagining a form, and when you submit it, you want a 'saving'
> message
> > > to take the place of the form.  Is that right?  (This sounds like a
> hack
> > of
> > > Zone to me.)  Or is the message some kind of lightbox while the page
> > behind
> > > changes completely?  (That's a different kettle of fish entirely.)
> > >
> > > The UI is a lot more like glue code, so while most simple things like
> > > displaying messages aren't that hard, being prepared to roll up your
> > > sleeves a bit and learn how to show/hide a few blocks of HTML in
> response
> > > to events is a good idea.  Tapestry isn't really about doing fancy UI
> > > things while still pretending you're only writing server code.  In
> terms
> > of
> > > client-side code, I think of Tapestry as a bit like an IoC service for
> > the
> > > page.
> > >
> > > Michael
> > >
> > > On 16 August 2012 21:04, George Ludwig  wrote:
> > >
> > > > Can anyone give me any pointers? All I need is to be able to
> > > enable/disable
> > > > a busy busy message based on what else is happening in my page. This
> is
> > > > such an obvious use case, I can't believe I'm the only one doing it.
> > And
> > > > every time I look at the Tapestry docs I get nowhere. I don't
> > understand
> > > > how the lifecycle or render cycle of this message can mesh with
> > > Tapestry's
> > > > render cycle.
> > > >
> > > >
> > > > On Thu, Aug 16, 2012 at 4:36 PM, George Ludwig <
> georgelud...@gmail.com
> > > > >wrote:
> > > >
> > > > > Ch

Re: Appropriate use of ProgressiveDisplay?

2012-08-16 Thread George Ludwig
Michael,

Ideally, the "please wait" message would appear over the existing layout,
and would go away after the operation is complete and the new data is
available. But I've already Wasted so many hours on this topic, I don't
really give a crap anymore how it works. I'll take whatever I can get.

"being prepared to roll up your
sleeves a bit and learn how to show/hide a few blocks of HTML in response
to events is a good idea"

I would love to do this, and have spent a fair number of hours searching
for resources on that very subject, and have yet to find any solid starting
point. I'm actually fairly blown away by how completely fruitless the
search has been. If you have suggestions, pelase let me know!

-George


On Thu, Aug 16, 2012 at 6:15 PM, Michael Prescott <
michael.r.presc...@gmail.com> wrote:

> Can you describe the layout of your page in a bit more detail?
>
> I'm imagining a form, and when you submit it, you want a 'saving' message
> to take the place of the form.  Is that right?  (This sounds like a hack of
> Zone to me.)  Or is the message some kind of lightbox while the page behind
> changes completely?  (That's a different kettle of fish entirely.)
>
> The UI is a lot more like glue code, so while most simple things like
> displaying messages aren't that hard, being prepared to roll up your
> sleeves a bit and learn how to show/hide a few blocks of HTML in response
> to events is a good idea.  Tapestry isn't really about doing fancy UI
> things while still pretending you're only writing server code.  In terms of
> client-side code, I think of Tapestry as a bit like an IoC service for the
> page.
>
> Michael
>
> On 16 August 2012 21:04, George Ludwig  wrote:
>
> > Can anyone give me any pointers? All I need is to be able to
> enable/disable
> > a busy busy message based on what else is happening in my page. This is
> > such an obvious use case, I can't believe I'm the only one doing it. And
> > every time I look at the Tapestry docs I get nowhere. I don't understand
> > how the lifecycle or render cycle of this message can mesh with
> Tapestry's
> > render cycle.
> >
> >
> > On Thu, Aug 16, 2012 at 4:36 PM, George Ludwig  > >wrote:
> >
> > > Christian,
> > >
> > > The thing is, I'm server-side guy being forced to do UI...I really
> don't
> > > know where to start on building such an object. Isn't there some
> > component
> > > already out there or must I re-invent the wheel?
> > >
> > > -George
> > >
> > >
> > > On Thu, Aug 16, 2012 at 2:31 PM, Christian Riedel <
> > cr.ml...@googlemail.com
> > > > wrote:
> > >
> > >> Hi George,
> > >>
> > >> ProgressiveDisplay's initial block may be used to display a "loading"
> > >> message / spinning icon.
> > >> But I wouldn't recommend this component to be used just as a feedback
> > >> mechanism. Build your own component that may listen to certain events
> > and
> > >> show/hide itself as needed.
> > >>
> > >> ProgressiveDisplay is rather useful if you have expensive server-side
> > >> stuff going on but don't want the user to wait 10 seconds until the
> page
> > >> can be loaded. The component will first show a placeholder and
> > immediately
> > >> send a separate request using XHR to the server to get the expensive
> > stuff.
> > >>
> > >> Best
> > >> Christian
> > >>
> > >> Am 16.08.2012 um 23:05 schrieb George Ludwig:
> > >>
> > >> > I want to use ProgressiveDisplay to display a message and spinner
> icon
> > >> when
> > >> > an operation is taking place. For example, when saving changes, the
> > >> message
> > >> > would be "Saving..." If the page was loading, the message would be
> > >> > "Loading...".
> > >> >
> > >> > Is this an appropriate use of ProgressiveDisplay, or is there a
> better
> > >> way?
> > >> >
> > >> > Second, when using "t:initial="block:..."  what is the easiest way
> to
> > >> get
> > >> > the spinning icon in it?
> > >> >
> > >> > -George
> > >>
> > >>
> > >> -
> > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > >>
> > >>
> > >
> >
>


Re: Appropriate use of ProgressiveDisplay?

2012-08-16 Thread George Ludwig
Can anyone give me any pointers? All I need is to be able to enable/disable
a busy busy message based on what else is happening in my page. This is
such an obvious use case, I can't believe I'm the only one doing it. And
every time I look at the Tapestry docs I get nowhere. I don't understand
how the lifecycle or render cycle of this message can mesh with Tapestry's
render cycle.


On Thu, Aug 16, 2012 at 4:36 PM, George Ludwig wrote:

> Christian,
>
> The thing is, I'm server-side guy being forced to do UI...I really don't
> know where to start on building such an object. Isn't there some component
> already out there or must I re-invent the wheel?
>
> -George
>
>
> On Thu, Aug 16, 2012 at 2:31 PM, Christian Riedel  > wrote:
>
>> Hi George,
>>
>> ProgressiveDisplay's initial block may be used to display a "loading"
>> message / spinning icon.
>> But I wouldn't recommend this component to be used just as a feedback
>> mechanism. Build your own component that may listen to certain events and
>> show/hide itself as needed.
>>
>> ProgressiveDisplay is rather useful if you have expensive server-side
>> stuff going on but don't want the user to wait 10 seconds until the page
>> can be loaded. The component will first show a placeholder and immediately
>> send a separate request using XHR to the server to get the expensive stuff.
>>
>> Best
>> Christian
>>
>> Am 16.08.2012 um 23:05 schrieb George Ludwig:
>>
>> > I want to use ProgressiveDisplay to display a message and spinner icon
>> when
>> > an operation is taking place. For example, when saving changes, the
>> message
>> > would be "Saving..." If the page was loading, the message would be
>> > "Loading...".
>> >
>> > Is this an appropriate use of ProgressiveDisplay, or is there a better
>> way?
>> >
>> > Second, when using "t:initial="block:..."  what is the easiest way to
>> get
>> > the spinning icon in it?
>> >
>> > -George
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Re: Appropriate use of ProgressiveDisplay?

2012-08-16 Thread George Ludwig
Christian,

The thing is, I'm server-side guy being forced to do UI...I really don't
know where to start on building such an object. Isn't there some component
already out there or must I re-invent the wheel?

-George

On Thu, Aug 16, 2012 at 2:31 PM, Christian Riedel
wrote:

> Hi George,
>
> ProgressiveDisplay's initial block may be used to display a "loading"
> message / spinning icon.
> But I wouldn't recommend this component to be used just as a feedback
> mechanism. Build your own component that may listen to certain events and
> show/hide itself as needed.
>
> ProgressiveDisplay is rather useful if you have expensive server-side
> stuff going on but don't want the user to wait 10 seconds until the page
> can be loaded. The component will first show a placeholder and immediately
> send a separate request using XHR to the server to get the expensive stuff.
>
> Best
> Christian
>
> Am 16.08.2012 um 23:05 schrieb George Ludwig:
>
> > I want to use ProgressiveDisplay to display a message and spinner icon
> when
> > an operation is taking place. For example, when saving changes, the
> message
> > would be "Saving..." If the page was loading, the message would be
> > "Loading...".
> >
> > Is this an appropriate use of ProgressiveDisplay, or is there a better
> way?
> >
> > Second, when using "t:initial="block:..."  what is the easiest way to get
> > the spinning icon in it?
> >
> > -George
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Creating a linked list of pages for easy backward navigation?

2012-08-16 Thread George Ludwig
Thiago,

It turned out that I didn't need bi-directional traversal of the page
history, just backtracking. So I went with a stack of objects that
encapsulated all the page data I needed to persist. Works great!

Question: To clear the persisted stack, do I need to do anything other than
set it to null when I'm done with it?

Best,

George

On Fri, Aug 3, 2012 at 8:01 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Fri, 03 Aug 2012 19:32:13 -0300, George Ludwig 
> wrote:
>
>  Thiago,
>>
>
> Hi, George!
>
>
>  Thanks, that's what I thought was going on. Off the top of my head, my
>> thought is to create an aggregating data structure that holds all the
>> fields I really need (including a page id, and a previous page id), and
>> persist a list of them. Then, in my "onback" method, pass the index of
>> the previous page to the setup method.
>>
>
> Sounds good to me.
>
>
>   Is there a "best practice" for doing this?
>>
>
> As far as I know, no, so go ahead. :) The only related best practice I can
> think of is to only use session persistence when really needed and to
> remove stuff from the session when it's not needed anymore.
>
>
>> -George
>>
>>
>> On Thu, Aug 2, 2012 at 6:38 PM, Thiago H de Paula Figueiredo <
>> thiag...@gmail.com> wrote:
>>
>>  On Thu, 02 Aug 2012 22:11:47 -0300, George Ludwig <
>>> georgelud...@gmail.com>
>>> wrote:
>>>
>>>  Thiago,
>>>
>>>>
>>>>
>>> Hi!
>>>
>>>
>>>
>>>  The previouspage object is referenced when we execute the continue
>>>> method,
>>>> which is what advances to the next iteration:
>>>>
>>>> @InjectPage
>>>> private Refine refine;
>>>>
>>>> Object onContinue() throws Exception {
>>>>
>>>>// do a bunch of business logic
>>>>
>>>>refine.setup(this);
>>>>
>>>>return refine;
>>>>
>>>> }
>>>>
>>>>
>>> Yep, what you're seeing is expected. The object is always the same
>>> because
>>> since Tapestry 5.2 there's a single instance of each page class. Instead
>>> of
>>> persisting the page instance, persist the data with one or more @Persist
>>> fields.
>>>
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>>
>>> --**
>>> --**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>> 
>>> >
>>>
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>
> --
> 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: Creating a linked list of pages for easy backward navigation?

2012-08-03 Thread George Ludwig
Thiago,

Thanks, that's what I thought was going on. Off the top of my head, my
thought is to create an aggregating data structure that holds all the
fields I really need (including a page id, and a previous page id), and
persist a list of them. Then, in my "onback" method, pass the index of the
previous page to the setup method.

 Is there a "best practice" for doing this?

-George


On Thu, Aug 2, 2012 at 6:38 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Thu, 02 Aug 2012 22:11:47 -0300, George Ludwig 
> wrote:
>
>  Thiago,
>>
>
> Hi!
>
>
>
>> The previouspage object is referenced when we execute the continue method,
>> which is what advances to the next iteration:
>>
>> @InjectPage
>> private Refine refine;
>>
>> Object onContinue() throws Exception {
>>
>>// do a bunch of business logic
>>
>>refine.setup(this);
>>
>>return refine;
>>
>> }
>>
>
> Yep, what you're seeing is expected. The object is always the same because
> since Tapestry 5.2 there's a single instance of each page class. Instead of
> persisting the page instance, persist the data with one or more @Persist
> fields.
>
>
> --
> 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: Using outputraw to render eventlinks fails, is there a workaround?

2012-08-02 Thread George Ludwig
My bad!

On Thu, Aug 2, 2012 at 11:42 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Thu, 02 Aug 2012 15:11:25 -0300, Josh Canfield 
> wrote:
>
>  Has it been that long? :)
>>
>
> Ouch, I guess my brain is still in vacation mode. :P George thanked Josh
> replying to my e-mail and I got confused . . .  Josh, I'm sorry for
> forgetting you. :)
>
>
> --
> 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: Creating a linked list of pages for easy backward navigation?

2012-08-02 Thread George Ludwig
Thiago,

The previouspage object is referenced when we execute the continue method,
which is what advances to the next iteration:

@InjectPage
private Refine refine;

Object onContinue() throws Exception {

   // do a bunch of business logic

   refine.setup(this);

   return refine;

}

Jens:

Yes, I am using the same page class to iteratively refine the data set. It
has an entry point page (Start,java) that you only see once, the refinement
page (Refine.java) that you iterate through a few times, and the end page
(End.java) the is served when refinement is complete.

-George
On Wed, Aug 1, 2012 at 6:21 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Wed, 01 Aug 2012 20:46:44 -0300, George Ludwig 
> wrote:
>
>> My current implementation doesn't work, as it appears that each
>> previousPage is the same object. What's the best way to do this?
>>
>
> You posted just a snippet from your code that doesn't include one
> important step: how do you get the previous page object?
>
>
>
>> Current implementation:
>>
>> Before the next iteration of the page is loaded, I set it up:
>>
>> @Persist
>>
>> private Object previousPage;
>> void setup(Object previousPage) {
>>this.previousPage=**previousPage;
>> }
>>
>> Then when the user clicks back:
>>
>>   Object onBack() {
>>
>>return previousPage;
>>
>> }
>>
>
>
> --
> 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: Using outputraw to render eventlinks fails, is there a workaround?

2012-08-01 Thread George Ludwig
Josh,

Wow, thanks so much! I can definitely learn from this example...

-George

On Wed, Aug 1, 2012 at 5:12 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 31 Jul 2012 23:02:53 -0300, George Ludwig 
> wrote:
>
>  The  component is fine. What is unwieldy are the hoops I'd need to
>> jump through in order to use it in this particular case.
>>
>
> In this case, seeing your code, I'd write a component that uses
> MarkupWriter, not a template, to output the HTML you need. You could even
> use the same code you already have, just adapt it to use MarkupWriter
> instead of a StringBuilder.
>
> Something like this (inside your component class source):
>
> void beginRender(MarkupWriter writer) {
> ...
> }
>
> That's why we ask people to post what they want to do, not how to do X or
> Y, because sometimes X or Y are the wrong approach. ;)
>
>
>  Now having thought about it, I'm not even sure how to replicate the server
>> side java code in tmi. Here's the code:
>>
>> // figure out some display booleans
>>
>> boolean isYes=this.positiveTermList.**contains(member);
>>
>>   boolean isNo=this.negativeTermList.**contains(member);
>>
>>   // start row, add hashtag
>>
>>   sb.append("");
>>
>>   sb.append(member);
>>
>> // add "yes"
>>
>>   sb.append("");
>>
>>   if((!isNo&&!isYes)||isNo)
>>
>>   sb.append("> "\">yes");
>>
>>   else if(isYes)
>>
>>   sb.append("yes!");
>>
>>   // add "no"
>>
>>   sb.append("");
>>
>>   if((!isNo&&!isYes)||isYes)
>>
>>   sb.append("> "\">no");
>>
>>   else if(isNo)
>>
>>   sb.append("no!");
>>
>>   // terminate row
>>
>>   sb.append("");
>>
>> Would I not need to create a wrapper around the member object, and a then
>> have several boolean methods to return !isNo&&!isYes)||isYes etc.?  Does
>> it
>> even work if you do **?
>>
>> On Tue, Jul 31, 2012 at 6:52 PM, Thiago H de Paula Figueiredo <
>> thiag...@gmail.com> wrote:
>>
>>  On Tue, 31 Jul 2012 21:43:22 -0300, George Ludwig <
>>> georgelud...@gmail.com>
>>> wrote:
>>>
>>>  I use outputraw because it would be unwieldy to use Tapestry's 
>>>
>>>> construct to control the rendering.
>>>>
>>>>
>>> Could you please say why you think Tapestry's If component is unwieldy?
>>> And what exactly changes from the if to the else? It seems to me you can
>>> avoid the If, as you could use t:event="prop:eventName" and have a
>>> getEventName() method that defines which event will be triggered.
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>>
>>> --**
>>> --**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>> 
>>> >
>>>
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>
> --
> 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: Using outputraw to render eventlinks fails, is there a workaround?

2012-07-31 Thread George Ludwig
The  component is fine. What is unwieldy are the hoops I'd need to
jump through in order to use it in this particular case.

Now having thought about it, I'm not even sure how to replicate the server
side java code in tmi. Here's the code:

// figure out some display booleans

boolean isYes=this.positiveTermList.contains(member);

  boolean isNo=this.negativeTermList.contains(member);

  // start row, add hashtag

  sb.append("");

  sb.append(member);

// add "yes"

  sb.append("");

  if((!isNo&&!isYes)||isNo)

  sb.append("yes");

  else if(isYes)

  sb.append("yes!");

  // add "no"

  sb.append("");

  if((!isNo&&!isYes)||isYes)

  sb.append("no");

  else if(isNo)

  sb.append("no!");

  // terminate row

  sb.append("");

Would I not need to create a wrapper around the member object, and a then
have several boolean methods to return !isNo&&!isYes)||isYes etc.?  Does it
even work if you do ?

On Tue, Jul 31, 2012 at 6:52 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 31 Jul 2012 21:43:22 -0300, George Ludwig 
> wrote:
>
>  I use outputraw because it would be unwieldy to use Tapestry's 
>> construct to control the rendering.
>>
>
> Could you please say why you think Tapestry's If component is unwieldy?
> And what exactly changes from the if to the else? It seems to me you can
> avoid the If, as you could use t:event="prop:eventName" and have a
> getEventName() method that defines which event will be triggered.
>
> --
> 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: Using outputraw to render eventlinks fails, is there a workaround?

2012-07-31 Thread George Ludwig
Thanks for that info, very interesting. It makes me wonder what you are
able to send as context to an eventlink.

To your question, I just remove the # and leave business. I wish there was
a better way to do this...I get uncomfortable when I am hardcoding object
names in to urls...

On Tue, Jul 31, 2012 at 6:39 PM, Josh Canfield wrote:

> The hash tag isn't supposed to be sent to the server, so it's curious that
> it'd have an effect.
>
> http://en.wikipedia.org/wiki/Fragment_identifier
>
> "Clients are not supposed to send URI-fragments to servers when they
> retrieve a document"
>
> Although, when you say that you remove the hashtag, do you remove the whole
> #business, or just the # and leave business?
>
>
> On Tue, Jul 31, 2012 at 6:15 PM, George Ludwig  >wrote:
>
> > Josh,
> >
> > Thanks for the response. I do in fact have the onAddXXTerm implemented,
> and
> > to make sure it works, I have another part of the TML with manually
> created
> > eventlinks so I can test it.
> >
> > I figured out that outputraw wont work with eventlinks because Tapestry
> > itself transforms and re-renders them. Outputraw bypasses this.
> >
> > My second approach that I posted:
> >
> > 
> > #businesshttp://localhost:8082/discoveryassistant/refine:addyesterm/#business>
> > ">yes > href="/discoveryassistant/refine:addnoterm/#business<
> > http://localhost:8082/discoveryassistant/refine:addnoterm/#business>
> > ">no
> > 
> >
> > ...actually kind of works. What is confusing tapestry is the hashtag. If
> I
> > remove it, Tapestry works as expected. If I put it back in, then I get
> the
> > exception saying I need to add a onAddXXTerm method.
> >
> > I also tried using the html code for the hashtag, however it still fails.
> >
> > For now, I'll just strip the hashtag from the rendering portion, and
> re-add
> > it in the event handler.
> >
> > On Tue, Jul 31, 2012 at 6:07 PM, Josh Canfield  > >wrote:
> >
> > > You need to implement a handler in your component "Refine" for the
> event.
> > >
> > > public void onAddNoTerm() {
> > > }
> > >
> > > for instance.
> > >
> > >
> > > On Tue, Jul 31, 2012 at 6:04 PM, George Ludwig  > > >wrote:
> > >
> > > > Actually, this doesn't work either. I get this exception:
> > > >
> > > > org.apache.tapestry5.ioc.internal.util.TapestryException: Request
> event
> > > > 'addnoterm' (on component discoveryassistant/Refine) was not handled;
> > you
> > > > must provide a matching event handler method in the component or in
> one
> > > of
> > > > its containers.
> > > >
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(
> > > > ComponentEventRequestHandlerImpl.java:85)
> > > >
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(
> > > > ImmediateActionRenderResponseFilter.java:42)
> > > >
> > > > at $ComponentEventRequestHandler_12a61376ef8749b9.handle(Unknown
> > Source)
> > > >
> > > > at org.apache.tapestry5.internal.services.AjaxFilter.handle(
> > > > AjaxFilter.java:42)
> > > >
> > > > at $ComponentEventRequestHandler_12a61376ef8749b9.handle(Unknown
> > Source)
> > > >
> > > > at org.apache.tapestry5.services.TapestryModule$40.handle(
> > > > TapestryModule.java:2458)...
> > > >
> > > > On Tue, Jul 31, 2012 at 5:59 PM, George Ludwig <
> georgelud...@gmail.com
> > > > >wrote:
> > > >
> > > > > Nevermind I guess... I discovered I could just render like this:
> > > > >
> > > > > 
> > > > > #businesshttp://localhost:8082/discoveryassistant/refine:addyesterm/#business
> >
> > > > > ">yes > > > href="/discoveryassistant/refine:addnoterm/#business<
> > > > http://localhost:8082/discoveryassistant/refine:addnoterm/#business>
> > > > > ">no
> > > > > 
> > > > >
> > > > > On Tue, Jul 31, 2012 at 5:43 PM, George Ludwig <
> > georgelud...@gmail.com
> > > > >wrote:
> > > > >
>

Re: Using outputraw to render eventlinks fails, is there a workaround?

2012-07-31 Thread George Ludwig
Josh,

Thanks for the response. I do in fact have the onAddXXTerm implemented, and
to make sure it works, I have another part of the TML with manually created
eventlinks so I can test it.

I figured out that outputraw wont work with eventlinks because Tapestry
itself transforms and re-renders them. Outputraw bypasses this.

My second approach that I posted:


#businesshttp://localhost:8082/discoveryassistant/refine:addyesterm/#business>
">yeshttp://localhost:8082/discoveryassistant/refine:addnoterm/#business>
">no


...actually kind of works. What is confusing tapestry is the hashtag. If I
remove it, Tapestry works as expected. If I put it back in, then I get the
exception saying I need to add a onAddXXTerm method.

I also tried using the html code for the hashtag, however it still fails.

For now, I'll just strip the hashtag from the rendering portion, and re-add
it in the event handler.

On Tue, Jul 31, 2012 at 6:07 PM, Josh Canfield wrote:

> You need to implement a handler in your component "Refine" for the event.
>
> public void onAddNoTerm() {
> }
>
> for instance.
>
>
> On Tue, Jul 31, 2012 at 6:04 PM, George Ludwig  >wrote:
>
> > Actually, this doesn't work either. I get this exception:
> >
> > org.apache.tapestry5.ioc.internal.util.TapestryException: Request event
> > 'addnoterm' (on component discoveryassistant/Refine) was not handled; you
> > must provide a matching event handler method in the component or in one
> of
> > its containers.
> >
> > at
> >
> >
> org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(
> > ComponentEventRequestHandlerImpl.java:85)
> >
> > at
> >
> >
> org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(
> > ImmediateActionRenderResponseFilter.java:42)
> >
> > at $ComponentEventRequestHandler_12a61376ef8749b9.handle(Unknown Source)
> >
> > at org.apache.tapestry5.internal.services.AjaxFilter.handle(
> > AjaxFilter.java:42)
> >
> > at $ComponentEventRequestHandler_12a61376ef8749b9.handle(Unknown Source)
> >
> > at org.apache.tapestry5.services.TapestryModule$40.handle(
> > TapestryModule.java:2458)...
> >
> > On Tue, Jul 31, 2012 at 5:59 PM, George Ludwig  > >wrote:
> >
> > > Nevermind I guess... I discovered I could just render like this:
> > >
> > > 
> > > #businesshttp://localhost:8082/discoveryassistant/refine:addyesterm/#business>
> > > ">yes > href="/discoveryassistant/refine:addnoterm/#business<
> > http://localhost:8082/discoveryassistant/refine:addnoterm/#business>
> > > ">no
> > > 
> > >
> > > On Tue, Jul 31, 2012 at 5:43 PM, George Ludwig  > >wrote:
> > >
> > >> I'm trying to use outputraw to render eventlinks, however when I do
> this
> > >> tapestry does not appear to bind the event on the client to the event
> on
> > >> the server. Is there a way to make this work?
> > >>
> > >> I use outputraw because it would be unwieldy to use Tapestry's 
> > >> construct to control the rendering. Here's a simplified example with a
> > >> single row:
> > >>
> > >> 
> > >> #business > >> t:context="literal:#business" href="#">yes > >> t:type="eventlink" t:event="addNoTerm" t:context="literal:#business"
> > >> href="#">no
> > >> 
> > >>
> > >> If I click on the "yes" eventlink, the table should re-render like
> this:
> > >>
> > >> 
> > >> #businessyes! > >> t:event="addNoTerm" t:context="literal:#business"
> > href="#">no
> > >> 
> > >>
> > >> If I then clicked on the "no" eventlink, the table should re-render
> like
> > >> this:
> > >>
> > >> 
> > >> #business > >> t:context="literal:#business" href="#">yesno!
> > >> 
> > >>
> > >> As I said, I think I can make this work with the  construct, but
> > it
> > >> would take a lot of extra coding!
> > >>
> > >
> > >
> >
>


Re: Using outputraw to render eventlinks fails, is there a workaround?

2012-07-31 Thread George Ludwig
Actually, this doesn't work either. I get this exception:

org.apache.tapestry5.ioc.internal.util.TapestryException: Request event
'addnoterm' (on component discoveryassistant/Refine) was not handled; you
must provide a matching event handler method in the component or in one of
its containers.

at
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(
ComponentEventRequestHandlerImpl.java:85)

at
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(
ImmediateActionRenderResponseFilter.java:42)

at $ComponentEventRequestHandler_12a61376ef8749b9.handle(Unknown Source)

at org.apache.tapestry5.internal.services.AjaxFilter.handle(
AjaxFilter.java:42)

at $ComponentEventRequestHandler_12a61376ef8749b9.handle(Unknown Source)

at org.apache.tapestry5.services.TapestryModule$40.handle(
TapestryModule.java:2458)...

On Tue, Jul 31, 2012 at 5:59 PM, George Ludwig wrote:

> Nevermind I guess... I discovered I could just render like this:
>
> 
> #businesshttp://localhost:8082/discoveryassistant/refine:addyesterm/#business>
> ">yes href="/discoveryassistant/refine:addnoterm/#business<http://localhost:8082/discoveryassistant/refine:addnoterm/#business>
> ">no
> 
>
> On Tue, Jul 31, 2012 at 5:43 PM, George Ludwig wrote:
>
>> I'm trying to use outputraw to render eventlinks, however when I do this
>> tapestry does not appear to bind the event on the client to the event on
>> the server. Is there a way to make this work?
>>
>> I use outputraw because it would be unwieldy to use Tapestry's 
>> construct to control the rendering. Here's a simplified example with a
>> single row:
>>
>> 
>> #business> t:context="literal:#business" href="#">yes> t:type="eventlink" t:event="addNoTerm" t:context="literal:#business"
>> href="#">no
>> 
>>
>> If I click on the "yes" eventlink, the table should re-render like this:
>>
>> 
>> #businessyes!> t:event="addNoTerm" t:context="literal:#business" href="#">no
>> 
>>
>> If I then clicked on the "no" eventlink, the table should re-render like
>> this:
>>
>> 
>> #business> t:context="literal:#business" href="#">yesno!
>> 
>>
>> As I said, I think I can make this work with the  construct, but it
>> would take a lot of extra coding!
>>
>
>


Re: Using outputraw to render eventlinks fails, is there a workaround?

2012-07-31 Thread George Ludwig
Nevermind I guess... I discovered I could just render like this:


#businesshttp://localhost:8082/discoveryassistant/refine:addyesterm/#business>
">yeshttp://localhost:8082/discoveryassistant/refine:addnoterm/#business>
">no


On Tue, Jul 31, 2012 at 5:43 PM, George Ludwig wrote:

> I'm trying to use outputraw to render eventlinks, however when I do this
> tapestry does not appear to bind the event on the client to the event on
> the server. Is there a way to make this work?
>
> I use outputraw because it would be unwieldy to use Tapestry's 
> construct to control the rendering. Here's a simplified example with a
> single row:
>
> 
> #business t:context="literal:#business" href="#">yes t:type="eventlink" t:event="addNoTerm" t:context="literal:#business"
> href="#">no
> 
>
> If I click on the "yes" eventlink, the table should re-render like this:
>
> 
> #businessyes! t:event="addNoTerm" t:context="literal:#business" href="#">no
> 
>
> If I then clicked on the "no" eventlink, the table should re-render like
> this:
>
> 
> #business t:context="literal:#business" href="#">yesno!
> 
>
> As I said, I think I can make this work with the  construct, but it
> would take a lot of extra coding!
>


Re: Preferred jQuery integration?

2012-07-26 Thread George Ludwig
Thanks guys! Wasn't sure if they were the same thing or not.

As far as application requirements, have a few use cases however none are
specific to jQuery; jQuery is simply a well-known library so I thought I'd
start there.

I'm working in the Twitter ecosystem, so replicating basic tweet
functionality like retweets and replies, with the ability to track these
actions on the server side, is the sort of thing I'm going for.

Also, another basic use case is in dealing with long lists of tweets that
would be grouped by hashtag. I want to show my user a list of hashtags, and
when they click on the tag, it reveals a list of tweets. Clicking on a
different hashtag would close any open list, and open the list they just
clicked on.

I just learned that Twitter Bootstrap has some level of Tapestry
integration, and I nee to look in to it.

Best,

George

On Tue, Jul 24, 2012 at 12:25 AM, Emmanuel DEMEY
wrote:

> Hi
>
> The best documentations is our website :   http://tapestry5-jquery.com/.
> or the src/test app of the project :
> https://github.com/got5/tapestry5-jquery
>
> You can also ask your Tapestry5-jQuery relative question on your mailing
> list :  tapestry5-jqu...@googlegroups.com and I will reply to them asap.
>
> What are your needs for your Tapestry5-jQuery based application ?
>
> Manu
>
>
> 2012/7/24 Lenny Primak 
>
> > They are the same thing.
> >
> >
> >
> > On Jul 23, 2012, at 8:40 PM, George Ludwig 
> wrote:
> >
> > > I need to use the cool jQuery stuff with Tapestry 5.3.4. I've found at
> > > least 2 integrations: https://github.com/got5/tapestry5-jquery and
> > > http://tapestry5-jquery.com/.
> > >
> > > Is tHere a preferred implementation? Does one or the other have better
> > > end-user documentation?
> > >
> > > Also, are there any good tutorials for using these?
> > >
> > > Best,
> > >
> > > George
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> Emmanuel DEMEY
> Ingénieur Etude et Développement
> ATOS Worldline
> +33 (0)6 47 47 42 02
> demey.emman...@gmail.com
> http://emmanueldemey.fr/
>
> Twitter : @EmmanuelDemey
>


Preferred jQuery integration?

2012-07-23 Thread George Ludwig
I need to use the cool jQuery stuff with Tapestry 5.3.4. I've found at
least 2 integrations: https://github.com/got5/tapestry5-jquery and
http://tapestry5-jquery.com/.

Is tHere a preferred implementation? Does one or the other have better
end-user documentation?

Also, are there any good tutorials for using these?

Best,

George


Re: Tapestry 5.3.2 throws TapestryException even though the original Exception was caught and properly handled

2012-04-03 Thread George Ludwig
Thiago,

Thanks for the rapid reply. While putting together a test case to send you
(the actual code is very long and complex), I figured out this was an error
on my part.

Basically, I assumed the exception was being thrown by one method, when in
fact it was being thrown by a different method

Obviously I need to take a break!

Best,

George

On Tue, Apr 3, 2012 at 2:38 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 03 Apr 2012 18:34:11 -0300, George Ludwig 
> wrote:
>
>  Hi all,
>>
>
> Hi!
>
>
>  The problem is that when an Exception is thrown during the calculation of
>> the number, Tapestry detects that an Exception was thrown even though it
>> was gracefully handled, and throws a TapestryException. This completely
>> de-rails my own Exception handling.
>>
>> Is this considered correct behavior?
>>
>
> No. Full page code and stack trace please.
>
> --
> 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
>


Tapestry 5.3.2 throws TapestryException even though the original Exception was caught and properly handled

2012-04-03 Thread George Ludwig
Hi all,

In my page there is a method that calculates a number, which might throw a
divide by zero or null pointer Exception. This number is used in other
methods that do some calculation and return a useful String to be displayed
by the UI.

The problem is that when an Exception is thrown during the calculation of
the number, Tapestry detects that an Exception was thrown even though it
was gracefully handled, and throws a TapestryException. This completely
de-rails my own Exception handling.

Is this considered correct behavior? Is there a graceful workaround to this?

Most trivial example:

MyPage.java:

public String getMyNumber() {
   try {
  int number=calcMyNumber();
  return String.parseInt(number);
   } catch(Exception e) {
  return "number not available";
   }
}

private int calcMyNumber() throws Exception {
  int theNumber=  ... // calculations that may throw a divide by zero or NPE
  return theNumber;
}


MyPage.tml:

Here is the number: ${myNumber}


When Tapestry tries to render the page, even though any Exception thrown by
calcMyNumber() is properly caught by getMyNumber() and a proper String
value is returned, Tapestry still throws a TapestryException after
getMyNumber() returns the String "number not available".

This behavior makes it impossible for me to handle Exceptions!

Best,

George


Re: Is it possible to use Zone with Radio Group to trigger an onValueChangedFrom?

2012-02-26 Thread George Ludwig
I spent a couple of hours on this today, and learned that my understanding
of Tapestry is not yet deep enough for me to make this work.

Has anyone else done something similar? Code examples? I've searched, and
haven't been able to find anything that makes sense to me.

On Sat, Feb 25, 2012 at 1:10 AM, derkoe <
tapestry.christian.koeb...@gmail.com> wrote:

>
> georgeludwig wrote
> >
> > I was able to get a Select with zone to trigger an onValueChangedFrom...
> > event, and now I want to do the same thing with a radio group.
> >
> > After flailing away for a couple of hours, I consulted the documentation
> > and noted that the Select component indicates it will use the zone param
> > to
> > trigger an org.apache.tapestry5.EventConstants#VALUE_CHANGED event.
> > However, neither Radio nor Radio Group have that in the doc.
> >
> > So I'm guessing my code isn't working because Radio Group doesn't
> > support zones. Is this correct, and if so, are there plans to support it?
> > Is there an alternate approach by using a zone for the form containing
> the
> > radio button?
> >
>
> You're right Radio/RadioGroup does not support this. But you can implement
> it yourself with a Mixin - look at the Code of the Select component and
> extract the JS/Ajax stuff into the Mixin. Then apply the Mixin to your
> Radio
> or RadioGroup.
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-use-Zone-with-Radio-Group-to-trigger-an-onValueChangedFrom-tp5514257p5514833.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
>
>


Is it possible to use Zone with Radio Group to trigger an onValueChangedFrom?

2012-02-24 Thread George Ludwig
I was able to get a Select with zone to trigger an onValueChangedFrom...
event, and now I want to do the same thing with a radio group.

After flailing away for a couple of hours, I consulted the documentation
and noted that the Select component indicates it will use the zone param to
trigger an org.apache.tapestry5.EventConstants#VALUE_CHANGED event.
However, neither Radio nor Radio Group have that in the doc.

So I'm guessing my code isn't working because Radio Group doesn't
support zones. Is this correct, and if so, are there plans to support it?
Is there an alternate approach by using a zone for the form containing the
radio button?


Re: Simplest way to detect change of Select component?

2012-02-24 Thread George Ludwig
Thanks, I was eventually able to get it working...but I'm not sure what I
missed the first time :)

On Thu, Feb 23, 2012 at 2:18 AM, Emmanuel DEMEY wrote:

> Hi George
>
> Since Tapestry 5.2, you can use the t:zone parameter of the select
> component, in order to update a zone of your page (containing your grid).
>
>
> http://tapestry.apache.org/5.2/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1
>
> Manu
>
> 2012/2/23 Markus Grell 
>
> >
> >
> > > I'm trying to implement a select object to control a filter to a grid
> > > form. For example, a drop down list box of employee first names
> followed
> > > by a grid of employee data. If I select a first name from the DDLB, I'd
> > > like to see only those employees with that first name.
> > >
> > > I haven't found a good way to do this without having to click a button
> > > associated with the DDLB, like "Apply Filter". And I haven't found a
> way
> > > to intercept a changed event on the select without dealing with zones.
> > > Using
> > > Ajax zones seems like overkill for this, plus, I am having a really
> hard
> > > time getting it to work.
> >
> > George,
> >
> > I have done exactly the same (a drop-down box that filters entries
> > displayed in a grid) - it is very, very easy using a zone and works like
> a
> > charm.
> > Where exactly do you have problems getting it to work?
> >
> > Markus
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> Emmanuel DEMEY
> Ingénieur Etude et Développement
> ATOS Worldline
> +33 (0)6 47 47 42 02
> demey.emman...@gmail.com
> http://emmanueldemey.fr
>
> Twitter : @gillespie59
>


Simplest way to detect change of Select component?

2012-02-22 Thread George Ludwig
I'm trying to implement a select object to control a filter to a grid form.
For example, a drop down list box of employee first names followed by a
grid of employee data. If I select a first name from the DDLB, I'd like to
see only those employees with that first name.

I haven't found a good way to do this without having to click a button
associated with the DDLB, like "Apply Filter". And I haven't found a way to
intercept a changed event on the select without dealing with zones. Using
Ajax zones seems like overkill for this, plus, I am having a really hard
time getting it to work.

Any input is appreciated!

-George


Re: T5.3: unable to change color of beaneditor border

2011-12-05 Thread George Ludwig
Perfect, thanks for the link!

On Sun, Dec 4, 2011 at 5:37 PM, Taha Hafeez Siddiqi <
tawus.tapes...@gmail.com> wrote:

> Hi
>
> You can google "CSS Overriding"
>
> http://www.google.co.in/search?q=css+overriding
>
> regards
> Taha
>
>
> On Dec 5, 2011, at 6:32 AM, George Ludwig wrote:
>
> > Thanks, that did the trick!
> >
> > I'm not an expert on CSS...I'm curious by what mechanism were  those
> > attributes protected?
> >
> > On Sun, Dec 4, 2011 at 4:48 PM, Dusko Jovanovski 
> wrote:
> >
> >> Try replacing your entry in your layout.css with this snippet:
> >>
> >> DIV.t-beaneditor {
> >>  border: 2px outset blue !important;
> >> }
> >>
> >> On Mon, Dec 5, 2011 at 12:53 AM, George Ludwig  >>> wrote:
> >>
> >>> I'm want to change the border color of all the beaneditors to blue, so
> I
> >>> added this to my layout.css:
> >>>
> >>> DIV.t-beaneditor {
> >>>   background: none repeat scroll 0 0 #CC;
> >>>   border: 2px outset blue;
> >>>   display: block;
> >>>   font-family: "Trebuchet MS",Arial,sans-serif;
> >>>   padding: 2px;
> >>> }
> >>>
> >>> However, it remains brown. When I inspect the page using FireBug, I see
> >>> this from default.css line 159:
> >>> DIV.t-beaneditor {
> >>>   background: none repeat scroll 0 0 #CC;
> >>>   border: 2px outset brown;
> >>>   display: block;
> >>>   font-family: "Trebuchet MS",Arial,sans-serif;
> >>>   padding: 2px;
> >>> }
> >>>
> >>> Just after that is my entry from layout.css, however all the entries
> are
> >>> lined out.
> >>>
> >>> Is there something obvious that I'm missing?
> >>>
> >>> -George
> >>>
> >>
>
>


Re: T5.3: unable to change color of beaneditor border

2011-12-04 Thread George Ludwig
Thanks, that did the trick!

I'm not an expert on CSS...I'm curious by what mechanism were  those
attributes protected?

On Sun, Dec 4, 2011 at 4:48 PM, Dusko Jovanovski  wrote:

> Try replacing your entry in your layout.css with this snippet:
>
> DIV.t-beaneditor {
>   border: 2px outset blue !important;
> }
>
> On Mon, Dec 5, 2011 at 12:53 AM, George Ludwig  >wrote:
>
> > I'm want to change the border color of all the beaneditors to blue, so I
> > added this to my layout.css:
> >
> > DIV.t-beaneditor {
> >background: none repeat scroll 0 0 #CC;
> >border: 2px outset blue;
> >display: block;
> >font-family: "Trebuchet MS",Arial,sans-serif;
> >padding: 2px;
> > }
> >
> > However, it remains brown. When I inspect the page using FireBug, I see
> > this from default.css line 159:
> > DIV.t-beaneditor {
> >background: none repeat scroll 0 0 #CC;
> >border: 2px outset brown;
> >display: block;
> >font-family: "Trebuchet MS",Arial,sans-serif;
> >padding: 2px;
> > }
> >
> > Just after that is my entry from layout.css, however all the entries are
> > lined out.
> >
> > Is there something obvious that I'm missing?
> >
> > -George
> >
>


T5.3: unable to change color of beaneditor border

2011-12-04 Thread George Ludwig
I'm want to change the border color of all the beaneditors to blue, so I
added this to my layout.css:

DIV.t-beaneditor {
background: none repeat scroll 0 0 #CC;
border: 2px outset blue;
display: block;
font-family: "Trebuchet MS",Arial,sans-serif;
padding: 2px;
}

However, it remains brown. When I inspect the page using FireBug, I see
this from default.css line 159:
DIV.t-beaneditor {
background: none repeat scroll 0 0 #CC;
border: 2px outset brown;
display: block;
font-family: "Trebuchet MS",Arial,sans-serif;
padding: 2px;
}

Just after that is my entry from layout.css, however all the entries are
lined out.

Is there something obvious that I'm missing?

-George


Re: beanedit form issues (the FAQ seems to be incorrect)

2011-10-05 Thread George Ludwig
Josh,

I'm on Tapestry 5.2.6

I just tried to recreate this issue, and was unable, so it must have
been me (working too late some nights).

However, the onPrepareFromMyBeanEditor() method is still called twice,
which seems inefficient. onActivate() is only called once, so I'm
going to leave the bean instantiation code there, at least for now.

-George

On Tue, Oct 4, 2011 at 4:01 PM, Josh Canfield  wrote:
> "This occurs when the BeanEditForm's object parameter is bound to null"
>
> Looking at the code, it seems that it only calls the constructor if
> your "object" parameter is null.
>
> Can you provide some of the actual template/project code or a small
> example project that reproduces the problem?
>
> Also, I may have overlooked it, but what version of tapestry are you using?
>
> Josh
>
> On Mon, Oct 3, 2011 at 7:21 PM, George Ludwig  wrote:
>> I've got a bean that reads/writes to the file system. To do that, it's
>> constructor takes a param for the file path. Very straightforward, however
>> using this bean has been problematic. I got the "no service implements the
>> interface String" exception when constructing the bean, which led me to the
>> FAQ here: http://tapestry.apache.org/beaneditform-faq.html However, things
>> do not work as advertised in the FAQ.
>>
>> No matter what I do, Tapestry requires that the bean have a no argument
>> constructor, and that I annotate that constructor with @Inject. And in the
>> debugger I see that the parameterized constructor is called twice
>> from onPrepareFromMyBeanEditor(), after which the no-param constructor is
>> called.
>>
>> At the time the page renders, my bean lacks a filepath, I assume because the
>> last time the constructor was called, it had no parameters.
>>
>> Summary:
>> Bean constructors are called multiple times, twice with params and once
>> without, always resulting in a bean that has been created with no
>> parameters.
>>
>> What can I do here? I've included hacked version of the FAQ code with notes.
>>
>> Best,
>>
>> George
>>
>> public class MyBean {
>>  @Inject           <-- without this annotation
>> on the no-param constructor, Tapestry always throws a "no service ..."
>> exception
>>  public MyBean() { ... }
>>  public MyBean(String filePath) { ... }
>> }
>>
>> public class MyPage {
>>  @Property
>>  public MyBean myBean;  <--- the example code declares this as
>> public, but Tapestry throws an exception, insisting it be made private...is
>> this possibly related to the problem I'm seeing?
>>  void onPrepareFromMyBeanEditor() {
>>   myBean = new MyBean(getFilePath()); <--- I need a param
>> to point to the file, but can't seem to hang on to the bean that is
>> instantiated here
>>  }
>> }
>>
>
> -
> 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: beanedit form issues (the FAQ seems to be incorrect)

2011-10-05 Thread George Ludwig
Muhammad,

Thanks for the reply! I did clean an rebuild the project. Also, I used
the event handler onPrepareFromMyBeanEditor() method, and as I wrote
in my original post, my bean is instantiated twice with parameters,
and is finally instantiated one more time without parameters.

No matter what I did using the approaches described in the FAQ,
Tapestry forced a no-param constructor.

Another list member wrote to me off-list and suggested I simply
instantiate the bean in the onActivate() method. I did that, and now
everything works: the constructor is called exactly once with the
proper parameters.

Which leaves me still wondering what exactly is going on with the
examples in the FAQ!

-George


On Tue, Oct 4, 2011 at 2:38 PM, Muhammad Gelbana  wrote:
> 2 Suggestions:
>
> 1. Have you tried cleaning your project and re-building it ? Restarting the
> server on which you are developing ?
> 2. Why don't you construct the bean yourself ? Add an event handler method
> to handle the "PREPARE" event of form embracing your bean editor.
>
> On Tue, Oct 4, 2011 at 4:21 AM, George Ludwig wrote:
>
>> I've got a bean that reads/writes to the file system. To do that, it's
>> constructor takes a param for the file path. Very straightforward, however
>> using this bean has been problematic. I got the "no service implements the
>> interface String" exception when constructing the bean, which led me to the
>> FAQ here: http://tapestry.apache.org/beaneditform-faq.html However, things
>> do not work as advertised in the FAQ.
>>
>> No matter what I do, Tapestry requires that the bean have a no argument
>> constructor, and that I annotate that constructor with @Inject. And in the
>> debugger I see that the parameterized constructor is called twice
>> from onPrepareFromMyBeanEditor(), after which the no-param constructor is
>> called.
>>
>> At the time the page renders, my bean lacks a filepath, I assume because
>> the
>> last time the constructor was called, it had no parameters.
>>
>> Summary:
>> Bean constructors are called multiple times, twice with params and once
>> without, always resulting in a bean that has been created with no
>> parameters.
>>
>> What can I do here? I've included hacked version of the FAQ code with
>> notes.
>>
>> Best,
>>
>> George
>>
>> public class MyBean {
>>  @Inject           <-- without this annotation
>> on the no-param constructor, Tapestry always throws a "no service ..."
>> exception
>>  public MyBean() { ... }
>>  public MyBean(String filePath) { ... }
>> }
>>
>> public class MyPage {
>>  @Property
>>  public MyBean myBean;  <--- the example code declares this as
>> public, but Tapestry throws an exception, insisting it be made private...is
>> this possibly related to the problem I'm seeing?
>>  void onPrepareFromMyBeanEditor() {
>>   myBean = new MyBean(getFilePath()); <--- I need a param
>> to point to the file, but can't seem to hang on to the bean that is
>> instantiated here
>>  }
>> }
>>
>
>
>
> --
> *Regards,*
> *Muhammad Gelbana
> Java Developer*
>

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



beanedit form issues (the FAQ seems to be incorrect)

2011-10-03 Thread George Ludwig
I've got a bean that reads/writes to the file system. To do that, it's
constructor takes a param for the file path. Very straightforward, however
using this bean has been problematic. I got the "no service implements the
interface String" exception when constructing the bean, which led me to the
FAQ here: http://tapestry.apache.org/beaneditform-faq.html However, things
do not work as advertised in the FAQ.

No matter what I do, Tapestry requires that the bean have a no argument
constructor, and that I annotate that constructor with @Inject. And in the
debugger I see that the parameterized constructor is called twice
from onPrepareFromMyBeanEditor(), after which the no-param constructor is
called.

At the time the page renders, my bean lacks a filepath, I assume because the
last time the constructor was called, it had no parameters.

Summary:
Bean constructors are called multiple times, twice with params and once
without, always resulting in a bean that has been created with no
parameters.

What can I do here? I've included hacked version of the FAQ code with notes.

Best,

George

public class MyBean {
  @Inject   <-- without this annotation
on the no-param constructor, Tapestry always throws a "no service ..."
exception
  public MyBean() { ... }
  public MyBean(String filePath) { ... }
}

public class MyPage {
 @Property
 public MyBean myBean;  <--- the example code declares this as
public, but Tapestry throws an exception, insisting it be made private...is
this possibly related to the problem I'm seeing?
 void onPrepareFromMyBeanEditor() {
   myBean = new MyBean(getFilePath()); <--- I need a param
to point to the file, but can't seem to hang on to the bean that is
instantiated here
 }
}


Overriding onActivate() in page sublass appears to prevent access to session attributes/properties in subclass...?

2011-10-01 Thread George Ludwig
I'm working on a Twitter authentication use case, i.e. log on to the
app via Twitter's oauth. It works well, except

I have a Page superclass called MyPage that includes a getter/setter
method for a session attribute isAuthenticated. In order to protect
access to the pages, I check getIsAuthenticated() in the onActivate()
method of each page. If it's not true, I return the Index page, from
which they can authorize via Twitter.

Everything works, except when I move the isAuthenticated() check to
the onActivate() method of the MyPage superclass. It seems intuitive
to want do this because it's the same check on every page, except for
the Index page, which I override to return a null (otherwise,
naturally there is an infinite loop of calling onActivate() on Index
page after Index page).

Unfortunately, with the isAuthenticated() check in the MyPage
superclass onActivate() method, for some reason calls to
isAuthenticated() fails.

I have no idea why this is happening. I can live with the code as-is,
but I would love to understand why it fails when I use a simple OO
construct!

Here's the setter/getter from the MyPage superclass:

@SessionAttribute(IS_AUTHENTICATED_SESSION_ATTRIBUTE)
private Boolean isAuthenticated;

public Boolean getIsAuthenticated() {
return isAuthenticated;
}

public void setIsAuthenticated(Boolean isAuthenticated) {
this.isAuthenticated = isAuthenticated;
}

Here's the onActivate method where the check occurs:

@InjectPage
private Index index;
public Object onActivate() throws Exception {
// check if we are authenticated
if(getIsAuthenticated()==null || !getIsAuthenticated())
return index;
return null;
}

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



Re: Any interest in starting a Tapestry Meetup in the SF-Bay area?

2011-09-30 Thread George Ludwig
Howard,

I was going to suggest a meetup during J1. Something informal, since I
won't have a full pass :(

I'a local, I'm sure I can think of a convenient place that's not
over-run with attendees...

-George

On Fri, Sep 30, 2011 at 2:59 PM, Howard Lewis Ship  wrote:
> I hope to run into more Tapestry enthusiasts while in SF for JavaOne.
> Twitter me @hlship (or #tapestry5) and we can arrainge to meet in
> person ... and I can hand over some laptop stickers!
>
> On Tue, Sep 27, 2011 at 10:32 PM, Jon Williams
>  wrote:
>> Sh*t dudes. I left SF because there is no decent Tapestry work there. Good
>> luck getting your ball rolling. :-) Send a link if you're hiring. I'm crazy
>> enough to move back to the US for Tapestry.
>>
>> On Tue, Sep 27, 2011 at 6:33 PM, Kalle Korhonen
>> wrote:
>>
>>> Count me in.
>>>
>>> Kalle
>>>
>>>
>>> On Tue, Sep 27, 2011 at 4:59 PM, Chris Collins  wrote:
>>> > That sounds like a great idea (also in sf bay area).
>>> >
>>> > C
>>> > On Sep 27, 2011, at 3:23 PM, George Ludwig wrote:
>>> >
>>> >> I searched meetup.com for a Tapestry meetup and didn't find one. I'm
>>> >> still a newb at this, yet I find the framework compelling, and am
>>> >> devoting a lot of energy to it.
>>> >>
>>> >> Is anyone else interested in forming a meetup? I imagine it being the
>>> >> usual things: speaker, hacking session, company sponsored pizza, and
>>> >> especially networking opportunities.
>>> >>
>>> >> I live in San Francisco, but will go anywhere I can get to on public
>>> transport.
>>> >>
>>> >> -George
>>> >>
>>> >> -
>>> >> 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
>>>
>>>
>>
>
>
>
> --
> 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
>
>

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



conditional page loading on OAuth callback?

2011-09-29 Thread George Ludwig
My app uses Twitter for authentication via OAuth. When Twitter
redirects the user to my authorization callback page, I would like to
be able to send them to their account setup page if they are a new
user, but if they are an existing user I want to send them to their
status page. I'm able to detect if they were an existing user, but I
don't know how to automatically send them to the appropriate page from
my callback page.

Ideas?

-George

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



Re: selenium hijacks TransformerFactory and breaks XML pretty print...wtf?

2011-09-27 Thread George Ludwig
Steve,

For the time being, that works, yet the rub comes later on when I will
actually want to use the testing stuff. Other than hacking the
selenium jar to remove the code (which may break selenium for all I
know), I'm unsure of how to address this problem.

Frankly, I'm shocked that selenium over-rides core java classes...that
was just a bad idea from the get-go.

-George

On Tue, Sep 27, 2011 at 1:49 AM, Steve Eynon
 wrote:
> As you say, it's the tapestry-test module that references selenium
> (via a Maven test dependency). If you don't use it, then you could
> exclude it from your Maven POM.
>
>
>
>
> On 27 September 2011 16:43, George Ludwig  wrote:
>> I've been ripping my hair out the last few hours trying to figure out
>> why my XML pretty print stopped working under Tapestry...
>>
>> I'm running Eclipe 3.7, JDK 1.6, and Tapestry 5.2.5 on Jetty 6.1.26
>>
>> I created the project using one of the maven Tapestry 5 prototypes,
>> and it included selenium server standalone and core 1.0.3 via
>> Tapestry-Test 5.2.5.
>>
>> When I run the app, I can see that when I hit my pretty print code,
>> the selenium server jar contains the class
>> javax.xml.transform.TransformerFactory. It must be some ancient
>> version of Xalan embedded in there that's causing the problem.
>>
>> I deleted the two selenium jars from my classpath, and now my app
>> works fine (so far), but what is the best long term solution? What are
>> the selenium jars actually used for? What does it take to get the
>> Tapestry build on a more modern version of selenium (I think it's up
>> to 2.7 at this point)? Finally, (this is a rhetorical question), WTF
>> is some alternate version of  javax.xml.transform.TransformerFactory
>> embedded in the selenium jars?!
>>
>> Best,
>>
>> George
>>
>> For reference, here's the Pretty print code:
>>
>> TransformerFactory transformerFactory=TransformerFactory.newInstance();
>> transformerFactory.setAttribute("indent-number", 3);
>> Transformer transformer=transformerFactory.newTransformer();
>> transformer.setOutputProperty(OutputKeys.INDENT, "yes");
>> //initialize StreamResult with File object to save to file
>> StreamResult result = new StreamResult(new StringWriter());
>> DOMSource source = new DOMSource(document);
>> transformer.transform(source, result);
>> String xmlString = result.getWriter().toString();
>>
>> -
>> 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



  1   2   >