T5: using TapestryTestCase

2008-01-16 Thread Angelo Chen
Hi, Is there any tutorial on using TapestryTestCase ? say, I'd like to test a service which has Hibernate's Session injected thru constructor, any idea? Thanks, A.C. -- View this message in context: http://www.nabble.com/T5%3A-using-TapestryTestCase-tp14913469p14913469.html Sent from the Tapes

t5: getting parameter from request

2008-01-17 Thread Angelo Chen
Hi, in a dispatcher, public boolean dispatch(Request request, Response response) if I pass url :http://localhost:8080/myapp/profile/262 in the browser, request.getPath() returns '/profile', I'd like to get 262 as well, anyway to retrieve this? Thanks, A.C. -- View this message in context:

Re: T5: using TapestryTestCase

2008-01-17 Thread Angelo Chen
Thanks, that works. one related question: I have this: public interface Mailer { public void send(); public String sendIt(); } then somewhere in the test, i'd like to make sure send is called, but it can not passed to expect as the latter expects a object, any way to 'expect' a void

Re: T5: Pretty URL

2008-01-17 Thread Angelo Chen
Hi, How about adding a dispatcher which will inspect the path first, if it's http://localhost:8080/pjx/project/999/backlog/panel then change it to: http://localhost:8080/pjx/project/backlog/panel/999, possible? Howard Lewis Ship wrote: > > Sorry, no this isn't directly possible. Tapestry is

T5: TapestryTestCase newbie

2008-01-20 Thread Angelo Chen
Hi, I'm trying to use TapestryTestCase, here is a simple case that I don't know how to handle: here is the object under test: public class MyServiceImpl implements MyService { final private Session session; public MyServiceImpl(Session session) { this.session = session; }

Re: [ANN]: Seam for T5

2008-01-20 Thread Angelo Chen
Hi, Good news, a few questions: 1) Any tutorials on using Seam with T5? I tried Seam, up to the point of booking example, stop when i know I have to learn something about JSF. A 'hello world' tutorial with T5 will be helpful. 2) if an app uses Seam, do we still need Tapestry-hibernate? Thanks

Re: T5: TapestryTestCase newbie

2008-01-21 Thread Angelo Chen
hi, found the solution, should have been: expect(session.save(anyObject())).andReturn(null); another question is, TapestryTestCase has replay(), verify(), but don't have reset(), how to reset mock objects under TapestryTestCase? Thanks, A.C. Angelo Chen wrote: > > >

T5: TapestryTestCase and EasyMock

2008-01-22 Thread Angelo Chen
Hi, I have a disturbing problem, following is a test using TapestryTestCase, Easymock will give me an error: ava.lang.IllegalStateException: missing behavior definition for the preceeding method call DBServices.findUsrByCode("M123") if I change the method test5 to test6, or i comment out the 'tes

T5: Service and thread

2008-01-24 Thread Angelo Chen
Hi, I have a service which does some file download that takes quite long, I'd like to run the service in a separate thread, possible with Tapestry Ioc? or I have to manage the thread manually? Thanks, A.C. -- View this message in context: http://www.nabble.com/T5%3A-Service-and-thread-tp1506

Re: T5: Service and thread

2008-01-25 Thread Angelo Chen
Hi Davor, Andy, Thanks for the reply, what I do now is, just start the service, and i can go to other pages as well, but if I stay in the same page where i start the service, the cursor will be in the 'wait' state, i have to leave the page first, any idea? A.C. Davor Hrg wrote: > > Tapestry-

Re: T5: Service and thread

2008-01-25 Thread Angelo Chen
'm not following you ... > > you say you download sth ... > does your service download sth from some server to yourown > or is browser downloading from your server ... > could you say more about your case ... some ceode mybe ... > > > Davor Hrg > > On Jan 25, 2

Re: T5: Service and thread

2008-01-25 Thread Angelo Chen
Hi Davor, getAll is not async, it will not return immediately, how to make a service async? thanks. Davor Hrg wrote: > > are you sure > fileService.getAll(); > is async and returns immediately ? > > Davor Hrg > > > > On Jan 25, 2008 4:36 PM, Angelo

T5: Tapestry-Hibernate and thread

