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: Dynamic Layout

2011-01-23 Thread Josh Canfield
You haven't shown us the code that you use to call the template, but you are
probably using parameter="${prop}" which converts your prop to a string
binding which is considered constant and so its not re-evaluated.
you should use "prop:propname".

Just a guess.

Josh.

On Jan 23, 2011 8:19 AM, "Gnu Ubuntu"  wrote:
>
> Hi,
> I need to apply an if condition in the  in a layout component.
> In my layout I want to do :
>
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>
>Error in Page title
>
>...
>
> So I can get the information that current page is in error
> (information stored in session),
> but I seem that Tapestry don't reload Layout. So even if my page is in
> error my IF is not verifiyed.
>
> How can I tell Tapestry to reload layout page ?
>
> thanks in advance.


Re: Dynamic Layout

2011-01-23 Thread Mark
Shouldn't the IF be within the title tags?

   
   Error in Page title
   


Otherwise the browser isn't going to know where to put it and may just
discard anything that does render there.

Mark

On Sun, Jan 23, 2011 at 10:18 AM, Gnu Ubuntu  wrote:
> Hi,
> I need to apply an if condition in the  in a layout component.
> In my layout I want to do :
>
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>    
>        Error in Page title
>    
>    ...
>
> So I can get the information that current page is in error
> (information stored in session),
> but I seem that Tapestry don't reload Layout. So even if my page is in
> error my IF is not verifiyed.
>
> How can I tell Tapestry to reload layout page ?
>
> thanks in advance.
>

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



Re: Dynamic Layout

2011-01-23 Thread Gnu Ubuntu
Thanks for your responses.
I can't paste code here, but I works for other use's cases. My method tell
me if my form in current page is on error. And in this case I need to add
the word "Error" in title of this page.
I hope it's more clear now.

So the second why proposed by Taha is not useful in this case.

Thanks,


Re: Dynamic Layout

2011-01-23 Thread Taha Hafeez
Why not do this tapestry way!!

extend 
RequestExceptionHandler

see http://tapestry.apache.org/overriding-exception-reporting.html

regards
Taha


On Sun, Jan 23, 2011 at 10:00 PM, Joost Schouten (mailing lists) <
joost...@jsportal.com> wrote:

> Hi,
>
> What does "page is in error" mean? Actual Exception on your page? Form
> validation problem? And please post the code of your condition
> (isCondition()) as that will most likely be the problem. Or if you are
> using a zone (AJAX) your layout will not be reloded either. On a
> normal page request your code should work so the problem lies
> somewhere else.
>
> Cheers,
> Joost
>
> On Sun, Jan 23, 2011 at 5:18 PM, Gnu Ubuntu  wrote:
> > Hi,
> > I need to apply an if condition in the  in a layout component.
> > In my layout I want to do :
> >
> > http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
> >
> >Error in Page title
> >
> >...
> >
> > So I can get the information that current page is in error
> > (information stored in session),
> > but I seem that Tapestry don't reload Layout. So even if my page is in
> > error my IF is not verifiyed.
> >
> > How can I tell Tapestry to reload layout page ?
> >
> > thanks in advance.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Dynamic Layout

2011-01-23 Thread Joost Schouten (mailing lists)
Hi,

What does "page is in error" mean? Actual Exception on your page? Form
validation problem? And please post the code of your condition
(isCondition()) as that will most likely be the problem. Or if you are
using a zone (AJAX) your layout will not be reloded either. On a
normal page request your code should work so the problem lies
somewhere else.

Cheers,
Joost

On Sun, Jan 23, 2011 at 5:18 PM, Gnu Ubuntu  wrote:
> Hi,
> I need to apply an if condition in the  in a layout component.
> In my layout I want to do :
>
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>    
>        Error in Page title
>    
>    ...
>
> So I can get the information that current page is in error
> (information stored in session),
> but I seem that Tapestry don't reload Layout. So even if my page is in
> error my IF is not verifiyed.
>
> How can I tell Tapestry to reload layout page ?
>
> thanks in advance.
>

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



Dynamic Layout

2011-01-23 Thread Gnu Ubuntu
Hi,
I need to apply an if condition in the  in a layout component.
In my layout I want to do :

http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>

Error in Page title

...

So I can get the information that current page is in error
(information stored in session),
but I seem that Tapestry don't reload Layout. So even if my page is in
error my IF is not verifiyed.

How can I tell Tapestry to reload layout page ?

thanks in advance.