You need to sign in to do that
Don't have an account?
prakash chaudhary
must see it....
Hiiii
I am making information in tabular format..
When I put information with single goal then it shows in data proper but when i insert more than one goal then data comes like adding one cell next to previous one like
Goal1 Goal2 Equity1 Equity2 Debt1 Debt2 Gold1 Gold2
But I need it like this
Goal1 Equity1 Debt1 Gold1
Goal2 Equity2 Debt2 Gold2
Please tell me how can I do it since my value are from database...
My code is..
<apex:repeat id="hd" value="{!beanObj.goalList}" var="golObj"> <tr> <td class="textStyle" style="width:40px">{!golObj.Description__c}</td> <apex:repeat value="{!beanObj.sipList}" var="aseObj"> <apex:repeat value="{!aseObj.golListVals}" var="gObj"> <td class="textStyle" style="width:40px;text-align:right;"> <apex:outputText value="{0, number, ,##,##0}" > <apex:param value="{!gObj}"/> </apex:outputText> </td> </apex:repeat> </apex:repeat> <apex:repeat value="{!beanObj.totSIPList}" var="totObj"> <td class="textStyle" style="width:40px;text-align:right;"> <apex:outputText value="{0, number, ,##,##0}" > <apex:param value="{!totObj}"/> </apex:outputText> </td> </apex:repeat> <apex:repeat id="hd1" value="{!beanObj.asetList}" var="aseObj"> <apex:repeat value="{!aseObj.golListVals}" var="gObj"> <td class="textStyle" style="width:40px;text-align:right;"> <apex:outputText value="{0, number, ,##,##0}" > <apex:param value="{!gObj}"/> </apex:outputText> </td> </apex:repeat> </apex:repeat> <apex:repeat id="hd111" value="{!beanObj.totLumpSumList}" var="totObj"> <td class="textStyle" style="width:40px;text-align:right;"> <apex:outputText value="{0, number, ,##,##0}" > <apex:param value="{!totObj}"/> </apex:outputText> </td> </apex:repeat> </tr> </apex:repeat>
It appears that your loops are written wrong. Not only would they show up side by side, as you observed, multiple goals should cause the entire thing to explode in size. The problem is that you presumably think that tables are rendered from top to bottom, or that repeat tags within repeat tags execute only one item at a time for each iteration, both of which is untrue.
So... I'm honestly confused as to your final layout. I get that you have a list of SIPs, a total for each list, and an asset list, and a total lump sum list. The best I came up with is the following:
To get this design working, Indices should be a List<Integer>, populated with values from 0 to the size of your lists - 1. Make sure all your lists are the same size.
In the future, I'd recommend you write a wrapper class to make things look nicer.
I'm also not entirely sure this is going to look the way you want it to, but this is the best I can do with what I have to go on.
Hiiii plz see the image below...
http://yfrog.com/khwn5fp
I have Goal value in GoalList, SIP value in SIPList, total sip value in totSIPList, lumpsum value in LumpsumList so all have their own list so please tell me how can i make this type of table..
Since In my above code that show in first very well but the problem is after 1 row so please tell me how can i do that ?
Do not make this hard on yourself. While they may be sublists, there is no requirement that you implement them as lists in your code, and in fact it is making it only harder for you to complete your objectives. Instead, try something like this:
Although, the idea I posted earlier this morning should also work; it would require far less code modification than the example here.
The point of these examples is that you need to render from left to right, top to bottom (like a Z shape), and not top to bottom, left to right (like an inverted N shape). You don't need to make it any more difficult on yourself, and using lists to represent your data does just that.