Anand Gondhiya

Ranch Hand
+ Follow
since Feb 24, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Anand Gondhiya

Srini,


As We are using SelectManyListBox (as opposed to SelectOneListBox) so Did you mean String[] OrgType instead of String OrgType ? I tried using that it works as expected and fine now !!!

This was a fun exercise. And thanks again for working with me !

Also , I am using complete Reference Java Server Faces book , if you know any good book for intermediate level , please let me know.

have fun !
- Anand
15 years ago
JSF
Thanks for your reply.

I think I am doign similar to what you are mentioning but still missign the key part.

Can you please tell me what's the datatype of MainMenuBean.organizations property ?



Ans: The array list organizations is populated with 'OrgBean' a class which has orgTypeid and orgtypedesc properties.

6. Iterate the updated arraylist to get to know the orgSelected property for each row.



But which variable in the backing bean will be holding the selected values ? is it organizations ??




Is it possible that you write some code , or may be c hange above code just so that I can understand your steps more clearly ??

Thanks again !
- Anand
15 years ago
JSF
Hi All,

I have following code

details:
* This page creates n number of dropdown menus.
* MainMenuBean is backing bean specified in faces-config.xml and OrgBean is part of MainMenuBean
* MainMenuBean's getOrganizations() method returns a List of OrgBeans. So 'orgBean' is a object of class OrgBean.

My questions is : when I make selections in all these dropdown menus , how do I retrieve them ?
If I had followign code , I know that OrgBean's data1 attribute is holding the value. but in this case it's all dynamic so How do I get those values ?

Thanks in advance
- Anand
15 years ago
JSF
Hi All,

I am trying to include a external stylesheet file in the JSF page. But It is not applying any styles. can anyone give any ideas ?

Thanks
- Anand

15 years ago
JSF
Hi Everyone,

I am new to JSF. I was able to create UI components such as dropdown menu, text area and text box, radio button etc. However i am having a trouble with drop down menu which allows multiple item selection. I am using <h:SelectManyListbox> tag for that. Here is the code in JavaBean and JSP:

Problem Descritption: When I load the JSP for the first time, I renders the multiple dropdown menu fine. The problem is when I try to navigate to other pages , It shows error in logs:

sourceId=createForm:Etiology[severity=(ERROR 2), summary=(createForm:Etiology: An error occurred when processing your submitted information. ), detail=(createForm:Etiology: An error occurred when processing your submitted information. )]



Code in JSP:



Entry in faces-config.xml



can someone guide me what am I doign wrong. I unfortunately couldn't find any working examples on the web which shows the usage of this UI Component.

Thanks everyone
- Anand
15 years ago
JSF
Hi,
I have following code:

All the examples I see on web or in the books says that when you hit on 'Register' button with no data entered in firstName text field , It would throw error right beside it. The error would read Validation Error: Value is required . But when submit above page, it shows j_id_jsp_172425500_1:fname: Validation Error: Value is required.. i.e it shows the generated code j_id_jsp_172425500_1:fname: as well !!
Has anybody come across such a sceneario. I am using JSF 1.2,JSTL 1.2 , Tomcat 6 , JDK 1.6

Thanks
-Anand
15 years ago
JSF
My form was missing ending tag </title> . now it is showing fine !

thanks
-Anand
15 years ago
JSF
Hello,

I am seeing strange behaviour with JSF when I switch between browsers IE 8 and Firefox 3.5. Both samples of code given below work fine in Firefox 3.5 but for IE 8 , 2nd sample fails.

page #1 has following code which works in IE 8 :



When you click on the link it takes to you page # 2. But this page doesn't display in IE 8. I did view source and I see that it has rendered all the HTML elements from JSF UI components. Any ideas ?? Thanks !



Thanks
- Anand
15 years ago
JSF
Hi,

I wrote following code but it still is showing the special characters. any more ideas ?




- Anand
Ulf,

I figured out that If I open the input.xml in Firefox , I can see the bullets. If I open the file in IE , IE won't let me change the encoding but with view source , I can see bullets.
in short , now I know the input file is correct and I can see them correctly.

Also , I wrote following code in Java to convert the text of input.xml to output.xml



If I open the output.xml in firefox , it DOESN"T show the bullets. If I open it in IE and do view source , it doesn't show bullets there as well. So my challenge is to convert the text into UTF-8 format using java in correct way.

this is really getting interesting. let me know if you have inputs. Thanks for your post !!

- Anand
Hi All,

1. following is the text from XML file which is supposed to be read using UTF-8. So I brought it up in IE to view. I tried to change the encoding to UTF-8 so that I can see bulllets instead of the weird characters like •. Am I doing the right thing / right way ?

It is expected that the incumbent meets the following selection criteria:

• A postgraduate degree, preferably Ph.D, in a relevant field such as economics, trade, competitiveness, industrial organization, private sector development. A multi-disciplinary background is an advantage.

• At least 12 years (15 with Master’s degree) relevant experience in trade and competitiveness.



2. Above text is part of CDATA section. As mentiioned above, with UTF-8 format these weird characters actually represent bullets. My java code reads this and copies the CDATA section with <!CDATA[ word and writes it to the output XML file. When I write to the output file , I convert the strings to UTF-8 expecting that the output file will show bulllets as it's already converted into UTF-8.

can anyone comment what am I doing wrong here ? I don't see bullets when I bring up the input file or output file.

Thanks
-Anand>
Thanks everyone. code below worked for me.





I am using JDK 1.4 , RAD 7.0 and Webshere Application server 6.1.

I have a dataSource 'CRDWebDataSource' set up in admin console. And with this DataSource , I have used JAAS ( J2C Connection). When I test the DataSource , it works fine.

Now , I have following line of code in Java class


When I run the application ,it ignores the userid/password values getConnection() function and always considers in J2C authentication.

in WSAD 5.1 , I had set up datasource which considers userid/pwd in getConnection().

Please advise.
thanks
-Anand
17 years ago
Looks like there was one jar file changed in the project. This jar file came from Business Object and was built using JDK 1.4. My project was built using JDK 1.3

As JDK version was diffrent in this jar file and my project , it gave errors and generated only 3 class files for some reason.

for those with this problem, you can force WSAD 5.1 to use JDK 1.4 version. by setting up JDK 1.4 jars in library.

Thanks everyone for helping me out.
-Anand.
17 years ago