Problem with tapestry grid inside form

2009-10-24 Thread Vidya Sivadas

Hi,

I am using tapestry 5.0.16.

I have a grid,2 submit buttons embedded inside a form.

One of the column in the grid displays checkboxes.

After coming to the page (for eg:5 rows in the grid),if I manually delete a
record from the database and click any of the submit buttons it is showing
exception index 4,size 4.

If I click after refreshing the page,this problem does not occur.

But I don't want to refresh the page.How can I handle this scenario?

I tried using volatile=true.Then this is okay.But while taking action on the
form, the checkbox states that I have changed is not taken for updating the
database.


Please help ...if anybody have idea on this.

Please explain in detail if there is some solution for this..


Thanks in advance




-- 
View this message in context: 
http://www.nabble.com/Problem-with-tapestry-grid-inside-form-tp26038119p26038119.html
Sent from the Tapestry - User 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 behaving strangely in production environment

2009-10-24 Thread Vidya Sivadas


We got the solution for the issue.

There were 2 hibernate.cfg.xml files that need to be modified.

Earlier we have modified only one, thinking that the second one (inside the
jar that contains the POJOs) will be ignored.But tapestry tries to contact
the second file at times.

Now we have only one hibernate.cfg.xml file
-- 
View this message in context: 
http://www.nabble.com/Tapestry-behaving-strangely-in-production-environment-tp25954098p26038183.html
Sent from the Tapestry - User 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



T4: bug in expression cache?

2009-10-24 Thread Marc van Kempen

Hi,

I have copied and changed the Dialog component in my project (Tapestry  
4.1.5) in order to create a HelpBalloon popup. This gives me the  
following files that I've added to my project:


HelpBalloonDialog.java
HelpBalloonDialog.jwc
HelpBalloonDialog.script

 I kept the condition checking the same as in Dialog.script, i.e.:

script
input-symbol key=component required=yes /

initialization
if expression=component.hidden
do_stuff();
/if
if-not expression=component.hidden
do_different_stuff();
/if-not
/initialization
/script

This is essentially the same construction as Dialog.script uses, and  
most importantly the expression string component.hidden is exactly  
the same. Requesting a page however where Dialog is used gives me a  
cast exception when it tries to use the cached compiled expression  
that it finds. Changing the name component to something else makes  
the problem go away.


Now, looking at the code I'm seeing the following:

The ExpressionCache uses the symbol map in ScriptSessionImpl as its  
key, so therefore the cache should be local to a script and I should  
be allowed to use the same expression in different scripts.


Is this the intended behaviour, am I missing something or am I looking  
at a bug?


Kind regards,
Marc van Kempen.




T5: how to put Testify into real use?

2009-10-24 Thread Angelo Chen

Hi,

I have tested Testify with a simple sample and manage to make it work:

public class MyPageTest extends TapestryTest{
private static final TapestryTester SHARED_TESTER = new
TapestryTester(org.apache.tapestry5.tutorial,
TestModule.class);

public MyPageTest() {super(SHARED_TESTER);}

@Override
protected void setUpForAllTestMethods() throws Exception {
MockitoAnnotations.initMocks(this);
}
}

public class MyTest extends MyPageTest{
@Test
public void testElementIsOnPage() {
Document page = tester.renderPage(index);
Assert.assertEquals(page.getElementById(123).getChildMarkup(), this
is 123);
}
}

public class TestModule {
public static void bind(ServiceBinder binder) {}
}

above code works, I added following to my AppModule:

public RequestFilter buildUtf8Filter(
  @InjectService(RequestGlobals) final RequestGlobals
requestGlobals) {
  return new RequestFilter() {
  public boolean service(Request request, Response response,
RequestHandler handler)
  throws IOException {
 
requestGlobals.getHTTPServletRequest().setCharacterEncoding(UTF-8);
  return handler.service(request, response);
  }
  };
  }

And I get this exception all the time, how to take care of this situation in
Testify? thanks.

