Re: T4.1 AJAX Indicators

2008-10-29 Thread Marcus Schulte
>>>>> Lastly, how can I get an ajax submit to abort? I want to have an
>>>>>>>> onclick
>>>>>>>> on
>>>>>>>> a the submit that will put up "confirm('Are you sure?')" but no
>>>>>>>> matter
>>>>>>>> what,
>>>>>>>> it submits anyway.
>>>>>>>>
>>>>>>>> Norman Franke
>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>> www.myasd.com
>>>>>>>>
>>>>>>>> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>>>>>>>>
>>>>>>>>  To answer your initial question, just use contrib:ajaxStatus from
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>>>>>>>>
>>>>>>>>> For the second, why not update only the part in question?
>>>>>>>>>
>>>>>>>>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <[EMAIL PROTECTED]>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I sort of have it working by doing an "onclick" and relying on the
>>>>>>>>>> entire
>>>>>>>>>> form to update, which resets my div.
>>>>>>>>>>
>>>>>>>>>> But that brings up another point. I want to AJAX fetch a list of
>>>>>>>>>> elements
>>>>>>>>>> with a checkbox. Is there a better way to do this than by setting
>>>>>>>>>> the
>>>>>>>>>> entire
>>>>>>>>>> form as one of the updateComponents? It pretty much forces an
>>>>>>>>>> update
>>>>>>>>>> of
>>>>>>>>>> the
>>>>>>>>>> entire page. If I don't, I can't get the values of the checkbox
>>>>>>>>>> since
>>>>>>>>>> tapestry serializes the state of the @For and checkboxes in
>>>>>>>>>> fields.
>>>>>>>>>>
>>>>>>>>>> What's the best way to handle this?
>>>>>>>>>>
>>>>>>>>>> Norman Franke
>>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>>> www.myasd.com
>>>>>>>>>>
>>>>>>>>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>>>>>>>>
>>>>>>>>>>  I've searched the documentation, and I can't find how one
>>>>>>>>>>> implements
>>>>>>>>>>> a
>>>>>>>>>>> "loading..." indicator when an AJAX request is sent off. My app
>>>>>>>>>>> will
>>>>>>>>>>> be
>>>>>>>>>>> doing a series of database queries which can take 10 seconds or
>>>>>>>>>>> so,
>>>>>>>>>>> and
>>>>>>>>>>> it
>>>>>>>>>>> really needs something to tell the user they need to wait a bit.
>>>>>>>>>>> Showing/Hiding a div would be great.
>>>>>>>>>>>
>>>>>>>>>>> Norman Franke
>>>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>>>> www.myasd.com
>>>>>>>>>>>
>>>>>>>>>>>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: [T 4.1.6] maven warning: tapestry-annotations pom invalid

2008-09-12 Thread Marcus Schulte
Oops, the POM is missing in the repo. Never trust maven when it tells you
"build successful" ...
I will upload the missing POM this evening.
Marcus

2008/9/12 Andy Pahne <[EMAIL PROTECTED]>

>
> When I tried to a project with the 4.1.6 release, maven gives me this
> error:
>
> [WARNING] POM for
> 'org.apache.tapestry:tapestry-annotations:pom:4.1.6:compile' is invalid. It
> will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for
> project org.apache.tapestry:tapestry-annotations at C:\Dokumente und
> Einstellungen\poops\.m2\repository\org\apache\tapestry\tapestry-annotations\4.1.6\tapestry-annotations-4.1.6.pom
>
>
> Did anybody else see this?
>
> Andy
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


[RELEASE] Tapestry 4.1.6

2008-09-11 Thread Marcus Schulte
Finally, I finished the 4.1.6 release. Release-notes, as usual, may be found
here:
http://tapestry.apache.org/tapestry4.1/release-notes.html

-- 
Marcus Schulte


Re: T-4.1.6-SNAPSHOT broken? commons-pool

2008-09-08 Thread Marcus Schulte
please make sure that there's exactly one version of commons-pool on your
classpath (1.4). --Marcus


Re: T4.1.5 possible ognl cache problem

2008-09-01 Thread Marcus Schulte
are you sure, you have org.apache.tapestry.disable-caching set to false? You
can easily check this by looking at Tapestry's exception page.

2008/9/1 denis queffeulou <[EMAIL PROTECTED]>

> h,
>
> actually my WAR is a big application and I can't put it in Jira.
> Don't you already have pages with some OGNL expression in test case ?
> I look at the source code and see that a WeakHashMap but even with half
> memory used, the cache hits are not numerous.
>
> Is there any configuration to tweak ? (I'm not in debug mode).
> Perhaps it's not a bug.
>
> Anyway I've made a issue in Jira (2635).
>
>
>  Can you attach a War-File to a an issue in Jira? If so, I promise to have
>> a
>> look at it :).
>>
>> 2008/9/1 denis queffeulou <[EMAIL PROTECTED]>
>>
>>
>>
>>> I've made another test with 4.1.5 which gives:
>>>
>>> 34,2% 90528 invocations on ExpressionCache.getCompiledExpression
>>> 25,4% 90300 invocations on Ognl.compileExpression
>>>
>>> The test is made of 5 pages which returns XML and has run for about 2
>>> hours.
>>>
>>> I'm not sure to be able to test with 4.1.6 in the next days.
>>>
>>> --
>>> Denis
>>>
>>>
>>>  Jesse, could you comment on this? I haven't tried profiling my apps, but
>>>
>>>
>>>> the
>>>> repeated calls to Ognl.compileExpression are worrisome if Denis got his
>>>> numbers right. Are there any ognl-related changes in 4.1.6? Denis, maybe
>>>> you
>>>> could repeat your profiling with the latest snapshot, so hopefully
>>>> something
>>>> could still be done for this before 4.1.6 is released.
>>>>
>>>> Kalle
>>>>
>>>>
>>>> On Thu, Aug 28, 2008 at 5:08 AM, denis queffeulou <
>>>> [EMAIL PROTECTED]> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm making some profiling on an web app made with Tapestry 4.1.5 which
>>>>> returns XML.
>>>>> The result are disappointing as the average access time (got with
>>>>> JMeter)
>>>>> is around 2000ms.
>>>>>
>>>>> In JProfiler, I found that OGNL expressions compilation uses 40% of
>>>>> processing time.
>>>>> As the JMeter script is requesting always the same page on the webapp,
>>>>> I'm
>>>>> wondering why the expressions are always compiled. The cache seems not
>>>>> to
>>>>> be
>>>>> used:
>>>>>
>>>>> 31896 invocations on ExpressionCache.getCompiledExpression
>>>>> 31140 invocations on Ognl.compileExpression
>>>>>
>>>>> Is there someone to give me a clue to have better performances ?
>>>>>
>>>>> Thanks
>>>>>
>>>>> PS: sorry for double posting in dev list, I had some problems to
>>>>> subscribe
>>>>> to users.
>>>>> --
>>>>> Denis Queffeulou
>>>>>
>>>>> -
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: T4.1.5 possible ognl cache problem

2008-09-01 Thread Marcus Schulte
Can you attach a War-File to a an issue in Jira? If so, I promise to have a
look at it :).

2008/9/1 denis queffeulou <[EMAIL PROTECTED]>

> I've made another test with 4.1.5 which gives:
>
> 34,2% 90528 invocations on ExpressionCache.getCompiledExpression
> 25,4% 90300 invocations on Ognl.compileExpression
>
> The test is made of 5 pages which returns XML and has run for about 2
> hours.
>
> I'm not sure to be able to test with 4.1.6 in the next days.
>
> --
> Denis
>
>
>  Jesse, could you comment on this? I haven't tried profiling my apps, but
>> the
>> repeated calls to Ognl.compileExpression are worrisome if Denis got his
>> numbers right. Are there any ognl-related changes in 4.1.6? Denis, maybe
>> you
>> could repeat your profiling with the latest snapshot, so hopefully
>> something
>> could still be done for this before 4.1.6 is released.
>>
>> Kalle
>>
>>
>> On Thu, Aug 28, 2008 at 5:08 AM, denis queffeulou <
>> [EMAIL PROTECTED]> wrote:
>>
>>
>>
>>> Hi all,
>>>
>>> I'm making some profiling on an web app made with Tapestry 4.1.5 which
>>> returns XML.
>>> The result are disappointing as the average access time (got with JMeter)
>>> is around 2000ms.
>>>
>>> In JProfiler, I found that OGNL expressions compilation uses 40% of
>>> processing time.
>>> As the JMeter script is requesting always the same page on the webapp,
>>> I'm
>>> wondering why the expressions are always compiled. The cache seems not to
>>> be
>>> used:
>>>
>>> 31896 invocations on ExpressionCache.getCompiledExpression
>>> 31140 invocations on Ognl.compileExpression
>>>
>>> Is there someone to give me a clue to have better performances ?
>>>
>>> Thanks
>>>
>>> PS: sorry for double posting in dev list, I had some problems to
>>> subscribe
>>> to users.
>>> --
>>> Denis Queffeulou
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: [T4.1.5] RadioGroup EventListener doesn't work

2008-07-06 Thread Marcus Schulte
Sorry guys,

I've forgotten the version-hint in the docs.  The feature was committed to
trunk end of march. Currently, it's only available in version
4.1.6-SNAPSHOT. I meant to push a release, but then, I never got around.

