Re: [Rife-users] rife forms
Hi Emmanuel, are you sure you declared a submission bean in the "commit" submission in your element declaration? What does your element declaration look like? Thanks a lot for taking a stab at Petstore! Best regards, Geert On 12 Apr 2006, at 08:11, Emmanuel Okyere wrote: hello all, I have finally found some free time, as the last app I worked on is getting ready to get out of the shop, and so I have started stabbing at getting rife to talk petshop. i'm however having problems with rife printing a simple form; it does retrieve the template and prints it out, except it filters out all the rife specifics. Could anybody say if i'm missing something obvious? -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] Loading a domain object onto a bean
Hi Mark, this is something that RIFE doesn't do automatically yet, but it's scheduled in the issue tracker. The main issue is the design of how it would work without dragging performance down. Ideally this should be lazy-loading, but that's only possible through byte-code modification I think of the appropriate getters / setters. These would then execute the query when the object is asked for. Another difficulty would be that each bean instance that is retrieved from the DB would then have to recall which datasource is was obtained from. Don't fred though, you can achieve something similar today already by implementing the afterRestore method of a CallBack: http://rifers.org/docs/api/com/uwyn/rife/database/querymanagers/ generic/Callbacks.html#afterRestore(BeanType) http://rifers.org/wiki/display/RIFE/Callbacks Hope this helps. Best regards, Geert On 12 Apr 2006, at 04:47, Mark Ashworth wrote: Good Day, Thank you very much for the help earlier, the ConstainedProperty#manyToOne() validation works like a dream. I was wondering if it was possible to load a property like location onto a bean like position given the following database structure. Position (Table)Location (Table) id (PK) id (PK) location_id (FK)description public class Position { ... private Location location; ... public void setLocation(final Location value) {this.location = value;} public Location getLocation() {return this.location;} } The question is how to populate the Location property on the Position class when it is loaded from the database? Mark P Ashworth Fax: 086 686 1624 Cell: 084 235 3554 http://www.connext.co.za ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] how to store raw data as a file in native file system instead of in database within rife cmf ?
Hi Wangwei, it is possible, though it is not implemented. A ContentQueryManager interfaces with a ContentManager, by default is uses DatabaseContent. You can however provide your own one in the constructor: http://rifers.org/docs/api/com/uwyn/rife/cmf/dam/ ContentQueryManager.html#ContentQueryManager (com.uwyn.rife.database.Datasource,%20java.lang.Class,% 20com.uwyn.rife.cmf.dam.ContentManager) You can then implement your own FileSystemContent by implementing http://rifers.org/docs/api/com/uwyn/rife/cmf/dam/ContentManager.html. If you do so, please do it in reusable fashion, then it can be integrated into RIFE ;§) Best regards, Geert On 12 Apr 2006, at 03:47, wang wei wrote: Hi, Now I am using rife to build a file server, which will support user to upload any amount of files, and the file size may up to hundreds of mega bytes. I like rife's cmf, and want to use it to manage those files. But I am not sure if there is way for cmf to store the files in native file system instead of in database, because I do care about the performance. Any idea ? Thanks in advance :) wangwei ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
[Rife-users] rife forms
hello all, I have finally found some free time, as the last app I worked on is getting ready to get out of the shop, and so I have started stabbing at getting rife to talk petshop. i'm however having problems with rife printing a simple form; it does retrieve the template and prints it out, except it filters out all the rife specifics. Could anybody say if i'm missing something obvious? Thanks, Emmanuel PS: I am using the 1.4 release (http://rifers.org/blogs/gbevin/2006/3/2/rife_1_4_released) The java code is simple: public void initialize() { template = getHtmlTemplate(TEMPLATE); } public void processElement() { print(template); } public static String TEMPLATE = "Register"; private Template template; the html looks like: User Information User ID: id="login" size="15" Email Address: A valid email address is required to activate your account id="email" size="30" Password: id="password" size="20" Repeat Password: id="password2" size="20" Account Information What is your first name? id="firstname" size="30" type="text" last name: id="lastname" size="30" type="text" Address 1: id="address" size="30" Address 2: id="address2" size="30" City: id="city" size="30" State: id="state" size="4" Zip: id="zip" size="10" Country: id="country" style="vertical-align: middle;" Profile Information Language Preference: id="language" style="vertical-align: middle;" Favourite Category: id="favCategory" style="vertical-align: middle;" Enable MyList id="listOption" value="on" Enable MyList id="bannerOption" value="on" And the final output: User Information User ID: id="login" size="15" Email Address: A valid email address is required to activate your account
[Rife-users] Loading a domain object onto a bean
Good Day, Thank you very much for the help earlier, the ConstainedProperty#manyToOne() validation works like a dream. I was wondering if it was possible to load a property like location onto a bean like position given the following database structure. Position (Table)Location (Table) id (PK) id (PK) location_id (FK)description public class Position { ... private Location location; ... public void setLocation(final Location value) {this.location = value;} public Location getLocation() {return this.location;} } The question is how to populate the Location property on the Position class when it is loaded from the database? Mark P Ashworth Fax: 086 686 1624 Cell: 084 235 3554 http://www.connext.co.za ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
[Rife-users] how to store raw data as a file in native file system instead of in database within rife cmf ?
Hi, Now I am using rife to build a file server, which will support user to upload any amount of files, and the file size may up to hundreds of mega bytes. I like rife's cmf, and want to use it to manage those files. But I am not sure if there is way for cmf to store the files in native file system instead of in database, because I do care about the performance. Any idea ? Thanks in advance :) wangwei ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] i18n patch
Geert, So, do we really need to control the order of priority from outside a Translator? Imho, yes. At least as soon as we don't want to do any assumption about when each resourcebundle will be added to the list. Well, I'm not so sure about this. People call the addResourceBundle method manually, right? Not always. For exemple it can be: - through "plugins" like rife-crud: the crud bundles will be put at the top of the list (see below the patch I use for CrudElement.decorateTemplate) - and/or through site configuration: then the final element, for exemple the Add one, can specify a required bundle basename, that will be put above the crud ones in the list. Can't they just call them in the correct order. I'll hear you say: "Yeah but what when they need to add resource bundles in front when a translator already has some?". Adding to the top doesn't solve that either, since at a later time other resource bundles might be added above again and obscure the properties too. Yes indeed. But imo it's not an issue. My point is, if there's a specific order that needs to be respected, then the developer can easily handle this by adding all the resource bundles one after the other in a reference factory or IoC container. I don't think that explicitly adding to front or bottom helps. I don't think that we need to control very exactly this order, but at least to be able to deal with some simple cases. If you think that addResourceBundle(s) with atTopPriority parameter is too much complexity, there is always the possibilty to remove this parameter and use getResources to work directly on the list. But then the complexity is only transfered from inside the addResourceBundle method to the caller. Imo such a solution is worse that the one with atTopPriority parameter. Regards Pierre PJ : public Template decorateTemplate(Template template) { String[] bundleNames = new String[2]; bundleNames[0] = L10N_PREFIX_RESOURCEBUNDLE + StringUtils.encodeClassname(mBeanClassName); bundleNames[1] = L10N_CRUD_RESOURCEBUNDLE; return decorateTemplate( template , Localization.getResourceBundles(bundleNames, getTranslator().getLocales(), true) , null ); // add bundles in top priority } ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] i18n patch
Hi Pierre, So, do we really need to control the order of priority from outside a Translator? Imho, yes. At least as soon as we don't want to do any assumption about when each resourcebundle will be added to the list. Well, I'm not so sure about this. People call the addResourceBundle method manually, right? Can't they just call them in the correct order. I'll hear you say: "Yeah but what when they need to add resource bundles in front when a translator already has some?". Adding to the top doesn't solve that either, since at a later time other resource bundles might be added above again and obscure the properties too. My point is, if there's a specific order that needs to be respected, then the developer can easily handle this by adding all the resource bundles one after the other in a reference factory or IoC container. I don't think that explicitly adding to front or bottom helps. What do you think? Best regards, Geert -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] RIFE/Continuations question
Hi Lucian, this is not yet supported by RIFE/Continuations, but it will be soon (no eta yet though). Currently, it only works in one method. Best regards, Geert On 11 Apr 2006, at 16:09, lucian chirita wrote: Hello Does RIFE/Continuations store the call stack context? I'm trying to achieve something like this in my application (which is not a web app btw): class Y calls method f0 of class X; f0 which calls f1 in a loop; f1 calls f2 and so on until f7 which needs to pause so the control goes back to class Y which does some stuff and then resumes f7 which will return to f6 and so on. Is this possible using RIFE/Continuations? Currently this is implemented using a separate thread for the X.f0 call, but this is causing problems in some environments.. Thank you, Lucian ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
[Rife-users] RIFE/Continuations question
Hello Does RIFE/Continuations store the call stack context? I'm trying to achieve something like this in my application (which is not a web app btw): class Y calls method f0 of class X; f0 which calls f1 in a loop; f1 calls f2 and so on until f7 which needs to pause so the control goes back to class Y which does some stuff and then resumes f7 which will return to f6 and so on. Is this possible using RIFE/Continuations? Currently this is implemented using a separate thread for the X.f0 call, but this is causing problems in some environments.. Thank you, Lucian ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
[Rife-users] Re: element.dtd
> for file uploads. Reference: http://www.rifers.org/wiki/display/RIFE/GuideCookbook#GuideCookbook-sectcookbookfileupload Frederic ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users