java.lang.RuntimeException: Exception constructing service 'RequestHandler':
Error invoking service builder method
org.apache.tapestry5.services.TapestryModule.buildRequestHandler(Logger,
List, Dispatcher) (at TapestryModule.java:1236) (for service
'RequestHandler'): Error invoking service contribution method
org.apache.tapestry5.tutorial.services.AppModule.contributeRequestHandler(OrderedConfiguration,
RequestFilter): Unable to locate a single service assignable to type
org.apache.tapestry5.services.RequestFilter with marker annotation(s)
org.apache.tapestry5.ioc.annotations.Local.
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-how-to-put-Testify-into-real-use--tp26038980p26038980.html
Sent from the Tapestry - User 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



T4: bug in expression cache?

2009-10-24 Thread Marc van Kempen

Hi,

I have copied and changed the Dialog component in my project (Tapestry  
4.1.5) in order to create a HelpBalloon popup. This gives me the  
following files that I've added to my project:


HelpBalloonDialog.java
HelpBalloonDialog.jwc
HelpBalloonDialog.script

 I kept the condition checking the same as in Dialog.script, i.e.:

script
input-symbol key=component required=yes /

initialization
if expression=component.hidden
do_stuff();
/if
if-not expression=component.hidden
do_different_stuff();
/if-not
/initialization
/script

This is essentially the same construction as Dialog.script uses, and  
most importantly the expression string component.hidden is exactly  
the same. Requesting a page however where Dialog is used gives me a  
cast exception when it tries to use the cached compiled expression  
that it finds. Changing the name component to something else makes  
the problem go away.


Now, looking at the code I'm seeing the following:

The ExpressionCache uses the symbol map in ScriptSessionImpl as its  
key, so therefore the cache should be local to a script and I should  
be allowed to use the same expression in different scripts.


Is this the intended behaviour, am I missing something or am I looking  
at a bug?


Kind regards,
Marc van Kempen.




Re: T4: bug in expression cache?

2009-10-24 Thread Andreas Andreou
I can't really see what's going on.. is it possible to include the
exception and/or
some related code?

On Sat, Oct 24, 2009 at 2:44 PM, Marc van Kempen m...@bowtie.nl wrote:
 Hi,

 I have copied and changed the Dialog component in my project (Tapestry
 4.1.5) in order to create a HelpBalloon popup. This gives me the following
 files that I've added to my project:

 HelpBalloonDialog.java
 HelpBalloonDialog.jwc
 HelpBalloonDialog.script

  I kept the condition checking the same as in Dialog.script, i.e.:

 script
    input-symbol key=component required=yes /

    initialization
        if expression=component.hidden
                do_stuff();
        /if
        if-not expression=component.hidden
                do_different_stuff();
        /if-not
    /initialization
 /script

 This is essentially the same construction as Dialog.script uses, and most
 importantly the expression string component.hidden is exactly the same.
 Requesting a page however where Dialog is used gives me a cast exception
 when it tries to use the cached compiled expression that it finds. Changing
 the name component to something else makes the problem go away.

 Now, looking at the code I'm seeing the following:

 The ExpressionCache uses the symbol map in ScriptSessionImpl as its key, so
 therefore the cache should be local to a script and I should be allowed to
 use the same expression in different scripts.

 Is this the intended behaviour, am I missing something or am I looking at a
 bug?

 Kind regards,
 Marc van Kempen.






-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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



Re: Which service returns the eventContext?

2009-10-24 Thread Stephan Windmüller
Thiago H. de Paula Figueiredo wrote:

 What do you mean with content? How do I access this?
 I was saying that, in a POST form submit, the field values aren't stored  
 in the URL, they are stored as the content of the HTTP request. You can  
 get any value by injecting Request and invoking its getParameterNames() to  
 get a ListString of parameter (field) names and getParameter(String  
 name) or getParameters(String name) to get their value.

That worked, thank you!

Regards
 Stephan

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



Re: Tapestry behaving strangely in production environment

2009-10-24 Thread Howard Lewis Ship
Tapestry is pretty verbose when it starts up, telling you what modules
it has loaded and what pages/components/mixins it knows about. I wish
some other frameworks would do something similar.