2008-01-29 Thread Angelo Chen
Hi, I have following code in a service: Rec p = new Rec(); session.save(p); p.setName("test"); session.save(p); this code works, but if it is invoked in a service under a thread, the change("test") was never saved to the file(the new record is there), any idea? Thanks, A.C. -- View this mes

Re: T5: Tapestry-Hibernate and thread

2008-01-29 Thread Angelo Chen
found solution, session.flush() at end of the thread, not needed if not in a thread, don't know why. Angelo Chen wrote: > > Hi, > > I have following code in a service: > > Rec p = new Rec(); > session.save(p); > > p.setName("test"); > sessio

Re: T5: Tapestry-Hibernate and thread

2008-01-29 Thread Angelo Chen
t; That session will not be commited unless you call ThreadCleanupHub > after thread exits. > Calling ThreadCleanupHub is a must if you use any threaded resources > from tapestry, > otherwise expect strange behavior and memory leaks. > > Davor Hrg > > > > > On Jan

Re: T5: Tapestry-Hibernate and thread

2008-01-30 Thread Angelo Chen
this works, thanks. Davor Hrg wrote: > > you inject the ThreadCleanupHub into your service, > > generaly speaking: make sure you dont share DB entities between those > threads since > the new thread will have a completely new hibernate session. > > > Davor Hrg > > > -- View this message

T5: checkbox questions

2008-01-30 Thread Angelo Chen
Hi, Got two questions about my checkbox in a form, template at end of this email: 1. Why the 'check here to approve' was not shown in the example below? even I remove the ? I'd like to display that text after the check box. 2. How to implement this: I will enable submit button if the checkbo

T5: best practice for a multiple module app

2008-02-03 Thread Angelo Chen
Hi, A mini ERP project which will contains ar, ap, gl, inventory and some others, if every module is a single Tapestry 5 application, then we have 4 modules, all modules should share the same persistence store, UI is independent from each other, however there are some linkage as well, example, in

T5: component and image

2008-02-03 Thread Angelo Chen
Hi, I have a component which renders html correctly, now I'd like to make another component but render everything into a image, possible? any idea how to get started with this? thanks. Angelo -- View this message in context: http://www.nabble.com/T5%3A-component-and-image-tp15261013p15261013.

Re: T5: best practice for a multiple module app

2008-02-04 Thread Angelo Chen
Hi Renat, EJB is not a must, any suggestions for this kind of app as long as front end is Tapestry 5. Renat Zubairov wrote: > > Hello Angelo, > > Main question is do you want to use EJB in your app or not, because > usually > there is no proper way to share state between multiple WAR's deplo

Re: T5: best practice for a multiple module app

2008-02-04 Thread Angelo Chen
any EJBs at > all. > IMHO it should be possible to automatically deploy all T5 services inside > the JNDI and then look them up in the Web Applications. > > Renat > > > On 04/02/2008, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> >> Hi Renat, >>

T5: HibernateSessionManager

2008-02-04 Thread Angelo Chen
hi, I have used Session session in my app and it works, I have seen HibernateSessionManager being mentioned many times in the list, what are the advantages of using HibernateSessionManager compared app which does not explicitly use it? Thanks, Angelo -- View this message in context: http://ww

T5: Hibernate and threaded service

2008-02-06 Thread Angelo Chen
Hi, I have two services, namely MyCreate and MyThread, what they do is: MyCreate will append a new record using Tapestry-Hibernate's session and MyThread will look it up, MyThread is in a thread while MyCreate is not, the problem is, the newly created record can not be located by MyThread, if My

Re: T5: Hibernate and threaded service

2008-02-07 Thread Angelo Chen
tions, while the MyISAM engine doesn't? > > If you want this record to be visible across two different threads, you > must commit before you start the second thread. Or perhaps it's simpler > not to use a second thread, and do everything in one session. > > Andy > &g

T5: HibernateSessionManager and Session

2008-02-07 Thread Angelo Chen
Hi, Got some questions, this is the one i use up to now: @Inject private Session session Is there a default HibernateSessionManager created somewhere? second question: @Inject private HibernateSessionManager manager @Inject private Session session In this case session is taken from the man

Re: T5: Hibernate and threaded service

2008-02-07 Thread Angelo Chen
Hi Davor, Thanks for your ThreadSource, it works and makes threaded tasks in T5 easier, I have included it in my app. however, in my case, the threaded service has insert and update in the same time: Doc doc = new Doc(); session.save(doc); doc.setTitle("test"); i

