Harpreet Parmar

Greenhorn
+ Follow
since Nov 10, 2010
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 Harpreet Parmar

Hi,

I am trying to give fileupload inside p:menuButton as a p:menuItem. I am able to upload the file but there are two "upload progress bars" appearing for each upload (single file upload). If I use p:fileUpload outside of p:menuButton then it is coming up fine.

Also the image for file upload is coming below the outputText. I want it to be displayed as image and then the text, in a single line.



Screen shot:



Any help is highly appreciated.
13 years ago
JSF
Thanks Cesar and Tim for your help.
I tried that "label" attribute and it works. But if I set it to a white space, a colon still appears, that doesn't look right. I want to remove it completely, is there any way to that?

Tim, can you please elaborate a little on your reply? I couldn't find validationMessage attribute on h:inputText. I am not very sure what you meant there. I am new to JSF.

Thanks
13 years ago
JSF
Hi,

I am using JSF 1.2 with Facelets. I use <h:message> to display error for each input field.
Whenever I get an error message for built-in kind of validations, an id gets appended to it. E.g. I have some Integer (Wrapper type) type of property in my backing bean and corresponding text box on my page, whenever user enters a value that is beyond the range of "int" or is not an "int", the error message that gets displayed is like:
"j_id50:j_id54:program_creditDueDate: 'ssd' must be a number between -2147483648 and 2147483647 Example: 9346"

This does not happen for manually defined validations using Hibernate Validator annotations like @Range, @Length.

I want to remove this component id part from the error message, how can I do that?

Thanks in advance.

13 years ago
JSF
Hi Tim,

I couldn't exactly get as how can I embed SelectOneRadio to the toolbar. sorry about that, I am new to JSF.

I tried to set the CSS class for the commandLink, programmatically.
I have now given IDs to my form and commandLink. So my xhtml page which contains this top level bar looks like:


On click of the commandLink on this top level navigation bar, the control goes to a results page that appears up under the bar. This results page is a different xhtml page that contains a rich:dataTable. This dataTable appears under this page. So what I want is that when this dataTable appears, the commandLink that opened this page should get highlighted so that user can clearly see on which page he is.

In the getter of this dataTable I have written following code:


And in the rich:dataTable tag, I have given reRender="navigation:user". In my css I have written:

When the toolBar appears, i can see the "userOld" class applied to the commandLink, the after clicking on it when the new page opens, the font remains the same i.e. the css doesnt seem to be getting applied.

One more thing I wanted to mention is that on the console i can see:
Earlier Style class:userOld
New Style class:userNew

If I click the button again, the same messages gets displayed on the console. shouldn't it display only "userNew" in both the lines, the second time I click the commandLink, because it should have been set to "userNew" on the first click?

Can someone please help?
13 years ago
JSF
Hi,

I have a xhtml page, with following code

This page defines top level navigation, the page corresponding to these links gets displayed when user clicks on the link.
My requirement is that I want to highlight the selected link (tab). This code is existing and i can not change it to use <rich:tabPanel>.

Can anyone help?
13 years ago
JSF
Hi,

I figured out the root cause for the problem. As I am using facelets in my application, in my web.xml the facelets.BUILD_BEFORE_RESTORE was set to true:




Changing it to false, solved the problem. There is no proper documentation available for this parameter, but looking for more info about it, I found many people complaining about it as it causes problems with Ajax. So I think the combination of Richfaces with this parameter set to "true" was the main problem.

But I have found that if this param is set to false, then if the session times out, a ViewSessionExpired exception gets thrown.

Is there anyone who have any similar scenario?
It will be great if someone can share any insights about this param.
13 years ago
JSF
Hi Shafik,

Yh thats a getter only, my bad. And it is returning the same number of rows on every click of any page number on dataScroller.

This is the code from FormActionsBean:


And this is the code from FormulaService (Using Hibernate here):


I am still stuck with this problem. Any help is highly appreciated.
13 years ago
JSF
Hi
Thanks for the replies. I tried putting <h:messages> and also <rich:messages>, but no error is displayed on the page.
I tried putting logs in the action method that returns the list to datatable, and it appears to be fine. There are currently 23 records in the list, and every time i click on any page number on the datascroller, the list returns exactly 23 results.

I tried the code given by Sumeet also but that also didnt work for me. I am using JSF 1.2 with Richfaces 3.3.3
I have tried using JSF 2.0 JARs also, still the problem persists.

Does anyone know anything else regarding this?

13 years ago
JSF
Hi,

I am trying to use <h:commandLink> inside <rich:dataTable> and I am using <rich:datascroller> for pagination.
first column in the dataTable is displayed using <h:commandLink>.
The problem I am facing is that on the first page of dataTable, the links are working fine and the action method is getting called on click of the link.
But on any of the other pages, when i click any of the commandLink, the action method doesnt get called and the first page gets rendered on the UI.
I have tried changing the scope of my bean from request to session. I even tried changing the <h:commandLink> to <a4j:commandLink>. The only difference that <a4j:commandLink> makes is that, now instead of rendering the first page, nothing happens on click of commandLink on any of those pages. The first page works fine with <a4j:commandLink> also.
I have also verified that I am not using any nested forms.

This is what the code looks like:


I need the resolution urgently. Any help is appreciated.

Thanks in advance.
13 years ago
JSF