Marcus

2008/7/4 Christophe Mesplede <[EMAIL PROTECTED]>:

> Hi.
>
> I experienced the exact same problem trying to use the RadioGroup Ajax
> behaviour.
> As you did, I also tried the sample code from the documentation, it did not
> work.
> Finally, I gave up the Ajax way, and added a looot of stuff in javascript
> to
> make
> some kind of workaround, but with no server interaction :(
>
> Anyway it's sad neither of us managed to make this work. I wonder if
> someone
> on
> the mailing list ever used this ability of the RadioGroup...
>
> Regards,
> Chris
>
>
> > Hi,
> > When trying to you the onChange method on a RadioGroup component, we
> > encountered the following error client side :
> >
> > [Exception... "'Error: bad srcObj for srcFunc: onChange' when calling
> > method: [nsIDOMEventListener::handleEv> ent]"  nsresult: "0x8057001c
> > (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: ""  data: no]
> >
> > We thought we did something wrong so we started back from the Ajax
> > example on the tapestry website
> > (http://tapestry.apache.org/tapestry4.1/components/form/radiogroup.html
> ).
> > Still doesn't work.
> >
> > Do you have an idea ?
> > How to made the example work, is there something missing ?
> >
> > Best regards,
> > Jérome.
>



-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: EventListener and JavaScript function

2008-05-12 Thread Marcus Schulte
Hi Warner
I'm not quite sure whether I understand you setup completely.
Nevertheless two hints:

 - the "targets" attribute must refer to tapestry components. If you want to
refer to a client-side object use "elements".
 - The element you want to intercept indeed *must* be a DOM-node. You could
call an empty hook on some dom-element from your code or use dojo.connect if
you don't control the javascript code to intercept.

2008/5/11 Warner Onstine <[EMAIL PROTECTED]>:

> Hi all,
> I'm working on getting a Portal implementation working based off of this (
> http://blog.xilinus.com/2007/9/4/prototype-portal-class-2). So far I have
> everything working the way it should but am now getting to the stage where I
> want to start saving the portal layout changes to a db for the user. We're
> currently on 4.0.x and I spied the EventListener annotation and it looks
> like exactly what I need to call from the JavaScript side.
>
> The problem I'm running into is I don't know how to get my listener
> actions called, the javascript that is called is not tied to the DOM and I'm
> unclear on how I'm supposed to tie the function I want to listen to to a
> Tapestry component (as has been suggested in other emails).
>
> Here are the relevant pieces of code:
> portal_hooks.js (passed into the portal as function calls)
>
> function onChange(portalState) {
> }
>
> function onUpdate(portalState) {
> }
>
> @EventListener(targets="portal" events="onChange")
> public void testOnChange(BrowserEvent event) {
> }
>
> @EventListener(targets="portal" events="onUpdate")
> public void testOnChange(BrowserEvent event) {
> }
>
> the "portal" target is the actual JavaScript object that I'm creating in
> Portal.script in the "" section:
> portal = new Xilinus.Portal("#portal div", {onOverWidget: onOverWidget,
> onOutWidget: onOutWidget, onChange: onChange, onUpdate: onUpdate,
> removeEffect: Effect.SwitchOff});
>
> So any suggestions on how to tie these together is greatly appreciated as
> the docs on this are not clear on how to do this except for the following
> line:
> "When listening to a client-side javascript function that does not
> represent a native browser-event, you can access the parameters passed to
> the function on the server-side. The Parameters are made available as a
> JSON-Array within the class BrowserEvent."
>
> but the example given doesn't work (at least I haven't gotten it to work
> for my case.
>
> Thanks in advance!
>
> -warner
>
> Warner Onstine - Programmer/Author
> New book on Tapestry 4!
> Tapestry 101 available at http://sourcebeat.com/books/tapestrylive.html
> [EMAIL PROTECTED]
> http://warneronstine.com/blog
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: [T4.1.5] problems with file service and IE

2008-05-07 Thread Marcus Schulte
The exception hints to IE closing the connection unexpectedly. Might
it be related to the content you're streaming? I use very similar code
to serve out Excel files to IE. Works great. Did you try omitting the
length-header?

On 07/05/2008, Henrik Schlanbusch <[EMAIL PROTECTED]> wrote:
> Marcus Schulte  googlemail.com> writes:
>
>  >
>  > output.close() ?
>  >
>
>  Marcus, thanks for the suggestion, but the same
>  situation persists. Exactly the same error message
>  from explorer.
>
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4.1.5] problems with file service and IE

2008-05-07 Thread Marcus Schulte
output.close() ?

On 07/05/2008, Henrik Schlanbusch <[EMAIL PROTECTED]> wrote:
> Hi
>
>  I have a major problem with my file service.
>  It is a service that should stream files
>  to the client. It works swell in firefox
>  and opera, but behaves strangely in IE.
>  An image may be opened ok first time (probably
>  due to caching), then the second time (after
>  hitting ctrl + F5)
>  the image may be streamed 50% or so and then
>  maybe not at all.
>
>  My service is implemented very simple:
>
>  public void service(IRequestCycle cycle) throws IOException {
> try {
> Object[] params = new Object[]{cycle.getParameter("resourceId")};
> String resourceId = (String) params[0];
> FileRef ref = getFileBankManager().getFileRef(resourceId);
> File sourceFile = ref.getData().getContent();
> byte[] data = FileUtils.readFileToByteArray(sourceFile);
>
> _response.setHeader("Cache-Control", "no-cache");
> _response.setHeader("Pragma", "no-cache");
> _response.setContentLength(data.length);
>
> OutputStream output = _response.getOutputStream(
>  new ContentType(ref.getData().getContentType()));
> output.write(data);
> } catch (IOException e) {
>
> } catch(Throwable t) {
> _response.setStatus(HttpServletResponse.SC_NOT_FOUND);
> t.printStackTrace();
> }
>
> return;
>
>  The exception that appears is
>  Connection reset by peer: socket write error
>
>  I simply cannot figure out why this happens and hope that
>  some of you can shed some light on this for me.
>
>  Regards,
>  Henrik
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4]hivemind variables in components

2008-04-24 Thread Marcus Schulte
condition="meta:amplafi.production" ?

On 23/04/2008, Patrick Moore <[EMAIL PROTECTED]> wrote:
> Hi there --
>
>  O.k. I feel silly -- but how do I use hivemind variables directly in a
>  component. I know how to pass hivemind variables to services. But how to use
>  those values in the components? For example, I would like to use the
>  hivemind variable 'amplafi.production' as the condition in a @If
>
>  for example,:
>
>  
>  hey there amplafi.production is true!
>  
>
>  -Pat
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: migrating from T4.0.2 to T4.1.5 problem

2008-04-18 Thread Marcus Schulte
your tapestry lib is in the shared tomcat lib-folder. Looks like this
leads to an old version of commons-pool being used. Either update to
the latest commons-pool, or, better, put all your web-app dependencies
including tapestry and all its dependencies into WEB-INF/lib

On 18/04/2008, abangkis <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  i'm trying to migrate my application from using Tapestry 4.0.2 to
>  4.1.5. I fix the problem that rises, remove tap4 library from my
>  tomcat shared lib, copied tap4.1 library to my tomcat shared lib, and
>  re-deploy it in my local computer, and it work fine. But when i try
>  deploying the application to my hosting server using the same method,
>  i've this error message :
>
>  javax.servlet.ServletException: Unable to construct service
>  tapestry.page.PageSource: Error building service
>  tapestry.page.PageSource: Error at
>  
> jar:file:/usr/local/shared/tomcat/mreunion/shared/lib/tapestry-framework-4.1.5.jar!/META-INF/tapestry.page.xml,
>  line 25, column 81: Unable to initialize service
>  tapestry.page.PageSource (by invoking method initializeService on
>  org.apache.tapestry.pageload.PageSource):
>  org.apache.commons.pool.impl.GenericKeyedObjectPool.setMinIdle(I)V
> 
> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:65)
>
>  I try looking athe tapestry.page.xml line 25, it contins
>
>service-id="tapestry.props.ApplicationPropertySource" />
>
>  my first guess was the error got something todo with my .application
>  file , but after i look at my .application file i didn't see anything
>  wrong with it. My .application is this :
>
>  
> "-//Apache Software Foundation//Tapestry Specification 4.1//EN"
>   "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd";>
>
>  
> value="com.cie2.mreunion.ui.tapestry"/>
>   value="com.cie2.mreunion.ui.tapestry.Visit"/>
>  
>
>
>  anyone know whats the problem ?
>
>
>  TIA
>
>  abangkis
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4 - Autocompleter without doing a full page re-render

2008-03-31 Thread Marcus Schulte
You can distinguish between a "normal" render and an "ajax"-render via

getRequestCycle().getResponseBuilder().isDynamic(),

hth,

Marcus


On 01/04/2008, Paul Stanton <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm using the @Autocompleter component and have noticed that at each
> interaction (lookup and selection) it essentially re-processes the whole
> wrapping page at the back end. In this case, I have a couple of
> sometimes large database lookups that are being re-queried and as a
> result the autocompleter appears slow and the server is working far
> harder than it needs to.
>
> Is there a way of avoiding this excess processing?
>
> Thanks, Paul.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: T4 - Autocompleter without doing a full page re-render

