Chrome Console: Error executing AG.js: ReferenceError: e is not defined

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Chrome Console: Error executing AG.js: ReferenceError: e is not defined

rexbroo

I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:

Error executing AG.js: ReferenceError: e is not defined

The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected.

The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports

@Entity
@Table(name = "element")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
    , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
    , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
    ... )})
public class Element implements Serializable {

I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.

Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says 

test.js was run

Any help or suggestions would be appreciated.

Thanks,
Rex

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 

Virus-free. www.avast.com
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

Simon Roberts
There is no Java in your .js file. That's JavaScript. Totally different language. You're looking in entirely the wrong direction :)


On Thu, Nov 9, 2017 at 11:14 AM, rexbroo <[hidden email]> wrote:

I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:

Error executing AG.js: ReferenceError: e is not defined

The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected.

The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports

@Entity
@Table(name = "element")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
    , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
    , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
    ... )})
public class Element implements Serializable {

I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.

Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says 

test.js was run

Any help or suggestions would be appreciated.

Thanks,
Rex

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: <a href="tel:(510)%20898-0670" value="+15108980670" target="_blank">510-898-0670 

Virus-free. www.avast.com



--
Simon Roberts
http://dancingcloudphotography.com
(303) 249 3613
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

rexbroo

The AG.js error is what I'm seeing in the Chrome Developer Tools Console. I don't know where it comes into play. I'm trying to understand why Chrome is telling me that e is not defined. When I compare my entity class to others that do run and display correctly, I'm not seeing a difference except in the names of the tables they're based on and the variable initial itself.

I'm stumped. But thanks for at least looking.

Rex


On 11/9/2017 10:25 AM, Simon Roberts wrote:
There is no Java in your .js file. That's JavaScript. Totally different language. You're looking in entirely the wrong direction :)


On Thu, Nov 9, 2017 at 11:14 AM, rexbroo <[hidden email]> wrote:

I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:

Error executing AG.js: ReferenceError: e is not defined

The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected.

The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports

@Entity
@Table(name = "element")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
    , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
    , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
    ... )})
public class Element implements Serializable {

I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.

Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says 

test.js was run

Any help or suggestions would be appreciated.

Thanks,
Rex

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: <a href="tel:%28510%29%20898-0670" value="+15108980670" target="_blank" moz-do-not-send="true">510-898-0670 

Virus-free. www.avast.com



--
Simon Roberts
http://dancingcloudphotography.com
(303) 249 3613

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

geertjan.wielenga@oracle.com
So use those that do work correctly first.

Gj

Sent from my iPhone

On 9 Nov 2017, at 20:19, rexbroo <[hidden email]> wrote:

The AG.js error is what I'm seeing in the Chrome Developer Tools Console. I don't know where it comes into play. I'm trying to understand why Chrome is telling me that e is not defined. When I compare my entity class to others that do run and display correctly, I'm not seeing a difference except in the names of the tables they're based on and the variable initial itself.

I'm stumped. But thanks for at least looking.

Rex


On 11/9/2017 10:25 AM, Simon Roberts wrote:
There is no Java in your .js file. That's JavaScript. Totally different language. You're looking in entirely the wrong direction :)


On Thu, Nov 9, 2017 at 11:14 AM, rexbroo <[hidden email]> wrote:

I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:

Error executing AG.js: ReferenceError: e is not defined

The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected.

The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports

@Entity
@Table(name = "element")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
    , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
    , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
    ... )})
public class Element implements Serializable {

I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.

Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says 

test.js was run

Any help or suggestions would be appreciated.

Thanks,
Rex

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: <a href="tel:%28510%29%20898-0670" value="+15108980670" target="_blank" moz-do-not-send="true">510-898-0670 

Virus-free. www.avast.com



--
Simon Roberts
http://dancingcloudphotography.com
(303) 249 3613

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

rexbroo
In reply to this post by rexbroo

I neglected to say that I am not dealing with the AG.js file. That is something the Google Chrome browser is apparently running against the jsp page and the underlying entity class and the database it is connected to. This is all the information I have to try and track down why the element rows in my table are not being processed/displayed. Sorry if I'm unclear. Novice.


On 11/9/2017 11:19 AM, rexbroo wrote:

The AG.js error is what I'm seeing in the Chrome Developer Tools Console. I don't know where it comes into play. I'm trying to understand why Chrome is telling me that e is not defined. When I compare my entity class to others that do run and display correctly, I'm not seeing a difference except in the names of the tables they're based on and the variable initial itself.

I'm stumped. But thanks for at least looking.

Rex


On 11/9/2017 10:25 AM, Simon Roberts wrote:
There is no Java in your .js file. That's JavaScript. Totally different language. You're looking in entirely the wrong direction :)