On Sat, Oct 24, 2009 at 4:33 AM, Vidya Sivadas
vidya.siva...@rediffmail.com wrote:


 We got the solution for the issue.

 There were 2 hibernate.cfg.xml files that need to be modified.

 Earlier we have modified only one, thinking that the second one (inside the
 jar that contains the POJOs) will be ignored.But tapestry tries to contact
 the second file at times.

 Now we have only one hibernate.cfg.xml file
 --
 View this message in context: 
 http://www.nabble.com/Tapestry-behaving-strangely-in-production-environment-tp25954098p26038183.html
 Sent from the Tapestry - User 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





-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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



Re: T5: Weird problem with browser cache and component event redirect

2009-10-24 Thread Felix Gonschorek

Hi Toby,

thank you very much for your hints. Since we have a tapestry-only 
application, i added a request filter that sends the cache control 
headers (expires, pragma, cacha-control, last-change etc.).


I used your settings with no success so far.

But I finally found a solution: I am appending a random string to all 
urls with the tapestry url-rewriting machanism, so browsers can't cache 
them. This is an ugly workaround since all urls look now cryptic, but it 
works.


On our test-environment we have encountered similar problems with other 
websites, so maybe this problem is not tapestry related at all but 
occurs very often since the request-redirect-request mechanism is used 
on every page. Maybe this is a browser-bug (strange thing is we have it 
in firefox and customers report problems with IE 7).


If anybody has problems like this: Please report here.

Thanks


Felix

Toby Hobson schrieb:

I've had similar problems (caching in general). I was running a mixed
T5/Spring MVC app so in the end I wrote a filter which set the various http
headers and I then mapped certain requests to that filter. In the end I
found that I needed to set quite a few cache related headers to get things
working across all browsers:

filter
filter-nameNoCacheFilter/filter-name
filter-classcom.thc.util.servlet.ResponseHeaderFilter/filter-class
init-param
param-namecache-control/param-name

param-valueprivate,no-cache,no-store,must-revalidate,max-age=-1/param-value
/init-param
init-param
param-namepragma/param-name
param-valueno-cache,no-store/param-value
/init-param
init-param
param-nameexpires/param-name
param-value-1/param-value
 /init-param
/filter

As you see I needed to set the cache-control, pragma and expires headers to
get it to play nicely

You might want to try something along those lines, of course if you have a
pure T5 app you could you a Tapestry filter instead of a standard servlet
filter as I did

2009/10/23 Felix Gonschorek fe...@ggmedia.net

  

Hi all,

we're experiencing a weird problem here with a live system (big b2b
enterprise shop frontend): Some users report that nothing happens when they
click on links.

We narrowed things down and found out that only component event links are
affacted that do not redirect to another page, for example:

Page is: /productlist. The page contains a product listing with a pager -
users can navigate with the pager (switch pages, sort products)

When the user clicks on an pager event link to go for example to the second
page, the link looks like this: /productlist.pager:gotopage/2.

The event handler sets the page number session variable to the value 2
and returns null - the same page (/productlist) should be rendered again -
but this time page two of the paged product list should be rendered.

On most browsers and clients this works, but as mentioned: Some browsers do
not follow the header Location - i can see it in the logfiles on the
server. The PageRendering request (header: Location) is not executed and
the client loads the page from the browser cache - and page 1 of the paged
products is displayed. So the users experience that nothing happens.

We heard from users using internet explorer 7 on the live system (tomcat 6
behind apache with mod_jk) experiencing this problem and we could reproduce
this with one system on our test environment (jetty 6, firefox 3.0.14) - the
browser does not follow the Location header. If we deactivate the browser
cache completely on firefox the problem does not occur.

Only thing special we have is a X-Ua-Compatible header to force internet
explorer 8 to be IE7 compatible. In the meanwhile we added the
last-modified,expires,pragma and cache-control header to modify the
browser cache behaviour, but so far with no success.


This are the server response headers for the component event request:

HTTP/1.x 302 Found
Location: http://localhost:8080/drw/en/productlist/$N
Content-Length: 0
Server: Jetty(6.1.16)


This are the server response headers for the page render request:

HTTP/1.x 200 OK
Last-Modified: Fri, 23 Oct 2009 12:51:42 GMT
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Content-Type: text/html; charset=utf-8
X-Ua-Compatible: IE=EmulateIE7
Pragma: no-cache
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Transfer-Encoding: chunked
Server: Jetty(6.1.16)


