Jason Richard

Ranch Hand
+ Follow
since Oct 05, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
10
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jason Richard

Hi all,

I'm brand new to JSF programming and inherited a project. I'm developing using mars Eclipse on a windows 7 64 bit machine.

I keep getting various "Errror in Oepe JSF plugin" errors when I modify the xhtml files. These errors occur while editing. They are coming out of the

oracle.eclipse.tools.webtier.jsf plugin and are different but here are a couple.

java.net.MalformedURLException: unknown protocol: virtual
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URI.toURL(Unknown Source)
at oracle.eclipse.tools.webtier.jsf.facelets.OepeFaceletCompiler.getRootDir(OepeFaceletCompiler.java:163)
at oracle.eclipse.tools.webtier.jsf.facelets.OepeFaceletCompiler.createConfig(OepeFaceletCompiler.java:107)
at oracle.eclipse.tools.webtier.jsf.facelets.OepeFaceletCompiler.compile(OepeFaceletCompiler.java:78)
at oracle.eclipse.tools.webtier.jsf.facelets.FaceletCompileUtil.ensureContext(FaceletCompileUtil.java:35)
at oracle.eclipse.tools.webtier.jsf.dependency.discovery.FaceletDiscoveryParticipant.discover(FaceletDiscoveryParticipant.java:267)
at oracle.eclipse.tools.webtier.jsf.dependency.discovery.FaceletDiscoveryParticipant.discoverFromExistingModel(FaceletDiscoveryParticipant.java:361)
at oracle.eclipse.tools.application.common.services.variables.VariablesController$DocumentRediscoveryJob.runAfterCommands(VariablesController.java:746)
at oracle.eclipse.tools.common.services.concurrency.AbstractJob.run(AbstractJob.java:73)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


and

java.lang.Exception: Couldn't get a dtContext for discovery: L/VZWEquipment/WebContent/Equipment.xhtml
at oracle.eclipse.tools.webtier.jsf.dependency.discovery.FaceletDiscoveryParticipant.discover(FaceletDiscoveryParticipant.java:293)
at oracle.eclipse.tools.webtier.jsf.dependency.discovery.FaceletDiscoveryParticipant.discoverFromExistingModel(FaceletDiscoveryParticipant.java:361)
at oracle.eclipse.tools.application.common.services.variables.VariablesController$DocumentRediscoveryJob.runAfterCommands(VariablesController.java:746)
at oracle.eclipse.tools.common.services.concurrency.AbstractJob.run(AbstractJob.java:73)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


I was seeing these errors on one system, and since I did a fresh install of windows 7 onto an SSD drive, and reinstalled everything (the install completely unrelated to the issue)

but here we go again with this error. The Google told me to replace a header in a manifest of one of the jars somewhere, but it was old and the version of the jar had been updated, so I don't think that's my issue.

I can provide any information anybody thinks is relevant. Thanks in advance for any time anybody spends on this


7 years ago
JSF
Hi All,

I'm working on something and I am unsure how to approach a solution.

I have working solution for filtering a table. However I want to use the filter results of that table to filter a different table.

if My first table looks like this:

JOHN PLUMBER
MIKE PLUMBER
MARY CARPENTER
SALLY CARPENTER
BOB SOLDIER
JUAN DENTIST




If my first filtered table gives me the following results (based on other columns):

JOHN PLUMBER
MARY CARPENTER
BOB SOLDIER


I want to be able to use this pairing of key fields to filter a different table, so if my second table was


JOHN PLUMBER MANCHESTER
JOHN PLUMBER CONCORD
MIKE PLUMBER CONCORD
MARY CARPENTER SMITHFIELD
SALLY CARPENTER GREENFIELD
BOB SOLDIER IRAQ
JOHN DENTIST SPRINGFIELD

my filtered results end up being

JOHN PLUMBER MANCHESTER
JOHN PLUMBER CONCORD
MARY CARPENTER SMITHFIELD
BOB SOLDIER IRAQ


I get how to do this for one column. I could make it so if I wanted to filter for "CARPENTER" I get all the CARPENTERS. I can also make if I want all the PLUMBERS named JOHN , i get the one result.

What I don't understand (hence I'm not adding PSUDO-code) , is how i can filter on the Forgegn Key Pair (or maybe more columns)

So I'd want from the second table is all the Records that have

"JOHN + PLUMBER"
"MARY + CARPENTER"
"BOB + SOLDER".

This would bring back four rows in the table. I don't want Mike because even though he's a PLUMBER he's not a result of the original filter. (which perhaps was filtered on zip code and years of service which are unrelated to the second
table.

I hope I am explaining this well. If I'm still being confusing let me know. In the end I want to use the list of key pairs to filter a different table only for those matching key pairs.
8 years ago

Darryl Burke wrote:
Include several inputs (possibly as an array or List) and the expected and actual outputs.




So basically if value was 3.2

and my values were
1233.2
332.42
2443.432
321.123
321123123.1
3.2

I'd only want the 1233.2 and the 3.2 back or the same if I had just typed 3.
8 years ago
Sure, sorry i was trying to keep it pretty general, but mostly because my code is in several different places.

