You need to sign in to do that
Don't have an account?
leepoo biswal
why i am getting this kind of out put????
<apex:page controller="task2" >
<apex:form>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:dataTable value="{!s}" var="aa" >
<apex:column value="{!aa}" />
</apex:dataTable>
<apex:pageBlockTable value="{!sdisplay}" var="vv">
<apex:column >
<apex:outputText value="{!vv}"/>
<! when its {!vv} it shows a0
b1
c2
but when ipu {!sdisplay} the out put is a0,b1,c3
a0,b1,c3
a0,b1,c3 !>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
***************************************************************
public class task2 {
public list<string> s{set;get;}
public list<string> sdisplay{set;get;}
public integer i{set;get;}
public task2(){
s=new list<string>();
sdisplay = new list<string>();
s.add('a');
s.add('b');
s.add('c');
i=0;
for(string ss:s){
sdisplay.add(ss+i);
i++; }
}
}
<apex:form>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:dataTable value="{!s}" var="aa" >
<apex:column value="{!aa}" />
</apex:dataTable>
<apex:pageBlockTable value="{!sdisplay}" var="vv">
<apex:column >
<apex:outputText value="{!vv}"/>
<! when its {!vv} it shows a0
b1
c2
but when ipu {!sdisplay} the out put is a0,b1,c3
a0,b1,c3
a0,b1,c3 !>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
***************************************************************
public class task2 {
public list<string> s{set;get;}
public list<string> sdisplay{set;get;}
public integer i{set;get;}
public task2(){
s=new list<string>();
sdisplay = new list<string>();
s.add('a');
s.add('b');
s.add('c');
i=0;
for(string ss:s){
sdisplay.add(ss+i);
i++; }
}
}
Saravanan Gengan 9
yes because sdisplay size is 3 with the values [a0, b1, c2]. It loops 3 times with same values.
Saravanan Gengan 9
A list of data displayed as a table within either an < apex:pageBlock > or < apex:pageBlockSection > component, similar to a related list or list view in a standard Salesforce page. Like an < apex:dataTable >, an < apex:pageBlockTable > is defined by iterating over a set of data, displaying information about one item of data per row. The set of data can contain up to 1,000 items, or 10,000 items when the page is executed in read-only mode.