T5 - how to efficently highlight one selected row in a grid
Dear all, I simply want to highlight one row in a grid component when the user click on one action link in that line. is it a good idea trying to use the rowClass attribute? Can you suggest me the best way to do it? -- View this message in context: http://www.nabble.com/T5---how-to-efficently-highlight-one-selected-row-in-a-grid-tp20342129p20342129.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]
Re: [T5] org.apache.tapestry5.runtime.ComponentEventException - Stack is empty
) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalStateException: Stack is empty. at org.apache.tapestry5.ioc.util.Stack.checkIfEmpty(Stack.java:119) at org.apache.tapestry5.ioc.util.Stack.peek(Stack.java:131) at org.apache.tapestry5.internal.services.PageLoaderProcessor.parameter(PageLoaderProcessor.java:594) at org.apache.tapestry5.internal.services.PageLoaderProcessor.loadTemplateForComponent(PageLoaderProcessor.java:529) at org.apache.tapestry5.internal.services.PageLoaderProcessor.workComponentQueue(PageLoaderProcessor.java:815) at org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:401) at org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59) at $PageLoader_11d1a057eb1.loadPage($PageLoader_11d1a057eb1.java) at org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) at org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:107) at $PagePool_11d1a057eb0.checkout($PagePool_11d1a057eb0.java) at org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:43) at $RequestPageCache_11d1a057eaf.get($RequestPageCache_11d1a057eaf.java) at $RequestPageCache_11d1a057ea7.get($RequestPageCache_11d1a057ea7.java) at org.apache.tapestry5.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:79) at $ComponentSource_11d1a057ec0.getPage($ComponentSource_11d1a057ec0.java) at sittingduck.pages.MatchPopulate._$read_inject_page_eventNew(MatchPopulate.java) at sittingduck.pages.MatchPopulate.onActionFromNewEvent(MatchPopulate.java:58) at sittingduck.pages.MatchPopulate.dispatchComponentEvent(MatchPopulate.java) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:881) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1049) Ville Virtanen wrote: Hi, What T5 version are you using? Anyway, add decorate request handler to your app.module as described here: http://tapestry.apache.org/tapestry5/cookbook/exceptions.html (Version 3: Decorating the RequestExceptionHandler, bottom of the page.) Set break point inside the decorator to get deeper insight? - Ville mdes wrote: Dear all, I need your help because I don't understand the real cause of my problem. I injected one page, say AnotherPage, in MyPage.java. When I try to use one of the setter methods of AnotherPage to pass a value contained in MyPage, I got this error: org.apache.tapestry5.runtime.ComponentEventException Stack is Empty I have used this practice many times, but I've never seen this error. Can you explain me what does Stack is empty error mean exactly? Where can I search my root error? Thanks in advance. -- View this message in context: http://www.nabble.com/-T5--org.apache.tapestry5.runtime.ComponentEventException---Stack-is-empty-tp20066468p20067396.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]
[T5] org.apache.tapestry5.runtime.ComponentEventException - Stack is empty
Dear all, I need your help because I don't understand the real cause of my problem. I injected one page, say AnotherPage, in MyPage.java. When I try to use one of the setter methods of AnotherPage to pass a value contained in MyPage, I got this error: org.apache.tapestry5.runtime.ComponentEventException Stack is Empty I have used this practice many times, but I've never seen this error. Can you explain me what does Stack is empty error mean esactly? Where can I search my root error? Thanks in advance. -- View this message in context: http://www.nabble.com/-T5--org.apache.tapestry5.runtime.ComponentEventException---Stack-is-empty-tp20066468p20066468.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]
manage sub-collection with grid component
Dear all, I need your support in order to determine the better way to solve this situation. I have, say, 2 entities (ejb3) @Entity public class Child { private String idChild; private String firstName; private String secondName; ... } @Entity public class Father{ private String idFather; private CollectionChild children; ... } And I want to build a table in this way: - for each row, print all Father properties - in the last column, I want to insert a list of links to the each child related to the specific Father in the row. I'm working on a grid component, so: t:grid t:id=Father add=childrenInfo/ but what can I insert in the childrenInfo column? I think that one solution could be a new component that accepts the idFather as parameter, and then returns the html code for the Children list. Is this a good idea? Any suggestions/thoughts? -- View this message in context: http://www.nabble.com/manage-sub-collection-with-grid-component-tp19954739p19954739.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]
Re: ActionLink in component
maybe you can try to be more specific in this way: ${index}/t:comp @OnEvent(value = action, component = select) void valueChosen(int value) { this.value = value; } Here you can find more explanation: http://tapestry.apache.org/tapestry5/tapestry-core/guide/event.html moritzgilsdorf-2 wrote: Yes, they are both persisted. tableParsed is set to true after a file was uploaded and parsed success fully. This variable is then used to show the next step of this process which requires the table to be parsed. The whole thing works well except that after the process is finished I have to restart jetty or wait until the session has expired. :-( When I change the OnEvent annotation to component unspecific by removing (component=reset), the reset() method is triggered, but then I never reach the second step. The method is then triggered when uploading the file. Thiago H. de Paula Figueiredo wrote: Em Mon, 13 Oct 2008 14:22:36 -0200, moritzgilsdorf [EMAIL PROTECTED] escreveu: @OnEvent(component = reset) public Object reset(){ tableParsed = false; saveSucceed = false; return null; } Are tableParsed and saveSucceed @Persist'ed? -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor Consultor, desenvolvedor e instrutor em Java http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://n2.nabble.com/ActionLink-in-component-tp1329406p1330597.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/ActionLink-in-component-tp19958102p19964545.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]
Re: problem beaneditform and external ejb3
I think I'm really close to the solution, after some modifications I can see the beaneditform in my page, but it's completly empty (I mean, only the Create/Update button is shown). Here my complete code: //DuckBeanRemote represents the Remote Interface of one stateless session bean. --- AddOperator.tml --- html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head titleAdd Operator/title /head body h1Add Operator/h1 t:beaneditform t:id=operatorEditor t:object=operator/ p [t:pagelink t:page=IndexBack to Index/t:pagelink] /p /body /html -- AddOperator.java public class AddOperator{ private DuckBeanRemote dao; @Persist private Operator operator; public AddOperator(){ // obtaining a dao from the context try {dao = (DuckBeanRemote)new javax.naming.InitialContext().lookup(DuckBean/remote); }catch(Exception e){e.toString();} } public void setOperator(Operator operator) {this.operator = operator;} public Operator getOperator() {return operator;} // I create an instance of Operator void onActivate(){operator= new Operator();} Object onSubmitFromOperatorEditor() { dao.addOperator(operator); return ShowOperators.class; } } This is what I can see in the jboss logs --- 09:57:27,979 INFO [STDOUT] [DEBUG] pages.AddOperator Dispatch event: ComponentEvent[activate from (self)] 09:57:27,980 INFO [STDOUT] [DEBUG] pages.AddOperator Invoking: sittingduck.pages.AddOperator.onActivate() (at AddOperator.java:21) 09:57:27,982 INFO [STDOUT] [DEBUG] pages.AddOperator Dispatch event: ComponentEvent[prepareForRender from operatorEditor] 09:57:27,983 INFO [STDOUT] [DEBUG] pages.AddOperator Dispatch event: ComponentEvent[prepare from operatorEditor] 09:57:27,985 INFO [STDOUT] [DEBUG] pages.AddOperator Dispatch event: ComponentEvent[prepare from operatorEditor] 09:57:27,985 INFO [STDOUT] [DEBUG] pages.AddOperator Dispatch event: ComponentEvent[passivate from (self)] 09:57:27,986 INFO [STDOUT] [DEBUG] pages.Index Dispatch event: ComponentEvent[passivate from (self)] 09:57:27,987 INFO [STDOUT] [DEBUG] pages.AddOperator Executed 89 rendering commands (max queue depth: 37) in 0.005 seconds -- View this message in context: http://www.nabble.com/problem-beaneditform-and-external-ejb3-tp19769807p19793534.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]
Re: problem beaneditform and external ejb3
PROBLEM FOUND! The beaneditform component can't understand this type of setter methods: public String getUsername(){return username;} public Operator setUsername(String username){this.username=username;return this;} I changed the setter in this way: public void setUsername(String username){this.username=username;} and everything is working now. I usually define setters in this way in order to write something like this: Operator operator = new Operator().setUsername().setPwd().setThis(..).setThat(..); So, how can I manage this kind of setters in Tapestry 5? any suggestion? do I really have to change all my setter methods?!?!? :,( -- View this message in context: http://www.nabble.com/problem-beaneditform-and-external-ejb3-tp19769807p19797874.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]
Re: problem beaneditform and external ejb3
@Thiango: I use the ejb3 business logic as a stand alone project (I mean, another folder in the workspace), separeted by the Tapestry one. I deploy it indipendently in JBoss and than a war for the Tapestry project. @Geoff: thanks for the jumpstart examples, but I already read them, but my problem is a bit different. Let me explain: I can use entity beans without any problem with the grid component and other components that can obtain a specific instance of the object. In particular, I call a page with a PageLink and I do something like dao.findOperator(username) in the onActivate() method, and the grid (for example) works perfectly. The problem with the beaneditform is that I want Tapestry to create an empty instance of my entity bean, but at the moment he can't understand what type he has to use (in this case, Operator). Geoff Callender-2 wrote: Does this example help? http://202.177.217.122:8080/jumpstart/examples/input/edit1/1 Cheers, Geoff On 02/10/2008, at 8:00 AM, Thiago H. de Paula Figueiredo wrote: Em Wed, 01 Oct 2008 18:47:37 -0300, mdes [EMAIL PROTECTED] escreveu: Hello everybody, I'm new to Tapestry 5 and I need help to solve a problem. I defined an entity bean Operator in my ejb3 project, and I want it to be the object of a beaneditform in a Tapestry 5 project. One common error for newbies is to put entity beans in packages controlled by Tapestry: pages, components, mixins, base. Maybe it is your error. Check this in your project. Thiago - 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] -- View this message in context: http://www.nabble.com/problem-beaneditform-and-external-ejb3-tp19769807p19775400.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]
problem beaneditform and external ejb3
Hello everybody, I'm new to Tapestry 5 and I need help to solve a problem. I defined an entity bean Operator in my ejb3 project, and I want it to be the object of a beaneditform in a Tapestry 5 project. So, I wrote this in the AddOperator.tml page: and I get this Tapestry error: Embedded component 'operatorEditor' has no type. You should specify a type in the component template, or define the component inside class sittingduck.pages.AddOperator using the @Component annotation on a private instance variable. In my understanding, my AddOperator.java seems to be ok because I defined: @Persist private Operator operator; and both setter and getter methods. I tried different ways, like setting a new instance of Operator to the AddOperator page via page injection, or assigning a new instance of Operator to the property field during the onActivate() method of AddOperator page, but no success. Please advise. -- View this message in context: http://www.nabble.com/problem-beaneditform-and-external-ejb3-tp19769807p19769807.html Sent from the Tapestry - User mailing list archive at Nabble.com.