2008-03-31 Thread Marcus Schulte
You can distinguish between a "normal" render and an "ajax"-render via

getRequestCycle().getResponseBuilder().isDynamic(),

hth,

Marcus


On 01/04/2008, Paul Stanton <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm using the @Autocompleter component and have noticed that at each
> interaction (lookup and selection) it essentially re-processes the whole
> wrapping page at the back end. In this case, I have a couple of
> sometimes large database lookups that are being re-queried and as a
> result the autocompleter appears slow and the server is working far
> harder than it needs to.
>
> Is there a way of avoiding this excess processing?
>
> Thanks, Paul.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: T5: Custom (conditional) validation

2008-03-31 Thread Marcus Schulte
Hi Inge,

I've done similar conditional validation using T4-1's  ajax - @EventListener
stuff. This is certainly not the tersest possible solution, but it's very
powerful. And, most importantly, client-side validation works.


So you might have something like:


...





...


and:


...

   IValidator[] getTxt2Validators() {

return getT1() == null ?

new IValidator[]{new RequiredValidator(), ...}

: new IValidator[0] }


 @EventListener( events = "onchange", target="txt1" )

 public void onT2changed() {

getRequestCycle().getResponseRenderer().updateComponent("txt2");

 }

...


Marcus


On 31/03/2008, Inge Solvoll <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I'm reading the examples on TextField validation, which use
> validate="required,regexp" for specifying validation rules.
>
> A lot of my pages use more sophisticated validation, examples here:
>
> - Field1 is only required if Field2 is empty
> - This is a temp save (save draft), so none of the fields are required,
> even
> though they should be required on normal submit.
>
> These are very common cases for me, and I'm struggling a bit in T4 to
> implement this in an elegant way (as elegant as default validation
> markup).
> Could someone point me to documentation/mailing list post that shows
> elegant
> solutions for this in T5 (or even better, in T4). I couldn't possibly be
> the
> first one to comment on this? :)
>
> In Struts 1.3.8, I find the default validation system so painful and hard
> to
> debug that I actually choose to write custom java code for all my
> validation, to have full control over the logic. Far from ideal, but in my
> opinion better than the built-in alternative. I'm really hoping that I can
> find a far better solution to advanced validation needs in Tapestry!
>
> Thanks
>
>
> Inge
>



-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Problem using EventListener annotation

2008-01-24 Thread Marcus Schulte
1. Make sure, your template includes a @Shell and a @Body component as shown
here: http://tapestry.apache.org/tapestry4.1/ajax/basics.html

2. please also try to keep your page-class abstract and remove the
auto-generated stubs of methods. Tapestry generates a concrete class for
each component/page at runtime (should not be the cause of your trouble,
though).

2008/1/24, HBKTron <[EMAIL PROTECTED]>:
>
>
> Hi,
>
> I'm currently using Tapestry 4.1.3 and I'm trying to copy the
> EventListener
> annotation example from:
> http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html.
>
> The example shows how a method can be annotated with EventListener to
> respond to DOM events.  Unfortunately the EventListener method is never
> being called when I try to run it.  Everything compiles ok, and I've been
> able to use other Tapestry functionality (such as submit button listeners)
> on this page.  Below is my code, can anyone help me out?
>
> Home.html
>...
> 
> Big brother is watching you.
> 
>...
>
> Home.page
> 
>"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
>   "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
> 
> 
>
> HomePage.java
> package pages;
>
> import org.apache.tapestry.annotations.EventListener;
> import org.apache.tapestry.event.BrowserEvent;
> import org.apache.tapestry.html.BasePage;
> import org.apache.tapestry.record.PropertyChangeObserver;
>
> public class HomePage extends BasePage {
>
> @Override
> public String getClientId() {
> // TODO Auto-generated method stub
> return null;
> }
>
> @Override
> public void setClientId(String arg0) {
> // TODO Auto-generated method stub
>
> }
>
> public PropertyChangeObserver getPropertyChangeObserver() {
> // TODO Auto-generated method stub
> return null;
> }
>
> @EventListener(elements = "myFavoriteDiv", events = "onmouseover")
> public void watchText(BrowserEvent e) {
> System.out.println("mouseover detected");
> System.out.println(e);
> }
>
> }
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Problem-using-EventListener-annotation-tp15072602p15072602.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: org.apache.tapestry.page-pool-min-idle

2008-01-20 Thread Marcus Schulte
To override "FactoryDefaults" you must use another SymbolSource. Most of the
time this will be "ApplicationDefaults".

2008/1/18, Kaspar Fischer <[EMAIL PROTECTED]>:
>
>
> On 12.01.2008, at 02:47, Kaspar Fischer wrote:
> > How would I do this?
> >
> > 
> >  > value="4" />
> > 
> >
> > Or do I have to use something like "InfrastructureOverrides"? The
> > latter is used to
> > override the exception settings, see
> >
> >   http://tapestry.apache.org/tapestry4.1/developmentguide/
> > exceptionpages.html
> >
>
> I've tried the former approach and it does not work:
>
>Caused by: org.apache.hivemind.ApplicationRuntimeException:
> Element default (at jar:file:...tomcat/wtpwebapps/KC/WEB-INF/lib/
> tapestry-framework-4.1.3.jar!/META-INF/tapestry.page.xml, line 37,
> column 78) contains errors: Value for attribute
> 'symbol' ('org.apache.tapestry.page-pool-min-idle') duplicates a
> prior instance at context:/WEB-INF/hivemodule.xml, line 5, column 72.
> [jar:file...tomcat/wtpwebapps/KC/WEB-INF/lib/tapestry-
> framework-4.1.3.jar!/META-INF/tapestry.page.xml, line 37, column 78]
> at org.apache.hivemind.impl.SchemaElement.validateAttributes
> (SchemaElement.java:185)
> at org.apache.hivemind.impl.SchemaProcessorImpl.processElement
> (SchemaProcessorImpl.java:251)
> at org.apache.hivemind.impl.SchemaProcessorImpl.processRootElement
> (SchemaProcessorImpl.java:235)
>
> So I have tried the latter approach (again in hivemodule.xml):
>
>   
>
>   
>
> With this, no errors are reported. But maybe the configuration is
> just ignored?
> How can I verify the "page-pool-min-idle" property has been set?
>
> Thanks,
> Kaspar
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Temporary objects in OGNL

2008-01-03 Thread Marcus Schulte
Oh, sorry, I didn't realize, you want to cache results between different
OGNL expressions. Different ognl expressions only share the page as common
context. So you'd need sth. like:
Page:
   ...
   public abstract Object getThat();
  ...

Template:

 ... xyz="ognl: that=components.table.tableRow.getProperty('title')" 

 ... condition="ognl: that != null && ..."...



Maybe, instead of "public abstract Object getThat();" you could use a map as
a "symbol table" like
@InitialValue("new java.util.HashMap()")
public abstract Map getTmp();
and put it in you base-class for pages.
Of course, your shortcuts won't be writable/settable ...


2008/1/3, Kaspar Fischer <[EMAIL PROTECTED]>:
>
> On 31.12.2007, at 09:07, <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]> wrote:
>
> > Have a look at
> >
> > http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/varref.html
>
> I actually tried this before:
>
>
>
>
> only outputs "foo" once. Shouldn't it emit this string twice?
>
> > I tend to use complex ognl for rapid view development (dynamic
> > reload).
> > After that, I move complex expressions into Java-code.
>
> Thanks a lot for this hint! Would almost have been my next question ;-)
>
> Kaspar
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Help needed with DirectLink and page parameters (Was: Contrib:Table and page parameters)

2007-12-21 Thread Marcus Schulte
2007/12/21, Kaspar Fischer <[EMAIL PROTECTED]>:
>
>
> On 20.12.2007, at 18:16, <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]> wrote:
> >> Does this mean that Tapestry will keep in its page pool an
> >> IExternalPage page for each article I have in the DB (once
> >> this page is visited)?
> >
> > Please refer to
> >  http://tapestry.apache.org/tapestry4.1/usersguide/state.html
> > Tapestry will keep in its pool one instance for each *concurrent
> > request* it is serving. Your persistent page-id will be stored in the
> > session or on the client (configurable).
> > When a request comes in, Tapestry will pick a page from the pool and
> > provide it with the persistent property data, e.g. the reference to
> > your
> > db-data.
>
> I don't see how this solves my problem of emitting DirectLinks with
> parameters into the page. If I understand you correctly, you say that
> by using persisted properties, my DirectLinks do not need to contain
> the page's parameters, right?
>
> Suppose my article page contains a link to download the article. This
> link is implemented via a DirectLink. Suppose now the user opens two
> tabs,
> in this order:
>
>http://my.org/app?page=Article&id=1
>http://my.org/app?page=Article&id=2
>
> After this, the session holds "id=2". Now the user clicks the download
> link in the former page (id=1). As this DirectLink does not contain
> "id=1"
> the user will get article 2. That's not what the user expects.
>
> Do I misunderstand this?
>
> It seems to me that persistent properties do not solve the problem. I
> need a way to tell DirectLink to look up the current external page's
> parameter's and embed them in the link.