On Thu, Nov 9, 2017 at 11:14 AM, rexbroo <[hidden email]> wrote:

I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:

Error executing AG.js: ReferenceError: e is not defined

The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected.

The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports

@Entity
@Table(name = "element")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
    , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
    , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
    ... )})
public class Element implements Serializable {

I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.

Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says 

test.js was run

Any help or suggestions would be appreciated.

Thanks,
Rex

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: <a href="tel:%28510%29%20898-0670" value="+15108980670" target="_blank" moz-do-not-send="true">510-898-0670 

Virus-free. www.avast.com



--
Simon Roberts
http://dancingcloudphotography.com
(303) 249 3613

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

rexbroo
In reply to this post by geertjan.wielenga@oracle.com

Unfortunately the Element db table is the critical table for the whole program since that is where the program goes to pull up the elements (records) for the elementTable for each of the 4 major data category pages. It functions the way that the Product table does in the E-Commerce Tutorial. I'll keep wrestling with it.

Rex

On 11/9/2017 11:22 AM, Geertjan Wielenga wrote:
So use those that do work correctly first.

Gj

Sent from my iPhone

On 9 Nov 2017, at 20:19, rexbroo <[hidden email]> wrote:

The AG.js error is what I'm seeing in the Chrome Developer Tools Console. I don't know where it comes into play. I'm trying to understand why Chrome is telling me that e is not defined. When I compare my entity class to others that do run and display correctly, I'm not seeing a difference except in the names of the tables they're based on and the variable initial itself.

I'm stumped. But thanks for at least looking.

Rex


On 11/9/2017 10:25 AM, Simon Roberts wrote:
There is no Java in your .js file. That's JavaScript. Totally different language. You're looking in entirely the wrong direction :)


On Thu, Nov 9, 2017 at 11:14 AM, rexbroo <[hidden email]> wrote:

I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:

Error executing AG.js: ReferenceError: e is not defined

The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected.

The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports

@Entity
@Table(name = "element")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
    , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
    , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
    ... )})
public class Element implements Serializable {

I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.

Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says 

test.js was run

Any help or suggestions would be appreciated.

Thanks,
Rex

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: <a href="tel:%28510%29%20898-0670" value="+15108980670" target="_blank" moz-do-not-send="true">510-898-0670 

Virus-free. www.avast.com



--
Simon Roberts
http://dancingcloudphotography.com
(303) 249 3613

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

rexbroo

I redid my entire E-commerce tutorial unit 7 adaptation for entity classes and session beans very carefully, but ended with the same result. For some reason, as yet to be determined, the program ignores the code block within the tables of the data category pages.

As near as I can tell the code matches up to the example of the tutorial. I checked and it doesn't appear that "element" is a reserved word in java or mysql, but the element db table is being ignored as opposed to the way that NetBeans and Google handle the "product' table in the tutorial.

This is true for the ControllerServlet.java, Element.java entity class, and category.jsp files.

When I debug category.jsp with a breakpoint at the <table id-"elementTable" class="smallText"> line, the program next processes the <c:forEach var="element" items="${categoryElements}" varStatus="iter"> line but then drops through to the </c:forEach> line followed by the </table> line, ignoring the code in between.

In the Elements tab of the Chrome DevTools the table tags enclose empty quotes "   " with a couple of empty lines in between. This is the same on both the Mac and Windows boxes.

Seriously cross-eyed but still determined. Any suggestions welcome.

Rex


On 11/9/2017 1:25 PM, rexbroo wrote:

Unfortunately the Element db table is the critical table for the whole program since that is where the program goes to pull up the elements (records) for the elementTable for each of the 4 major data category pages. It functions the way that the Product table does in the E-Commerce Tutorial. I'll keep wrestling with it.

Rex

On 11/9/2017 11:22 AM, Geertjan Wielenga wrote:
So use those that do work correctly first.

Gj

Sent from my iPhone

On 9 Nov 2017, at 20:19, rexbroo <[hidden email]> wrote:

The AG.js error is what I'm seeing in the Chrome Developer Tools Console. I don't know where it comes into play. I'm trying to understand why Chrome is telling me that e is not defined. When I compare my entity class to others that do run and display correctly, I'm not seeing a difference except in the names of the tables they're based on and the variable initial itself.

I'm stumped. But thanks for at least looking.

Rex


On 11/9/2017 10:25 AM, Simon Roberts wrote:
There is no Java in your .js file. That's JavaScript. Totally different language. You're looking in entirely the wrong direction :)


