Skip Cole

Ranch Hand
+ Follow
since Jan 05, 2001
Merit badge: grant badges
For More
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Skip Cole

Thanks Tim,

I've been trying to avoid altering with the domain data model, since this is only an upgrade, and I think that In Theory Richfaces 4 should be displaying this in the same way that Richfaces 3.32 did. But this is not the case.

I have started looking into how the data model is constructed, but haven't found a quick fix for this yet. If there is any parameter setting that will make the rich:tree 4.0 display like the rich:tree 3.3.2, that would be great.

Thanks again for getting back to me on this.

8 years ago
JSF
Hi,
We are migrating to Richfaces 4 from Richfaces 3.3.2
We had a rich:tree which before, put leafs ahead of Nodes. This behavior has changed, as shown below:

-------------------------------------------------------
Before:
Root
---> Leaf A
---> Node 1
---------> Leaf B
---------> Leaf C
---------> Node 2

Now:
Root
---> Node 1
---> Leaf A
---------> Node 2
---------> Leaf B
---------> Leaf C
-------------------------------------------------------

We are using a rich:treeModelRecursiveAdaptor, and I have not been able to find a way to order the tree in the same way as was done before.

Any ideas?

Thanks,
Skip
8 years ago
JSF

You know, this really drove me crazy today, because it is something that should be very simple to do.

I have two .classpath files, and I want to compare all of the jar files that they use. Since the path information may be different, I wanted to just get the list of everything '.jar'.

So a line like, '<classpathentry kind="lib" path="C:/apache-tomcat-8.0.99/lib/servlet-api.jar"/>', would just produce 'servlet-api.jar'

So I tried with grep and then sed and then java regex (Pattern and Matches) and finally String.split(). I finally got my what I wanted, but it wasn't pretty.

