Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Empty data
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
marceloudi  
View profile  
 More options Apr 4 2012, 9:41 pm
From: marceloudi <marcelob...@gmail.com>
Date: Wed, 4 Apr 2012 18:41:16 -0700 (PDT)
Local: Wed, Apr 4 2012 9:41 pm
Subject: Empty data
Hi all!
I just receiving an empty reponse from code.

What I'm doing wrong???

<html>
<head>
  <title>PURE Unobtrusive Rendering Engine</title>
  <script src="libs/jquery.js"></script>
  <script src="libs/pure.js"></script>
</head>
<body>

<div id="container">
        <div>
        <fieldset id="fscustomer">
                <legend id="lggcustomer"></legend>
                <table id="tbemployee">
                <tbody>
                        <tr id="tremployee">
                                <td id="tdempname">Employee Name</td>
                                <td id="tdeventcontainer">
                                        <table id="tbevent">
                                        <tr id="trevent">
                                                <td id="tddate">Date:<input class="date" value="" name=""></td>
                                                <td id="tdend">End:<input class="end" value="" name=""></td>
                                                <td id="tdobs">Obs:<textarea class="obs" name=""></textarea></
td>
                                        </tr>
                                        </table>
                                </td>
                        </tr>
                </tbody>
                </table>
        </fieldset>
        </div>
</div>

<script>
var ex06 = {

        data:{
                "Customers": [
                        {
                                "name":"Customer 1"
                                ,"personid":"9999"
                                ,"Employees": [
                                        {
                                                "name": "Marcelo"
                                                ,"Events": [
                                                        {"eventid": "1", "eventtype": "1", "date":
"01/12/2011","end":"15/12/2012","obs":"free text1"}
                                                        ,{"eventid": "1", "eventtype": "1", "date":
"01/12/2011","end":"15/12/2012","obs":"free text2"}
                                                ]
                                        }
                                        ,{
                                                "name": "Mic"
                                                ,"Events": [
                                                        {"eventid": "1", "eventtype": "1", "date":
"01/12/2011","end":"15/12/2012","obs":"free text3"}
                                                        ,{"eventid": "1", "eventtype": "1", "date":
"01/12/2011","end":"15/12/2012","obs":"free text4"}
                                                ]
                                        }
                                ]
                        }
                ]
        },
        directive:{
                "#fscustomer" : {
                        'customer <- Customers':{
                                '#tbemployee #tremployee': {
                                        'employee <- Employees': {
                                                '#tbemployee #tremployee #tdempname' : 'employee.name',
                                                '#tbemployee #tremployee #tdeventcontainer #trevent': {
                                                        //'#tbemployee #tremployee #tdeventcontainer #tbevent
#trevent': {
                                                                'event <- Events': {
                                                                        '#tbemployee #tremployee #tdeventcontainer #trevent #tddate':
function(){return 'test1'},
                                                                        '#tbemployee #tremployee #tdeventcontainer #trevent #tdend':
function(){return 'test1'},
                                                                        '#tbemployee #tremployee #tdeventcontainer #trevent #tdobs':
function(){return 'test1'}
                                                                }
                                                        //}
                                                }
                                        }
                                }
                        }
                }
        }

};

$p('#container').render(ex06.data, ex06.directive);

</script>

</body>
</html>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marceloudi  
View profile  
 More options Apr 4 2012, 11:38 pm
From: marceloudi <marcelob...@gmail.com>
Date: Wed, 4 Apr 2012 20:38:42 -0700 (PDT)
Local: Wed, Apr 4 2012 11:38 pm
Subject: Re: Empty data
I'm just trying to repeat a higher level (above its first TR).
I followed https://github.com/pure/pure/blob/master/js/examples.js
this example, and rear a lot about,
but I dont find a way do it.

I have success in many others ways, but I'm not finding what's wrong.
Is PURE capable to do it?

Thanks

Marcelo
PS: you made a really brilliant job! Im studying to reach your
knowledge! 8D

On 4 abr, 22:41, marceloudi <marcelob...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mic (BeeBole)  
View profile  
 More options Apr 6 2012, 6:27 pm
From: "Mic (BeeBole)" <tch...@gmail.com>
Date: Fri, 6 Apr 2012 15:27:53 -0700 (PDT)
Local: Fri, Apr 6 2012 6:27 pm
Subject: Re: Empty data
Hello Marcelo,

Here's how I would do it instead:
https://gist.github.com/2323464

Some remarks:

** do not use id's inside your templates. An id must be unique, if you
repeat a TR, they will have all the same id.
The same apply if you re-use a template various times in the same
page.
** you did not add the properties for the loop in the directives eg:
customer.Employees, instead of Employees
** I've simplified both the HTML and the directive, there were too
many useless selectors and id's

On Apr 5, 5:38 am, marceloudi <marcelob...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »