Re: textchanged like clientEvent

2011-09-20 Thread LLTYK
Define doesn't work. What was wrong with keyup?

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/textchanged-like-clientEvent-tp6798861p6811862.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: textchanged like clientEvent

2011-09-19 Thread LLTYK
You are stuck with onkeyup. Or maybe onblur.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/textchanged-like-clientEvent-tp6798861p6808066.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: ajaxformloop inside ajaxformlopp

2011-09-12 Thread LLTYK
You probably need a public List onAddRowFromOuterLoop(). Assuming each
element in your outer loop is a list which is used by the inner loop. Then
you'd need to store these multiple lists somewhere.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/ajaxformloop-inside-ajaxformlopp-tp6782680p6782985.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: How to add add a random number in requset path to avoid IE cache?

2011-09-08 Thread LLTYK
In what context?

I've found the cache option in jQuery.ajax automatically does it:
http://api.jquery.com/jQuery.ajax/

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/How-to-add-add-a-random-number-in-requset-path-to-avoid-IE-cache-tp6771848p6772360.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: javaScriptSupport.addScript vs script in .tml file

2011-09-06 Thread LLTYK
If you declare a function (your plusOneCalled) inside another function
(Tapestry.onDOMLoaded), it won't be visible outside the function.

Don't use addScript, unless you can initialize the button itself in
addScript as well. Or you can use addScript and add the function to the
window variable ( window.plusOneCalled = function () { alert('...'); } ),
which should make it visible.

You could also put plusOneCalled function in its own js file.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/javaScriptSupport-addScript-vs-script-in-tml-file-tp6762486p6763598.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Patching Tapestry for IE9 Prototype Bug

2011-08-24 Thread LLTYK
5.2.6 has Prototype 1.7 and presumably those fixes.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Patching-Tapestry-for-IE9-Prototype-Bug-tp6719594p6719989.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Loop and javascript

2011-07-21 Thread LLTYK
Use a mixin. They allow you to get the autogenerated Tapestry ids and pass
those to javascript.

Or you can change your javascript to use event.target instead of the id.
That will let you know what image was clicked, and then you can traverse the
dom for the nearest radiobutton.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Loop-and-javascript-tp6606437p6606626.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: what is called when - ajax version

2011-07-19 Thread LLTYK
Not really.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/what-is-called-when-ajax-version-tp6593136p6598840.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

2011-07-05 Thread LLTYK
That's what I changed mine to, I found something commented with .

There definitely aren't bots on my staging server though. Just IE
browsers...

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp6486339p6551007.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: No context for a t:select?

2011-07-05 Thread LLTYK
I have something like that floating in my code. Doesn't have to be
selectobject and could be a plain select, but you need zoneupdater.


t:selectobject t:blankOption=never t:value=currentCategory
list=secondaryCategories t:labelField=literal:title
t:valueField=literal:title
t:mixins=zoneUpdater t:zone=dummyzone
t:clientEvent=change t:event=change
t:context=[primary.id,secondary.id] /




--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/No-context-for-a-t-select-tp6060602p6551150.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: No context for a t:select?

