Reginald Carter

Greenhorn
+ Follow
since Apr 14, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Reginald Carter

I'm getting an error 'Object doesn't support property or method 'addEventListener''
Trying to use the micron.js.
Here is the html:

error is from micron.min.js
var watchEvents=function(){window.addEventListener("click",function(t){var e=t.target,n="mjs-",i=e.dataset.micron,a=e.dataset.micronDuration,o=e.dataset.micronTiming,r=e.dataset.micronBind,s=e.dataset.micronId;if(void 0===i)return!1;if("true"===r){if(void 0===s)return!1;if(void 0===(u=document.getElementById(s))||null===u)return!1;var d=u.cloneNode(!0);u.parentNode.replaceChild(d,u),d.classList.add(n+i)}else{var u;d=(u=e).cloneNode(!0);u.parentNode.replaceChild(d,u),d.classList.add(n+i)}void 0!==a?isNaN(a)?d.style.animationDuration=".45s":d.style.animationDuration=a+"s":d.style.animationDuration=".45s",void 0!==o&&("linear"===o||"ease-in"===o||"ease-out"===o||"ease-in-out"===o)?d.classList.add(n+o):d.classList.add(n+"ease-in-out")})};"loading"!=document.readyState?watchEvents():document.addEventListener("DOMContentLoaded",function(){watchEvents()});var Micron=function(){var t,e;return{getEle:function(n){return void 0!=(t=document.querySelector(n))&&null!=t?(e=t.cloneNode(!0),t.parentNode.replaceChild(e,t),this):this},interaction:function(t){if(void 0!==e&&null!==e){if(void 0!=t&&null!=t&&-1==t.indexOf(" ")){var n="mjs-"+t;return e.classList.add(n)

Any help would be much appreciated.
Thanks for your reply.
Sorry about all the code.
I'll do better next time.
Meanwhile I have solved the problem and everything is fine now.
-Reg
7 years ago
JSF
Hello,
[size=12]I think I'm in quite a mess here.
I'm using Netbeans IDE and Glassfish application server.
I have a JSF CRUD application running with a MySQL database and everything was fine until I was asked to be able to sort a column whose MySQL datatype was Varchar.
Here is my Model for Vehicles:

And my Controller:

And my List View:

So I changed the datatype to Integer and updated my source code to change the column from String to Integer.
When the list displays every thing seems good and the rows are sorted according to the column whose datatype I changed to Integer.
However when I then tried to edit nothing works and I get HTTP Status 505 from Glassfish with the error message
javax.servlet.ServletException: HV000030: No validator could be found for type: java.lang.Integer
Is there anyway I can possibly fix this?
I would appreciate any help. [/size]
Thanks for reading,
G.
7 years ago
JSF
Hello Tim,
Thanks for all your help.
Your suggestion about giving the form an id and checking the 'Page Source' helped me resolve this issue.
When I make the call to getElementById using the form id with the element id it works like a charm.
Like this

Again Thank You!
8 years ago
JSF
Hello Tim,
Yes
If I remove everything from the javascript function except the alert- The alert does show.
So at least we know that it's finding the function.
So there must be a problem with the call to getElementById.
I'm using Firefox. Is there something else that might work?
8 years ago
JSF
Thank You for your reply Tim.
Actually the code I sent was wrong (from a text editor copy partially edited.)
Here is a slimmed down version of the code and it still doesn't work.

I've tried placing the javascript into the head as well and still no result.
I've also tried using a normal HTML head tag without the ui:define tag <ui:define name ="head">
If I use the following snippet:

The alert box does appear. but with my call to the javascript function it's dead Tim.
8 years ago
JSF
Hello,
I'm hoping someone can help me.
After a couple of weeks trying just about everything I'm wondering why I can't reach my java script code with the onclick event in commandButton.
Here is the XHTML page...




The java script accepts a big decimal value for Cost and Depreciation and attempts to insert the value (cost-depreciation) into the value field.
If anyone has any ideas I would be very grateful.

8 years ago
JSF
Hello-
Would that be
C:\tomcat\server\webapps\host-manager\WEB-INF
or
C:\tomcat\server\webapps\manager\WEB-INF
or
C:\tomcat\webapps\balancer\WEB-INF
or
C:\tomcat\webapps\ROOT\WEB-INF
or
C:\tomcat\webapps\servlets-examples\WEB-INF
or
C:\tomcat\webapps\webdav\WEB-INF
??
You see when you say

and all jar files needed are in WEB-INF/lib


My head starts to spin.
Where should my files go?
-R

12 years ago
Well shoot-Y'all wouldn't happen t' have a pair of war cutters on ya wouldja pilgrim?
Seriously though, since until two days ago I thought tomcat referred to a feline of the male gender, I don't know how to create
a "real" web app using tomcat.
Do you know of any tutorials that I could read?
Maybe a good primer?
Also I'm not really using the IDE for this, only to generate the WAR file.
Hopefully the class files I have can still be used?
Anyways thanks for your efforts to help me.
I really do appreciate it.
-R.
12 years ago
I'm trying to use tomcat, but since the war file contains classes which need some of the files in the root folder of my eclipse project I thought I should do everything from there. Is this not a good idea?
I admit its confusing.
Maybe I should copy the war file to the tomcat directory and try to do it from there?
I don't know I am really confused at this point.
-R
12 years ago
Sorry.
I edited my context.xml like so:

I am still getting the same startup message.
In the folder C:/MyWebApp are all the files the eclipse project needs to run the program plus the WAR file and context.xml as well.
-R
12 years ago
OK Now when I enter:
http:/localhost:8080/mywebapp
I get

What to do now?
-R
12 years ago
Thanks for all your help.
I know how frustrating it can be.
I think I'm just going to start over.
-R
12 years ago
OK My context.xml:

When I look at the folder:C:/MyWebApp
I don't see any URL!
-R
12 years ago
I'm obviously missing something here..
Would the URL for the web app be the path to the .war file?
-R
12 years ago