On Thu, Nov 9, 2017 at 11:14 AM, rexbroo <[hidden email]> wrote:

I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:

Error executing AG.js: ReferenceError: e is not defined

The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected.

The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports

@Entity
@Table(name = "element")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
    , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
    , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
    ... )})
public class Element implements Serializable {

I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.

Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says 

test.js was run

Any help or suggestions would be appreciated.

Thanks,
Rex

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: <a href="tel:%28510%29%20898-0670" value="+15108980670" target="_blank" moz-do-not-send="true">510-898-0670 

Virus-free. www.avast.com



--
Simon Roberts
http://dancingcloudphotography.com
(303) 249 3613

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 

-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

geertjan.wielenga@oracle.com

So what is the “code in between” that is being ignored?

How can anyone help without knowing the specific piece of code you’re talking about?

Gj

> On 13 Nov 2017, at 22:13, rexbroo <[hidden email]> wrote:
>
> I redid my entire E-commerce tutorial unit 7 adaptation for entity classes and session beans very carefully, but ended with the same result. For some reason, as yet to be determined, the program ignores the code block within the tables of the data category pages.
>
> As near as I can tell the code matches up to the example of the tutorial. I checked and it doesn't appear that "element" is a reserved word in java or mysql, but the element db table is being ignored as opposed to the way that NetBeans and Google handle the "product' table in the tutorial.
>
> This is true for the ControllerServlet.java, Element.java entity class, and category.jsp files.
>
> When I debug category.jsp with a breakpoint at the <table id-"elementTable" class="smallText"> line, the program next processes the <c:forEach var="element" items="${categoryElements}" varStatus="iter"> line but then drops through to the </c:forEach> line followed by the </table> line, ignoring the code in between.
>
> In the Elements tab of the Chrome DevTools the table tags enclose empty quotes "   " with a couple of empty lines in between. This is the same on both the Mac and Windows boxes.
>
> Seriously cross-eyed but still determined. Any suggestions welcome.
>
> Rex
>
> On 11/9/2017 1:25 PM, rexbroo wrote:
>> Unfortunately the Element db table is the critical table for the whole program since that is where the program goes to pull up the elements (records) for the elementTable for each of the 4 major data category pages. It functions the way that the Product table does in the E-Commerce Tutorial. I'll keep wrestling with it.
>>
>> Rex
>> On 11/9/2017 11:22 AM, Geertjan Wielenga wrote:
>>> So use those that do work correctly first.
>>>
>>> Gj
>>>
>>> Sent from my iPhone
>>>
>>> On 9 Nov 2017, at 20:19, rexbroo <[hidden email]> wrote:
>>>
>>>> The AG.js error is what I'm seeing in the Chrome Developer Tools Console. I don't know where it comes into play. I'm trying to understand why Chrome is telling me that e is not defined. When I compare my entity class to others that do run and display correctly, I'm not seeing a difference except in the names of the tables they're based on and the variable initial itself.
>>>>
>>>> I'm stumped. But thanks for at least looking.
>>>>
>>>> Rex
>>>>
>>>> On 11/9/2017 10:25 AM, Simon Roberts wrote:
>>>>> There is no Java in your .js file. That's JavaScript. Totally different language. You're looking in entirely the wrong direction :)
>>>>>
>>>>>
>>>>> On Thu, Nov 9, 2017 at 11:14 AM, rexbroo <[hidden email]> wrote:
>>>>> I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:
>>>>>
>>>>> Error executing AG.js: ReferenceError: e is not defined
>>>>>
>>>>> The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected.
>>>>>
>>>>> The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports
>>>>>
>>>>> @Entity
>>>>> @Table(name = "element")
>>>>> @XmlRootElement
>>>>> @NamedQueries({
>>>>>     @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
>>>>>     , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
>>>>>     , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
>>>>>     ... )})
>>>>> public class Element implements Serializable {
>>>>>
>>>>> I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.
>>>>>
>>>>> Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says  
>>>>>
>>>>> test.js was run
>>>>> Any help or suggestions would be appreciated.
>>>>>
>>>>> Thanks,
>>>>> Rex
>>>>>
>>>>>  
>>>>> --
>>>>> Rex Brooks
>>>>> Starbourne Communications Design
>>>>> Email:
>>>>> [hidden email]
>>>>>
>>>>> GeoAddress:
>>>>> 1361 Addison St. Apt. A
>>>>> Berkeley, CA 94702
>>>>> Phone:
>>>>> 510-898-0670
>>>>>
>>>>> Virus-free. www.avast.com
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Simon Roberts
>>>>> http://dancingcloudphotography.com
>>>>> (303) 249 3613
>>>>
>>>> --
>>>> Rex Brooks
>>>> Starbourne Communications Design
>>>> Email:
>>>> [hidden email]
>>>>
>>>> GeoAddress:
>>>> 1361 Addison St. Apt. A
>>>> Berkeley, CA 94702
>>>> Phone: 510-898-0670
>>>>
>>
>> --
>> Rex Brooks
>> Starbourne Communications Design
>> Email:
>> [hidden email]
>>
>> GeoAddress:
>> 1361 Addison St. Apt. A
>> Berkeley, CA 94702
>> Phone: 510-898-0670
>>
>
> --
> Rex Brooks
> Starbourne Communications Design
> Email:
> [hidden email]
>
> GeoAddress:
> 1361 Addison St. Apt. A
> Berkeley, CA 94702
> Phone: 510-898-0670
>

Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

rexbroo

The code in between is the code for each row of the table in the category.jsp file.:

                <table id="elementTable" class="smallText">
                   
                    <c:forEach var="element" items="${categoryElements}" varStatus="iter">
                  
                        <tr class="${((iter.index % 2) == 0) ? 'lightBlue' : 'white'}">
                            <td>
                                <input type="checkbox" name="start">start
                            </td>
                            <td>
                                &nbsp;&nbsp;element:<br>
                                &nbsp;&nbsp; ${element.name}
                                <c:choose>
                                    <c:when test="${element.required == 1}">
                                         *
                                    </c:when>
                                    <c:otherwise>&nbsp;&nbsp;
                                    </c:otherwise>
                                </c:choose>
                                &nbsp;&nbsp;
                            </td>
                            <td>
                                <div id="elementInput">
                                   
                                    <c:choose>
                                    <%--<c:when test="${element.datatype == ENUM}">
                                           
                                                //script to retrieve values from ENUM datatype of selectedElement
                                                ${ENUM(values) = select(options)}
                                                //to populate drop-down list
                                                <span class="smallText">
                                                    Select&nbsp; ${element.name}
                                                    <select name="selectedElement" id="element.id">
                                                        <option value=""></option>
                                                        <co:forEach items="${element}" var="value">
                                                           <option>${value}</option>
                                                        </co:forEach>
                                                        </>
                                                    </select>--%>
                                                       
                                        <c:when test="${element.name == 'status'}">
                                            Select&nbsp; status
                                                <select name="status">
                                                    <option>Actual</option>
                                                    <option>Exercise</option>
                                                    <option>System</option>
                                                    <option>Test</option>
                                                    <option>Draft</option>
                                                </select>
                                           
                                        </c:when>
                                        <c:when test="${element.name == 'msgType'}">
                                            Select&nbsp; msgType
                                                <select name="msgType">
                                                    <option>Alert</option>
                                                    <option>Update</option>
                                                    <option>Cancel</option>
                                                    <option>Ack</option>
                                                    <option>Error</option>
                                                </select>
                                           
                                        </c:when>
                                        <c:when test="${element.name == 'scope'}">
                                            Select&nbsp; scope
                                                <select name="scope">
                                                    <option>Public</option>
                                                    <option>Restricted</option>
                                                    <option>Private</option>
                                                </select>
                                           
                                        </c:when>
                                        <c:when test="${element.name == 'category'}">
                                            Select&nbsp; category
                                                <select name="category">
                                                    <option>Geo</option>
                                                    <option>Met</option>
                                                    <option>Safety</option>
                                                    <option>Security</option>
                                                    <option>Rescue</option>
                                                    <option>Fire</option>
                                                    <option>Health</option>
                                                    <option>Env</option>
                                                    <option>Transport</option>
                                                    <option>Infra</option>
                                                    <option>CBRNE</option>
                                                    <option>Other</option>
                                                </select>
                                           
                                        </c:when>
                                        <c:when test="${element.name == 'responseType'}">
                                            Select&nbsp; responseType
                                                <select name="responseType">
                                                    <option>Shelter</option>
                                                    <option>Evacuate</option>
                                                    <option>Prepare</option>
                                                    <option>Execute</option>
                                                    <option>Avoid</option>
                                                    <option>Monitor</option>
                                                    <option>Assess</option>
                                                    <option>AllClear</option>
                                                    <option>None</option>
                                                </select>
                                           
                                        </c:when>
                                        <c:when test="${element.name == 'urgency'}">
                                            Select&nbsp; urgency
                                                <select name="urgency">
                                                    <option>Immediate</option>
                                                    <option>Expected</option>
                                                    <option>Future</option>
                                                    <option>Past</option>
                                                    <option>Unknown</option>
                                                </select>
                                           
                                        </c:when>
                                        <c:when test="${element.name == 'severity'}">
                                            Select&nbsp; severity
                                                <select name="severity">
                                                    <option>Extreme</option>
                                                    <option>Severe</option>
                                                    <option>Moderate</option>
                                                    <option>Minor</option>
                                                    <option>Unknown</option>
                                                </select>
                                           
                                        </c:when>
                                        <c:when test="${element.name == 'certainty'}">
                                            Select&nbsp; certainty
                                                <select name="certainty">
                                                    <option>Observed</option>
                                                    <option>Likely</option>
                                                    <option>Possible</option>
                                                    <option>Unlikely</option>
                                                    <option>Unknown</option>
                                                </select>
                                       
                                        </c:when>
                                            <c:otherwise>
                                                <c:choose>
                                                    <c:when test="${element.datatype_size < 49}">
                                                        <span class="smallText">Enter ${element.name} value
                                                            <input type="text" name="elementValue" value="" size="25" />
                                                        </span>
                                                    </c:when>
                                            <c:otherwise>
                                                <span class="smallText">Enter ${element.name} value
                                                    <textarea name="elementValue" rows="3" cols="25">
                                                    </textarea>
                                                </span>
                                            </c:otherwise>
                                        </c:choose>
                                    </c:otherwise>
                                </c:choose>

                            </div>

                        </td>
                        <td>
                           
                            <c:choose>
                                <c:when test="${element.repeatable == 1}">
                                    <input type="radio" name="repeatElement" value="" />&nbsp;repeat
                                </c:when>
                                <c:otherwise>&nbsp;&nbsp;
                                </c:otherwise>
                            </c:choose>

                        </td>
                        <td>
                            <form action="addElement" method="post">
                                <input type="hidden"
                                       name="elementId"
                                       value="${element.id}">
                                <input type="submit"
                                       value="add element">
                            </form>
                        </td>
                    </tr>
            
                </c:forEach>
                       
            </table>


On 11/13/2017 2:28 PM, [hidden email] wrote:
So what is the “code in between” that is being ignored?

How can anyone help without knowing the specific piece of code you’re talking about?

Gj

On 13 Nov 2017, at 22:13, rexbroo [hidden email] wrote:

I redid my entire E-commerce tutorial unit 7 adaptation for entity classes and session beans very carefully, but ended with the same result. For some reason, as yet to be determined, the program ignores the code block within the tables of the data category pages.

As near as I can tell the code matches up to the example of the tutorial. I checked and it doesn't appear that "element" is a reserved word in java or mysql, but the element db table is being ignored as opposed to the way that NetBeans and Google handle the "product' table in the tutorial. 

This is true for the ControllerServlet.java, Element.java entity class, and category.jsp files. 

When I debug category.jsp with a breakpoint at the <table id-"elementTable" class="smallText"> line, the program next processes the <c:forEach var="element" items="${categoryElements}" varStatus="iter"> line but then drops through to the </c:forEach> line followed by the </table> line, ignoring the code in between.

In the Elements tab of the Chrome DevTools the table tags enclose empty quotes "   " with a couple of empty lines in between. This is the same on both the Mac and Windows boxes. 

Seriously cross-eyed but still determined. Any suggestions welcome.

Rex

On 11/9/2017 1:25 PM, rexbroo wrote:
Unfortunately the Element db table is the critical table for the whole program since that is where the program goes to pull up the elements (records) for the elementTable for each of the 4 major data category pages. It functions the way that the Product table does in the E-Commerce Tutorial. I'll keep wrestling with it.

Rex
On 11/9/2017 11:22 AM, Geertjan Wielenga wrote:
So use those that do work correctly first.

Gj

Sent from my iPhone

On 9 Nov 2017, at 20:19, rexbroo [hidden email] wrote:

The AG.js error is what I'm seeing in the Chrome Developer Tools Console. I don't know where it comes into play. I'm trying to understand why Chrome is telling me that e is not defined. When I compare my entity class to others that do run and display correctly, I'm not seeing a difference except in the names of the tables they're based on and the variable initial itself.

I'm stumped. But thanks for at least looking.

Rex

On 11/9/2017 10:25 AM, Simon Roberts wrote:
There is no Java in your .js file. That's JavaScript. Totally different language. You're looking in entirely the wrong direction :)