Sounds like what you really want is client-side persistence. This will store
your page-state in the URL - or in a hidden field, if your page uses forms.
So, to be concrete, if you're having a non-null property annotated with
@Persist("client"), or tagged appropriately in the .page xml-File, your
direct Link will, magically, render as something like:

http://localhost:8080/myapp/app?component=dl&page=Home&service=direct&state:Home=BrO0ABXcQAQAACXRyaWdnZXJlZHQAATE%3D

The funny String making up the value of the parameter "state:Home" is
actually the Base64 encoded version of your page-state. That way, a user
opnening several instances of your page in multiple browser windows/tabs
will see what he expects (possibly ;))

Btw., don't worry about asking basic questions, that's ok, of course.


Marcus

-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: [T4] OGNL bytecode compilation in Tapestry/status of tapestry-prop?

2007-12-20 Thread Marcus Schulte
Hi Kaspar,
you are right OGNL bytecode compilation is enabled in all Tapestry-versions
>= 4.1.2.
As far as I can see, the performance improvements will be substantial for
high-volume public sites where server-cpu load is a performance-bottleneck.
If you are not satisfied with rendering times in single-/few user tests, I'd
think of db-roundtrips rather than OGNL as the usual suspect.
After all, only performance profiling will really tell (see YourKit, for
example).

--Marcus

2007/12/20, Kaspar Fischer <[EMAIL PROTECTED]>:
>
> Dear list,
>
> I am confused about the status of OGNL that comes with Tapestry 4.1.3.
> I read on
>
>http://blog.opencomponentry.com/2007/01/14/new-ognl-release-on-the-
> horizon-its-faster
>
> that bytecode compilation has been implemented for OGNL and that this
> is in Tapestry 4.1.2 already.
>
> * Is this the case?
>
> * Do I have to enable OGNL bytecode compilation in some way?
>(We have quite high rendering times and I wonder whether OGNL is
> resonsible.)
>
> * Does this mean that tapestry-prop,
>
>  http://howardlewisship.com/tapestry-javaforge/tapestry-prop/
>
>which you cannot download currently, is not needed anymore?
>
> Thanks,
> Kaspar
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Using Alfresco from within Tapestry

2007-11-18 Thread Marcus Schulte
Have a look at
http://hivemind.apache.org/hivemind1/hivemind-lib/SpringLookupFactory.html

I'm not familiar with Alfresco, but this should get you started with using
any kind of Spring bean from HiveMind (and Tapestry).

You'll probably need to add a couple of hooks to your Tapestry app's
web.xmlto make sure, that the Spring BeanFactory is properly
initialized.

