joshbirk / onestarter

A jQuery plugin for easily making HTML appear in the style of Salesforce1
BSD 3-Clause "New" or "Revised" License
46 stars 15 forks source link

<apex:repeat> breaks styles for <div id="related-list" /> #3

Closed Opopanax closed 10 years ago

Opopanax commented 10 years ago

Using the example provided in the OneStarter page, I'm trying to build a related list look and feel with a list of records. I'm iterating over the component.

Apex Repeat prevents the styles from being applied. Removing and hardcoding values does allow the page to be stylized correctly. Here's an example of code using Apex Repeat (I leave out Div for one-app). It also contains the "hard coded" example which only renders properly if the apex:repeat section is commented out. I've tried different placement of the apex:repeat tag and does not appear to make a difference.

joshbirk commented 10 years ago

I'll test it out. Can you get a gist together with a more complete example?

joshbirk commented 10 years ago

This works for me off an accounts recordset var, so maybe with a gist I can see what might be more specific. Is this off a re-render or anything post load?

<article >
              <apex:repeat var="a" value="{!accounts}">
                <div id="detail-example">               
                    <section class="padded">
                    <div class="icon icon-right icon-float-right icon--account"></div>
                            <h1 class="simple-bold">
                                {!a.Name}
                            </h1>
                      <ul class="list-plain">
                        <li >{!a.BillingCity}, {!a.BillingState}</li>
                        <li >{!a.Phone}</li>
                      </ul>
                    </section>
                </div>       
                </apex:repeat>
                </article>
Opopanax commented 10 years ago

Here's the gist: https://gist.github.com/Opopanax/3d0e5fab43fffd871f00

Code should look vaguely familiar :)

I'm using this with

joshbirk commented 10 years ago

I'm thinking the server side redirect may be the real culprit. I'll test down that angle.

joshbirk commented 10 years ago

We think we got this with the other issue - closing, but let me know if I'm wrong