On Thu, Nov 9, 2017 at 11:14 AM, rexbroo [hidden email] wrote:
I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:

Error executing AG.js: ReferenceError: e is not defined

The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected. 

The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports 

@Entity
@Table(name = "element")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
    , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
    , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
    ... )})
public class Element implements Serializable {

I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.

Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says  

test.js was run
Any help or suggestions would be appreciated.

Thanks,
Rex

 
-- 
Rex Brooks
Starbourne Communications Design
Email: 
[hidden email]

GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 
510-898-0670 

	Virus-free. www.avast.com



-- 
Simon Roberts
http://dancingcloudphotography.com
(303) 249 3613
-- 
Rex Brooks
Starbourne Communications Design
Email: 
[hidden email]

GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 

-- 
Rex Brooks
Starbourne Communications Design
Email: 
[hidden email]

GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 

-- 
Rex Brooks
Starbourne Communications Design
Email: 
[hidden email]

GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 




-- 
Rex Brooks
Starbourne Communications Design
Email: [hidden email]
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 

Virus-free. www.avast.com
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

Thufir Hawat
In reply to this post by rexbroo
On Mon, 13 Nov 2017 14:13:33 -0800, rexbroo wrote:

> I redid my entire E-commerce tutorial unit 7 adaptation for entity
> classes and session beans very carefully, but ended with the same
> result. For some reason, as yet to be determined, the program ignores
> the code block within the tables of the data category pages.



when you want to know when a method executes, or something about the
bean, log it like so:

private static final Logger LOG = Logger.getLogger(App.class.getName());

it will show in Glassfish log, or wildlfly, whatever you're using.  quite
useful.


HTH,

Thufir

Reply | Threaded
Open this post in threaded view
|

Re: Chrome Console: Error executing AG.js: ReferenceError: e is not defined

geertjan.wielenga@oracle.com
In reply to this post by rexbroo

I recommend you break the project down to its smallest and simplest and use that code there and get it to work in the context of a small application first.


Geertjan Wielenga | Principal Product Manager
Phone: +31620320056 | 
Oracle Developer Tools

ORACLE Netherlands | Hertogswetering 163-167 | 3543 AS Utrecht | Netherlands


Oracle is committed to developing practices and products that help protect the environment

On 14 Nov 2017, at 00:36, rexbroo <[hidden email]> wrote:

The code in between is the code for each row of the table in the category.jsp file.:

                <table id="elementTable" class="smallText">
                    
                    <c:forEach var="element" items="${categoryElements}" varStatus="iter">
                   
                        <tr class="${((iter.index % 2) == 0) ? 'lightBlue' : 'white'}">
                            <td>
                                <input type="checkbox" name="start">start
                            </td>
                            <td>
                                &nbsp;&nbsp;element:<br>
                                &nbsp;&nbsp; ${element.name} 
                                <c:choose>
                                    <c:when test="${element.required == 1}">
                                         *
                                    </c:when>
                                    <c:otherwise>&nbsp;&nbsp;
                                    </c:otherwise>
                                </c:choose>
                                &nbsp;&nbsp;
                            </td>
                            <td>
                                <div id="elementInput">
                                    
                                    <c:choose>
                                    <%--<c:when test="${element.datatype == ENUM}">
                                            
                                                //script to retrieve values from ENUM datatype of selectedElement
                                                ${ENUM(values) = select(options)}
                                                //to populate drop-down list 
                                                <span class="smallText">
                                                    Select&nbsp; ${element.name}
                                                    <select name="selectedElement" id="element.id">
                                                        <option value=""></option>
                                                        <co:forEach items="${element}" var="value">
                                                           <option>${value}</option>
                                                        </co:forEach>
                                                        </>
                                                    </select>--%>
                                                        