There has to be a simple way to use a regular expression to look through a file and get all /*.jar

What is it? And before you answer without testing your code, be advised, I must have tried 100 things that I was Sure would work, but did not.

Thanks in advance,
Skip
8 years ago
Hi,

I'm about to buy the Kindle edition. I'm doing a large Spring project, and need all the help I can get.

But I have to say that I find it surprising that Chapter 8, the last chapter, is on AOP. I would think that a book on Spring would discuss that more near the start.

Do you have any comments on that?

Thanks,
Skip
10 years ago
Thanks Mark.

I'm starting to think now that for now I may just move to having one organization and database per application installation. That would simplify this a lot, and simple is good.
This is going to be a cloud based application this time, and so having a new URL and database to shoot to on demand may not be that hard to pull off. (Skip says naively.)

I have to admit, I keep reading about how flexible Spring Security is, but then when I try to do anything with it (like change the authorities on a user after they have logged in) I run up against problems. It probably is time to simplify.

Thanks again for the leads you gave me. Someday they may come in very handy.

Best,
Skip
10 years ago

I have a web application to create online roleplays that I'm re-writing in Spring.

Currently it allows a user to log in and then see a list of all organizations that they are members of on the platform. They can then pick one section (Admin, Author, Facilitator or Player) and then enter into it. Picking the section they go into is important, because it requires a mental shift to go from thinking like an author or facilitator, etc. We want that mental shift made explicit by forcing the user to select what area they want to enter into.

Additionally, a user's permissions may be different for different organizations. So someone may be an author in Org 1, but only a player in Org 2. If they have no permissions in Org 3, then they would not even see it listed. Below is an example of what they may see after logging in:

Org 1
Author, Facilitator, Player

Org 2
Player

I am trying to implement this in Spring Security, but find it difficult. In the current application, the permissions were set after the user logged in and chose an organization and section to go into. Spring Security seems to highly lean toward loading all user permissions (authorities) at the moment of login. So now I'm considering what to do. I could chop the application into 4 different pieces and then just allow someone to only enter into one of those for one organization. But I'd rather keep it one platform, and have the user select the section they are entering after logging in at the one (and only one) login page.

Any thoughts?

Thanks,
Skip


10 years ago
Hi Shailesh,

I just want to confirm I understand what you mean. When you say "validate method in form" do you mean client-side validation?

I agree a lot validation can be there can be done on the client side, but some things - such as verifying that a name entered is not already found in the database - are impractical to do so.

Thanks,
Skip
10 years ago

Thanks Shailesh for your reply.

It just seems to me that it would be far simpler, and simpler is much better, to do the redirect of the execute method and validate method all in one place. That way someone maintaining the code just has to look in one place to get the full picture: no need to go looking for some overridden processValidate method somewhere or anything else.

Personally, I place a great deal of value in being able to figure out things quickly from the code, and not requiring a lot of background knowledge on the part of the person doing the work. Frameworks are supposed to make our lives easier, right?

Let me ask this, What would be the harm in allowing someone to select a different validate method from inside of the struts.xml file? Would it violate any core coding principal?

Thanks,
Skip
10 years ago

We can direct the action to a method other than 'execute' by using



as an attribute in the action tag in the struts.xml file.

Why can't we direct the validation to another method in a similar fashion?

It seems that the execute and validation methods work hand in hand together. So being able to change one without changing the other, well it just seems like a bit of a gap.

Thanks in Advance,
Skip
10 years ago
Personally, I am all for organizing things. I think it helps one debug faster and avoid jar hell.

It really is a shame one can't put subdirectories in the WEB-INF/lib folder. I'm just saying ...
10 years ago
Thanks Tim!

This is great information, and will help me in my search.

I do find it unfortunate that there is not enough interest for people to vote on them. Even something simple, like the number of downloads or the number of uses would be helpful. Maybe as the tool evolves, that may eventually come.

10 years ago
Silence?

No one has any opinions on this?
10 years ago
Hi,

I am new to Maven, and I am really in love with it in theory.

But the problem I'm experiencing is that I don't see very much information on any given archetype - at most I am seeing a one line description. (Is there generally more, anywhere?)

And I don't know where to find comments and ratings on archetypes. As the number of them grows, this seems to me to be a critical issue to address. I don't have the time to track down and research each of hundreds of archetypes.

I'm starting a new project (described in post I made yesterday). This is a project very important to me, so I want it to come off well, and so at the very least, I don't want to select a bad Maven archetype to begin with.

So please, list the stinkers here. This will let their authors know about deficiencies and improve them, and help me in my search. If there is a more standard, natural place for this type of information, please share that information with the community here also.

Thanks for your help. We are making the world better with our work.

Sincerely,
Skip
10 years ago
Hi,

I'm doing a code-rewrite of a very large open-source web application. It was a JSP/Java/Hibernate application and has a large user base.

Now it will be a JQuery/Struts2/Spring/Hibernate application. We are going to create the core application and then allow extension via plug-ins. WordPress is the inspiration for the plugin model that we are following, but we will not require that plugins get written in PHP. (God forbid that I ever do that.) The code for plugins will need to all be contained in one folder, and will need to be capable of being executed on the platform on which they are deployed. For example, a PHP plugin will require that the server supports PHP. But we don't want to impose any more restrictions on the plugin authors than that.

Just by way of background, this open source application allows anyone to create online role plays. It is not quite Unity 3D, but something that non-programming mere mortals can use. This is about the 7th time I have written this application, so its about time I get it right.

So, kicking this off, I want to pick the right archetype to start with. There is a German phrase, "Well begun is half done" and I am a strong believer in that. I want to start with the best Struts 2 archetype that can easily be extended to include JQuery, Spring and Hibernate.

Any opinions? There seem to be a lot of great Maven starting points out there, but kicking this off, I'd like to go from one of the best. All thoughts, feelings, opinions, feedback, etc. are welcome.

Best,
Skip


10 years ago
Hi Mohana,

Thanks for the answer, and thanks for the question.

I'm doing a re-write of software that allows anyone to author, conduct and/or play in multi-player online simulations. (This is of an existing, exciting project http://www.facebook.com/groups/162549447105518/ )

Central to this software is the concept that an author defines who all of the actors will be in a simulation (President, Ambassador, Prison Guard, etc.) and then defines the phases during which the game will flow (preparation, crisis, post-crisis, etc.) The tool is extremely flexible, so the author can define all of the above, add images, background information, relationships, etc. The author then gives the tools to each actor that they will have during each phase. For example if several of the players can chat with each other in one phase, the author adds the chat room to them. Simulation creation without programmer involvement. (Look Ma' no hands!)

In the first version many of the 'tools' (chat, email, text page, shared document, etc.) were built into the tool, and some work was done on creating an API to allow programmers to create their own. This was a Peace Institute initiative, and I had hopes that many open source programmers would get involved - that never happened.

For this second version Everything will be handled as a plugin to the system! So programmers will be able to define simulation tools and add them into the tool. Thus allowing for tools we have not even planned on. Working on version 1, one example of an open source tool we never planned on was Similie Timeline from MIT. New cool tools will be able to be plugged into the system via an API.

In creating a 'plug-in' the programmer will need to define several important items:
1.) The page (generally a jsp) that the player will see. This 'page' may add functionality to the system.
2.) The page (almost certainly a jsp) that the author will use to customize the page that the player will see.
3.) Java classes to handle any actions that the player may make. Some of these may be 'Hibernate' entity classes to allow for information to be saved to the database. (Version 1 uses Hibernate very successfully.)
4.) A configuration file to define the plugin. For example, stating which classes will need to be persisted, the description the plugin will present to the author, etc.

Version 1 worked, but was rather backwards in many aspects. Version 2 will be JQuery/Spring/Hibernate. I wanted to use Struts 2 for some aspects, but if we can't give plugin authors the ability to write their own actions, I'm not sure how useful it will be. I suppose we could write a suite of generic actions that they could tap into. I will give that some thought.

BTW, this is a big project. The first version was over 2,000,000 lines and a code estimator estimated the cost of creation at over $2.8 million. If anyone does want to join this open source project, please just let me know. It is going to be big, and it will be a great resume builder. It is also going to be a lot of damn fun.

Does this answer your question?

Thanks,
Skip
PS. It is all open source. The first version was on google code. (http://code.google.com/p/opensimplatform/). I'm going to set up this next one on git hub. Email skip at seachangesimulations dot com if you want to be involved.
10 years ago