2007/11/18, Kaspar Fischer <[EMAIL PROTECTED]>:
>
> Hi there!
>
> I am completely new to Tapestry and would like to use it in order
> to display content from an Alfresco data repository. More precisely,
> I have a folder ("space", in Alfresco's terminology) in Alfresco
> and I want to create a dynamic webpage for each file in this folder.
> The webpage shows some properties of the file and I want to obtain
> these properties by calling Alfresco's Node Service API.
>
> I have tried to find some information on how to start here. I have
> the book "Enjoying Web Development with Tapestry" but need a hint
> on how to get an Alfresco session from within Tapestry.
>
> Alfresco and Tapestry will run on the same installation of Tomcat.
> Can I then just load Alfresco's Node Service bean from within
> Tapestry and use it?!
>
> Could anybody help me with a pointer or a very high-level list of
> the necessary steps?
>
> Many thanks,
> Kaspar
>
>
> ---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: T4:NumberTranslator Leading and Trailing 0's

2007-11-18 Thread Marcus Schulte
please try to omit the double-quotes and commas. The following should work:
translator="translator:number,omitZero=false,pattern=#0.00"


If you need the comma, you can set up your translator in Java and bind it
via ... translator="ognl:fancyTranslator". The simple bean initializers only
work for really simple cases.

2007/11/17, bioye <[EMAIL PROTECTED]>:
>
>
> How do I make NumberTranslator display leading and trailing zeros in my
> TextField?  Using markup as below, I expect 0 to appear as 0.00 but it
> appears as 0.  I also expect 0.8 to appear as 0.80 but it appears as .8 .
> My markup is:
>
> span size="8" jwcid="@TextField" value="ognl:transaction.price"
> translator="translator:number,omitZero=false,pattern="###,##0.00"
> style="text-align:right"
>
> I'm using T4.13
> --
> View this message in context:
> http://www.nabble.com/T4%3ANumberTranslator-Leading-and-Trailing-0%27s-tf4827165.html#a13810955
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: After upgrade to T4.1.3: clientValidationEnabled together with PropertySelection does not work any more

2007-11-05 Thread Marcus Schulte
no test-case neccessary. I stumbled over the same thing and will fix it

2007/11/5, Ulrich Stärk <[EMAIL PROTECTED]>:
>
> Sounds like http://issues.apache.org/jira/browse/TAPESTRY-1806.
> I suggest you write a very simple test demonstrating the issue and attach
> it to the JIRA issue report.
>
> Uli
>
> On So, 4.11.2007, 20:48, spot_ sagte:
> >
> > Hi
> >
> > after upgrading my webapp from Tapestry 4.1.2 to 4.1.3 form components
> > with
> > clientValidationEnabled attribute set to true, that contain
> > PropertySelection input fields (StringPropertySelectionModel (first
> array
> > entry is an emtpy String: "")) with validators set to 'required' do not
> > work
> > any more. After pressing the submit button, an empty validation popup is
> > shown (both in firefox and ie) and the the submit is not executed.
> >
> > Any help on that?
> >
> > Thanks in advance
> > Christoph
> > --
> > View this message in context:
> >
> http://www.nabble.com/After-upgrade-to-T4.1.3%3A-clientValidationEnabled-together-with-PropertySelection-does-not-work-any-more-tf4748161.html#a13576989
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Honeycomb project

2007-10-30 Thread Marcus Schulte
Seems to be due to the recent javaforge sw-upgrade. I'll try to recover it.
Marcus

2007/10/30, Istvan Szucs <[EMAIL PROTECTED]>:
> Hi,
>
> The Honeycomb project is closed?
> I can't access to http://honeycomb.javaforge.com/ website.
> Any info from this project? It is moved somewhere?
>
> Best regards,
> Stef
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [4.1] AJAX Substituting a component

2007-09-27 Thread Marcus Schulte
have a look at @Block, @RenderBlock .


2007/9/27, Michael Wölm <[EMAIL PROTECTED]>:
> Hi,
>
> I have a BasePage with a template which declares a component like this:
>
> first.html:
> Hello World
> 
>
> Now I want a DirectLink thats update the content of the first.jwc and
> substitute it with second.jwc:
> second.html:
> ByeBye
> 
>
> (Imagine that the real components contain a complex template like the
> short texts described here in the static way. Perhaps with further
> encapsulated components...)
>
> http://tapestry.apache.org/tapestry4.1/ajax/index.html gives information how 
> to reload informations in a tapestry component like Insert, but I can not 
> derive from that how to substitute
> a self-made component with another. The given example could be dissolved by 
> an insert-component, but what happens, if I want to fully delete a complex 
> component as the part of the actual dom and fully insert the substitute 
> there? As like Prototypes AJAX.Update("",...)
>
> I would be very happy, to get a tip or link to get information about that.
> I could imagine that I have to declare a further component that encapsulate 
> the component, which should be substitute (like first in example), but then I 
> do not know how to substitute the inner component.
>
>
> Regards,
> Michael Wölm
>
>
>
>
>
> ---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with jetty:run when using Tapestry 4.1.3

2007-09-20 Thread Marcus Schulte
OK, it's obviously not really the one I just fixed but it looks somewhat
similar. Maybe the order of Enhancement-/Injection-Workers for the
spring/other stuff (which I unfortunately don't use) is also defined
incompletely.


2007/9/20, mraible <[EMAIL PROTECTED]>:
>
>
> It happens for me on OS X and the original problem was reported by someone
> on
> Windows XP.
>
> Matt
>
>
> Marcus Schulte wrote:
> >
> > might be somehow related to
> > https://issues.apache.org/jira/browse/TAPESTRY-1721 ... I'm looking into
> > it.
> > Which OS/jvm are you running?
> >
> > 2007/9/20, mraible <[EMAIL PROTECTED]>:
> >>
> >>
> >> Any idea why Tapestry 4.1.3 works with jetty:run-war and tomcat:run
> (two
> >> Maven plugins), but not jetty:run? We're having this problem in AppFuse
> >> 2.0.
> >>
> >>
> >>
> http://www.nabble.com/Problem-with-jetty%3Arun-in-Tapestry-basic-archetype-tf4485474s2369.html#a12791114
> >>
> >> Thanks,
> >>
> >> Matt
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Problem-with-jetty%3Arun-when-using-Tapestry-4.1.3-tf4489399.html#a12803514
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > Marcus Schulte
> > http://marcus-schulte.blogspot.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-jetty%3Arun-when-using-Tapestry-4.1.3-tf4489399.html#a12805463
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Problem with jetty:run when using Tapestry 4.1.3

2007-09-20 Thread Marcus Schulte
might be somehow related to
https://issues.apache.org/jira/browse/TAPESTRY-1721 ... I'm looking into it.
Which OS/jvm are you running?

2007/9/20, mraible <[EMAIL PROTECTED]>:
>
>
> Any idea why Tapestry 4.1.3 works with jetty:run-war and tomcat:run (two
> Maven plugins), but not jetty:run? We're having this problem in AppFuse
> 2.0.
>
>
> http://www.nabble.com/Problem-with-jetty%3Arun-in-Tapestry-basic-archetype-tf4485474s2369.html#a12791114
>
> Thanks,
>
> Matt
> --
> View this message in context:
> http://www.nabble.com/Problem-with-jetty%3Arun-when-using-Tapestry-4.1.3-tf4489399.html#a12803514
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Memory issues with Tapestry 4.1.x

2007-09-05 Thread Marcus Schulte
There are a couple of reports on the list that seem to point in this
direction. Especially the HivemindClassPool seems to be a candidate for
further observation. Since there are productive apps on 4.1.2 with no
issues, an issue with a sample app / setup to reproduce an OOM would be very
helpful.


2007/9/5, mraible <[EMAIL PROTECTED]>:
>
>
> I've been experiencing some OOM issues in a couple applications ever since
> I
> upgraded from 4.0.x to 4.1.x. I didn't change any code for the most part,
> just some descriptors and such. Has anyone else noticed memory-hogging
> issues with 4.1.x?
>
> Even stranger, if I start up my app using "mvn jetty:run", browse a couple
> pages and hit Ctrl+C, it doesn't kill the process. I have to forcefully
> kill
> the process in order to shut down Jetty. This doesn't happen with the
> other
> web frameworks I'm using, so I'm confident it's caused by Tapestry 4.1.2.
>
> Thanks,
>
> Matt
> --
> View this message in context:
> http://www.nabble.com/Memory-issues-with-Tapestry-4.1.x-tf4387514.html#a12508911
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: [T4] Jetty + tapestry 4.1.2 archetype + UTF-8

2007-09-01 Thread Marcus Schulte
please try setting org.apache.tapestry.template-encoding to "UTF-8", es
described in
http://tapestry.apache.org/tapestry4.1/usersguide/configuration.html

2007/9/1, Istvan Szucs <[EMAIL PROTECTED]>:
>
> Hi Folks!
>
> How can I setup the jetty to use it UTF-8 encoded html page?
>
> An exempale:
> 1. Create a new project, use tapestry 4.1.2 archetype:
> mvn archetype:create -DarchetypeGroupId=org.apache.tapestry \
> -DarchetypeArtifactId=tapestry-archetype \
> -DarchetypeVersion=4.1.2-SNAPSHOT -DgroupId=org.example -DartifactId=myapp
> 2. Import created myapp project into Eclipse
> 3. Change Home.html >>> text file encoding from Cp1250 to UTF-8
> 4. Write some international character to Home.html (eg: ÁÉŐÚÖŰ)
> 5. Run project (with jetty 5 or 6)
> 6. You see wrong characters on the browser...
>
> Jetty don't work with UTF-8 character encoded html pages?
> Wich parameter needed to setup jetty to use UTF-8 text encoded pages?
>
> Best regards,
> Stef
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: T4.1.2 / Spring 2.0.6 / Hib3 Lazy loading and PropertySelectionModel stuff

2007-08-28 Thread Marcus Schulte
One thing to be aware of is that the same db-row, in two different
Hibernate-Session, corresponds to two different objects. So with
session-per-request, if your PSModel is loaded in one request, and your
value-parameter-object in another. If you don't override
Object.equalsappropriately, Tapestry cannot know which list member to
show for a given
value.

2007/8/28, Jan Vissers <[EMAIL PROTECTED]>:
>
> Hi,
>
> I'm witnessing some 'interesting' behavior, using lazily loaded
> collections (Hibernate) combined with PropertySelectionModel stuff. Before
> getting into too much detail - using my JUnit tests I can prove that
> traversing the (nested) objectgraph actually has the information (albeit
> via CGLIB proxies). When using this in my T4.1.2 page however, I see that
> the correct poplist value doesn't get selected. In a read only version of
> the page on the other hand - where the poplist is dynamically replaced by
> a readonly display item - the information is shown.
>
> Is there something that I should be aware of in using T4/Hib3 regarding
> the selectionmodel component?
>
> -J.
>
> BTW: I'm using OpenSessionInView provided by Spring.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: [Tapestry Beginner] Validation is ignored

2007-08-16 Thread Marcus Schulte
I can't really see your mistake from the code, but anyway, here are
two things that could be wrong:

1. for client-side validation to work, you need to set the
clienValidationEnabled parameter of your form to true

2. be sure to bind the form's delegate-parameter to your delegate.

3. if you want server-side validation check the delegate bean using hasErrors

2007/8/16, ipoese <[EMAIL PROTECTED]>:
>
> Hi Everyone,
>
> i've been teaching myself tapestry for some time now, and everytime i think
> i am finally getting a grip on it something new comes up.
> OK, here's the deal... (i'll be using snippets since you guys probably don't
> want a million lines of code... all code i post compiles in it's context and
> runs without exceptions)
>
> i have to pages, Login and Register
>
> First for login:
>
> Login.html has:
> 
>   User
> Name
>   
> 
>
> Login.page has:
>   
>
>   
> 
> 
> 
>   
>
> Login.java has:
>
>   public abstract String getUsername();
>   public abstract void setUsername(String Username);
>
>   public IPage tryLogin(){ // <-- gets called when the form around username
> is submitted
> //do fancy stuff
>   }
>
> this works quite good. it checks the enteresd string in username against the
> self written Validator $ValidString. I can debug, breakpoint, step-though
> and see all the magic happening. quite cool, acctually.
>
> Now for Register
>
> Register.html
>   firstname  />
>   lastname   />
>
> Register.page
>
>
>   
>   
> 
>   
>
>   
>   
>
>   
>   
> 
>  /> 
>   
>
>   
> 
> 
>   
>
> Register.java
>
>   public abstract String getFirstname();
>   public abstract String getLastname();
>
>   public IPage tryUserCreate(){
> // do more fancy stuff
>   }
>
> now this acctually compiles and runs (!!!) without an error or expection
> even tho the gibberish Validator bean in firstname does not exist. This form
> has a lot more fields to it, and two more self written validators but this
> is pretty much the essence.
> now - the Validators here get ignored. i can write anything after the $ and
> it still runs through without any trouble. I can even delete the bean
> statement completely withouth raising an exception.
> required is also ignored - it jumps right into the listener without looking
> at the Validators.
> This started happening after i had to refactor the class to move it to
> another package. Used the NetBeans refactor (which always worked before) and
> suddenly it would not validate anymore. Refactoring it back does not help
> either.
>
> if i type somthing like this in one if the TextFields it does give me an
> exception upon loading the page:
> 
>
> Here is what i have tried:
>
> i have moved the Form around in register - even used it inline - same thing
> i have copied and pasted the content to a new file - same thing
> i have used tapestry 4.1.1, 4.1.2 and the nightly 4.1.3 - same thing
> i have deleted the project and reloaded it from svn - same thing
> i have set up NetBeans completely new - same thing
> i have run the application on two more machines (Windows, Debian, Ubuntu) -
> same thing
> i have run it with sun java 1.5 and 1.6 - same thing
>
> also, if i tried to use a Fieldlabel (maybe thats the error ?) and copied
> the username from Login to Register (it has a username too) - one to one
> copy - works in Login, not in Register (the Fieldlabel says no DisplayName
> was set in Username - which i definetly had set - and throws an expception)
>
> anybody got any idea why the validators get ignored or why Register is
> behaving to strange ? i really need this to work sometime soon...
>
> Hope this mail is not too cryptic,
> Ingmar
> --
> View this message in context: 
> http://www.nabble.com/-Tapestry-Beginner--Validation-is-ignored-tf4278261.html#a12177442
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: DropDownDatePicker

2007-07-30 Thread Marcus Schulte
dont' know. I use dddp extensively without any unwanted submissions
(just double-checked). Are you sure you don't have any EventListeners
or stuff wired to them?

2007/7/30, Andrea Chiumenti <[EMAIL PROTECTED]>:
> Hello, I've just seen a strange behaviour when selecting a date from
> DorpDownDatePicker, because this component performs a submit.
> Is it a bug ?
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tapestry-4.1.2 Documentation Clarification ... please

2007-07-30 Thread Marcus Schulte
2007/7/30, Ken nashua <[EMAIL PROTECTED]>:
> Hi Folks,
>
> I am trying to operate the index parameter as documented in the
> contrib:table docs.
>
> Can someone help clarify this for me?
>
> Here is the documentary...
>
> INDEX: If provided, the parameter is updated with the index of the loop on
> each iteration.
>
> Can someone elaborate on what the definition of 'If Provided" means?
>

it means "if the parameter is bound".
I cannnot comment on your example below, because I cannot see from it
what you're trying to achieve exactly.

> So far I have tried this...
>
> MyTable.jwc
> 
>
> MyTable.java
> @Parameter(required = false, cache = true)
> public abstract Object getIndex();
> public abstract void setIndex(Object index);
>
> Then I tried this...
>
> MyTable.jwc
> 
> index
>
> MyTable.java
> @Parameter(required = false, cache = true)
> public abstract Object getIndex();
> public abstract void setIndex(Object index);
>
> I tried mixing/matching but still no luck.
>
> If anyone could elaborate on this usage I would appreciate.
>
> Best regards
> Ken in nashua
>
> _
> Don't get caught with egg on your face. Play Chicktionary!
> http://club.live.com/chicktionary.aspx?icid=chick_hotmailtextlink2
>
>
> ---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax question

2007-07-25 Thread Marcus Schulte

- at least, that's a pretty decent reason, isn't it?

2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>:


IE won't let you do it. ..because they are evil bastards.

On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
>
> Does anybody know if there are some problems in updating a tbody element
> when performing an ajax request?
>
> Thx,
> kiuma
>



--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Mixing AjaxForm and Form

2007-07-24 Thread Marcus Schulte

Hi Rachel,

2007/7/24, RachelS <[EMAIL PROTECTED]>:



Even after reading the documentation, I still could not see (whether on
4.0
or 4.1) how to get the more detailed validation of Tacos forms to work.

The one way (with profiles) i imagine would involve writing a js profile
for
every form and having the form know about every field in every component
on
it that requires validation. That said, I'm still not sure how I would
then
get the server side validation to work in a similar way to the Validators
of
4.0.



In Tap 4.1, you can do all the things you could do with Tacos' Ajax*
components directly with the native Tap-components. For example, the
standard form will create your validation profile automatically - and it
will support async submission, update of selected components and so on.

/Marcus


Re: Mixing AjaxForm and Form

2007-07-24 Thread Marcus Schulte

I fear, I can't help a lot with your concrete problems. Nevertheless, two
hints:

- Maybe the Tap 4.1 docs on the subject helps:
http://tapestry.apache.org/tapestry4.1/javascript/index.html

- Did you consider updating to T 4.1.2? It's really an
"almost-drop-in-replacement" for 4.0.x. And it's main topic was to pull over
the best from Tacos and make all the Ajax stuff integrate smoothly with the
synchronous-request-oriented parts. Unfortunately, the Tacos version
for 4.1is not yet final, but we found the snapshot quite workable.

2007/7/23, RachelS <[EMAIL PROTECTED]>:



Hi there

(I'm using Tapestry 4.0.2 and Tacos 4.0.1)

I have a situation where I have a Form and a separate AjaxForm on a page.

What I find is that the Form works perfectly when the AjaxForm is not also
on the page. As soon as the AjaxForm is added, most of the Form's
validation
fails with errors like "Tapestry.validate_currency is not a method" or
"Tapestry.validate_number is not a method."

I see that Tapestry.validate_number is a method that is added by
Tapestry's
form.js when you have "translator="translator:number" on a TextField. To
try
and force this to work when both forms are on the page, I'm taking out the
translator and creating a custom validator that I attach to the TextField
with a bean which seems like a bit of overkill to duplicate the translator
functionality.

So I have done some reading and I see that the AjaxForm supplies it's own
copy of Form.js to the page and that this is why most of the methods fail
to
work once the AjaxForm is added to the page.

I also see that there is mention of having a form profile and using
dojo.validate.check(form, profile) to see if the form passed validation.
(Once you have setup up the profile of course)

I'd like to know if adding a profile to the form is the 'correct' way to
accomplish validation in this case.

Also, I'd like to know what the 'correct' way is to do this. Is the best
pattern to simply add javascript to the page and add the check into the
form's submit handler? I just don't know what to do with the result from
dojo.validate.check.

Are there any detailed examples of this available?

Many thanks,
Rachel
--
View this message in context:
http://www.nabble.com/Mixing-AjaxForm-and-Form-tf4128054.html#a11739250
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: 4.1.2 dojo gregorianExtras.js

2007-07-24 Thread Marcus Schulte

see https://issues.apache.org/jira/browse/TAPESTRY-1551

I'm not sure, how this should be fixed ... .

2007/7/23, Malin Ljungh <[EMAIL PROTECTED]>:


Hi,

I have a problem with my 4.1:

2007-07-23 13:36:35,122 [http-8080-Processor4] WARN
tapestry.services.Asset- Classpath resource '/dojo-
0.4.3/src/i18n/calendar/nls/sv/gregorianExtras.js' does not exist.

I can see there is a corresponding GregorianExtras.js file in the tapestry
framework jar, under the dojo-0.4.3/src/i18n/calendar/nls/ directory but
under dojo-0.4.3/src/i18n/calendar/nls/sv there is only the
gregorian.jsfile. Can I add the missing file myself somewhere? Why
does it not default
to the above directory?

/Malin





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Tap 4.1.2 Bug found ???

2007-07-12 Thread Marcus Schulte

I'll try and set up a similarly structured test-case this weekend. If I can
find a bug, I'll post it.

2007/7/13, Jesse Kuhnert <[EMAIL PROTECTED]>:


This is too much for me to digest,  has anything important been added to
that JIRA issue that is still missing?

On 7/11/07, Bastian Voigt <[EMAIL PROTECTED]> wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Sorry, I have to correct my last post:
> The for loop is _NOT_ nested in the form!
>
> Component HTML:
> - ---
> 
> - input field
> 
>
>  <-- iterate over ajax search results
> 
> 
> 
> 
>
> - --
> Bastian Voigt
> Neumünstersche Straße 4
> 20251 Hamburg
> telefon +49 - 40  - 67957171
> mobil   +49 - 179 - 4826359
>
>
> - -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGlPaT9+lAHD7HULYRArHSAJ97gPartnzwSTF2LTq/5oXNl5VrEgCggtEr
> 8UWGtY3KiRtmBnSTQH7+cyA=
> =cE6B
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Tap 4.1.2 Bug found ???

2007-07-10 Thread Marcus Schulte
vicer_113b0099d50.service($ServletRequestServicer_113b0099d50.java)
org.apache.tapestry.multipart.MultipartDecoderFilter.service(
MultipartDecoderFilter.java:52)

$ServletRequestServicerFilter_113b0099d48.service($ServletRequestServicerFilter_113b0099d48.java)

$ServletRequestServicer_113b0099d50.service($ServletRequestServicer_113b0099d50.java)
org.apache.tapestry.services.impl.SetupRequestEncoding.service(
SetupRequestEncoding.java:53)

$ServletRequestServicerFilter_113b0099d4c.service($ServletRequestServicerFilter_113b0099d4c.java)

$ServletRequestServicer_113b0099d50.service($ServletRequestServicer_113b0099d50.java)

$ServletRequestServicer_113b0099d42.service($ServletRequestServicer_113b0099d42.java)
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java
:126)
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
javax.servlet.http.HttpServlet.service(HttpServlet.java:705)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFGk3tZ9+lAHD7HULYRAmOOAJ0bWVD0zWYtZqNqFJnkm9p7TBHnVQCYjf0E
LhUMwN/U+p+TXAFiuZ/tBg==
=W9lK
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: ==============================

2007-07-07 Thread Marcus Schulte

did you try foo&page=Show ?

2007/7/7, Shing Hing Man <[EMAIL PROTECTED]>:


Tap 5.0.5  Cannot parse url in href which contains query string page
To: tapestry Tapestry <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <[EMAIL PROTECTED]>

In Start.html, I have

http://foo.com/pageCounter/app?chapter=foo&page=Show";>
My Counter


The following exception occurs when the page is
accessed.

#
org.apache.tapestry.ioc.internal.util.TapestryException
Failure parsing template context:WEB-INF/Start.html:
The reference to entity "page" must end with the ';'
delimiter.

location
context:WEB-INF/Start.html, line 37, column 57
32   
33
34  
35
36
37  http://foo.com/pageCounter/app?chapter=foo&page=Show";>
My Counter
38
39
40   
41
42  

# org.xml.sax.SAXParseException
The reference to entity "page" must end with the ';'
delimiter.

columnNumber
57
lineNumber
37
Stack trace

*
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
*
org.apache.tapestry.internal.services.TemplateParserImpl.parseTemplate(
TemplateParserImpl.java:173)
*

org.apache.tapestry.internal.services.ComponentTemplateSourceImpl.parseTemplate
(ComponentTemplateSourceImpl.java:145)
*

org.apache.tapestry.internal.services.ComponentTemplateSourceImpl.getTemplate
(ComponentTemplateSourceImpl.java:126)
*

org.apache.tapestry.internal.services.PageLoaderProcessor.loadTemplateForComponent
(PageLoaderProcessor.java:427)
*

org.apache.tapestry.internal.services.PageLoaderProcessor.workComponentQueue
(PageLoaderProcessor.java:712)
*
org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(
PageLoaderProcessor.java:393)
*
org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(
PageLoaderImpl.java:59)
*
org.apache.tapestry.internal.services.PagePoolImpl.checkout(
PagePoolImpl.java:70)
*
org.apache.tapestry.internal.services.RequestPageCacheImpl.get(
RequestPageCacheImpl.java:44)
*
org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(
PageLinkHandlerImpl.java:57)
*
org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(
PageLinkHandlerImpl.java:49)
*
org.apache.tapestry.internal.services.RootPathDispatcher.dispatch(
RootPathDispatcher.java:76)
*
org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java
:1067)
*
org.apache.tapestry.internal.services.LocalizationFilter.service(
LocalizationFilter.java:43)
*
org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java
:667)