Re: T5: Hibernate and threaded service

2008-02-07 Thread Angelo Chen
Hi Davor, That explains my problem, this happens in 5.0.7 and 5.0.9, never tried it with 5.0.8 Davor Hrg wrote: > > I'm debuggin an example like yours, > and although I called ThreadCleanupHub.cleanup() > the list of listeners is empty... and HibernateSessionManager is not in it > > something

T5: ServletRequestFilter and dependency injection

2008-02-07 Thread Angelo Chen
Hi, How to inject dependency into a a filter? can't use constructor as it is registered as: public static void contributeHttpServletRequestHandler( OrderedConfiguration configuration) { configuration.add("URLRewriteRequestFilter", new URLRewriteRequestFilter())

Re: T5: Hibernate and threaded service

2008-02-12 Thread Angelo Chen
seems to be a JVM bug >> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5025230 >> > >> > I tried it in Java 6 and code works just fine >> > >> > I'll look into it, >> > an post a jira... also still trying to make a workarround for it &

T5: maintaining ASO in a service?

2008-02-13 Thread Angelo Chen
Hi, Here is what I use to check if a user has logged in : @ApplicationState private SessionData _user; private boolean _userExists; public void signIn(Long id) { if (!_userExists) { // ... } } this is in a page and working well, now I'd like to move

Re: T5: maintaining ASO in a service?

2008-02-14 Thread Angelo Chen
: > > http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher2 > > On Thu, Feb 14, 2008 at 6:32 AM, Angelo Chen <[EMAIL PROTECTED]> > wrote: >> >> > -- View this message in context: http://www.nabble.com/T5%3A-maintaining-ASO-in-a-service--tp15474336p

T5: cookies and expire check

2008-02-14 Thread Angelo Chen
hi, I use this to get cookies, it works, but how to check if cookie has expired? String logCookie = cookies.readCookieValue(logKey); Thanks, a.c -- View this message in context: http://www.nabble.com/T5%3A-cookies-and-expire-check-tp15479307p15479307.html Sent from the Tapestry - User mai

T5: autocomplete and textual input

2008-02-14 Thread Angelo Chen
Hi, Autocomplete returns a list of values that user can select, if I'd let the user type in a value which is not in the list, it seems impossible, example: my onProvideCompletionsFromCity will return the 10 major cities, if it is not there, user can just type in whatever he wants to type, possibl

T5: zone example

2008-02-14 Thread Angelo Chen
Hi, Is there a simple zone sample? thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3A-zone-example-tp15494028p15494028.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubs

Re: T5: autocomplete and textual input

2008-02-14 Thread Angelo Chen
field after all, > and proposals are only to help reenter existing text. > > Davor Hrg > > > On Fri, Feb 15, 2008 at 3:27 AM, Angelo Chen <[EMAIL PROTECTED]> > wrote: >> >> Hi, >> >> Autocomplete returns a list of values that user can select,

T5: T5.0.10 and Hibernate

2008-02-14 Thread Angelo Chen
Hi, I have several pages working well in T5.0.9 but got following error in T5.0.10: An unexpected application exception has occurred. Render queue error in Expansion[PropBinding[expansion TestPage1(call.usr.name)]]: could not initialize proxy - the owning Session was closed here is a simplified

T5: grid's css in 5.0.10

2008-02-15 Thread Angelo Chen
Hi, in the t5.0.9, the grid's column header's css is, field name plus header, so we have this: Results for this I can have : .id-header { width:700px; background:lightgreen} but now, for the same template we have this: Results and how can I specify a css for "id t-first t-last"? please help,

Re: T5: grid's css in 5.0.10

2008-02-15 Thread Angelo Chen
mprehensive resource > http://www.w3.org/TR/REC-CSS2/selector.html > > Davor Hrg > > On Fri, Feb 15, 2008 at 9:59 AM, Angelo Chen <[EMAIL PROTECTED]> > wrote: >> >> Hi, >> >> in the t5.0.9, the grid's column header's css is, field n

Re: T5: 5.0.10 exception report has no detail

2008-02-17 Thread Angelo Chen
Hi, Got the same issue, not using jetty, but tomcat, where could I add that production mode setting? thanks, a.c. Chris Poulsen wrote: > > Hi, > > Could this be related to the introduction of production mode ? > > I had to add: > > > >

T5: 5.0.10 new features

2008-02-17 Thread Angelo Chen
Hi, I'm looking at 5.0.10 new features, following are some that I'd need some additional info: Tapestry now understands JDK 1.5 Generics, allowing for simple parameterized types for properties of data objects and components. what this means? any sample? Components can now supply an event handl

Re: T5: 5.0.10 new features

2008-02-17 Thread Angelo Chen
Hi Davor, Looks good although I have no idea yet how to use this feature, thanks. A.C. Davor Hrg wrote: > > it is a resolution of these issues > > https://issues.apache.org/jira/browse/TAPESTRY-2053 > https://issues.apache.org/jira/browse/TAPESTRY-1518 > > you have samples there > > > --

T5: JSCalender popup window always in the left most when inside a layout

2008-02-17 Thread Angelo Chen
Hi, There seems a problem in the JSCalender in the 5.0.10, if following form is in a normal tapestry page, it generates A css: this is my date but if I wrap above form in a layout like this: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

Re: T5.0.10 DateField component broken ???

2008-02-17 Thread Angelo Chen
Hi, I have the same problem, here is my http://www.nabble.com/T5%3A-JSCalender-popup-window-always-in-the-left-most-when-inside-a-layout-to15537707.html problem , the misplaced popup happens only inside a layout component, maybe somebody can package the old js calendar as a 3rd party component?

Re: T5.0.10 DateField component broken ???

2008-02-18 Thread Angelo Chen
I don't think so. HugoPalma wrote: > > Is there an issue in JIRA for this already ? > > Angelo Chen wrote: >> Hi, >> >> I have the same problem, here is my >> http://www.nabble.com/T5%3A-JSCalender-popup-window-always-in-the-left-most-when-inside-

T5: display jpeg from a page class

2008-02-18 Thread Angelo Chen
Hi, I'd like to have a URL like this: http://localhost:8080/myapp/ImageView/pict01.jpg so I make a page class as below, but when I use the above URL, Firefox will prompt user either to save or open the file instead of displaying directly the image, what is the proper way to do this? Thanks, A.

t5: threaded service continues ?

2008-02-19 Thread Angelo Chen
Hi, In a page i started a threaded service which will take a long time to finish(appending data to database from some other sources), if I close my browser, will that thread continue? Thanks, A.C. -- View this message in context: http://www.nabble.com/t5%3A-threaded-service-continues---tp15560

Re: T5: quickstart archetype problem and solution

2008-02-19 Thread Angelo Chen
Hi Julian, but it works for me, here is what I did: mvn archetype:create -DarchetypeGroupId=org.apache.tapestry -DarchetypeArtifactId=quickstart -DarchetypeVersion=5.0.10 -DgroupId=com.usti.app -DartifactId=test1 -DpackageName=com.usti.app.test1 cd test1 mvn compile mvn jetty:run Julian W

T5: how to use Hibernate properly?

2008-02-19 Thread Angelo Chen
Hi, What is the proper way of using hibernate in T5? is following list correct? 1. Don't commit, let Tapestry-Hibernate take care of that. 2. Commit only if you are going to start a thread with Session as well. 3. Use session.save for the new objects, after that, any updates to the object does

Re: T5: quickstart archetype problem and solution

2008-02-19 Thread Angelo Chen
; J > > On Feb 19, 2008, at 6:17 PM, Angelo Chen wrote: > >> >> Hi Julian, >> >> but it works for me, here is what I did: >> >> mvn archetype:create -DarchetypeGroupId=org.apache.tapestry >> -DarchetypeArtifactId=quickstart -DarchetypeVersion=5.

Re: T5: quickstart archetype problem and solution

2008-02-19 Thread Angelo Chen
Hi Julian, You are right, i have this file in the repository from the 2.0.7 time, that explains why it works in my machine:), thanks for figuring this out, that will save a lot of time next time when I work in a totally new maven 2.0.8. A.C. Julian Wood wrote: > > Well the plugin config is in

Re: T5 5.0.10: ComponentResources.createActionLink broke after upgrade from 5.0.6 to 5.0.10

2008-02-20 Thread Angelo Chen
Hi, I have exactly the same problem, I make a simple class to test, it works in 5.0.7, but fails in 5.0.9 and 10: page class: public class TestPage1 { @Inject private ComponentResources resources; private Object[] _objs; public Class onActivate(Object[] obj) { _objs =

T5: Accessing entities/services in another app

2008-02-20 Thread Angelo Chen
Hi, I have a t5 app(app A) that uses Tapestry-Hibernate, now I need to write a new T5 app(app B) that need to : 1) Access tthe entities in the first app 2) use some services in the first app as well Any idea how to structure the app A so that it will be available to the app B? Thanks, A.C. --

Re: T5: Accessing entities/services in another app

2008-02-21 Thread Angelo Chen
Hi Davor, I'm thinking of jar file dependency, say, entities and t5 services(interfaces and implementations) packaged into a jar file, so app B can declare it as dependency in the maven, of course app B has to bind those services in appModule, just not figure out how to structure app A in such a

Re: T5 5.0.10: ComponentResources.createActionLink broke after upgrade from 5.0.6 to 5.0.10

2008-02-21 Thread Angelo Chen
i post a jira for this: https://issues.apache.org/jira/browse/TAPESTRY-2184 https://issues.apache.org/jira/browse/TAPESTRY-2184 Davor Hrg wrote: > > plese post a JIRA issue > > > -- View this message in context: http://www.nabble.com/T5-5.0.10%3A---ComponentResources.createActionLink-brok

Re: T5: Using resources

2008-02-21 Thread Angelo Chen
Hi, here is what I did: store it under resources, then add: p.setProperty("resource.loader", "class"); p.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); engine.init(p); MoritzGilsdorf wrote: > > Hi, > > I'm trying to find

