Patricio Hervas

+ Follow
since Mar 28, 2006
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Patricio Hervas


I think you probably have some issues in your jscript.

first, unless you use the "forceId=true" property in your tomahawk
tags, the id's of your tags would be "form:id", so instead of refering
in the script of "" you would have to use ""

then, i think (im not that sure though) that you might want to use
"document.getElementById('form1:div1').style.display" to change the
display properties

if you set the "forceId=true" then it would be

hope that helps

17 years ago
"JSF in Action" i think is REALLY good to start
17 years ago
Well, i'm learning jsf and i like it very much. but i have a background
on php programming, with a lot of css and javascript things going on
just to enhance the application's look and feel (i like cool interfaces)

definitely programming in jsf is very powerful in so many ways than
php, but i like having total control on the rendered html so that i can
apply dinamic css depending on things going on in the application.

so lets say that i enclose the <X:messsages> inside a div.
it would be cool if i could, inside a bean, put a border and
background color on the containing div if there's a message
displayed. also, depending on the message severity, the border
could be of different colors, etc.

its just an example of things that i would like to do from a bean
and if you could control tag properties from a bean like you do with
javascript it would give you a lot of possibilities inside your app
without scripting inside the page and maybe reusing code a such.

i like that with myFaces im able to use normal html tags with jsf
tags without using <f:verbatim> so i can use external css's with
no problem to control the layout of the page 100% . i just want not
to do scripting in javscript.

that's basically what i wish to have control over
18 years ago
Does anybody know ?
help :-)
18 years ago
Hi. Some time ago I was wondering if you could access a component by its
id like in javascript with getElemetById.
I just found that there's this findComponent in the UIViewRoot which
i guess would work like getElementById.
Now, my question is if you have a native html tag (lets say a DIV)
with an id, would it get mapped into the FacesContext tree ?
Or only jsf native components get mapped in the FacesContext.

I wonder if something like this would work:

<div id="someDiv">

FacesContext fc = FacesContext.getCurrentInstance();
UIViewRoot view = fc.getViewRoot();
UIComponent div = (UIComponent)view.findComponent("someDiv");
div.setStyle("border: 1px solid red");
18 years ago
Correct if im wrong but isnt RAD a technique or method that
would be possible thanks to the use of and IDE ??
That's what i think.

I also think that RAD in web applications is sort of myth, still,
since you have to deal with a lot of issues when it comes to
browser differences, css, html,jscript etc, so it isnt just drag and
drop to create a form. If you want to have a quality look and
feel on your app, you'll have to still code a lot
18 years ago
I looked into MyEclipse a little bit, but as i said, didnt get too
far when checking. Which plugins are u using ? Have u used netbeans
maybe, as to compared both ?

18 years ago
Lets see. According to the author of the book i mentioned, JSF implements
a variation of the MVC model defined as Model 2, which is specific to
web applications.
The model would be your javaBeans or EJBs.
The view would be the html/jsp/jsf tags and the controller would be
the servlet that helps the model and view interact.

Now, about the page controller pattern, this page
gives a nice explanation of the theory behind it. I dont know
enough of all this as to explain, so i recommend that you read it
so that i dont confuse you.

This page also has a good discussion about page controller

hope that helps Nato
18 years ago
I personally use NetBeans.
I've tried some IDEs and i feel more comfortable with NetBeans.
Other tools like JDeveloper and Creator are very good, but i prefer
to code things by hand when it comes to the JSF/Html tags and dont
like when an IDE changes the structure. Other reason why I use Netbeans
is because i can use the Myfaces implementation, where JDeveloper and
Creator use ADF Faces and Sun's implementation respectively.
Creator is very good but i didnt like that it adds a lot of propietary
code and creates innecesary bindings to every single control you add
to a page.
I tried Eclipse shortly, but to be honest i didnt get into it
because of some company related issues.

i dont know what other tools people use or which might be better for
your particular case, but i like netbeans a lot, i've customized it
for using myfaces as default implementation.
18 years ago
Hi Nato, im also new to jsf.
I think its a good idea if you read chapter one of JavaServer Faces in Action.
There you can find a good explanation of some basics.
You can buy the book or you can read the free chapter at

hope that helps
18 years ago
AJAX means Asynchronous JavaScript and XML. Its a very interesting technique that involves different technologies. I recommend that you read the four articles in the link below. They explain really well the fundamentals of AJAX while bringing some basic code too.
18 years ago

I'm not sure if i understand exactly, but maybe you could implement a
custom NavigationHandler. There you can change the ViewRoot with
something like (i think)

FacesContext ctx = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = ctx.getViewRoot();

Then you can forward using the handleNavigation method.

Maybe that helps, im not exactly sure how it would work in your case
but its how i think you can change the viewRoot
18 years ago
You can change the css properties "padding" and "margin" to "0" of the form so that it uses no space.

use a css page or a style tag which contains somthing like

form {
margin: 0px;
padding: 0px;

hope that helps
18 years ago

I think you can set the css "overflow" property of a <div> to "scroll"
and it should display the scrollbars as long as you define a "width" and "height".

18 years ago
Thanks, i hope JSF 1.2 arrives soon.
18 years ago