Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Jason Lee

Greenhorn
+ Follow
since Mar 03, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jason Lee

wen xin ni wrote:I'm still a beginner and have tried some of the tutorial online. I have been "googling" and "yahooling" for few days to find out is there any real world sample source code for me to learn further. But until now coud't get.

Compare to microsoft, there are more real world application reference.



What, exactly are you trying to accomplish?



That's from the hip, but that injects an EJB of the type MyEJB into your managed bean. I'm sure there's more you're needing, but I haven't a clue what it is ATM. :P
12 years ago
JSF
[quote=Kashif Nazar]Hi,

I am new to JSF Custom Tags. I developed a Custom tag. It's quite a fun to make your own custom tags :) . Now I have to use some javascript for my custom components. The inline javascript calls are no issue for me. But I want my javascript be embedded in a <script> tag automatically. So that I don't have to explicitly add my javascript into <script> tag, instead, it is automatically included in the page where my tags are being used. How can this be achieved?[/quote]

I'm not sure I understand your question. Are you wanting to add your custom JS to <head>? If so, you would user <h:outputScript>. If you're wanting something easier for inline JS from your composite component (which is what I'm assuming you mean by "custom tag?"), I'm not aware of anything to help there. A component for that seems like over kill. :)

12 years ago
JSF
Mojarra 1.2_09 BETA1 is now available. For full details, you can read the release notes [1], but the coolest thing in this release, I think, is the introduction of Groovy support. For more information, you can read about it on Ryan's blog here: http://blogs.sun.com/rlubke/entry/groovy_mojarra

That's all new code, so we could use people hammering at that before the final stamp is put on this release. Note also, that this is the implementation of the MR2 version of the spec, for those that are following that.

[1] https://javaserverfaces.dev.java.net/nonav/rlnotes/1.2_09/changelog.html

[ Edited the title to include the product name ]
[ May 01, 2008: Message edited by: David O'Meara ]
14 years ago

Originally posted by Chandan Rajan:

But I also want to expose the attributes of h:graphicImage (the component I am extending). To achieve this I have copy pasted graphicImage's attributes from graphicImage's tld file into my tld. Is there a better way to expose the attributes of the base component that I am extending on the tld?



I'm not sure how easy it would be to apply this technique to your project now, but you might find this useful either way:

http://java.sun.com/developer/technicalArticles/J2EE/jsf_templating/index.html

That's the approach Mojarra Scales uses, and I like quite a bit. I should, since I co-authored that article, right? :P By using annotations and apt at compile time, I have the TLD, JSP Tag, and Facelets taglib.xml generated for me. This article uses a JSFTemplating-based Renderer, but there's no need for you to do so if you don't want to (though I've found that template-based Renderers are often a lot easier to maintain, as I don't have a million writer.write*() calls).
[ April 29, 2008: Message edited by: Jason Lee ]
14 years ago
JSF

Originally posted by Mary Cole:
Hi,
Is there a component/sample code to download files from a web page using JSF?

Please advice



Off hand, assuming I understand your request, I know of two such components. One is my own download component in the Mojarra Scales project: https://scales.dev.java.net/#download with a live demo here: http://jsftemplating.org/mojarra-scales-demo-facelets/download.jsf

RichFaces/Ajax4Jsf also offers a4j:mediaOutput: http://labs.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/RichFacesComponentsLibrary.html (section 6.12) and a live demo of that here: http://livedemo.exadel.com/richfaces-demo/richfaces/mediaOutput.jsf
14 years ago
JSF

Originally posted by Chris Stewart:
I am using Facelets and ui:fragment did the trick. Thanks for the tip!


Very good!
14 years ago
JSF

Originally posted by Chris Stewart:
In JSF, what's the best way to display or not display a div based on the value in one of my JavaBeans? In JSP, I imagine I'd just use Java code to do this, but in JSF I'm told that's a no-no. So, any suggestions?



In "plain" JSF, you can do

<h:panelGroup rendered="...">

Seam offers a s:div, and Facelets offers ui:fragment if you happen to be using either of those.
14 years ago
JSF
Both my project, Mojarra Scales (https://scales.dev.java.net), and Ajax4Jsf has something like that, if I understand you correctly. They are sc:download and a4j:mediaOutput respectively.
14 years ago
JSF
Have you looked at the conversation scope provided by libraries like Seam or Orchestra?
14 years ago
JSF

Originally posted by Abhijit Das:
I am getting the following error while deploying the JSF application in JBOSS 4.0.0, I have followed all the steps , Please help me.



What version of Mojarra are you using, and on what version of the JVM are you running this? If you're using Mojarra 1.2_*, you have to use Java 5 or greater. From the hip, it looks like you might be using Mojarra 1.2 and JDK 1.4 or lesser...
14 years ago
JSF

Originally posted by anbu paj:
hi all
we have developed ajax using jsf (sun ri) and ajax.jar. later when we shifted to richfaces we found that the ajax functions like commandbutton are not working. no action is triggered for this.now we are using jsf(sun ri) and richfaces. kindly advice on this as this is blocking our project proceedings.

thanks in advance
anbarasan



I am both a user of and developer on Mojarra. I have also used RichFaces with Mojarra, so I might be able to help. Could you describe in more detail what you're trying to do, and maybe paste in the commandButton markup that's not working? While I'm familiar with RichFaces, I don't know what ajax.jar is, so I'm going to need some more information before I can speculate too much.
14 years ago
JSF