[Rife-users] Sharing my experiments

2006-05-31 Thread apdewith

Hi Geert,

Well, thanks again for the quick response. I overlooked that I handled 
the embedded elements differently in both embedding elements.
Your explanation helped me a lot in understanding how embedded elements 
are handled.
Your suggested solution is exactly with what I started with but ended up 
in the background because of the 'problem' I encountered.


Regards,
Adriaan
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Sharing my experiments

2006-05-31 Thread Geert Bevin

Hi Adriaan,

the reason for this is that you first handle the "reservationList"  
submission with the "Seats" action in the BrowseReservations element.  
This renders a dynamic list of embedded SeatEntry elements. When the  
"seatEntry" submission is however sent, the embedding element (which  
is BrowseReservations), didn't receive the "reservationList"  
submission anymore. This means that its "processElement" is executed  
instead (ie. the element is merely rendered, it doesn't process an  
action). In that method, you print the template, which processes one  
SeatEntry embedded element without differentiator. This embedded  
element has a different identifier than the one that sent the  
"seatEntry" submission since the differentiator is missing.


One way to solve this, is to create a datalink from the  
"BrowseReservations" element that points to itself (with input and  
output "showSeats", for instance). Set the output to "true" when the  
seats should be shown and render then accordingly in the  
"processElement" method. The reflective datalink indicates to RIFE  
that this element has state that needs to be maintained, and when the  
output is set, RIFE will do so automatically.


Hope this helps.

Best regards,

Geert

On 31 May 2006, at 00:49, apdewith wrote:


Hi Geert,

Thanks for the fix that solved my 'problem'.
But I ran into another problem.
I use the 'SeatEntry' embedded element in both 'BrowseReservations'  
and 'ManageReservation'.
In 'ManageReservation' the inline editing works ok but in  
'BrowseReservations' not.
The 'doSeatEntry' is just not called from the 'BrowseReservations'  
if the 'Save' button is clicked.
Can you verify this with the sources you have? That is because I  
added more rudimentary functionality (Customer and Payments) in the  
meantime.


Btw, I am considering your blog invitation.

Regards,
Adriaan
___
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] Sharing my experiments

2006-05-30 Thread apdewith

Hi Geert,

Thanks for the fix that solved my 'problem'.
But I ran into another problem.
I use the 'SeatEntry' embedded element in both 'BrowseReservations' and 
'ManageReservation'.
In 'ManageReservation' the inline editing works ok but in 
'BrowseReservations' not.
The 'doSeatEntry' is just not called from the 'BrowseReservations' if 
the 'Save' button is clicked.
Can you verify this with the sources you have? That is because I added 
more rudimentary functionality (Customer and Payments) in the meantime.


Btw, I am considering your blog invitation.

Regards,
Adriaan
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Sharing my experiments

2006-05-29 Thread Geert Bevin

Hi Adriaan,

you can download the fixes version from here:
http://rifers.org/downloads/rife/snapshots/rife-1.5M2-snapshot-20060530/


Well, I am glad you used my experiments sharing to look into my  
'problem' and found the solution!
One of the reasons to share my experiments is to challenge other  
users to do the same.


That is great! What would be even cooler is to talk about the things  
you discover, the things you like, the things you think that can  
improve, ... by blogging about them (and making sure your blog is on  
javablogs.com). If you don't have a blog, you're free to blog about  
RIFE at http://rifers.org/blogs, just register and tell me that I  
have to activate you as a blogger.


What I like the most about Rife is that it allows users (even  
novice java programmers) to build up an application in small steps  
with a quick turn around time (edit, run, repair, retry) using  
Eclipse.


Very nice way of putting it, thanks :-)

Take care,

Geert

--
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] Sharing my experiments

2006-05-29 Thread apdewith

Hi Geert,

Well, I am glad you used my experiments sharing to look into my 
'problem' and found the solution!
One of the reasons to share my experiments is to challenge other users 
to do the same.
What I like the most about Rife is that it allows users (even novice 
java programmers) to build up an application in small steps with a quick 
turn around time (edit, run, repair, retry) using Eclipse.


Regards,
Adriaan
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Sharing my experiments

2006-05-29 Thread Geert Bevin

Hi Adriaan,

thanks a lot for your sources, I tracked it down to a bug in RIFE  
that creeped in with RIFE 1.4 (http://rifers.org/wiki/display/RIFE/ 
Embedded+element+priorities)


