Re: Caching the result of an EL expression evaluation with in a lifecycle

2009-06-26 Thread Alan Hancock
Use JPA to get the data. You'll need a service and an entity object.  
Then your backing bean can use the service layer to retrieve the  
entire object.


This approach handles caching for you and is much more scalable

-Alan via iPhone


On Jun 26, 2009, at 5:56 AM, Jeremy Wilson  
jeremy.wil...@esrgtech.com wrote:




--Original Message--
From: Sam Witty
To: dev@myfaces.apache.org
ReplyTo: MyFaces Development
Sent: Jun 25, 2009 9:36 PM
Subject: Caching the result of an EL expression evaluation with in a  
lifecycle



If you have the following code:

h:h:outputText#{someBean.user.firstName}/h:outputText
h:h:outputText#{someBean.user.lastName}/h:outputText
h:h:outputText#{someBean.user.age}/h:outputText

and if SomeBean.user() is a call to the db then every one of the above
expressions will cause a trip to the db. Of course to get around  
this one
simply has to cache the value of user from the db (the first time)  
and then

return the cached value instead of going to the db again.

This is all well and good... however, I find myself writing a lot of  
this
type of caching code in various places. It would seem that a much  
elegant
solution would be to have the EL expression evaluator cache the  
result of an
expression within a life cycle avoiding the need for every JSF  
developer to

sprinkle caching code all over the place.

Then again there maybe something out there that does this already  
(magical

config param?) I just could not find anything.

Thanks
-Sam
--
View this message in context: 
http://www.nabble.com/Caching-the-result-of-an-EL-expression-evaluation-with-in-a-life-cycle-tp24213650p24213650.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.



Jeremy Wilson
CTO
ESRG Technologies Group
Office 757-965-5963
Cell 814-241-4500


Re: OT: Oracle buys Sun

2009-04-20 Thread Alan Hancock
What would IBM move to? Why would  Java be any different with Oracle  
from

 IBM's perspective?


-Alan via iPhone


On Apr 20, 2009, at 10:25 AM, Arash Rajaeeyan  
arash.rajaee...@gmail.com wrote:


I may be a little bad for some sun products, but in whole it would  
be great for java vs .net platform

Oracle is second largest software vendor.
I am afraid this may cause other companies like IBM to move away  
from Java platform


On Mon, Apr 20, 2009 at 7:01 AM, Werner Punz werner.p...@gmail.com  
wrote:
Hello everyone I just read at the german Heise site that Oracle has  
bought Sun for 7.4 billion dollars.


I wonder what the implications in the long run will be.

My personal thought is that it might finally become possible that  
the RI and MyFaces can merge...


Java: Probably business as usual but maybe it will become more open!

OpenOffice will probably be maintained with the business as usual.

Same goes for OpenSolaris/Solaris

But I see a rather black future for Netbeans and MySQL...
(I would be sad if Netbeans would go away the IDE is simply excellent)

Also the proposed IceFaces merger as base for a future JSF-Sun  
component set might be now dead in the light of Oracle having  
already something in their portfolio!


As for the Sun hardware division that is a big question, but I  
personally guess Oracle will try to keep it alive and make it a cash  
cow again!





--
Arash Rajaeeyan


reCaptcha with Trinidad

2009-04-07 Thread Alan Hancock
Has anyone used reCaptcha in a Trinidad app? I'm trying to figure out the
best way to do this. If anyone has successfully used reCaptcha, I would be
interested in seeing how it was done.
 
This may be a good component to add in a future release. 
 
Information about the API is available at http://recaptcha.net/
 
-Alan


Re: reCaptcha with Trinidad

2009-04-07 Thread Alan Hancock

Many thanks!

I'll check it out.


-Alan via iPhone


On Apr 7, 2009, at 1:33 PM, Cagatay Civici cagatay.civ...@gmail.com  
wrote:



FYI there's a reCaptche JSF component in PrimeFaces.

See the demo here;

http://www.rehberharitam.com/primefaces-examples/ui/captcha.jsf

On Apr 7, 2009, at 3:43 PM, Alan Hancock wrote:

Has anyone used reCaptcha in a Trinidad app? I'm trying to figure  
out the best way to do this. If anyone has successfully used  
reCaptcha, I would be interested in seeing how it was done.


This may be a good component to add in a future release.

Information about the API is available at http://recaptcha.net/

-Alan




RE: Trinidad skin and demo rewrite

2009-02-28 Thread Alan Hancock
Is the documented process of creating a skin? 
 
I would like to create skin that is mostly white and blue, similar to the
Oracle ADF Faces skin. Trinidad needs a skin or set of skins that are
suitable for corporate web sites, which will help encourage adoption. A lot
of the productivity gains are lost in the effort required to develop or
modify skins. 
 

  _  

From: Adonis Raduca [mailto:adonis.rad...@codebeat.ro] 
Sent: Wednesday, February 18, 2009 7:16 AM
To: dev@myfaces.apache.org
Subject: Trinidad skin and demo rewrite


Hi,

Almost an year ago a discussion take place regarding the Trinidad skin and
components demo rewriting.
There is also an issue opened on wiki regarding this subject. 
http://wiki.apache.org/myfaces/Trinidad_MyFaces_Skin_and_Demo_rewrite

Now I have some time and I want to start to work on this subject ;)

Because I'm an organized guy I think is better to have a little action plan.
So I've made this action plan that looks like this:
- components overview (a little investigation on the already existing
components)
- components reclassification (we can improve the already existing
classification of the components)
- Trinidad shining mechanism study (very useful to understand what is
possible what is not)
- components skin design (all stuff regarding the components look and feel)
- skin implementation
- demo site design (components demo application look and feel)
- demo site implementation (if is needed)

For the beginning I've started with the component overview. 
So I made a table with all components and several related information like: 
- component category
- a field that indicate if the component manifests in the visible way (is a
button, a panel ...) or is a invisible one (like the iterator)
- have interactive samples (demos)
- is documented.
- have skinning capabilities.
- have skinning keys documentation.
- a short description of the component

All these information was taken from Trinidad component demo page:
http://www.irian.at/trinidad-demo/faces/componentDemos.jspx

Please look in the atached *.xls file.

So, what do you think about this component overview table and about the
approach in general ?
If anyone find a wrong piece the information and/or posses information that
is not present in this table, can notify me and I will made the required
change.


Have a nice day !
Adonis