                                        <c:when test="${element.name == 'status'}">
                                            Select&nbsp; status
                                                <select name="status">
                                                    <option>Actual</option>
                                                    <option>Exercise</option>
                                                    <option>System</option>
                                                    <option>Test</option>
                                                    <option>Draft</option>
                                                </select>
                                            
                                        </c:when>
                                        <c:when test="${element.name == 'msgType'}">
                                            Select&nbsp; msgType
                                                <select name="msgType">
                                                    <option>Alert</option>
                                                    <option>Update</option>
                                                    <option>Cancel</option>
                                                    <option>Ack</option>
                                                    <option>Error</option>
                                                </select>
                                            
                                        </c:when>
                                        <c:when test="${element.name == 'scope'}">
                                            Select&nbsp; scope
                                                <select name="scope">
                                                    <option>Public</option>
                                                    <option>Restricted</option>
                                                    <option>Private</option>
                                                </select>
                                            
                                        </c:when>
                                        <c:when test="${element.name == 'category'}">
                                            Select&nbsp; category
                                                <select name="category">
                                                    <option>Geo</option>
                                                    <option>Met</option>
                                                    <option>Safety</option>
                                                    <option>Security</option>
                                                    <option>Rescue</option>
                                                    <option>Fire</option>
                                                    <option>Health</option>
                                                    <option>Env</option>
                                                    <option>Transport</option>
                                                    <option>Infra</option>
                                                    <option>CBRNE</option>
                                                    <option>Other</option>
                                                </select>
                                            