t5: utf8(chinese) in form

2008-02-21 Thread Angelo Chen
Hi, I encoded some chinese in utf 8 and submit, the data saved to mysql is garbage, if I encode the data directly into mysql table using a native client, then display back in t5 app page, it shows correctly, i tried adding the wiki's approach: public RequestFilter buildUtf8Filter(

Re: T5: Using resources

2008-02-22 Thread Angelo Chen
how about just : emplate template = Velocity.getTemplate("description.vm"); MoritzGilsdorf wrote: > > Hi, > > I have that. Here is my code: > > props.setProperty(VelocityEngine.RESOURCE_LOADER, "classpath"); > props.setProperty("classpath." + VelocityEngine.RESOURCE_LOADER + > ".class",Class

Re: T5: Using resources

2008-02-22 Thread Angelo Chen
wrote: > > Then I get: > > org.apache.velocity.exception.ResourceNotFoundException: Unable to find > resource 'description.vm' > > Obviously Velocity can't find the template because in my deployment it is > packaged in the jar file under WEB-INF/lib . >

Re: t5: utf8(chinese) in form

2008-02-22 Thread Angelo Chen
Hi Lauri, no, i'm not using tapesry-upload in this case, thanks for the coming sample code. Lauri Benno wrote: > > Hi Angelo, > > Are you using tapestry-upload on the same page? If yes then it's the > culprit. You can patch it contributing a service alias in your app module > but I don't have

Re: injecting services in T5

2008-02-22 Thread Angelo Chen
Hi Howard, Since service does not subject to run time manipulation of Tapestry, does that mean we can debug a service easier than a page class? for the page class, it's strict that they have to be placed inside the pages package, same with components, but we can place a service class anywhere, is

T5: PageTester and TextStreamResponse

2008-02-22 Thread Angelo Chen
Hi, I have this simple page that I'd like to test: TestPage1.java: public class TestPage1 { private String test; // getter/setter omitted TextStreamResponse onSuccess() { return new TextStreamResponse("text/html", test); } } TestPage1.tml: here

T5 PageTester and ApplicationGlobals

2008-02-23 Thread Angelo Chen
Hi, I was trying to use PageTester, I got this problem: the TestServiceImpl is a service injected in the test page, it will be called from there, but the ApplicationGlobals in the service does not work under PageTester, works in a normal web app, maybe I have to mock an ApplicationGlobals? then

Re: T5: PageTester and TextStreamResponse

2008-02-23 Thread Angelo Chen
Hi Mark, if I return null instead of : return new TextStreamResponse("text/html", test); the test works, I also run it in maven, got the same result, does that mean PageTester does not work with pages returning TextStreamResponse? thanks. A.C. Mark W. Shead-2 wrote: > > Obviously make sure t

Re: T5: PageTester problems since 5.0.6

2008-02-23 Thread Angelo Chen
Hi Jesper, I remember after 5.0.7 or something, the template is under the root, is it the problem? PageTester tester = new PageTester(appPackage, appName, "src/main/webapp", TestAppModule.class); Jesper Zedlitz-3 wrote: > > I have been sucessfully using the PageTester with Tapestry 5.0.5. Aft

Re: T5 PageTester and ApplicationGlobals

2008-02-23 Thread Angelo Chen
e better approach when testing pages that need to use mock'ed services? Thanks, A.C. Angelo Chen wrote: > > Hi, > > I was trying to use PageTester, I got this problem: > > -- View this message in context: http://www.nabble.com/T5-PageTester-and-ApplicationGlobals-t

Re: T5 PageTester and ApplicationGlobals

2008-02-24 Thread Angelo Chen
Hi Robert, Nice tip, it works! and with that, i can use anonymous class to implement a mock object, or can even use EasyMock to create one, good idea, thanks. PageTester and Tapestry-Test seems overlapping each other, any guide lines when to use PageTester and when to use Tapestry-Test? A.C.

Re: Inject into Test Class

2008-02-26 Thread Angelo Chen
Hi Mark, @Inject is only for pages and components. Mark W. Shead-2 wrote: > > > @Inject > Logger _logger; > > -- View this message in context: http://www.nabble.com/Inject-into-Test-Class-tp15705386p15706258.html Sent from the Tapestry - User mailing list archive at Nabble.co

T5: Hibernate warning

2008-02-26 Thread Angelo Chen
Hi, I use Tapestry-Hibernate and it works very well, just I always see this warning in the log: [WARN] AnnotationBinder Package not found or wo package-info.java: : org.ust.test.t5.entities -- View this message in context: http://www.nabble.com/T5%3A-Hibernate-warning-tp15706803p15706803.htm

Re: T5: 5.0.10 new features

2008-02-27 Thread Angelo Chen
Hi Howard, This is a very nice feature, in my app, I have many small tables, say 30, so to edit those 30 objects I have to create 30 page classes without template, that's a big saving. I'd like to save further, is there a way that we can create a generic page class that can be called from other p

Re: T5: 5.0.10 new features

2008-02-27 Thread Angelo Chen
ctor: > public GenericGrid(Class[] genericClasses){ > } > > and instead of calling default constructor framework would call the > one with Class[] > > if this was available, GenericGrid for hibernate entities would be a snap, > and more... > > Davor Hrg > > On W

t5: BeanEditform and Timestamp

2008-02-27 Thread Angelo Chen
Hi, I use BeanEditForm with an entity that has Timestamp field, it has DateField dialog in the page, how to encode the time? and when click 'update', I got this error: Failure writing parameter value of component core/PropertyEditBlocks:datefield: Could not find a coercion from type java.util.Da

t5: BeanEditForm and column label

2008-02-29 Thread Angelo Chen
Hi, Is there a way to set column label to null? if I do this, it will cause an exception: model.get("edit").label(""); -- View this message in context: http://www.nabble.com/t5%3A-BeanEditForm-and-column-label-tp15754436p15754436.html Sent from the Tapestry - User mailing list archive at Nab

t5: zone auto disappear?

2008-02-29 Thread Angelo Chen
Hi, I use zone to display some messages when use click a actionLink, is there a way to automatically hide the zone after a certain period of time? thanks. A.C. -- View this message in context: http://www.nabble.com/t5%3A-zone-auto-disappear--tp15755347p15755347.html Sent from the Tapestry - Us

Re: t5: BeanEditForm and column label

2008-02-29 Thread Angelo Chen
this works, thanks Thiago HP wrote: > > A simple workaround is to add a line like this in you app.properties: > edit-label= > > -- > Thiago > > -- View this message in context: http://www.nabble.com/t5%3A-BeanEditForm-and-column-label-tp15754436p15758922.html Sent from the Tapestry - User

T5: beaneditform and entities with lookup

2008-03-01 Thread Angelo Chen
Hi, I found beaneditform a time saver, so far I use it only on simple entities, how to use it on entities that has a look up, something like following, what is a best appraoch? thanks. public class OrderLine { Long id; private Item item; @ManyToOne(fetch = FetchType.LAZY) @Joi

t5: BeanEditForm and complex beans

2008-03-01 Thread Angelo Chen
Hi, How to use beaneditform with complex beans? it seems that beaneditform does not render those user defined classes, here is an example that I found in the list about the similar question for t4: public class Item { private ItemDetails details; } public class ItemDetails {

Re: t5: BeanEditform and Timestamp

2008-03-02 Thread Angelo Chen
Hi Howard, Thanks, I tried to follow the "Using the BeanEditForm Component" article and come out with a basic editor, my initial plan is, just to edit it first in a textfield, following is my code based exactly on the article, but I got this error: org.apache.tapestry.internal.services.RenderQue

T5: How to handle lookup?

2008-03-03 Thread Angelo Chen
Hi, I have this problem, say I have a OrderRec: public class OrderRec { private Long qty; private Long supplierID; private Long itemNo; // getters/setters omitted } now I have a Order page: public class Order { private OrderRec rec; // getter/setter...

Re: T5: How to handle lookup?

2008-03-03 Thread Angelo Chen
Hi Davor, This sounds interesting, question, how block be used in a popup window? Davor Hrg wrote: > > uh, > I assumed you were talking about popup window, > I'm doing such thing in my form and I just made a component > that triggers event when something is selected > ComponentResources.trigerE

Re: AW: T5: How to handle lookup?

2008-03-03 Thread Angelo Chen
Hi Martin, Thanks for the fast answer, i tried the javascript approach and it works, that does give me some idea, in an intranet app, there are so entities that are used often in the lookup, maybe components like DateField can be built for them and use in the UI, this will make the app like a des

Re: T5: How to handle lookup?

2008-03-03 Thread Angelo Chen
hi Davor, In the case of zone, another area in the same page will be opened for the user to do some query/selection and return the result back to main form when done? I tried jQuery with Thickbox, it pops up another window and we can do some selection, although it appears like another window, bu

Re: T5: Grid's rowClass

2008-03-03 Thread Angelo Chen
hi, might be nice to include that in the tapestry-core as this has a very common use. Howard Lewis Ship wrote: > > Cool idea. I'm trying to come up with a name for this approach, so > > -- View this message in context: http://www.nabble.com/T5%3A-Grid%27s-rowClass-tp13810748p15818201.htm

T5: determine button clicked in a beaneditor

2008-03-04 Thread Angelo Chen
Hi, How to determine which button is clicked in the following case: Thanks, A.C. -- View this message in context: http://www.nabble.com/T5%3A-determine-button-clicked-in-a-beaneditor-tp15841944p15841944.html Sent from the Tapestry - User mailing list archive at Nabble.com.

T5: beaneditor and remove

2008-03-04 Thread Angelo Chen
Hi, I like beaneditor, it's very powerful, however I found this 'remove' option time consuming, many time I need to display or edit only a few fields, maybe we can add another parameter like 'removeAllExcept'? this will remove all the fields from the model except those listed, that will be a good

T5: Nice to have features for beaneditor

2008-03-04 Thread Angelo Chen
Hi, Following is a list of features that will make the use of beaneditor/beaneditform easy: 1. RemoveAllExcept: in addition to remove, removeAllExcept will remove all the properties except those listed. 2. Option to disable the display of labels, this is very useful when the column contains act

Re: AW: T5: determine button clicked in a beaneditor

2008-03-04 Thread Angelo Chen
g. I am to buzzy right > now but I can do it as well at weekend. > > > Cheers, > > Martin (Kersten) > > > -Ursprüngliche Nachricht- > Von: Angelo Chen [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 5. März 2008 04:03 > An: users@tapestry.apache.or

Re: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Angelo Chen
Hi Martin, The onSelected even happens after the form fields have been submitted, my need is to edit a Hibernate bean, what I'm doing now is: I persisted the bean's id, in the onActivate even I re-read the bean, so that form will update an existing bean, however, even the cancel button triggers o

Re: AW: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Angelo Chen
Link onSuccess() { return backLink; } Martin Kersten-2 wrote: > > Hi Angelo, > >Are you using the onSuccess event? > > Cheers, > > Martin (Kersten) > > -Ursprüngliche Nachricht- > Von: Angelo Chen [mailto:[EMAIL PROTECTED] > Gese

Re: AW: AW: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Angelo Chen
Hi Martin, Your case should work as you have alterTheUserAccordingToForm. I'm just taking advantage of Tapestry-Hibernate's feature to save coding, in the first request, an object will be retrieved to render the form, in submission the existing object was retrieved again then merge with the data

Re: AW: AW: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Angelo Chen
Hi Davor, Martin, This is the elegant solution, so from the method suggested by Martin, I am able to determine which button is clicked, then I just do a session.evict as suggested by Davor in the onSelectedFromCancel, simple and works! thanks guys. Davor has mentioned this event approach, I remem

Re: AW: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Angelo Chen
Hi Davor, This is interesting, can you give a simple but complete sample how it works? thanks. A.C. Davor Hrg wrote: > > > I for enitity editing have a component > and throw new events based on button clicked; > > then capture them > onEntitySaved(id, entity, isNew) > onCancel() > > this w

Re: AW: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Angelo Chen
Hi Davor, I got your point, the thing I can't understand is the event, how to use those events triggered in the onSuccess? Davor Hrg wrote: > > public void onSuccess(){ > if(isCancel){ > _session.evict(_entity);//it is forgotten now > _resources.triggerEvent("cancel", new O

Re: T5: 5.0.10 new features

2008-03-05 Thread Angelo Chen
y to do it from inside the component, > but it works only for components, not for pages... > > I'm still looking is there a real bebefit from this... > > If this is helpful for you, > I can give you the snippet ... > > Davor Hrg > > > On Wed, Feb 27, 200

T5: Chinese in form submission(5.0.11)

2008-03-05 Thread Angelo Chen
Hi, I have a simple form just to accept anything, but when I encode some chinese characters, it turns out garbage in the server side, why? Start Page jave side: void onSubmit() { System.out.println(msg); } -- View this message in con

Re: T5: Chinese in form submission(5.0.11)

2008-03-05 Thread Angelo Chen
This problem is fixed by following the utf8 how to in the wiki page. the problem now is, the form's field and file upload, it turned into garbage. any fix on this? thanks. Angelo Chen wrote: > > Hi, > > -- View this message in context: http://www.nabble.com/T5%3

Re: How to Upload a file to my server

2008-03-06 Thread Angelo Chen
can't find anything wrong, try to dump the file name, is it valid? private String fname = "c:/temp/"+strategyFile.getFileName(); System.out.println(fname); Yeeswara Nadapana (HCL Financial Services) wrote: > > > File stratFile = new File("c:/temp/"+strategyFile.getFileName()); > > strategyF

Re: T5: Chinese in form submission(5.0.11)

2008-03-06 Thread Angelo Chen
Hi Yuan, yes, the problem now is, file upload, if you have a textfield mixed with file upload, the input will have garbage. yuan gogo wrote: > > This problem has been resolved. > > I'm Chinese too :-) > > > -- View this message in context: http://www.nabble.com/T5%3A-Chinese-in-form-sub

Re: Tapestry 5 Form

2008-03-06 Thread Angelo Chen
Hi Simon, The template should have .tml as extension and place under webapp in the new version of t5. A.C Simon Raveh wrote: > > Hi, > > I have a small demo application that use to work correctly with > version 5.0.6 but know when I switch to 5.0.10 it's stop working. > > I'm getting an ex

t5: home page

2008-03-06 Thread Angelo Chen
hi, t5 loads start page when it is called: http://localhost:8080/myapp I'd like it to load home.tmp instead, any way to set it? renaming home.tml to start.tml is one, but i like to keep it. thanks. A.C. -- View this message in context: http://www.nabble.com/t5%3A-home-page-tp15890272p1589027

T5: proper handling of hibernate exception?

2008-03-07 Thread Angelo Chen
I have a class where its email field has unique constraint, a page like this: @Inject private Session session; void onActionFromUpdate1() { Usr usr = (Usr) session.get(Usr.class, new Long(2)); usr.setEmail("[EMAIL PROTECTED]");// email already used by other user }

  1   2   3   4   5   6   7   8   9   >