Any assistance is appreciated!

Shing

Home page : http://uk.geocities.com/matmsh/



___
Inbox full of unwanted email? Get leading protection and 1GB storage with
All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: TAP 4: How to override asset service.

2007-07-07 Thread Marcus Schulte

try to override the existing service like that:


  


In the invoke-factory element, you'd reference the original tapestry
implementation under a different service-id, under which you'd make it
available by copying the original stuff from the tapestry hivemodules.
hth, Marcus

2007/7/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:


Hello,

We're a Tapestry 4 shop.  I need to override the asset service within
the  tapestry.services.FactoryServices contribution point with my own
asset service.

My wrinkle is that I also need to inject the existing asset service as a
property during construction of my own asset service.

How may I do this?

This is my configuration, nonfunctional, today:
















The error I'm receiving is:

org.apache.hivemind.ApplicationRuntimeException: Element service (at
jar:file:/C:/containers/presentation/tomcat-5.5.17/temp/2-edis3-central/
WEB-INF/lib/tapestry-4.0.2.patched.jar!/META-INF/tapestry.services.xml,
line 59, column 51) contains errors: Value for attribute 'name'
('asset') duplicates a prior instance at
jar:file:/C:/containers/presentation/tomcat-5.5.17/temp/2-edis3-central/
WEB-INF/lib/UsitcTapestryLibrary-1.0-SNAPSHOT.jar!/META-INF/gov.usitc.en
hance.xml, line 19, column 64.
[jar:file:/C:/containers/presentation/tomcat-5.5.17/temp/2-edis3-central
/WEB-INF/lib/tapestry-4.0.2.patched.jar!/META-INF/tapestry.services.xml,
line 59, column 51]