                                        </c:when>
                                        <c:when test="${element.name == 'responseType'}">
                                            Select&nbsp; responseType
                                                <select name="responseType">
                                                    <option>Shelter</option>
                                                    <option>Evacuate</option>
                                                    <option>Prepare</option>
                                                    <option>Execute</option>
                                                    <option>Avoid</option>
                                                    <option>Monitor</option>
                                                    <option>Assess</option>
                                                    <option>AllClear</option>
                                                    <option>None</option>
                                                </select>
                                            
                                        </c:when>
                                        <c:when test="${element.name == 'urgency'}">
                                            Select&nbsp; urgency
                                                <select name="urgency">
                                                    <option>Immediate</option>
                                                    <option>Expected</option>
                                                    <option>Future</option>
                                                    <option>Past</option>
                                                    <option>Unknown</option>
                                                </select>
                                            
                                        </c:when>
                                        <c:when test="${element.name == 'severity'}">
                                            Select&nbsp; severity
                                                <select name="severity">
                                                    <option>Extreme</option>
                                                    <option>Severe</option>
                                                    <option>Moderate</option>
                                                    <option>Minor</option>
                                                    <option>Unknown</option>
                                                </select>
                                            
                                        </c:when>
                                        <c:when test="${element.name == 'certainty'}">
                                            Select&nbsp; certainty
                                                <select name="certainty">
                                                    <option>Observed</option>
                                                    <option>Likely</option>
                                                    <option>Possible</option>
                                                    <option>Unlikely</option>
                                                    <option>Unknown</option>
                                                </select>
                                        
                                        </c:when>
                                            <c:otherwise>
                                                <c:choose>
                                                    <c:when test="${element.datatype_size < 49}">
                                                        <span class="smallText">Enter ${element.name} value
                                                            <input type="text" name="elementValue" value="" size="25" />
                                                        </span>
                                                    </c:when>
                                            <c:otherwise>
                                                <span class="smallText">Enter ${element.name} value
                                                    <textarea name="elementValue" rows="3" cols="25">
                                                    </textarea>
                                                </span>
                                            </c:otherwise>
                                        </c:choose>
                                    </c:otherwise>
                                </c:choose>

                            </div>

                        </td>
                        <td>
                            
                            <c:choose>
                                <c:when test="${element.repeatable == 1}">
                                    <input type="radio" name="repeatElement" value="" />&nbsp;repeat
                                </c:when>
                                <c:otherwise>&nbsp;&nbsp;
                                </c:otherwise>
                            </c:choose>

                        </td>
                        <td>
                            <form action="addElement" method="post">
                                <input type="hidden"
                                       name="elementId"
                                       value="${element.id}">
                                <input type="submit"
                                       value="add element">
                            </form>
                        </td>
                    </tr>
             