2011-07-05 Thread LLTYK
Here's mine:

  @Log
  void onChange(String primary, String secondary, String categoryName)
  {

And what it does:
2011-07-05 16:52:07,899 [qtp1317701801-91] DEBUG -[ENTER]
onChange(e1718719-df6e-4bc4-a25d-4b7c83b0baae,
7486318b-3f15-4735-be78-0d42ec778e1b, category1)

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/No-context-for-a-t-select-tp6060602p6551701.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: filtering Ajax requests

2011-06-20 Thread LLTYK
The TimingFilter is part of the tapestry quickstart project. Here's mine:


  public RequestFilter buildTimingFilter(final Logger log)
  {
return new RequestFilter() {
  @Override
  public boolean service(Request request, Response response,
RequestHandler handler) throws IOException {
long startTime = System.currentTimeMillis();
String path = request.getPath();
boolean doit = !path.contains(asset);
try {
  return handler.service(request, response);
} finally {
  long elapsed = System.currentTimeMillis() - startTime;
  if (doit)
log.info(String.format(Request time: %d ms  + path, elapsed));
}
  }
};
  }

  /**
   * This is a contribution to the RequestHandler service configuration.
This is
   * how we extend Tapestry using the timing filter. A common use for this
kind
   * of filter is transaction management or security. The @Local annotation
   * selects the desired service by type, but only from the same module.
Without
   * @Local, there would be an error due to the other service(s) that
implement
   * RequestFilter (defined in other modules).
   */
  public void contributeRequestHandler(OrderedConfigurationRequestFilter
configuration,
@Local RequestFilter filter)
  {
// Each contribution to an ordered configuration has a name, When
necessary,
// you may
// set constraints to precisely control the invocation order of the
// contributed filter
// within the pipeline.

configuration.add(Timing, filter);
  }

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/filtering-Ajax-requests-tp6496667p6496792.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

2011-06-17 Thread LLTYK
I see it too. Haven't tracked it down though. I'd think the only clientside
indicator of the problem would be a missing image.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp6486339p6486531.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

2011-06-17 Thread LLTYK
This happens randomly for me. Exact same page/template, suddenly decide to
error 1 time out of 100. My guess is it sometimes doesn't process the
expansions.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp6486339p6487352.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: $T deprecated in Tapestry

2011-06-07 Thread LLTYK
Apparently it's still used in 5.3. Looks like the replacement hasn't been
decided on.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T-deprecated-in-Tapestry-tp6444160p6448959.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Simpler Select configuration

2011-06-06 Thread LLTYK
Whatever the solution is for making this simpler, it'd be nice if it came
with Tapestry by default. 

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Simpler-Select-configuration-tp6421890p6444986.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Simpler Select configuration

2011-06-03 Thread LLTYK
How about a shorthand for selectmodelfactory calls. Something like t:select
model=someList,valueProperty,labelProperty /

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Simpler-Select-configuration-tp6421890p6434883.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Strange behaviour in tapestry app

2011-06-01 Thread LLTYK
Tapestry always rewrites page classes. I haven't had much trouble debugging
them in in 5.2 though. 5.2.4 did the null variable thing, 5.2.5 'fixed' it.
Stepping around in the debugger would result in you finding code Tapestry
added to your methods (logging at the start/end of a method if you used
@Log, getters for the 'null' variables wherever they're dereferenced, etc).


So the webservice call fails, how? NPE?

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Strange-behaviour-in-tapestry-app-tp6425097p6426480.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: [Slightly OT] Jetty manager/deployer

2011-05-31 Thread LLTYK
Jetty has an API, not sure if it's accessible from an application. Would be
neat to have an app that can redeploy the other apps.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Slightly-OT-Jetty-manager-deployer-tp6422979p6423600.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Maven-Tapestry Problem

2011-05-23 Thread LLTYK
It says firefox.exe not found. I'm not sure how you configure selenium to
find firefox, it complained about my having 4.0 before so I had to copy it
to a different directory and install 3.6. Assuming you really want to run
the tests that bad.


I just do -Dmaven.test.skip=true.




--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Maven-Tapestry-Problem-tp6391381p6393894.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: which is better for AJAX Implementation in Tapestry 4.0

2011-05-18 Thread LLTYK
This is in my pom:

dependencies
dependency
groupIdorg.apache.tapestry/groupId
artifactIdtapestry-framework/artifactId
version4.1.6/version
/dependency
dependency
groupIdorg.apache.tapestry/groupId
artifactIdtapestry-core/artifactId
version5.2.5/version
/dependency


T5 makes for a sweet ajax library.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/which-is-better-for-AJAX-Implementation-in-Tapestry-4-0-tp6376349p6377255.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Easier way to have multiple submits doing different things?

2011-05-11 Thread LLTYK
Right now the pattern below is peppered all over my code. It annoys me,
having to create these booleans all the time. I think most of the time I
need to do things after the submitted data is sent in, so I can't do it in
the onSelected itself.


Anyone have any alternatives?




public class Page
{
  private boolean button1Clicked;
  private boolean button2Clicked;

  void onSelectedFromButton1()
  {
 button1Clicked = true;
  }

  void onSelectedFromButton2()
  {
 button2Clicked = true
  }

  void onSuccess()
  {
 if (button1Clicked)
 //do foo

if (button2Clicked)
//do bar
  }


--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Easier-way-to-have-multiple-submits-doing-different-things-tp6351722p6351722.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Using JavascriptSupport addInitializerCall

2011-05-10 Thread LLTYK
addInitializer only calls on the Tapestry.Initializer object. addScript calls
global functions.

So:
Tapestry.Initializer.createDroppable = function() {
 Droppables.add('rightContent');
 alert('added RightContent to droppables');
};


And:
addInitializerCall(createDroppable);

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Using-JavascriptSupport-addInitializerCall-tp6348185p6348372.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Execute JavaScript from dynamic component

2011-05-06 Thread LLTYK
Turn your script into a mixin, that will automatically call the mixin's
addScript again on partial reloads. I think there was another way to do it
as well, some other way of calling addScript again, can't recall it though.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Execute-JavaScript-from-dynamic-component-tp6337184p6337494.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Getting page cannot be displayed error in Tapestry 4 on submitting a form with 100+ dropdowns and text field components

2011-05-05 Thread LLTYK
I don't have that in my .application and I have lots of huge forms. I did
have to adjust a jetty setting (Set name=maxFormContentSize3124208/Set
).

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Getting-page-cannot-be-displayed-error-in-Tapestry-4-on-submitting-a-form-with-100-dropdowns-and-texs-tp6333740p6333835.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Injecting spring beans in tapestry services?

2011-05-05 Thread LLTYK
So I have a DAO, with an interface and impl, and injecting it works fine in a
page:

public class SomePage
{
  @Inject
  private SomeDAO someDAO;
}



But then I have some tapestry service:

public class SomeService
{
  @Inject
  private SomeDAO someDAO; //nope
  @Inject @Autowired
  private SomeDAO someDAO; //nope
  @Autowired
  private SomeDAO someDAO; //nope
}



So how do I inject spring beans in services?

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Injecting-spring-beans-in-tapestry-services-tp6334659p6334659.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Injecting spring beans in tapestry services?

2011-05-05 Thread LLTYK

public SomeService(SomeDAO someDAO)
{
  this.someDAO = someDAO; //nope
}

Still getting No service implements the interface.



Thiago, that would turn off injecting tapestry services into spring beans.
I'm gonna hold out for a bit.



--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Injecting-spring-beans-in-tapestry-services-tp6334659p6334803.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Injecting spring beans in tapestry services?

2011-05-05 Thread LLTYK
Why does it work in pages anyways, if they're not exposed as ioc services
without compatibility mode?

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Injecting-spring-beans-in-tapestry-services-tp6334659p6334823.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Injecting spring beans in tapestry services?

2011-05-05 Thread LLTYK
Well the real problem was me trying to use the service to early during
application startup.

A plain
  @Inject
  private SomeDAO someDAO;


worked after I moved my code to contributeRegistryStartup.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Injecting-spring-beans-in-tapestry-services-tp6334659p6335087.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Help required regarding IPropertySelectionModel in Tapestry 4

2011-05-04 Thread LLTYK
Either give it an initial value in pageBeginRender and don't allow a blank
selection, or allow it to be null and do null-safe equals checks in
getCityModel (returning an empty city list on null or something).

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Help-required-regarding-IPropertySelectionModel-in-Tapestry-4-tp6330269p6330408.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: How to disable Tapestry javascript debugger

2011-05-04 Thread LLTYK
Just blow away Tapestry.error, warning, etc with your own versions. Redirect
all messages to console.log().

console.log() should probably be moved to in general, blackbird seems to
only be useful for IE6/IE7 and they seem to be winding down.


If you're talking about errors that don't appear at all, I got in the habit
of always doing a try-catch-console.log(error) in anything I put in
addScript. addInit errors seem to be caught by Tapestry and popped up.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/How-to-disable-Tapestry-javascript-debugger-tp6327614p6330440.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: transposed form loop

2011-05-04 Thread LLTYK
No, it uses form injector to add exactly one element. If you really love ajax
you can put a forminjector in each row, and fire them all at once when you
do an add so they can each add a cell... sounds crazy.


Even with a regular Loop it's hairy, I'd have a loop for each row,
generating X many columns.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/transposed-form-loop-tp6329719p6330571.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Creating direct download links to files

2011-05-04 Thread LLTYK
Huh, wget has a bug in it where it ignores the Content-Dispostion.
https://bugzilla.redhat.com/show_bug.cgi?id=239351

But that would only result in weird filenames being saved. You seem to be
not streaming it right. Or  maybe something inbetween is dropping the
parameters.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Creating-direct-download-links-to-files-tp6308634p6331840.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: how to build dynamic URL showing tooltip in tapestry 5.1.0.5

2011-04-29 Thread LLTYK
Yes you can use them side by side.

http://tapestry.1045711.n5.nabble.com/t5-5-2-4-and-IE8-td3345797.html--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/how-to-build-dynamic-URL-showing-tooltip-in-tapestry-5-1-0-5-tp6315973p6316430.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Creating direct download links to files

2011-04-27 Thread LLTYK
There's no difference between streaming and what you want. You're probably
just missing a header or something. For example, 'Content-Disposition:
attachment; filename=Textfile.txt' or such.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Creating-direct-download-links-to-files-tp6308634p6308992.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



How do I refresh form field components in a zone?

2011-04-20 Thread LLTYK
I see that t:select magically does this somehow, I point it's zone
parameter to zones containing other t:selects all the time, and it works.
Yet manually refreshing a zone with a t:select results in complaints of
not being in a form.


How do I put form fields in a zone with the form being outside the zone?

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/How-do-I-refresh-form-field-components-in-a-zone-tp6290726p6290726.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Live reload in production?

2011-04-20 Thread LLTYK
Disabled, so you automatically get better performance. I don't think you
should have to tweak Tapestry options to get better performance.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Live-reload-in-production-tp6288037p6291747.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: How to implement AJAX for Insert jwcid in Tapestry 4.1 ?

2011-04-19 Thread LLTYK
I don't know.

However, T5 can be run alongside T4. I have an old T4 app, and write all the
new pages in T5.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/How-to-implement-AJAX-for-Insert-jwcid-in-Tapestry-4-1-tp6286999p6287572.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: New component library

2011-04-18 Thread LLTYK
Put it in Maven.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/New-component-library-tp6282982p6283152.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Displaying a progress message while processing a zone update

2011-04-15 Thread LLTYK
A javascripty approach would be to popup the progress indicator onclick and
hide it when the ZONE_UPDATED event is fired on the zone.


Or you can look up that periodic zone refresh example, and have the zone
load over and over, with it saying Still Loading until the actual results
arrive. Not sure how you'd stop the periodic part when you don't need it
though.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Displaying-a-progress-message-while-processing-a-zone-update-tp6275777p6275833.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Help required in using AJAX Functionality in Tapestry 4.1

2011-04-14 Thread LLTYK
I never looked into how to receive values back in T4 ajax, I only did the
send part. Although doing a search on that annotation I mentioned before
might help.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Help-required-in-using-AJAX-Functionality-in-Tapestry-4-1-tp6271536p6272286.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



IE7/8 performance issue at tapestry.js:1645

2011-04-14 Thread LLTYK
Yes, one line. This is 5.2.5.

I have a huge number of form fields in my form (300+), and instantiating
FieldEventManagers takes forever (multiple seconds) in IE. I profiled it and
found that 60% of it was the up and down selectors used to find the label
element.

I'm not really sure what a general purpose solution is, but I simply removed
that line. I'm guessing it tries to attach the validation bubbles to the
label element instead of the form field? I was fine with it on the form
field.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/IE7-8-performance-issue-at-tapestry-js-1645-tp6273082p6273082.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Required a sample program in Tapestry 4.1.3 which demonstrates AJAX Functionality

2011-04-12 Thread LLTYK
Here's an example of @EventListener I found floating around. Using the
annotation magically adds a javascript method to a certain div on the page.

  

  




  @EventListener(elements = FooJsEventSource, events = foo)
  public void doFoo()
  {
log.trace(doFoo);
  }

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Required-a-sample-program-in-Tapestry-4-1-3-which-demonstrates-AJAX-Functionality-tp6261222p6264976.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Implementation mixin and persistence

2011-04-06 Thread LLTYK
Last time I did this I used a javascript cookie api.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Implementation-mixin-and-persistence-tp6243796p6246820.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: updating a zone which does not exist...

2011-04-05 Thread LLTYK
I haven't used multizoneupdate, but it looks like you can specify the id of
the destination, and the source doesn't have to be the exact same zone.

Put your stuff in a block, then do new MultiZoneUpdate(myzone, myblock);
And render the zone outside of the conditional so it's always there, with
maybe a  inside the conditional instead.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/updating-a-zone-which-does-not-exist-tp6241264p6241931.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Generating popup window after form success

2011-03-31 Thread LLTYK
So wait, is this form submit an ajax submit? Why wouldn't there always be a
page refresh (and thus you can do that conditional javascript scenario you
described). There's no way the transaction can be successful otherwise
(unless you're submitting via ajax).

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Generating-popup-window-after-form-success-tp6225179p6227974.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Logon notification

2011-03-30 Thread LLTYK
An HttpSessionListener...

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Logon-notification-tp6223363p6223518.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: dynamically changing event link context on client side using js

2011-03-29 Thread LLTYK
I have a mixin that does this. It doesn't have to be a mixin though. I used
the urlencoder from TAP5-637 since space characters and such tend to make
things break. Basically you encoder a bunch of unique characters as the
context of the url server side, then replace it with whatever value you want
actually sent as the context.

@Import(stack=core,
library={context:/js/urlencoder.js,context:/js/updater.js})
public class Updater
{
  @Inject
  private JavaScriptSupport jsSupport;
  @Inject
  private ComponentResources componentResources;
  
  @InjectContainer
  private ClientElement element;

  void afterRender()
  {
String replace = 0xDEADBEEF;
String url = componentResources.createEventLink(change,
replace).toAbsoluteURI();
jsSupport.addScript(String.format(new Updater ('%s','%s','%s');,
element.getClientId(), url, replace));
  }
}

//updater.js
var Updater = Class.create({
initialize : function(elementId,url,urlReplace) {
try {
var theSelect = this.theSelect = $(elementId);
this.theSelect.observe('change',
this.onChange.bindAsEventListener(this));
this.url = url;
this.urlReplace = urlReplace;
} catch (ex) {
log(ex);
}
},
onChange : function(e) {
log('onChange');
var v = URLEncoder.encode(this.theSelect.value);
log(v);
var url = this.url.replace(this.urlReplace,v);
var _this = this;
Tapestry.ajaxRequest(url);
}
});


--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/dynamically-changing-event-link-context-on-client-side-using-js-tp6216273p6218667.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Dynamic combo box - Tapestry 5.2.2

2011-03-29 Thread LLTYK
The js file needs to be in the same package directory, but in the resources
directory instead of the java directory.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp6011286p6218845.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



How do I set the anchor of the current page?

2011-03-29 Thread LLTYK
So someone clicked something on my page, and whatever event handler returns
null/is void. Is there a way to set the anchor in this case? I know there's
a setAnchor on a Link, but that doesn't seem to be the easiest way (since
all these event handlers weren't returning anything to begin with).

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/How-do-I-set-the-anchor-of-the-current-page-tp6220281p6220281.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Disable Validation of a field

2011-03-17 Thread LLTYK
Do you still use the textfield even when the checkbox is checked? If not, you
can make some js for the click event of the checkbox and simply disable the
textfield in your js. I suspect this disables validation.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Disable-Validation-of-a-field-tp6176353p6180363.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Disable Validation of a field

2011-03-17 Thread LLTYK
You can use a FormFragment to hide and disable the field. Or you can remove
the builtin required validation and manually decide whether it's required in
onValidateForm.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Disable-Validation-of-a-field-tp6176353p6180826.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Uploading then displaying Images

2011-03-11 Thread LLTYK
Nobody's mentioned createEventLink. That's where you get the image url,
create an event link pointing to the event handler that returns the stream
response.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Uploading-then-displaying-Images-tp6159049p6161239.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Updating a Field on event in Tapestry5

2011-03-10 Thread LLTYK
Define update another textfield. Are you putting some result from the
server in it?

Read up ZoneUpdater:
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/ajaxonevent

Although it's annoyingly tricky to refresh form fields. The example
refreshes some plain text.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Updating-a-Field-on-event-in-Tapestry5-tp6157127p6157447.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Invoke method after page is loaded; when method finishes, redirect to another page

2011-03-04 Thread LLTYK
Use a meta refresh (it'll probably have to be in the  tag somehow). Or
javascript, to hit the same url.

@Inject
private ComponentResources componentResources;

@OnEvent(calculate)
ResultPage calculate() {  }

public String getCalculateUrl()
{
return componentResources.createEventLink(calculate).toString();
}




--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Invoke-method-after-page-is-loaded-when-method-finishes-redirect-to-another-page-tp6088155p6088324.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Handling form events inside components

2011-03-04 Thread LLTYK
One hacky way of doing it is with onValidateFromXXX. Before the actual value
is copied over from a field to the java object, this method is called. Not
to be confused with onValidateForm.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Handling-form-events-inside-components-tp6088056p6088508.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Centralize error handling

2011-03-04 Thread LLTYK
My approach would be not to throw exceptions all the time. The exception
handler is only used for fatal stuff, I don't throw stuff there by design.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Centralize-error-handling-tp6089256p6089399.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Can mixins add validation serverside?

2011-02-28 Thread LLTYK
I'd like to conditionally add some validation using a mixin, maxLength and
required for example. Can a mixin somehow alter the validate attribute of a
field?

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Can-mixins-add-validation-serverside-tp6073177p6073177.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Pb in 'getOrCreateMethod()' ?

2011-02-28 Thread LLTYK
That setup sounds like something you shouldn't do. Two different instances of
two different classes with the same name?

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Pb-in-getOrCreateMethod-tp6073648p6073867.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Can mixins add validation serverside?

2011-02-28 Thread LLTYK
With that I'd have to get the class of the parent of the property somehow...
you guys tightly integrate the annotation support to do this with @Validate.

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Can-mixins-add-validation-serverside-tp6073177p6073903.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Can mixins add validation serverside?

2011-02-28 Thread LLTYK
I in particular need to get the class of the parent of the property somehow.
That's how I conditionally add validation. And the name of the property as
well. It's a retread of what tapestry5-cayenne does, which seems castrated
to me because it requires BeanEditor to provide this information to the
constraint generator. I'm trying to find some other way to get the class and
property.

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Can-mixins-add-validation-serverside-tp6073177p6074453.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: JavaScript Stack aggregator

2011-02-28 Thread LLTYK
We can't really tell what you've forgotten if we haven't seen how you did it.


-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/JavaScript-Stack-aggregator-tp6074088p6074478.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Defining validation properties for a textfield embedded within another component

2011-02-28 Thread LLTYK
I'd think of a way to avoid using a bunch of css class names to begin with.
Perhaps a better css selector would work with no changes to the class names.
Maybe you could stamp the class you want on the div or whatever that
contains all these fields.

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Defining-validation-properties-for-a-textfield-embedded-within-another-component-tp6072497p6075073.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: T5.2 mixin example

2011-02-23 Thread LLTYK

The wiki examples aren't terribly different, just change RenderSupport to
JavaScriptSupport. And the addScript method may have changed slightly as
well.

var SomeMixin = Class.create();
SomeMixin.prototype = {
initialize : function(element,zone) {
Event.observe($(element), 'click',
this.onclick.bindAsEventListener(this));
this.zone =$(zone);
},
onclick : function(e) {
//etc
}
};


As for how to POST the depends on what you're trying to do. Where's this
data you want to send coming from? Is it an entire form, or a field, or
what? Is this zone loading form elements?
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-2-mixin-example-tp6056074p6056309.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: T5.2 mixin example

2011-02-23 Thread LLTYK

See the ZoneUpdater code:
http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html

Disable the builtin actionlink behavior and do all you want your self
(zoneupdater shows how to do the zone part, with context parameter for
sending little bits of information). I assume fire back any selected is a
little piece of information.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-2-mixin-example-tp6056074p6056818.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Radio Button Event ??

2011-02-23 Thread LLTYK

I'd do it in more or less pure javascript, since you will have to add a
javascript listener to the radio button either way (either to trigger an
event java side or to directly add/remove the disabled attribute from the
fields).
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Radio-Button-Event-tp6057240p6057292.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



RE: T5: UploadedFile problem

2011-02-22 Thread LLTYK

Hit your app with IE and it'll return something. Newer versions of IE
actually return c:\fakepath.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-UploadedFile-problem-tp6052426p6053186.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Error after logout

2011-02-17 Thread LLTYK

The problem here is the session somehow being accessed after invalidate() is
called. Maybe you tried to set an @Persist'd variable or something, and the
actual change didn't propagate until after you called invalidate().

I do my invalidate in an ajax request. The other solution is to call
invalidate in a filter, so it always ends up after any session altering
code.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Error-after-logout-tp6036478p6036628.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Tapestry 5 JBoss 6 - Silently Fails

2011-02-16 Thread LLTYK

I'm on Jboss 5.1 here. Slightly different classpath converter.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Tapestry-5-JBoss-6-Silently-Fails-tp6021772p6031747.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Tapestry 5 JBoss 6 - Silently Fails

2011-02-16 Thread LLTYK

  // supports virtual filesystem used by JBoss 5.x
  try
  {
URLConnection connection = url.openConnection();
Object virtualFile = invokerGetter(connection, getContent);
Object zipEntryHandler = invokerGetter(virtualFile, getHandler);
URL realUrl = (URL)invokerGetter(zipEntryHandler, getRealURL);
if (realUrl.toString().indexOf(.war) !=-1 
realUrl.toString().indexOf(.jar) != -1) {
  //EAP 5.0.1 breaks getRealURL, concatenate what it's supposed to
do manually
  Object localPath = invokerGetter(zipEntryHandler,
getLocalPathName);
  Object zipEntryContext = invokerGetter(zipEntryHandler,
getZipEntryContext);
  URL jarRealUrl = (URL)invokerGetter(zipEntryContext,
getRealURL);
  realUrl = new URL(jarRealUrl.toExternalForm() + localPath);
}
log.trace(Converted -  + url +  - to -  + realUrl);
return realUrl;
  }

My jars are in WEB-INF/lib. Oddly enough EAP 5.0.x is supposed to match
jboss 5.1, yet somehow 5.0.0 and 5.0.1 are different. Maybe it depends on
what version of jboss 5.1 a particular person has.

There oughta be a module for this... I know the main reason for all this
reflection is not wanting a ton of jboss dependencies in my pom.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Tapestry-5-JBoss-6-Silently-Fails-tp6021772p6032112.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Spring beans in the AppModule?

2011-02-15 Thread LLTYK

I'm trying to use a spring bean in my AppModule:

  public static void
contributeApplicationDefaults(MappedConfigurationString, String
configuration,
@Inject SomeSpringBean someSpringBean)
  {
configuration.add(SymbolConstants.SUPPORTED_LOCALES, en);
configuration.add(SymbolConstants.APPLICATION_VERSION,
someSpringBean.getVersion()));
  }


It fails with this exception:
Caused by: 
java.lang.IllegalStateException: Construction of service 'Alias' has failed
due to recursion: the service depends on itself in some way. Please check
org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
AliasManager, Collection) (at TapestryModule.java:411) for references to
another service that is itself dependent on service 'Alias'.


Any ideas on how to do this?
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Spring-beans-in-the-AppModule-tp6027304p6027304.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Dynamic combo box - Tapestry 5.2.2

2011-02-10 Thread LLTYK

I use the ZoneUpdater mixin to do this.

http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html


t:select t:id=firstselect ... rest of the stuff ...  
t:mixins=zoneUpdater t:zone=myzone t:clientEvent=change event=change
/

  @Log
  void onChangeFromFirstSelect(String value)
  {
//set options for second select
  }


The zone encompasses all the selects.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp6011286p6011408.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: How to fix the id attribute of a select component

2011-02-08 Thread LLTYK

The current solution is to use a mixin instead of onchange. Mixins will get
the newly generated id passed in to their initialize(), where you would then
attach an onchange listener with prototype observe.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/How-to-fix-the-id-attribute-of-a-select-component-tp5999701p6004558.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Annotation for Field Description

2011-02-08 Thread LLTYK

A more descriptive label would be easy, just add the keys to the properties
file. More than that will probably delve into custom decorator or property
block territory.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Annotation-for-Field-Description-tp6004837p6005098.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



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

2011-02-07 Thread LLTYK

Because it's literal false and where changes would be stored is not
specified. If you want to set it you  have to have the parameter map to a
property of the container.

The example doesn't make clear what you are trying to do to begin with.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Tapestry-5-error-Caused-by-java-lang-RuntimeException-Literal-values-are-not-updateable-tp6000461p6000769.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: How to fix the id attribute of a select component

2011-02-07 Thread LLTYK

When you load Tapestry components in an ajax request a new t:id is generated.
Presumably because it's possible for a component with the same original id
to still be on the page. I'm not sure how this relates to the client side
id.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/How-to-fix-the-id-attribute-of-a-select-component-tp5999701p6001123.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Struggling with Ajax in T5 ...

2011-01-31 Thread LLTYK

The key part of zone updater that does what you want is this:
  void afterRender() {
String url = resources.createEventLink(event, context).toAbsoluteURI();
...
renderSupport.addScript(%sZoneUpdater = new ZoneUpdater(%s), prefix,
spec.toString());
  }


This is the interface from Tapestry to Javascript. The string in the
addScript call is literal javascript (except for the %s) that's added to the
bottom of the page.

You are basically looking for the right url to hit from javascript that will
trigger your Tapestry method. createEventLink generates this url
('createEventLink(register, placeholderforputtingstudentid)'), addScript
will pass it to the Javascript, and in there zoneManager.updateFromUrl
proceeds to ping that url. Another way to ping urls from js is with
Prototype:
http://www.prototypejs.org/api/ajax/request

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Struggling-with-Ajax-in-T5-tp5970312p5976916.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: how to return value to a onCompleteCallback() function?

2011-01-27 Thread LLTYK

Return a JSONObject.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/how-to-return-value-to-a-onCompleteCallback-function-tp5967095p5967228.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: creating an InPlaceSelect control

2011-01-26 Thread LLTYK

Just use the chenillekit onevent mixin. Unfortunately it'll only pass the
selected value as a string. So you'd have to translate the string back into
your object.




select t:type=any t:id=TheSelect t:mixins=ck/OnEvent
t:event=change

@OnEvent(component = TheSelect, value = change)
  void onSelected(String value)
  {

  }

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/creating-an-InPlaceSelect-control-tp5963248p5963591.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: creating an InPlaceSelect control

2011-01-26 Thread LLTYK

Just a guess, but change your tml to have a context along with changing the
event handler.


t:mixins=ck/OnEvent t:event=change t:context=contextyoumakeup
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/creating-an-InPlaceSelect-control-tp5963248p5963981.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Dynamic Layout

2011-01-24 Thread LLTYK

You need to do it in Javascript (document.title = Blah + document.title).
Or if you disable Tapestry javascript validation the layout will be
rerendered as you expect.

Tapestry doesn't seem to have a good place to hook into failed javascript
validations though. As far as I can tell you'd hook into the submit event on
the form and check $T(theform).validationError. So:

$('id_of_the_form').observe('submit', function() {
  if ($T($('id_of_the_form')).validationError)
document.title = Blah + document.title;
}



-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Dynamic-Layout-tp5952978p5954906.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Tapestry 5.2 Disable element id autogeneration

2011-01-19 Thread LLTYK

Put the submit button inside the zone as well, then it will link to the new
id.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Tapestry-5-2-Disable-element-id-autogeneration-tp5938959p5939355.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Combine scripts doesn't work in 5.2.4?

2011-01-19 Thread LLTYK

The only example I've seen is in TapestryModule.java:

public static void
contributeJavaScriptStackSource(MappedConfigurationString, JavaScriptStack
configuration)
{
configuration.addInstance(InternalConstants.CORE_STACK_NAME,
CoreJavaScriptStack.class);
configuration.addInstance(core-datefield, DateFieldStack.class);
}

There is a configuration.overrideInstance, so in your AppModule you can
create a wrapper around CoreJavaScriptStack and call override with it.

Or you can just create your own stack and presumably have two js files.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Combine-scripts-doesn-t-work-in-5-2-4-tp5929290p5939372.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Service order in a tapestry library?

2011-01-19 Thread LLTYK

I try to contribute a JavaScriptStack in a library module, and it ends up
failing. The TapestryModule seems load after the libraries. I assume it
would work fine if I put it in my AppModule instead. How would you use it in
a library though?

The contribution:
  public static void
contributeJavaScriptStackSource(MappedConfigurationString, JavaScriptStack
configuration)
  {
configuration.addInstance(JQUERYSTACK, JQueryJavaScriptStack.class);
  }

The error:
2011-01-19 10:55:36.703:WARN::FAILED app:
java.lang.IllegalArgumentException: Contribution
com.x.y.MyModule.contributeJavaScriptStackSource(MappedConfiguration) (at
MyModule.java:43) is for service 'JavaScriptStackSource', which does not
exist.
Module.contributeJavaScriptStackSource(MappedConfiguration) (at
MyModule.java:43) is for service 'JavaScriptStackSource', which does not
exist.
at
org.apache.tapestry5.ioc.internal.RegistryImpl.validateContributeDefs(RegistryImpl.java:199)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.init(RegistryImpl.java:174)
at
org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:170)

In the log:
2011-01-19 10:55:40,138 [main] INFO 
org.apache.tapestry5.ioc.RegistryBuilder  - Adding module definition for
class org.apache.tapestry5.ioc.services.TapestryIOCModule
2011-01-19 10:55:40,263 [main] INFO 
org.apache.tapestry5.ioc.RegistryBuilder  - Adding module definition for
class org.apache.tapestry5.spring.SpringModule
2011-01-19 10:55:40,319 [main] INFO 
org.apache.tapestry5.ioc.RegistryBuilder  - Adding module definition for
class com.x.y.MyModule
2011-01-19 10:55:40,323 [main] INFO 
org.apache.tapestry5.ioc.RegistryBuilder  - Adding module definition for
class org.apache.tapestry5.services.TapestryModule
2011-01-19 10:55:40,409 [main] INFO 
org.apache.tapestry5.ioc.RegistryBuilder  - Adding module definition for
class org.apache.tapestry5.internal.services.InternalModule
2011-01-19 10:55:40,452 [main] INFO 
org.apache.tapestry5.ioc.RegistryBuilder  - Adding module definition for
class com.x.y.z.AppModule
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Service-order-in-a-tapestry-library-tp5940301p5940301.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Resurrected: T5 Rendering a column as text box in a grid when the columnName is dynamic

2011-01-19 Thread LLTYK

Any tapestry identifiers in tml are not dynamically changeable.

First step would be programmatically creating the bean model in the java
code, and passing that to the grid. Customizing those dynamic blocks can be
tricky though, probably involving PropertyEditBlocks in the appmodule or
something.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Resurrected-T5-Rendering-a-column-as-text-box-in-a-grid-when-the-columnName-is-dynamic-tp5940109p5940318.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Service order in a tapestry library?

2011-01-19 Thread LLTYK

Nevermind, it was a maven classpath problem. It works fine regardless of the
order of those Adding module statements.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Service-order-in-a-tapestry-library-tp5940301p5940531.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: t5: 5.2.4 and IE8

2011-01-19 Thread LLTYK

I suspect you simply need to add noConflict to the end of the jquery js
(without having to reminify). As long as it is in the same file it'll
satisfy IE8.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/t5-5-2-4-and-IE8-tp5934819p5940730.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



JavaScriptStack demo

2011-01-19 Thread LLTYK

Here's an example of the 5.2 JavaScriptStack api. I used it to load
Datatables (http://www.datatables.net/).


The page:
@Import( stack={datatable})
public class PageWithDatatable
{
  void afterRender()
{
//connect datatable to tml here
}
}

The AppModule:
public static void
contributeJavaScriptStackSource(MappedConfigurationString, JavaScriptStack
configuration)
{
  configuration.addInstance(jquery, JQueryJavaScriptStack.class);
  configuration.addInstance(datatable,
DatatableJavaScriptStack.class);
}

DatatableJavaScriptStack.java:

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.apache.tapestry5.Asset;
import org.apache.tapestry5.ioc.services.SymbolSource;
import org.apache.tapestry5.services.AssetSource;
import org.apache.tapestry5.services.javascript.JavaScriptStack;
import org.apache.tapestry5.services.javascript.StylesheetLink;

public class DatatableJavaScriptStack implements JavaScriptStack
{
  private final Asset[] js;
  private final StylesheetLink[] css;

  public DatatableJavaScriptStack(SymbolSource symbolSource, AssetSource
assetSource)
  {
this.js = new Asset[] {
  assetSource.getContextAsset(/js/jquery.dataTables.min.js, null),
  assetSource.getContextAsset(/js/ColVis.js, null),
};
this.css = new StylesheetLink[] {
  new StylesheetLink(assetSource.getContextAsset(/css/datatable.css,
null)),
  new StylesheetLink(assetSource.getContextAsset(/css/ColVis.css,
null)),
  new
StylesheetLink(assetSource.getContextAsset(/css/flick/jquery-ui-1.8.5.custom.css,
null)),
};
  }
 

  public String getInitialization()
  {
return null;
  }

  public ListAsset getJavaScriptLibraries()
  {
return Arrays.asList(js);
  }

  public ListStylesheetLink getStylesheets()
  {
return Arrays.asList(css);
  }

  public ListString getStacks()
  {
//load jquery stack first
return Collections.singletonList(jquery);
  }
}


-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/JavaScriptStack-demo-tp5941012p5941012.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Grid onAction Problem IEM6

2011-01-18 Thread LLTYK

If you wanted a servlet request you'd do return new
HttpServletRequestFilter(). And then you'd change the the return type, and
the request and response type (HttpServletResponse, etc).

I don't think you need to do that anyways. Just log Request.getPath().

Usually this ends up being a url() reference in a css file.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Grid-onAction-Problem-IEM6-tp5917903p5936428.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Combine scripts doesn't work in 5.2.4?

2011-01-18 Thread LLTYK

The builtin tapestry stuff seems to combine itself into core.js if it's
included as a stack. Maybe it works if you create a javascriptstack instead?
Still a bug though.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Combine-scripts-doesn-t-work-in-5-2-4-tp5929290p5936505.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



T5.2 - Activation context for ajax requests

2011-01-14 Thread LLTYK

So I am using Inge's ZoneUpdater. Previously in 5.1, the createEventLink in
it results in a ?t:ac=1/2 being tacked onto the end of the event link.
Afterwards, when the event is triggered, the page's
onActivate(Integer,Integer) is called. This initializes some instance
variables that are then used by the event handler (which is buried in some
component).

Now in 5.2, this t:ac query parameter isn't being put on. Tapestry then
thinks that there is no page activation context (it goes for onActivate()
with no params), and then the event handler proceeds to throw an NPE since
the variable is not initialized.

How am I supposed to include the page context in ajax requests now?
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-2-Activation-context-for-ajax-requests-tp5921567p5921567.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: T5.2 - Activation context for ajax requests

2011-01-14 Thread LLTYK

I had an onPassivate. I realized something in my javascript was stripping the
query parameters from the link from createEventLink.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Re-T5-2-Activation-context-for-ajax-requests-tp5921878p5922180.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Grid onAction Problem IEM6

2011-01-13 Thread LLTYK

Bad relative link in the css or something sending asset requests to the page
itself?
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Grid-onAction-Problem-IEM6-tp5917903p5917932.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Grid onAction Problem IEM6

2011-01-13 Thread LLTYK

I would log all HTTP requests to the server and see which one is triggering
the error.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Grid-onAction-Problem-IEM6-tp5917903p5918246.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Grid / Ajax and checkbox

2011-01-13 Thread LLTYK

Well if you *must* use the ajax grid paging... then don't use tapestry
checkboxes. Use ordinary html checkboxes that have onclick javascript
handlers that ping the server with their new value.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Grid-Ajax-and-checkbox-tp5918400p5918429.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Tapestry5 + Tomcat5 + Apache2

2011-01-11 Thread LLTYK

I think apache just isn't expecting urls to be in the js and isn't replacing
it. I wonder if Chenillekit should be using toAbsoluteURI, wouldn't a
relative path work just fine? 

As for the solution, well make your own copy of the mixin and fix it (I'd
make it use a relative path instead).
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Tapestry5-Tomcat5-Apache2-tp5908721p5910560.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: T5.2.4 How to discard persistent fields when the user leaves a page ?

2010-12-27 Thread LLTYK

It's called discardPersistentFieldChanges:

http://tapestry.1045711.n5.nabble.com/T5-Cleaning-page-s-persistent-field-td2419355.html
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-2-4-How-to-discard-persistent-fields-when-the-user-leaves-a-page-tp5867260p5869215.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: T5 disable loading specified module

2010-12-21 Thread LLTYK

There is a tapestry.disable-default-modules. Took me a while to find it in
the source code. Then you specify the modules you want to use manually with
tapestry.modules
(org.apache.tapestry5.upload.services.UploadModule,org.apache.tapestry5.spring.SpringModule).
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-disable-loading-specified-module-tp3127241p5855485.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



tapestry.disable-default-modules seems broken

2010-12-21 Thread LLTYK

If you specify this, it disables any modules on the classpath, leaving only
the Tapestry stuff. I assumed that you'd be able to add other modules
manually via tapestry.modules, but that also gets disabled. Is it supposed
to be like that?
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/tapestry-disable-default-modules-seems-broken-tp5855492p5855492.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Tapestry 5, jetty, jdbc drivers, class reloading

2010-12-15 Thread LLTYK

This is for jetty 7. Jetty 6 has different package names, different plugin
names, etc. A chore to switch between the two but much of the syntax is the
same.

plugin
groupIdorg.mortbay.jetty/groupId
artifactIdjetty-maven-plugin/artifactId
version7.2.0.v20101020/version
dependencies
dependency
groupIdcommons-dbcp/groupId
artifactIdcommons-dbcp/artifactId
version1.4/version
/dependency
dependency
groupIdmysql/groupId
artifactIdmysql-connector-java/artifactId
version5.1.13/version
/dependency
dependency
groupIdxalan/groupId
artifactIdxalan/artifactId
version2.7.0/version
/dependency
/dependencies
configuration
connectors
connector
implementation=org.eclipse.jetty.server.nio.SelectChannelConnector
host0.0.0.0/host
port8081/port
maxIdleTime12/maxIdleTime
acceptors10/acceptors
/connector
/connectors
requestLog
implementation=org.eclipse.jetty.server.NCSARequestLog
appendtrue/append
/requestLog
/configuration
/plugin

Then in WEB-INF/jetty-env.xml:
?xml version=1.0?
!DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN
http://jetty.mortbay.org/configure.dtd;
Configure class=org.eclipse.jetty.webapp.WebAppContext
New id=ds class=org.eclipse.jetty.plus.jndi.Resource
Argjava:jdbc/db/Arg
Arg
New 
class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Set name=serverName/Set
Set name=databaseName/Set
Set name=user/Set
Set name=password/Set
/New
/Arg
/New
/Configure
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Tapestry-5-jetty-jdbc-drivers-class-reloading-tp5837594p5837937.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



  1   2   >