Thanks,

-jason

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: T4: Can I have dynamic component id or how do I solve this?

2007-07-07 Thread Marcus Schulte

cool, I was completely wrong then - didn't know, it worked with client-side
id's. Something like that would really be a nice example for the docs, I
think!

2007/7/6, Malin Ljungh <[EMAIL PROTECTED]>:


Well, actually I works excellent!

I have it like this in my template now:


 
...
 


(loopContacts is of type For)
and on every row I have edit button which swithes current contact from
display to edit form.
So on edit linkbutton I have this:




and the same on submit/save button.
Result is very neat AJAX style table with editable rows without reload of
page :)




On 7/6/07, Marcus Schulte <[EMAIL PROTECTED]> wrote:
>
> Yes, you should be able to define any attribute (=informal parameter) in
> the
> template, in the spec or in annotated Java. In some components, however,
> id
> is a reserved parameter, because the component insists on generating it
> itself.
>
> But I think even if you had your data-id in the client-side element-id,
> your
> problem of updating only one "rendering" of a component in a @For would
> not
> be solved.
>
> One approach would be to make your loopContacts component a
JSON-Component
> like it's described here:
> http://tapestry.apache.org/tapestry4.1/ajax/json.html .
>
> 2007/7/6, Malin Ljungh <[EMAIL PROTECTED]>:
> >
> > OK, it does NOT work to have the ognl id in the page-file.
> > Not that it's important - but ... am I correct?
> >
> > I thought everything could be done either way.
> >
> >
> > On 7/6/07, Malin Ljungh <[EMAIL PROTECTED]> wrote:
> > >
> > > Andreas!
> > >
> > > That was EXACTLY what I was looking for!!! Thanks!!!
> > > (And thank you Marcus too, I'll to refresh the whole loop if this
> > doesn't
> > > work out)
> > >
> > > Actually I started with something like this but I normally use just
> > jwcid
> > > in my .html file and have everything else in the page-specification
> > (.page
> > > file) but it seemed so weird to have ognl in the jwcid in the .html
> file
> > > that I didn't even test it... would it work? I guess I should just
> > try...
> > >
> > > Thanks again! *happy*
> > >
> > > /Malin - I'm a she btw ;)
> > >
> > >
> > >
> > > On 7/6/07, Andreas Andreou <[EMAIL PROTECTED] > wrote:
> > > >
> > > > But he can set the id parameter to whatever he likes, i.e.
> > > > data
> > > >
> > > > On 7/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > As there are no dynamic component instances in Tapestry, there
are
> > no
> > > > > dynamic component-ids. What you are seeing (loopContacts_i, i=1
> ...)
> > > > are
> > > > > multiple clientId's (Element id's on the client side) rendere by
> one
> > > > and
> > > > > the same component instance, whose id, the component-id on the
> > server,
> > > >
> > > > > is "loopContacts". So, tapestry wouldn't recognise loopContact_0
> as
> > a
> > > > > valid component-id anyway.
> > > > >
> > > > > So, I'd just try to refresh "loopContacts" and see whether the
> > > > overhead
> > > > > of refreshing all instances really hurts.
> > > > >
> > > > > > -Original Message-
> > > > > > From: Malin Ljungh [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Friday, July 06, 2007 9:03 AM
> > > > > > To: Tapestry users
> > > > > > Subject: T4: Can I have dynamic component id or how do I solve
> > this?
> > > > > >
> > > > > > I have a loop - a component of type="For", displaying
contacts.
> > > > > > I'd like to have a component inside the loop with component
> > > > > > id equals something with the database key in it, the contact
> > > > > > ID. Is that possible?
> > > > > >
> > > > > > Or is there a smarter way to solve my issue?
> > > > > > The reason I want it this way is that I want to use it in
> > > > > > updateComponents with async="true". Then I could set
> > > > > > updateComponents to the desired contact ID that I want to
> > > > > > update on the client.
> > > > > >
> > > > > > All I have now is loopContacts, loopContacts_0,
> > > > > > loopContacts_1 and so on, but I don't know which contact is
> > which...
> > > > > >
> > > > > > Hope someone understood something... :)
> > > > > > Any input appreciated!!!
> > > > > >
> > > > > > Malin
> > > > > >
> > > > >
> > > > >
> > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> > > > Tapestry / Tacos developer
> > > > Open Source / JEE Consulting
> > > >
> > >
> > >
> >
>
>
>
> --
> Marcus Schulte
> http://marcus-schulte.blogspot.com
>





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: T4: Can I have dynamic component id or how do I solve this?

2007-07-06 Thread Marcus Schulte

Yes, you should be able to define any attribute (=informal parameter) in the
template, in the spec or in annotated Java. In some components, however, id
is a reserved parameter, because the component insists on generating it
itself.

But I think even if you had your data-id in the client-side element-id, your
problem of updating only one "rendering" of a component in a @For would not
be solved.

One approach would be to make your loopContacts component a JSON-Component
like it's described here:
http://tapestry.apache.org/tapestry4.1/ajax/json.html .

2007/7/6, Malin Ljungh <[EMAIL PROTECTED]>:


OK, it does NOT work to have the ognl id in the page-file.
Not that it's important - but ... am I correct?

I thought everything could be done either way.


On 7/6/07, Malin Ljungh <[EMAIL PROTECTED]> wrote:
>
> Andreas!
>
> That was EXACTLY what I was looking for!!! Thanks!!!
> (And thank you Marcus too, I'll to refresh the whole loop if this
doesn't
> work out)
>
> Actually I started with something like this but I normally use just
jwcid
> in my .html file and have everything else in the page-specification
(.page
> file) but it seemed so weird to have ognl in the jwcid in the .html file
> that I didn't even test it... would it work? I guess I should just
try...
>
> Thanks again! *happy*
>
> /Malin - I'm a she btw ;)
>
>
>
> On 7/6/07, Andreas Andreou <[EMAIL PROTECTED] > wrote:
> >
> > But he can set the id parameter to whatever he likes, i.e.
> > data
> >
> > On 7/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > > As there are no dynamic component instances in Tapestry, there are
no
> > > dynamic component-ids. What you are seeing (loopContacts_i, i=1 ...)
> > are
> > > multiple clientId's (Element id's on the client side) rendere by one
> > and
> > > the same component instance, whose id, the component-id on the
server,
> >
> > > is "loopContacts". So, tapestry wouldn't recognise loopContact_0 as
a
> > > valid component-id anyway.
> > >
> > > So, I'd just try to refresh "loopContacts" and see whether the
> > overhead
> > > of refreshing all instances really hurts.
> > >
> > > > -Original Message-
> > > > From: Malin Ljungh [mailto:[EMAIL PROTECTED]
> > > > Sent: Friday, July 06, 2007 9:03 AM
> > > > To: Tapestry users
> > > > Subject: T4: Can I have dynamic component id or how do I solve
this?
> > > >
> > > > I have a loop - a component of type="For", displaying contacts.
> > > > I'd like to have a component inside the loop with component
> > > > id equals something with the database key in it, the contact
> > > > ID. Is that possible?
> > > >
> > > > Or is there a smarter way to solve my issue?
> > > > The reason I want it this way is that I want to use it in
> > > > updateComponents with async="true". Then I could set
> > > > updateComponents to the desired contact ID that I want to
> > > > update on the client.
> > > >
> > > > All I have now is loopContacts, loopContacts_0,
> > > > loopContacts_1 and so on, but I don't know which contact is
which...
> > > >
> > > > Hope someone understood something... :)
> > > > Any input appreciated!!!
> > > >
> > > > Malin
> > > >
> > >
> > >
-
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> > --
> > Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> > Tapestry / Tacos developer
> > Open Source / JEE Consulting
> >
>
>





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: No OPTION Tags rendered for PropertySelection after updateComponents