                </c:forEach>
                        
            </table>

On 11/13/2017 2:28 PM, [hidden email] wrote:
So what is the “code in between” that is being ignored?

How can anyone help without knowing the specific piece of code you’re talking about?

Gj


On 13 Nov 2017, at 22:13, rexbroo <[hidden email]>
 wrote:

I redid my entire E-commerce tutorial unit 7 adaptation for entity classes and session beans very carefully, but ended with the same result. For some reason, as yet to be determined, the program ignores the code block within the tables of the data category pages.

As near as I can tell the code matches up to the example of the tutorial. I checked and it doesn't appear that "element" is a reserved word in java or mysql, but the element db table is being ignored as opposed to the way that NetBeans and Google handle the "product' table in the tutorial. 

This is true for the ControllerServlet.java, Element.java entity class, and category.jsp files. 

When I debug category.jsp with a breakpoint at the <table id-"elementTable" class="smallText"> line, the program next processes the <c:forEach var="element" items="${categoryElements}" varStatus="iter"> line but then drops through to the </c:forEach> line followed by the </table> line, ignoring the code in between.

In the Elements tab of the Chrome DevTools the table tags enclose empty quotes "   " with a couple of empty lines in between. This is the same on both the Mac and Windows boxes. 

Seriously cross-eyed but still determined. Any suggestions welcome.

Rex

On 11/9/2017 1:25 PM, rexbroo wrote:

Unfortunately the Element db table is the critical table for the whole program since that is where the program goes to pull up the elements (records) for the elementTable for each of the 4 major data category pages. It functions the way that the Product table does in the E-Commerce Tutorial. I'll keep wrestling with it.

Rex
On 11/9/2017 11:22 AM, Geertjan Wielenga wrote:

So use those that do work correctly first.

Gj

Sent from my iPhone

On 9 Nov 2017, at 20:19, rexbroo 
<[hidden email]>
 wrote:


The AG.js error is what I'm seeing in the Chrome Developer Tools Console. I don't know where it comes into play. I'm trying to understand why Chrome is telling me that e is not defined. When I compare my entity class to others that do run and display correctly, I'm not seeing a difference except in the names of the tables they're based on and the variable initial itself.

I'm stumped. But thanks for at least looking.

Rex

On 11/9/2017 10:25 AM, Simon Roberts wrote:

There is no Java in your .js file. That's JavaScript. Totally different language. You're looking in entirely the wrong direction :)


On Thu, Nov 9, 2017 at 11:14 AM, rexbroo 
<[hidden email]>
 wrote:
I'm trying to track down and correct this error which I see in the Chrome DeveloperTools Console when running my program on Mac OSX 10.12.5:

Error executing AG.js: ReferenceError: e is not defined

The program runs ok but when I click on a link in the opening page, the destination page displays most components correctly except that the rows in the main table are not there. Those rows each represent the individual data elements for the data category page selected. 

The variable e is generated by NetBeans in an Entity Class for database table named element. e stands for an element from that table. e is specified in the Entity Class Element.java which I excerpt below from the start of the file following imports 

@Entity
@Table(name = "element")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Element.findAll", query = "SELECT e FROM Element e")
    , @NamedQuery(name = "Element.findById", query = "SELECT e FROM Element e WHERE e.id = :id")
    , @NamedQuery(name = "Element.findByName", query = "SELECT e FROM Element e WHERE e.name = :name"), ...
    ... )})
public class Element implements Serializable {

I have searched on the error message but none of the examples I've found matches this nor even comes close enough to suggest solutions to me.

Oddly enough, when I run the program in Windows 10, I get that same yempty table but Develop Tools Console just says  

test.js was run
Any help or suggestions would be appreciated.

Thanks,
Rex

 
-- 
Rex Brooks
Starbourne Communications Design
Email: 

[hidden email]


GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 
510-898-0670 

Virus-free. 
www.avast.com




-- 
Simon Roberts

http://dancingcloudphotography.com

(303) 249 3613

-- 
Rex Brooks
Starbourne Communications Design
Email: 

[hidden email]


GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 


-- 
Rex Brooks
Starbourne Communications Design
Email: 

[hidden email]


GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 


-- 
Rex Brooks
Starbourne Communications Design
Email: 

[hidden email]


GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 






-- 
Rex Brooks
Starbourne Communications Design
Email: 
[hidden email]

GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 


Virus-free. www.avast.com