Re: [Rife-users] meta data code generator
I'm glad you all like it :) I've just uploaded a slightly revised version 1.1, that fixes a bug that would cause, ie: private String title = "Mr."; To not be recognized as a field in need of a constraint. The new version not only recognizes the field, but also sets a defaultValue() constraint on it. PS. Command line loving Eclipse users should take a look at the EasyShell plugin ;) Cheers -- "All good software releases were accidents corrected in the next version." ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] Custom SessionManager minor gotcha
I don't think that will work. SessionManager is stateless and if you did that you wouldn't be able to use a singleton instance. An alternate approach would be to add a method that returns some kind of session object given a session ID, and have that object implement getSessionUserId() and continueSession(). (And maybe isSessionValid() too, but you could just say that object is only returned for valid session IDs.) The authentication code can remember that object using a request attribute a la the IDENTITY_ATTRIBUTE_NAME attribute so the element class can call it as needed. What do you think of that? -Steve Geert Bevin wrote: Hi Steven, maybe we should add a method to the SessionManager interface (setElementSupport) that is called by the authentication with itself as the argument. What do you think? Geert ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] meta data code generator
Amen. Long time no talk guys (sorry about that). I've been ridiculously busy for the last two months. Looks like a great tool and I love the cmd line tools for RIFE notion. Cheers, Tyler On 9/25/06, Emmanuel Okyere <[EMAIL PROTECTED]> wrote: brilliant stuff, Christian... very nice... works here... could be a nice drop to start cmd line tools for rife off of too :) cheers, Emmauel On 9/24/06, Christian Vest Hansen <[EMAIL PROTECTED]> wrote: > Great, here you are: > http://rifers.org/wiki/display/RIFE/MetaData+stub+class+code+generation > > ^_^ > > Cheers. > > 2006/9/23, Geert Bevin <[EMAIL PROTECTED]>: > > Hi Christian, > > > > sounds useful! Maybe the best thing is to upload this to the wiki as > > an attachment and add a page to the tips & trick section explaining > > what it does? > > > > Best regards, > > > > Geert > > -- > "All good software releases were accidents corrected in the next version." > ___ > Rife-users mailing list > Rife-users@uwyn.com > http://lists.uwyn.com/mailman/listinfo/rife-users > -- +44.790.449.0207 (London, NW10) ito! -- http://itoworld.com/ rife -- http://rifers.org/ Coke/iTunes -- http://music.coca-cola.com/ Coca-Cola Global -- http://coca-cola.com/ Orange Phone Trainer -- http://shop.orange.co.uk/shop/phonetrainer Grammy In the Schools -- http://grammyintheschools.com Mohandas Gandhi - "My life is my message." ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] meta data code generator
brilliant stuff, Christian... very nice... works here... could be a nice drop to start cmd line tools for rife off of too :) cheers, Emmauel On 9/24/06, Christian Vest Hansen <[EMAIL PROTECTED]> wrote: Great, here you are: http://rifers.org/wiki/display/RIFE/MetaData+stub+class+code+generation ^_^ Cheers. 2006/9/23, Geert Bevin <[EMAIL PROTECTED]>: > Hi Christian, > > sounds useful! Maybe the best thing is to upload this to the wiki as > an attachment and add a page to the tips & trick section explaining > what it does? > > Best regards, > > Geert -- "All good software releases were accidents corrected in the next version." ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- +44.790.449.0207 (London, NW10) ito! -- http://itoworld.com/ rife -- http://rifers.org/ Coke/iTunes -- http://music.coca-cola.com/ Coca-Cola Global -- http://coca-cola.com/ Orange Phone Trainer -- http://shop.orange.co.uk/shop/phonetrainer Grammy In the Schools -- http://grammyintheschools.com Mohandas Gandhi - "My life is my message." ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] Mysql JDBC driver and DISTINCT ON not being supported ??
Ah, got you. I achieved the same result using something like this: Select select = new Select(getDatasource()) .from("question_answer, answer, question") .distinct() .field("question.id QuestionID") .field("question.qText Question") .field("answer.id AnswerID") .field("answer.text Answer") .field("question_answer.correct_answer CorrectA") .where( "answer.id = answer_id") .whereAnd("question_id = ?") .whereAnd("question.id = question_id"); thanks. J. On 9/25/06, Geert Bevin <[EMAIL PROTECTED]> wrote: Hi John, MySQL simply doesn't support it, only DISTINCT (without on) is supported: http://dev.mysql.com/doc/refman/4.1/en/select.html Best regards, Geert On 25 Sep 2006, at 01:02, John Lukar wrote: > Hi folks, > is it true that distinctOn is not supported by MySql JDBC driver ? I > have tried both versions: > > mysql-connector-java-5.0.3 > mysql-connector-java-3.1.13 > > on MySql versions: > > 4.1.10a-nt > 5.0.22-Debian_0ubuntu6.06.2-log > > and all the same results. > > below is the SQL: > > > Select select = new Select(getDatasource()) >.distinctOn("question.id QuestionID, question.qText > Question, answer.id AnswerID, answer.text Answer, > question_answer.correct_answer CorrectA") >.from("question_answer") >.from("answer") >.from("question") >.where( "answer.id = answer_id") >.whereAnd("question_id = 3") >.whereAnd("question.id = question_id"); > > >System.out.println(" Query: "+select.getSql()); > >// fetch every row in the resultset and forward the processing >// of the data to the DisplayProcessor >executeFetchAll(select, processor); > > > Below is the stack trace: > > > om.uwyn.rife.database.exceptions.UnsupportedSqlFeatureException: The > 'DISTINCT ON' feature isn't supported by the driver > 'com.mysql.jdbc.Driver'. > at com.uwyn.rife.database.queries.Select.getSql(Select.java:291) > at com.uwyn.ecalendar.ExamQuestionManager.display > (ExamQuestionManager.java:56) > at com.uwyn.ecalendar.elements.DisplayExamQuestions.processElement > (DisplayExamQuestions.java:56) > at com.uwyn.rife.engine.ElementContext.processContext > (ElementContext.java:443) > at com.uwyn.rife.engine.RequestState.service(RequestState.java:342) > at com.uwyn.rife.engine.Gate.handleRequest(Gate.java:421) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at com.uwyn.rife.servlet.RifeFilter.doFilter(RifeFilter.java:142) > at org.mortbay.jetty.servlet.WebApplicationHandler > $CachedChain.doFilter(WebApplicationHandler.java:823) > at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch > (WebApplicationHandler.java:473) > at org.mortbay.jetty.servlet.ServletHandler.handle > (ServletHandler.java:567) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1565) > at org.mortbay.jetty.servlet.WebApplicationContext.handle > (WebApplicationContext.java:635) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1517) > at org.mortbay.http.HttpServer.service(HttpServer.java:954) > at org.mortbay.http.HttpConnection.service(HttpConnection.java:814) > ___ > Rife-users mailing list > Rife-users@uwyn.com > http://lists.uwyn.com/mailman/listinfo/rife-users > -- Geert Bevin Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Music and words - http://gbevin.com ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] Augmetning CRUD generated parent bean data entry form with child beans listing
Thanks Steph. I look forward to seeing it. I realized the M-to-M was not yet supported out of the box. I was just scratching my head as how to best achieve the parent/child presentation. So I settled for simple blog way of doing it. thanks j On 9/25/06, Steph Meslin-Weber <[EMAIL PROTECTED]> wrote: Hi John, Just a quick heads up, I've recently implemented a survey site which at a glance looks like what you want to achieve. I'm currently cleaning up the code and should put it up on the web sometime this week. Some limitations are that M:N relationships between questions/answers are manual - as Geert has mentioned in another thread, RIFE doesn't cater to these automatically at the moment. Cheers, Steph On 25/09/06, John Lukar <[EMAIL PROTECTED]> wrote: > Hi all, > > I am having a hard time figuring out how to do the following: > > I have : > > Question { > id > text > } > > Answer { > id > questionId > text > } > > A question can have multiple answers. > > When editing a question, I'd like to show the list of possible answers > that has been added to the Question and allow the user to add more > answers on that same page. > > > I have been able to create a ViewQuestion element that shows the > question and possible answers using ContentQueryManager's for > Question and Answer and a primitive template that shows the Question > and the array of answers for it. > > I have two questions: > > 1) Is it possible to somehow "augment" the nice data form that is > generated by CRUD for the Question bean and add the Answer listing to > it ?Using CRUD, and the MetaData for Question generates a nice > data entry form for question. Looking at CustomMenu code of one of > the examples I see that one can get a handle to one of the CRUD > generated forms using something like: > mElement.getSite().resolveId(".Admin.question.EDIT") > > > If answer is no to above and I have to role my own data entry form for > Question+Answers then : > > When I use: >template.setBean(question); >template.appendBlock("thequestion","question"); > > I have to add individual FORM:INPUT fields for the Question bean to my > template. Is there a way to auto-generate a FORM for all the fields > in the Question bean ? > > also appreciate suggestions on how to create this sort of Parent/Child > relationship. So far I have been able to limp along by looking at the > simple-blog code on newsItem and newsComments that have sort of same > relationship. > > J. > ___ > Rife-users mailing list > Rife-users@uwyn.com > http://lists.uwyn.com/mailman/listinfo/rife-users > -- Steph Meslin-Weber, [EMAIL PROTECTED] ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] problem with HTTP/1.0 clients?
David: On 9/22/06, David Herbert <[EMAIL PROTECTED]> wrote: Hello, I have come across a strange bug which one of our customers who runs a local Squid proxy cache (which I gather for historical reasons still speaks HTTP/1.0) reported. Basically our RIFE application output a blank page (after hanging for a couple of minutes) for a particular request of the form: http://data.itoworld.com/mysite/mypage?status=1 where "status" is declared as an input with flowlinks and datalinks in the usual way. Perhaps the input is unwisely named (though I can find no documentation whatever on reserved words which shouldn't be used in query strings in HTTP). RIFE indeed does appear to have some reserved words (that are passed along as hidden params with submissions), and Geert shd be able to clarify this, although "status" doesn't appear to be one of them. you can find them in the com.uwyn.rife.engine.ReservedParameters. Cheers, Emmanuel -- +44.790.449.0207 (London, NW10) ito! -- http://itoworld.com/ rife -- http://rifers.org/ Coke/iTunes -- http://music.coca-cola.com/ Coca-Cola Global -- http://coca-cola.com/ Orange Phone Trainer -- http://shop.orange.co.uk/shop/phonetrainer Grammy In the Schools -- http://grammyintheschools.com Mohandas Gandhi - "My life is my message." ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] Augmetning CRUD generated parent bean data entry form with child beans listing
Hi John, Just a quick heads up, I've recently implemented a survey site which at a glance looks like what you want to achieve. I'm currently cleaning up the code and should put it up on the web sometime this week. Some limitations are that M:N relationships between questions/answers are manual - as Geert has mentioned in another thread, RIFE doesn't cater to these automatically at the moment. Cheers, Steph On 25/09/06, John Lukar <[EMAIL PROTECTED]> wrote: Hi all, I am having a hard time figuring out how to do the following: I have : Question { id text } Answer { id questionId text } A question can have multiple answers. When editing a question, I'd like to show the list of possible answers that has been added to the Question and allow the user to add more answers on that same page. I have been able to create a ViewQuestion element that shows the question and possible answers using ContentQueryManager's for Question and Answer and a primitive template that shows the Question and the array of answers for it. I have two questions: 1) Is it possible to somehow "augment" the nice data form that is generated by CRUD for the Question bean and add the Answer listing to it ?Using CRUD, and the MetaData for Question generates a nice data entry form for question. Looking at CustomMenu code of one of the examples I see that one can get a handle to one of the CRUD generated forms using something like: mElement.getSite().resolveId(".Admin.question.EDIT") If answer is no to above and I have to role my own data entry form for Question+Answers then : When I use: template.setBean(question); template.appendBlock("thequestion","question"); I have to add individual FORM:INPUT fields for the Question bean to my template. Is there a way to auto-generate a FORM for all the fields in the Question bean ? also appreciate suggestions on how to create this sort of Parent/Child relationship. So far I have been able to limp along by looking at the simple-blog code on newsItem and newsComments that have sort of same relationship. J. ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Steph Meslin-Weber, [EMAIL PROTECTED] ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users