I committed the fix and you should be able to download it form this  
night's nightly build.


Btw, if you're processing embedded elements with dynamic  
differentiators, it's a good idea to make them late processing (add a  
+ sign in front of the element id in the value tag).


Best regards,

Geert

On 29 May 2006, at 16:11, apdewith wrote:


Hi Geert,

Click 'browseTours' in the menu and then on one of the 'Tours'  
buttons.
In the 'toursList' click on a 'Select' button and a Reservation  
with one seat will be created for that selected tour.


Regards,
Adriaan


___
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] Sharing my experiments

2006-05-29 Thread apdewith

Hi Geert,

Click 'browseTours' in the menu and then on one of the 'Tours' buttons.
In the 'toursList' click on a 'Select' button and a Reservation with one 
seat will be created for that selected tour.


Regards,
Adriaan


___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Sharing my experiments

2006-05-29 Thread Stefan Thomas

Hi Adriaan,

It's great to see more and more people interested with RIFE and by 
learning Java you are really diving into a huge area of high-end 
software engineering.


I've just taken a very brief look at your code and I must say that you 
are on the right path. There are a few suggestions I want to give you, 
though:


- Take a look at Java package naming conventions. You should always use 
a valid domain you own to prevent collisions. For example 
com.yourdomain.tbs instead of just tbs.
- Comment more. What seems obvious today, may be a great riddle 
tomorrow. It's a good habit to *always* write comments, even when 
writing seemingly simple code. Still try to write only non-trivial 
comments, there are many good guides on commenting out there.
- JavaDocs. You should take a look at JavaDocs. Most editors help you 
with writing those. If your editor does not, try Eclipse (eclipse.org).
- For Java, there is an official document with Code Formatting 
guidelines. Find it here: http://java.sun.com/docs/codeconv/ - It's a 
pain to read, but once you got it it really helps, because almost 
everyone is following those guidelines.


All of these suggestions are more concerning your code and less your 
logic. It would be really time consuming to dig into what you are trying 
to do there. So I can only recommend you read stuff about "design 
patterns" and "software architecture" to learn about these things. Maybe 
you should also get involved in an open source project where you'll be 
able to get some feedback from other team members.


If you have a concrete problem involving RIFE, feel free to post a 
precise description to this list and I'm sure someone will have a look 
at it.


Regards,

Stefan :)

apdewith schrieb:

Hi,

Reading to the mailing list and learning from questions and answers I 
decided to share my experiments with Rife.
I am trying to build up a tour reservations application (partly just 
for fun) in small steps.
Getting to know Rife in more detail is one of my goals but also 
building up java programming experience.
I started with Rife jumpstart ofcourse, elaborated on the friends 
example first, tried some  template variants and then started with the 
tbs (tour booking system).
Note that this is an experiment of a novice java programmer and that 
there are several ad hoc solutions that should be labelled 'not 
perfect but for now works fine for me'.


Attached is a dump of my source directory that should work out of the 
box in an Eclipse Rife jumpstart environment.

Any comments and/or questions are welcome.

Kind regards
Adriaan de With


___
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] Sharing my experiments

2006-05-29 Thread Geert Bevin

Hi Adriaan,

I got your example running thad to add a couple of jars) to try to  
reproduce your problem. However, I can't add a new reservation since  
the "reservationNew" submission isn't handled by the  
BrowseReservation element. Inherently I can't try out the reservation  
list logic that fails, since there are no reservation present. Maybe  
you could also send a zipped archive of your hsql db?


Best regards,

Geert

On 29 May 2006, at 15:29, apdewith wrote:


Hi,

Reading to the mailing list and learning from questions and answers  
I decided to share my experiments with Rife.
I am trying to build up a tour reservations application (partly  
just for fun) in small steps.
Getting to know Rife in more detail is one of my goals but also  
building up java programming experience.
I started with Rife jumpstart ofcourse, elaborated on the friends  
example first, tried some  template variants and then started with  
the tbs (tour booking system).
Note that this is an experiment of a novice java programmer and  
that there are several ad hoc solutions that should be labelled  
'not perfect but for now works fine for me'.


Attached is a dump of my source directory that should work out of  
the box in an Eclipse Rife jumpstart environment.

Any comments and/or questions are welcome.

Kind regards
Adriaan de With

___
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