Has anybody experienced similar problems? Does anybody have a hint how we
could force all browsers to do the page render request after the component
event request, even if we do not change the page? As the problem occured on
jetty and tomcat, firefox and internetexplorer we assume that some headers
are incorrect, but we don't know which.

Any help is much appreciated!

Felix

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




Re: T4: bug in expression cache?

2009-10-24 Thread Marc van Kempen

Hi Andreas,

When the application starts, first a page is displayed that contains  
the HelpBalloonDialog component, hence it's script expression is  
compiled into the expression cache. Then I open a page that uses the  
Dialog component, now it seems to retrieve the compiled expression for  
the other script and poof!


Here is the exception:

[ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL  
expression' of {component=$dialog_...@b03d85e5[assetsmanagement/ 
fileManager.$Dialog], widget=dialog, props= 
{bgColor:black,bgOpacity: 
0.400059604645 
,followScroll:true,closeOnBackgroundClick:false,blockDuration: 
0,lifeTime:0,toggle:fade,toggleDuration:150}}: $Dialog_142  
cannot be cast to nl.relate4u.pcc.contexthelp.HelpBalloonDialog

org.apache.hivemind.ApplicationRuntimeException
location:	classpath:/org/apache/tapestry/dojo/html/Dialog.script, line  
36, column 43

31   /unique
32   /body
33  
34   initialization
35	 tapestry.widget.synchronizeWidgetState($ 
{component.clientId}, Dialog, ${props}, ${component.destroy});

36   if expression=component.hidden
37   dojo.widget.byId(${component.clientId}).hide();
38   /if
39   if-not expression=component.hidden
40   dojo.widget.byId(${component.clientId}).show();
41   /if-not

[ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL  
expression' of {component=$dialog_...@b03d85e5[assetsmanagement/ 
fileManager.$Dialog], widget=dialog, props= 
{bgColor:black,bgOpacity: 
0.400059604645 
,followScroll:true,closeOnBackgroundClick:false,blockDuration: 
0,lifeTime:0,toggle:fade,toggleDuration:150}}: $Dialog_142  
cannot be cast to nl.relate4u.pcc.contexthelp.HelpBalloonDialog	  
[ +/- ] Exception: $Dialog_142 cannot be cast to  
nl.relate4u.pcc.contexthelp.HelpBalloonDialog

java.lang.ClassCastException
Stack Trace:
$ASTChain_12487ac4bf9.get($ASTChain_12487ac4bf9.java)
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read 
(ExpressionEvaluatorImpl.java:141)
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read 
(ExpressionEvaluatorImpl.java:110)
$ExpressionEvaluator_12487ac4a68.read 
($ExpressionEvaluator_12487ac4a68.java)
org.apache.tapestry.script.ScriptSessionImpl.evaluate 
(ScriptSessionImpl.java:86)
org.apache.tapestry.script.ScriptSessionImpl.evaluate 
(ScriptSessionImpl.java:91)
org.apache.tapestry.script.AbstractToken.evaluateBoolean 
(AbstractToken.java:102)

org.apache.tapestry.script.IfToken.evaluate(IfToken.java:43)
org.apache.tapestry.script.IfToken.write(IfToken.java:48)
org.apache.tapestry.script.AbstractToken.writeChildren 
(AbstractToken.java:71)

org.apache.tapestry.script.InitToken.write(InitToken.java:43)
org.apache.tapestry.script.AbstractToken.writeChildren 
(AbstractToken.java:71)

org.apache.tapestry.script.ParsedScript.execute(ParsedScript.java:82)
org.apache.tapestry.dojo.html.Dialog.renderWidget(Dialog.java:106)
(rest of stack trace omitted)
Here is the code for HelpBalloonDialog (the dialog component is the  
standard Tapestry component included in the distribution):


HelpBalloonDialog.java:

package nl.relate4u.pcc.contexthelp;

import java.util.HashMap;
import java.util.Map;

import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.IScript;
import org.apache.tapestry.TapestryUtils;
import org.apache.tapestry.dojo.AbstractWidget;
import org.apache.tapestry.services.ResponseBuilder;

/**
 * Implementation of HelpBalloons, by calling custom javascript code.
 */
