Re: Repository URL for 5.5-alpha releases

2018-09-26 Thread Balázs Palcsó
Hi Thiago,

Does not seem to find it still.
Nor I can see any 5.5 releases from the browser at
https://repository.apache.org/content/groups/snapshots/org/apache/tapestry/tapestry-core/

Thanks,
Balazs

On Wed, 26 Sep 2018 at 15:29, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Hello!
>
> Please try https://repository.apache.org/content/groups/snapshots/
> instead.
>
> Cheers!
>
> On Tue, Sep 25, 2018 at 7:01 AM Balázs Palcsó 
> wrote:
>
> > Hi,
> >
> > What is the correct repository URL for 5.5-alpha releases?
> > This does not seem to contain them:
> > repositories {
> > maven {
> > url "https://repository.apache.org/content/groups/staging;
> > }
> > }
> >
> > Many thanks,
> > Balazs
> >
>
>
> --
> Thiago
>


Re: Repository URL for 5.5-alpha releases

2018-09-26 Thread Thiago H. de Paula Figueiredo
Hello!

Please try https://repository.apache.org/content/groups/snapshots/ instead.

Cheers!

On Tue, Sep 25, 2018 at 7:01 AM Balázs Palcsó 
wrote:

> Hi,
>
> What is the correct repository URL for 5.5-alpha releases?
> This does not seem to contain them:
> repositories {
> maven {
> url "https://repository.apache.org/content/groups/staging;
> }
> }
>
> Many thanks,
> Balazs
>


-- 
Thiago


Re: JavaScript not invoked on zone refresh

2018-09-26 Thread JumpStart
Examples can be found in JumpStart, starting here:


http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/javascript

> On 26 Sep 2018, at 3:19 pm, Chris Poulsen  wrote:
> 
> Reacting to the zone events sounds like the best option IMO. Controlling
> this from the server side seems needlessly complex and fragile in this case.
> 
> Not really related to your issue, but you can call exported module methods
> in 5.4 like this:
> 
> JSONObject specification = new JSONObject( "diagramClientId",
> diagram.getClientId(), "modelJson", modelJson );
> 
> jsSupport.require( "pages/contentspace/content-space-index" ).invoke(
> "init" ).with( specification );
> 
> HTH.
> 
> -- 
> Chris
> 
> On Wed, Sep 26, 2018 at 1:10 AM Christopher Dodunski <
> chrisfromtapes...@christopher.net.nz> wrote:
> 
>> After exploring a little further, I discovered the below thread on
>> invoking javascript from within Tapestry.
>> 
>> 
>> https://stackoverflow.com/questions/27988473/pass-parameter-from-java-to-js-in-tapestry
>> 
>> Joost writes:
>> 
>> You will need to use the JavaScriptSupport service.
>> 
>> Your java file:
>> 
>> @Import(library = "RoomManagement.js")
>> public final class RoomManagement{
>> 
>>  @Inject
>>  private JavaScriptSupport javascriptSupport;
>> 
>>  @Property
>>  private long contactId;
>> 
>>  @AfterRender
>>  private void setup() {
>>JSONObject jsonObject = new JSONObject();
>>jsonObject.put("contactId", contactId);
>>javascriptSupport.addInitializerCall("RoomManagement",jsonObject);
>>  }
>> }
>> 
>> Your RoomManagement.js
>> 
>> Tapestry.Initializer.RoomManagement = function (parameters) {
>>//do whatever you need here
>>alert('Your contactId: ' + parameters.contactId);
>> };
>> 
>> This looks promising, but I later read that Tapestry's handling of
>> javascript has been completely rewritten in Tapestry 5.4, with the above
>> being deprecated.  And I've not found any example code of doing tnings the
>> new way.  Any pointers would be much appreciated.
>> 
>> My page contains 10 expand/collapse buttons, and I only wish to animate
>> the one connected to the zone being updated.  So am thinking of giving
>> each button a unique ID, and passing that ID to the javascript so just the
>> one button animates.
>> 
>> My needs are pretty straight forward, and reportedly Tapestry's javascript
>> handling was completely rewritten in 5.4 to simplify things.  Look forward
>> to seeing how things now get done.  :-)
>> 
>> Appreciate any help.
>> 
>> Regards,
>> 
>> Chris.
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 


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



Re: JavaScript not invoked on zone refresh

2018-09-26 Thread Chris Poulsen
Reacting to the zone events sounds like the best option IMO. Controlling
this from the server side seems needlessly complex and fragile in this case.

Not really related to your issue, but you can call exported module methods
in 5.4 like this:

JSONObject specification = new JSONObject( "diagramClientId",
diagram.getClientId(), "modelJson", modelJson );

jsSupport.require( "pages/contentspace/content-space-index" ).invoke(
"init" ).with( specification );

HTH.

-- 
Chris

On Wed, Sep 26, 2018 at 1:10 AM Christopher Dodunski <
chrisfromtapes...@christopher.net.nz> wrote:

> After exploring a little further, I discovered the below thread on
> invoking javascript from within Tapestry.
>
>
> https://stackoverflow.com/questions/27988473/pass-parameter-from-java-to-js-in-tapestry
>
> Joost writes:
>
> You will need to use the JavaScriptSupport service.
>
> Your java file:
>
> @Import(library = "RoomManagement.js")
> public final class RoomManagement{
>
>   @Inject
>   private JavaScriptSupport javascriptSupport;
>
>   @Property
>   private long contactId;
>
>   @AfterRender
>   private void setup() {
> JSONObject jsonObject = new JSONObject();
> jsonObject.put("contactId", contactId);
> javascriptSupport.addInitializerCall("RoomManagement",jsonObject);
>   }
> }
>
> Your RoomManagement.js
>
> Tapestry.Initializer.RoomManagement = function (parameters) {
> //do whatever you need here
> alert('Your contactId: ' + parameters.contactId);
> };
>
> This looks promising, but I later read that Tapestry's handling of
> javascript has been completely rewritten in Tapestry 5.4, with the above
> being deprecated.  And I've not found any example code of doing tnings the
> new way.  Any pointers would be much appreciated.
>
> My page contains 10 expand/collapse buttons, and I only wish to animate
> the one connected to the zone being updated.  So am thinking of giving
> each button a unique ID, and passing that ID to the javascript so just the
> one button animates.
>
> My needs are pretty straight forward, and reportedly Tapestry's javascript
> handling was completely rewritten in 5.4 to simplify things.  Look forward
> to seeing how things now get done.  :-)
>
> Appreciate any help.
>
> Regards,
>
> Chris.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>