2007-07-05 Thread Marcus Schulte

don't know, what's exactly wrong, but:

- the id-attribute in the form-tag is suspicious. That's normally a
reserved parameter, you should get an error.

- where do you see the 1234 without the option-tags? in the dom-tree after
the request? or in the debug output in the browser?

- if you didn't do that already, try enabling client-side debug by setting
debugEnabled=true in the Shell component.

- In which Browser are you seeing this?

2007/7/5, Schips Markus <[EMAIL PROTECTED]>:


Hy there...

its my first post on this list and I haven't found anything regarding my
actual Tapestry 4.1.2 Problem.

See the example below.

HTML-Template:





change






Page:


















Java:
public abstract class Test extends BasePage {

public abstract String[] getTestArray();
public abstract void setTestArray(String[] testArray);

public IPropertySelectionModel getModel() {
return new StringPropertySelectionModel(getTestArray());
}

public void onChange() {
setTestArray(new String[]{"1","2","3","4"});
}
}

The test consists of a DirectLink Component and a PropertySelection.
The PropertySelection is initialized with a StringPropertySelectionModel
and should change its options when the DirectLink is clicked.

The first call of the Page shows that the PropertySelection is working:
...

A
B
C

...

But after the DirectLink is triggered, something went wrong:
...
1234
...

No OPTION Tags were rendered.

--
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify our systems manager
at [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Problem after upgrade to Tapestry 4.1.2

2007-06-28 Thread Marcus Schulte
onentTemplateLoaderImpl.loadTemplate
(ComponentTemplateLoaderImpl.java:60)


$ComponentTemplateLoader_113714f5251.loadTemplate($ComponentTemplateLoader_113714f5251.java)

org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(
PageLoader.java:673)
   org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:92)
   org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:122)
   $Exception_3.finishLoad($Exception_3.java)

org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java
:408)
   org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:639)
   $IPageLoader_113714f5247.loadPage($IPageLoader_113714f5247.java)
   $IPageLoader_113714f5248.loadPage($IPageLoader_113714f5248.java)
   org.apache.tapestry.pageload.PageSource.makeObject(PageSource.java:153)

org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(
GenericKeyedObjectPool.java:797)
   org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:177)
   $IPageSource_113714f51a6.getPage($IPageSource_113714f51a6.java)
   org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:239)
   org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:226)

org.apache.tapestry.error.ExceptionPresenterImpl.presentException(
ExceptionPresenterImpl.java:42)


$ExceptionPresenter_113714f51b3.presentException($ExceptionPresenter_113714f51b3.java)


$ExceptionPresenter_113714f51b2.presentException($ExceptionPresenter_113714f51b2.java)

org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(
AbstractEngine.java:117)

org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:267)

org.apache.tapestry.services.impl.InvokeEngineTerminator.service(
InvokeEngineTerminator.java:54)


$WebRequestServicer_113714f5201.service($WebRequestServicer_113714f5201.java)


$WebRequestServicer_113714f5200.service($WebRequestServicer_113714f5200.java)


$WebRequestServicer_113714f51fd.service($WebRequestServicer_113714f51fd.java)


$WebRequestServicer_113714f51fc.service($WebRequestServicer_113714f51fc.java)

org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service
(WebRequestServicerPipelineBridge.java:61)


$ServletRequestServicer_113714f51ef.service($ServletRequestServicer_113714f51ef.java)


$ServletRequestServicer_113714f51ee.service($ServletRequestServicer_113714f51ee.java)

org.apache.tapestry.request.DecodedRequestInjector.service(
DecodedRequestInjector.java:55)


$ServletRequestServicerFilter_113714f51eb.service($ServletRequestServicerFilter_113714f51eb.java)


$ServletRequestServicerFilter_113714f51ea.service($ServletRequestServicerFilter_113714f51ea.java)


$ServletRequestServicer_113714f51f0.service($ServletRequestServicer_113714f51f0.java)

org.apache.tapestry.multipart.MultipartDecoderFilter.service(
MultipartDecoderFilter.java:52)


$ServletRequestServicerFilter_113714f51e9.service($ServletRequestServicerFilter_113714f51e9.java)


$ServletRequestServicerFilter_113714f51e8.service($ServletRequestServicerFilter_113714f51e8.java)


$ServletRequestServicer_113714f51f0.service($ServletRequestServicer_113714f51f0.java)

org.apache.tapestry.services.impl.SetupRequestEncoding.service(
SetupRequestEncoding.java:53)


$ServletRequestServicerFilter_113714f51ed.service($ServletRequestServicerFilter_113714f51ed.java)


$ServletRequestServicerFilter_113714f51ec.service($ServletRequestServicerFilter_113714f51ec.java)


$ServletRequestServicer_113714f51f0.service($ServletRequestServicer_113714f51f0.java)


$ServletRequestServicer_113714f51e3.service($ServletRequestServicer_113714f51e3.java)


$ServletRequestServicer_113714f51e2.service($ServletRequestServicer_113714f51e2.java)

org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java
:126)
   org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java
:103)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


This error occurs if I request any page of my WebApp. The box is a Ubuntu
6.10 server and Tomcat 5.0.30 running on a VPS. With Tapestry 4.1.1
everything was fine.

Thanks in advance for any help
Christoph
--
View this message in context:
http://www.nabble.com/Problem-after-upgrade-to-Tapestry-4.1.2-tf3993336.html#a11339836
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: [t4] EventListener question

2007-06-26 Thread Marcus Schulte

That should really work. I'm using something very similar (checkbox instead
of radiobutton). If you post some code, I can look for differences.


2007/6/27, Julian Wood <[EMAIL PROTECTED]>:


I have a pretty straight forward paradigm:

- two groups of 3 radio buttons followed by a property selection.
- an async form with no listener whatsoever
- a submit button with an action listener (called saveTime)

The idea is that choosing a radio button narrows down the list in the
property selection.

I chose to add eventlisteners to the onclicks of the radiobuttons,
and update the property selection in response. The eventlisteners
submit the above form, which is why there is no listener set in the
form binding. For simplicity, I'll call one eventListener method
categorySelected.

This form is entirely contained within a Dialog component, which is
reused.

Now, this all works perfectly the first time through - open the
dialog, fill out the form, watch the property selection values
change, submit the form, close the dialog, reset all the fields. Note
that saveTime is not called when you click a radio button - only
categorySelected.

The second time the dialog is opened, the eventlisteners behave
slightly differently. This time, when you click a radio button, the
form is submitted, categorySelected is invoked _and_ saveTime is
called (which is a problem). The primary difference between the two
posts (at the request level) is the inclusion of the name of said
button, which I believe is how Tapestry determines what listener to
call (ie if &addTimeEventButton=Save%20Time is included, then
saveTime is called - correct me if I'm wrong).

So I'm wondering why the eventlisteners call saveTime (some of the
time), if there is a way to prevent that, or if there is a better way
to approach this problem all together (is an async form with no
listener at all okay?). I know there are a bunch of workarounds, but
I'm looking for that clean solution.

Thanks,

J

--
Julian Wood <[EMAIL PROTECTED]>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Honeycomb without annotations ?

2007-06-26 Thread Marcus Schulte

the element to include a hibernate-config file ist config-xml, see

http://honeycomb.javaforge.com/HoneycombHibernate/hivedocs/index.html#sch.HibernateSessionFactory

for complete docs of the schema

2007/6/26, Stephane Decleire <[EMAIL PROTECTED]>:


Thanks Marcus but i didn't find any docs or samples on that
configuration. Could you tell me what to put in the hivemodule file or
give me a link to a documentation on that subject ?

Thanks in advance.

Stephane

Marcus Schulte a écrit :
> yes, it is. but, you'll nevertheless need to run on a 1.5 JVM since the
> library code uses 1.5 features.
>
> 2007/6/25, Webmaster Bébé Nounou <[EMAIL PROTECTED]>:
>>
>> Is it possible to configure Honeycomb without annotations (with the
>> Hibernate .hbm.xml files) ?
>>
>> Thanks in advance.
>>
>> Stephane
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>

---------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: Honeycomb without annotations ?

2007-06-25 Thread Marcus Schulte

yes, it is. but, you'll nevertheless need to run on a 1.5 JVM since the
library code uses 1.5 features.

2007/6/25, Webmaster Bébé Nounou <[EMAIL PROTECTED]>:


Is it possible to configure Honeycomb without annotations (with the
Hibernate .hbm.xml files) ?

Thanks in advance.

Stephane

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: 4.1.2-SNAPSHOT String in specification escaped

2007-06-25 Thread Marcus Schulte

did you put the  in the beginning of
you spec?

2007/6/25, Manri Offermann <[EMAIL PROTECTED]>:


Hi,

I have changed my tapestry version for my simple test app to
4.1.2-SNAPSHOT.

I have a simple japanese property:



which renders fine in 4.1.1-SNAPSHOT:



but when switching to 4.1.2-SNAPSHOT I the output looks like this:

u5e74MMu6708ddu65e5

All settings are UTF-8 for my test app, is there a new setting that I
have overlooked for 4.1.2 ?


Best regards,

Manri

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Marcus Schulte
http://marcus-schulte.blogspot.com