Re: RequireJS Shim and JavaScriptModuleConfiguration

2014-06-17 Thread Geoff Callender
Here's one that worked, producing a module called jquery-ui: public static void contributeModuleManager(MappedConfiguration configuration, @Path("/META-INF/assets/js/jquery-ui-1.9.1.js") Resource jqueryUi) { configuration.add("jquery-ui", new JavaScriptModuleConfiguration(

RequireJS Shim and JavaScriptModuleConfiguration

2014-06-17 Thread Sanket Sharma
Hi, How do I convert a non AMD javascript module to work with require.js? I did some investigate and it seems like shimming is the way to go. I would like to take a javascript file ol.js and shim to to export 'ol'. The file is located under modules and is packaged in META-INF/modules directory in

Re: IoC / Multiple Implementations

2014-06-17 Thread Michael Leuthold
Well, the scenario is a simple service-interface that returns a JSON array to configure a Javascript component. And depending on the input, the content of the JSON array looks different, that's why there are multiple implementations. Usually we iterate over the implementations and take the first re

Re: IoC / Multiple Implementations

2014-06-17 Thread Lance Java
I tend to do the following: public interface FooProvider { List getFoos(); } @UsesOrderedConfiguration(Foo.class) public class FooProviderImpl implements FooProvider { private final List foos; public FooProviderImpl(List foos) { this.foos = foos; } public List getFoos() { return foos;

Re: IoC / Multiple Implementations

2014-06-17 Thread Thiago H de Paula Figueiredo
On Tue, 17 Jun 2014 09:54:24 -0300, Michael Leuthold wrote: Hello, I am currently stuck with the following problem: I try to inject a list of implementations of a certain interface but it seems it does not work using the straight approach of injecting a "List impls" Though implementations e

Re: Error in BeginRender[...]: Parameter 'translate' of component .. is bound to null. This parameter is not allowed to be null.

2014-06-17 Thread Net Dawg
I tried explicitly dropping the null constraint at the database level - same issue - for some reason the parameter is being interpreted as not allowed to be null...while other fields defined exactly the same way are OK... ALTER TABLE project ALTER COLUMN details DROP NOT NULL; I have been look

Re: Multi file upload

2014-06-17 Thread Michael Leuthold
We integrated jQuery-File-Upload as well but the Request to upload files is posted to a EventLink-URL that is provided upon initialization of the File-Upload-Plugin. The event is then handled by the component and files are extracted using org.apache.commons.fileupload.servlet.ServletFileUpload fro

IoC / Multiple Implementations

2014-06-17 Thread Michael Leuthold
Hello, I am currently stuck with the following problem: I try to inject a list of implementations of a certain interface but it seems it does not work using the straight approach of injecting a "List impls" Though implementations exist and a list is injected but it's just empty. Does anyone have

Re: Correct way to JS in tapestry 5.4

2014-06-17 Thread Thiago H de Paula Figueiredo
On Mon, 16 Jun 2014 20:01:48 -0300, Sanket Sharma wrote: javaScriptSupport.require("openstreetmaps").invoke("registerAddressChangeListener").with(clientElement.getClientId()); I'do do this instead: javaScriptSupport.require("openstreetmaps").with(clientElement.getClientId()); define('ope

Error in BeginRender[...]: Parameter 'translate' of component .. is bound to null. This parameter is not allowed to be null.

2014-06-17 Thread Net Dawg
Getting this parameter not allowed to be null error.  Actually there is no restriction whatsoever on this parameter.  I have a entity class called "Project" with the field "details",  @Entity @Indexed public class Project {     @Id @GeneratedValue @DocumentId @NonVisual     private Long id;

Re: WebSocket for tapestry

2014-06-17 Thread Lance Java
I'm starting to think this is caused by the js prepend function. It's simply: element.innerHTML = newHtml + element.innerHTML. I think this function needs to be smarter and do a dom based element addition rather than a String addition. I tried to avoid using prototype or jquery so it was agnos

Re: WebSocket for tapestry

2014-06-17 Thread Lance Java
Hmm. Interesting. 1. Are there any javascript errors in the console? 2. Which version of Tapestry are you using? 3. Try adding an ajax eventlink to the page that's not in a PushTarget (normal page render). Is it affected in the same way? 4. Is the markup for the link in 3 any different from the Pu