Mostly I'm looking at the following




The filtering model works great outside of the "."
8 years ago

Darryl Burke wrote:The dot is a metacharacter in regex and matches *any* character. To match a literal dot, you need to escape it. In a String literal, that would mean prefacing it with a double backslash; in a String input, a single backslash would suffice. Or you could process the entire input, prefacing it and suffixing it with the regex quote characters "\\Q" and "\\E"



Brilliant!


except I'm still confused. I understand completely what you are saying, but I'm having a hard time making it work.

I've tried String value = "3\\.2"
as well as String value = "\\Q3.2\\E"

as well as some other things, but it's still working the same
8 years ago
Hi All,
e
I'm working with RowFilters and trying to get the following to happen.

One of my columns might be doubles. there might be several values like

Column FOO
-------------
392.444444
433.33333
123.333354
2.33331


and I have a separate table that I use to filter these columns

but I'm looking for pattern matching so if the first character that is entered is 3 my table is filtered down 4 my table is filtered down to

Column FOO
-------------
392.444444
433.33333
123.333354

This all works fantastic

however I seem to be having a problem with the .

for example if my filter is 3. my filter seems to be using the . as a "there is a character there"

so the above filtering wont' change. but if I add a 3.2 my results would be

Column FOO
-------------
392.444444

String value = "3.2"
filters.add(RowFilter.regexFilter("(?i)" + value, k));

what I would prefer is that the . be the decimal place, so if I type 3. my filter would be

Column FOO
-------------
433.33333
123.333354

and If I typed 3.2 as my filter, then I would have no results.


Any help would be appreciated.
8 years ago

Rob Camick wrote:Yes this is old and I would not recommend this approach.

A renderer is used to render the data in the table NOT to control focus. I see Darryl made the same observation while I was thinking about the answer

For an alternative approach you could customize the default tabbing Action for the table:

You will need the class from Table Tabbing.

Another option would probably be to override the changeSelection(...) method of the JTable. Of course the logic gets more complicated because you can't just assume focus goes to the next column, like the renderer solution does above.



This is fantastic. Works great, and pulls the work out of the Render. TY!
9 years ago

Darryl Burke wrote:Technically, this shouldn't be regarded as a solution but as a workaround for a non-standard requirement. I say that because the function of a renderer is to render; renderer code, like painting code, shouldn't change the state of the component being rendered.

As a user, I would be confused if tabbing skipped over a column. So I'm curious: what led to this requirement in the first place?



So in this case, and I'm sure I'm doing something sideways (which often tends to be the case with this Swing stuff), in certain tables, I'm using row 1 as a Psudo Header column, so column two is the only column accepting input.

So table with two columns might look like:

FIELD VALUE
----------------
NAME Bob
COLOR blue
COMMENTS blah blah


so when they tab, we don't want to go into the "header" row, but rather only back and forth in Column 1



9 years ago
I know this is old but this was a GIGANTIC help. I'm having trouble getting the reverse to work, but that's just a casting issue I think and will look at it later. I've searched and searched for this fix, and THIS was IT. Thank you
9 years ago

Thank you Paul. That was perfect. You are right, all examples have been the FileNameExtensionFilter that I could find.

I did find that I couldn't use both a FileNameExtensionFilter and a FileFilter at the same time. The Chooser would take it, but seemed to ignore one, so I just added the extensionFiltering to my FileFilter and everything worked great!

9 years ago
Hi all,

I'm using a JFileChooser. I'm using a FileNameExtensionFilter which is fantastic, and will let me only show files that are of type .db or whatever.

However

I don't want to show the user files that have a type of lock.db or *_trace.db for example, and I can't figure out a way to do that.

Is there a way to do that?
9 years ago

Rob Camick wrote:

I've played around with different Layouts (Border Layout.East, etc),



Should work. When you add/remove components from a visible GUI the basic code is:



Post your SSCCE that demonstrates the problem.



I was mostly trying do do it with SetVisible();
9 years ago
Hi All,

I have a GUI that I've been working on for a while now. What I am trying to figure out, is a way to have the user push a button, and when they do have the GUI extend out to the right with another table to use for Filter Data. Once They are done, I want them to push that button again, and the panel with the query data retracts and is hidden again, all without changing the size of the current GUI in question. I've tried a bunch of different things with setting preferred and Minimal values to my GUI, and I've played around with different Layouts (Border Layout.East, etc), but I can't seem to find a good working solution.

I'm not adding psudo code here/yet because I'm not looking more for ideas rather then fixes if that makes sense.

Ideally it would be slick if I could make my panel SLIDE out and SLIDE back in, which would look really cool, but I'd settle for something that just worked
9 years ago

Campbell Ritchie wrote:And when somebody passes an Integer to your List?

There is something wrong with lots of instanceofs and lots of casts.



well, since it's my swingworker, I wouldn't pass anything I don't know about.

However, what would your solution be?
9 years ago
Not that anybody but myself is reading, but if somebody else stumbles across this thread.

I worked around my issue by having my using Object as my process parameter, and then checking for different objects based on what i wanted to do .

9 years ago