public abstract class HelpBalloonDialog extends AbstractWidget {
public abstract boolean isHidden();

public abstract void setHidden(boolean hidden);

public abstract String getIconElementId();

public abstract void setIconElementId(String v);

public abstract void setTitle(String title);

public abstract String getTitle();

public void show() {
setHidden(false);
}

public void hide() {
setHidden(true);
}

/**
 * {...@inheritdoc}
 */
public void renderWidget(IMarkupWriter writer, IRequestCycle  
cycle) {

if (!cycle.isRewinding()) {
writer.begin(getTemplateTagName()); // use element  
specified

renderIdAttribute(writer, cycle); // render id= client id
renderInformalParameters(writer, cycle);
}

renderBody(writer, cycle);

if (!cycle.isRewinding()) writer.end();

if (!cycle.isRewinding()) {
MapString, Object parms = new HashMapString, Object();
parms.put(component, this);

getScript().execute(this, cycle,  
TapestryUtils.getPageRenderSupport(cycle, this), parms);


if (isResizing()) {
if (!getResponseBuilder 
().isInitializationScriptAllowed(this)) {

getResponseBuilder().updateComponent(getId());
}


Re: T4: bug in expression cache?

2009-10-24 Thread Andreas Andreou
 Also, even though i dont remember (and kind find) any such bug report,
kind find = can't find :)

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



Re: T4: bug in expression cache?

2009-10-24 Thread Andreas Andreou
Hmm - don't see anything wrong... Are you using the latest ognl ...
afaik it's 2.7.3

Also, even though i dont remember (and kind find) any such bug report,
how hard is
it to try this with 4.1.6 ?

On Sat, Oct 24, 2009 at 9:08 PM, Marc van Kempen m...@bowtie.nl wrote:
 Hi Andreas,

 When the application starts, first a page is displayed that contains the
 HelpBalloonDialog component, hence it's script expression is compiled into
 the expression cache. Then I open a page that uses the Dialog component, now
 it seems to retrieve the compiled expression for the other script and poof!

 Here is the exception:

 [ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL expression'
 of {component=$dialog_...@b03d85e5[assetsmanagement/fileManager.$Dialog],
 widget=dialog,
 props={bgColor:black,bgOpacity:0.400059604645,followScroll:true,closeOnBackgroundClick:false,blockDuration:0,lifeTime:0,toggle:fade,toggleDuration:150}}:
 $Dialog_142 cannot be cast to nl.relate4u.pcc.contexthelp.HelpBalloonDialog
 org.apache.hivemind.ApplicationRuntimeException
 location:       classpath:/org/apache/tapestry/dojo/html/Dialog.script, line
 36, column 43
 31               /unique
 32           /body
 33
 34           initialization
 35
 tapestry.widget.synchronizeWidgetState(${component.clientId}, Dialog,
 ${props}, ${component.destroy});
 36               if expression=component.hidden
 37                   dojo.widget.byId(${component.clientId}).hide();
 38               /if
 39               if-not expression=component.hidden
 40                   dojo.widget.byId(${component.clientId}).show();
 41               /if-not

 [ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL expression'
 of {component=$dialog_...@b03d85e5[assetsmanagement/fileManager.$Dialog],
 widget=dialog,
 props={bgColor:black,bgOpacity:0.400059604645,followScroll:true,closeOnBackgroundClick:false,blockDuration:0,lifeTime:0,toggle:fade,toggleDuration:150}}:
 $Dialog_142 cannot be cast to nl.relate4u.pcc.contexthelp.HelpBalloonDialog
  [ +/- ] Exception: $Dialog_142 cannot be cast to
 nl.relate4u.pcc.contexthelp.HelpBalloonDialog
 java.lang.ClassCastException
 Stack Trace:
 $ASTChain_12487ac4bf9.get($ASTChain_12487ac4bf9.java)
 org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read(ExpressionEvaluatorImpl.java:141)
 org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read(ExpressionEvaluatorImpl.java:110)
 $ExpressionEvaluator_12487ac4a68.read($ExpressionEvaluator_12487ac4a68.java)
 org.apache.tapestry.script.ScriptSessionImpl.evaluate(ScriptSessionImpl.java:86)
 org.apache.tapestry.script.ScriptSessionImpl.evaluate(ScriptSessionImpl.java:91)
 org.apache.tapestry.script.AbstractToken.evaluateBoolean(AbstractToken.java:102)
 org.apache.tapestry.script.IfToken.evaluate(IfToken.java:43)
 org.apache.tapestry.script.IfToken.write(IfToken.java:48)
 org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)
 org.apache.tapestry.script.InitToken.write(InitToken.java:43)
 org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)
 org.apache.tapestry.script.ParsedScript.execute(ParsedScript.java:82)
 org.apache.tapestry.dojo.html.Dialog.renderWidget(Dialog.java:106)
 (rest of stack trace omitted)
 Here is the code for HelpBalloonDialog (the dialog component is the standard
 Tapestry component included in the distribution):

 HelpBalloonDialog.java:

 package nl.relate4u.pcc.contexthelp;

 import java.util.HashMap;
 import java.util.Map;

 import org.apache.tapestry.IMarkupWriter;
 import org.apache.tapestry.IRequestCycle;
 import org.apache.tapestry.IScript;
 import org.apache.tapestry.TapestryUtils;
 import org.apache.tapestry.dojo.AbstractWidget;
 import org.apache.tapestry.services.ResponseBuilder;

 /**
  * Implementation of HelpBalloons, by calling custom javascript code.
  */
 public abstract class HelpBalloonDialog extends AbstractWidget {
    public abstract boolean isHidden();

    public abstract void setHidden(boolean hidden);

    public abstract String getIconElementId();

    public abstract void setIconElementId(String v);

    public abstract void setTitle(String title);

    public abstract String getTitle();

    public void show() {
        setHidden(false);
    }

    public void hide() {
        setHidden(true);
    }

    /**
     * {...@inheritdoc}
     */
    public void renderWidget(IMarkupWriter writer, IRequestCycle cycle) {
        if (!cycle.isRewinding()) {
            writer.begin(getTemplateTagName()); // use element specified
            renderIdAttribute(writer, cycle); // render id= client id
            renderInformalParameters(writer, cycle);
        }

        renderBody(writer, cycle);

        if (!cycle.isRewinding()) writer.end();

        if (!cycle.isRewinding()) {
            MapString, Object parms = new HashMapString, Object();
            parms.put(component, this);

            getScript().execute(this, cycle,
 

Re: hibernate @Embedded

2009-10-24 Thread Scot Mcphee
Thanks Thiago, I'll just put the fields in the bean model.

regs
scot

2009/10/23 Thiago H. de Paula Figueiredo thiag...@gmail.com:
 Em Thu, 22 Oct 2009 21:13:08 -0200, Scot Mcphee scot.mcp...@gmail.com
 escreveu:

 When I include the containing object (Car in my example) in a
 Tapestry grid the embedded object doesn't show up.

 This happens because BeanModelSource (the service that creates BeanModels)
 doesn't pick properties of properties. The @Embedded annotation is ignored.

 Is there any easy
 way to coerce it to display as if it's fields were part of the
 original, apart from writing a bean model?

 You can add methods like getRegistrationDate() { return
 registration.getDate(); } to your Car class.
 Another option is to add the Registration properties to the Car BeanModel:

 @Inject
 private BeanModelSource beanModelSource;

 @Inject
 private PropertyConduitSource propertyConduitSource;

 BeanModel model = beanModelSource.create(car);
 model.add(registrationDate, propertyConduitSource.create(Car.class,
 registration.date);

 containing objects, and I was wondering if there's anyway to annotate
 the Registration object to tell Tapestry automatically inline this
 object's fields into the owning object's generated bean model or
 something like that.

 You can file a JIRA for that.

 --
 Thiago H. de Paula Figueiredo
 Independent Java consultant, developer, and instructor
 http://www.arsmachina.com.br/thiago

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





-- 
let x=x - http://crazymcphee.net/x/
xray dubs - http://autonomous.org/music/

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



T5.1 - Select component with validation error

2009-10-24 Thread Benny Law
Hello everyone,

Is there any reason why the t-error CSS class is not assigned to a Select
component when it is in error? Moreover, a Select component in error does
not get the keyboard focus when the form is rendered.

How can I fix this so that Select components get the same treatment as, say,
TextField with regard to validation errors?

Thanks,

Benny Law