?
Solved

For loops, while loops and conditional statements in JSF

Posted on 2005-05-17
10
Medium Priority
?
3,234 Views
Last Modified: 2008-01-26
Hi All,

How can i perform these operations in JSF View Pages

Thanks
Sudhakar
0
Comment
Question by:sudhakar_koundinya
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 13

Expert Comment

by:petmagdy
ID: 14017115
Hi sudhakar_koundinya,

if I know JSF I would be richer than objects ;)

Good Luck
0
 
LVL 35

Assisted Solution

by:TimYates
TimYates earned 80 total points
ID: 14017120
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 14017197
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 14017264
I have tried with JSTL also. But no use

FYI, I am using Creator for desigining pages

Sudhakar



0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 14017302
>>if I know JSF I would be richer than objects ;)


aozarov is in the way. He is also same as of you. Always in hunt of points :-)

Good involvement from both of you in this disccusion board

Regards
Sudhakar
0
 
LVL 35

Expert Comment

by:TimYates
ID: 14017330
>>  I have tried with JSTL also. But no use

Doh!  Ignore my comment in the other question too then ;-)

Sorry...I have no idea...hopefully someone else will...

It's not because you are trying to repeatedly use the same property is it?  Is there a restriction on the number of times a property can appear in a page?

Would this work if you had an array of booleans, and tried to tie checkboxes to the elements in the array?

I don't know :-(

Sorry...

Good luck!

Tim
0
 
LVL 28

Accepted Solution

by:
rrz earned 280 total points
ID: 14018921
0
 
LVL 28

Assisted Solution

by:rrz
rrz earned 280 total points
ID: 14019025
>and conditional statements in JSF  
There is the rendered attribute.   For example,
<h:commandLink action="SomeAction"
                          rendered="#{myBean.myProperty}">
The link will be rendered if myProperty returns true.
0
 
LVL 4

Assisted Solution

by:ShannonE
ShannonE earned 140 total points
ID: 14020215
Not sure if this is what you're asking but when I used Creator I put the for/while statements in the event handler code, for example:

protected void beforeRenderResponse() {
       textSendMsg.setValue("");
       ApplicationBean1 b = this.getApplicationBean1();
       ArrayList ar = b.getMessages();
       String s = "";
       Iterator it = ar.iterator();
       while (it.hasNext()) {    
            s = s + ((String)it.next() + "\n");
       }
       textChatArea.setValue(s);
       
    }
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 14020692
Atlast I get some good grip on JSF. I think ;-)

Now I can handle JSF
  1. with  Normal JSPs
  2. with JSTL
  3. with struts
  4. and ofcourse without using above 3

May be I will post complicated. But not silly queries that I have posted for last 2 two days

Regards
Sudhakar
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month16 days, 8 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question