Patricio Hervas

Greenhorn
+ Follow
since Mar 28, 2006
Merit badge: grant badges
For More
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 Patricio Hervas

Hi.

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 "div1.style" you would have to use "form1:div1.style"

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
"document.getElementById('div1').style.display"

hope that helps

PAto
17 years ago
JSF
"JSF in Action" i think is REALLY good to start
17 years ago
JSF
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
JSF
Does anybody know ?
help :-)
18 years ago
JSF
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">
....
</div>

--
FacesContext fc = FacesContext.getCurrentInstance();
UIViewRoot view = fc.getViewRoot();
UIComponent div = (UIComponent)view.findComponent("someDiv");
div.setStyle("border: 1px solid red");
18 years ago
JSF
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
JSF
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 ?

thanks
18 years ago
JSF
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
http://www.onlamp.com/pub/a/php/2004/10/14/page_controller.html
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
http://mail-archives.apache.org/mod_mbox/struts-user/200603.mbox/%3C425b63690603201808q6f29fceah4b6a162117b92b29@mail.gmail.com%3E

hope that helps Nato
18 years ago
JSF
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
JSF
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
http://www.manning.com/mann/

hope that helps
18 years ago
JSF
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.

http://www-128.ibm.com/developerworks/views/web/libraryview.jsp?search_by=Mastering+Ajax
18 years ago
JSF
Hi.

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();
viewRoot.setViewId("/page.jsp");

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
JSF
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
JSF
Hi.

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".

check
http://www.w3schools.com/css/pr_pos_overflow.asp
18 years ago
JSF
Thanks, i hope JSF 1.2 arrives soon.
18 years ago
JSF