g madhava

Ranch Hand
+ Follow
since Sep 14, 2001
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 g madhava

Currently that is one of the limitation of the JSF framework. I guess it's really the limitation of JSTL.

You cannot invoke a method (both Action as well as binding methods) with any parameters.

Thanks,
11 years ago
JSF
Replace the "onblurfunction" keyword with the "onblur" function of javascript.

I had write the above since javaranch is parsing the content of the response
11 years ago
JSF
Since you wanted this functionality using javascript - This question should ideally have been posted in "javascript" forum.

I am assuming you are already doing the below.

The HTML code generated is the starting point in order to get this thing done.
Use the "view source" feature available in the browser which you are using,
You need to apply DOM concepts in order to iterate through the elements using javascript DOM API.

What you might be missing is the place holder for the '*'.
For this you have to create a 'DIV' element. Usually this can be created directly by having hutputText with "ID" attribute. Set the style for this 'DIV' element to 'display:none' initially.
Now in your onchange() / onBlur() function, you could have the function that sets the styple

Note - This can be done easily if you have consistent naming for the field values. A sample example is as below. You would have to replace the parameters appropriately if you plan to use this function below.

11 years ago
JSF
Actually it's not you who is creating that code.
I believe that code is being created by IBM's RAD.

The simplistic way of acheiving this is to wrap a Filter around the Faces servlet. Check for the URL, and if it's login page, then invalidate the existing session and create a new session.
11 years ago
JSF
Yes at my previous project, we tried to do include some of the components from Apache's "MyFaces" with the already existing components from IBM, then you are asking for lot of unwarranted issues...

It's not really worth because of some of the JAR incompatibilities that Myfaces needs with respect to the WebSphere Server Run time environment(assuming you are planning to run on WAS ).

I would suggest *not* to go with this path.

But rather you might want to wait a little bit for RAD 7 which is going to be released soon. It should be having most of the components and the good thing is they would be AJAX enabled.(read somewhere in the IBM's websphere forums) I hope it's really worth the wait for RAD 7.

Thanks,
11 years ago
JSF
>>> that's too much micromanaging for a framework, I think.

The framework needs to know on what data it has to work. And certainly the framework is not an work-flow based application. Even the work-flow based applications the application should be told whether to reuse the existing data or dispose of the old data to start working with the new data, and so on...

1] Do you have 2 buttons in the page, one for modifying the data and another for Saving the new user ? If yes, why not have 2 different action methods, the save method clearing of the session data.

2] You could also manage this thing in a Servlet Filter, if you know which action you are going to perform. But I would prefer approach 1] since everything will be handled at the JSF level.
12 years ago
JSF
Well, before we answer your question, which one do you think is the best approach ?
12 years ago
JSF
Take a look at the below link,it gives you an idea of how to get a handle on the FacesContext.

http://www.thoughtsabout.net/blog/archives/000033.html

P.S: I was going to try it out, but because of a change in the technical architecture, I didn't had the necessity to try it. Please let us know if the above idea worked out for you.
12 years ago
JSF
Shouldn't the <f:selectItem> be <f:selectItems> or that was also a typo ?
12 years ago
JSF
In <h:selectOneMenu id="menu1"
value ="#pc_MerchantSearchResults.recordsPerPage}">

you are missing the starting braces.

"#pc_MerchantSearchResults.recordsPerPage}" should be "#{pc_MerchantSearchResults.recordsPerPage}
12 years ago
JSF
Based on the code below:


you are going to show to the user the "order.jsp" jsp page.
This JSP page needs to interact with the managed bean.
Let's say you are displaying "order.jsp" as a table below.



Now you have the JSF Managed Bean declared as "jsf_mb_OrderDisplayBean" in the faces-config.xml corresponding to the class,let's say "com.javaranch.OrderDisplayBean"

This class has a method that "getOrders()" that will display the list of orders


In this method, you can use the code supplied by "Tim Holloway" or my code as below. The one given by "Tim" returns String[].



You ** DO NOT ** need to implement either the doGet() method or either the doPost() method.
12 years ago
JSF
JSF uses custom tag libraries, but is not just a custom tag library.
JSF offers many features like

1] It has a powerful lifecycle mechanism.(6 phases)

2] One can build custom components straight out of the java code.
No need to use the "custom tag library" components.

3] Custom renderers..

etc...
12 years ago
JSF
You need to provide <f:selectItems> for your list of check box items to appear.

<h: dataTable value="#{dataTable.all}" var="var" >
<h:selectManyCheckbox id="marked" value="#{vapreensoes.marked}">
<f:selectItem itemValue="var.id" />


<f:selectItems itemValue="#{vapreensoes.listOfResponses}" />


</h:selectManyCheckbox>

The #{vapreensoes.listOfResponses} is the value binding method that should return a SelectItems object or a List containing SelectItem object.



or

12 years ago
JSF
Some ways in which you could handle this.

1] First you could write a Servlet filter which would check if the user is already logged in. If not take the user to the login page.

2] The other option would be to use the JSF Navigation Handler mechanism.

An example is at this site.

http://www.jsftutorials.net/jsfNavigation/jsf-login-navigation-redirect.html
12 years ago
JSF
<h:commandButton id="ApagarSelecionados"image="resources/imagens/bt-apagar-selecionados.gif" action="#{manterEvento.excluir}" onKlick="excluir('form');" immediate="true"/>

What is the role of [immediate="true"] in this case ?

See whether this helps you.

http://radio.javaranch.com/gthought/2005/01/04/1104874993000.html
12 years ago
JSF