Refreshing page / onBeforeRender() issue

2009-04-12 Thread Henrique Boregio
I have a web page with a simple design where a NavigationPanel contains a few links which replace the main panel with other panels. My problem is that when I initialize this web page, it creates all of the panels which will eventually replace a main panel (according to the link in the NavigationPa

Passing hidden parameters / bookmarkable links

2009-04-15 Thread Henrique Boregio
I am developing a system that has "groups" and want to make them accesible via user-friendly urls such as www.mysite.com/group/GROUPNAME On a web page, I have a list of groups which are all links to their group pages, such as: www.mysite.com/group/groupA www.mysite.com/group/groupB ... This is i

Markup's isVisible method being called multiple times

2009-04-18 Thread Henrique Boregio
here i am here i am Any ideas why this method is being called 4 times? Thanks. -- Henrique Boregio - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Web search functionality

2010-12-09 Thread Henrique Boregio
I want to add search functionality to my site (think of a classifieds site, something like craigslist where users post items to sell). Currently I am using mysql for storage, and nothing else. Is searching directly at the database via queries the best way? It seems illogical to perform a linear se

SQL Query casting objects

2010-12-09 Thread Henrique Boregio
I have an SQL query to do a full-text search on my database: String sql = "SELECT * FROM Items WHERE MATCH (title, description) AGAINST ('" + searchText + "');"; List items = session.createSQLQuery(sql).list(); When I execute it, it returns a list with the rows it found as a result. Each row is a

Re: SQL Query casting objects

2010-12-10 Thread Henrique Boregio
Thanks, I'll give it a shot! On Thu, Dec 9, 2010 at 11:39 PM, Henrique Boregio wrote: > I have an SQL query to do a full-text search on my database: > > String sql = "SELECT * FROM Items WHERE MATCH (title, description) > AGAINST ('" + searchText + "'

Basic Webpage security

2010-12-10 Thread Henrique Boregio
Just like many others, my website has parts that are “public” and parts where the user has to login to see it. Since I don’t need to manage user roles, I have this basic interface: public class SecureWebPage extends WebPage { public SecureWebPage() { if(!UserLoggedInSession.get().isLoggedI

URL coding strategies

2010-12-16 Thread Henrique Boregio
Hello, I am mounting my URLs so I can list product items like so: http://www.mysite.com/item/id/0 http://www.mysite.com/item/id/1 and so on...then I user this id param to fetch the data from the database. I am not accesing this page directly. I have another page where the items are fully listed (

Re: URL coding strategies

2010-12-16 Thread Henrique Boregio
Hey Bas, you're right, I hadn't thought of it that way. In option 1, how would I go about using a unique textual identifier? Say there are 2 items with the name "Ford Ranger Model 2005" but each one is posted by different users, the URL would still be: http://www.mysite.com/item/Ford-Ranger-Model-

Multiple user inputs created dynamically.

2011-01-05 Thread Henrique Boregio
Hello, I have a product published on a page, and users can ask the owner of this product a question. Only the owner can then answer it. A product can have many questions. But each question only has one answer, which is answered by the owner. What I am trying to do is have a listView listing all o

Mixing links and texts

2011-01-10 Thread Henrique Boregio
Hello, I am working on a notifications systems and want to generate notifications like the following: "UserX has asked you a question on item ItemY" Where UserX is a link to the user’s profile page. And ItemY is a link to the item’s page. Currently I am doing the following (pseudo-code): Java Sou

Re: Mixing links and texts

2011-01-10 Thread Henrique Boregio
Making a custom component sounds like a good idea..thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Browser loading absolute image paths

2011-01-15 Thread Henrique Boregio
Hi, I am trying to load a picture from a user folder, so I am storing the picture's path and pasting it into the "src" attribute of the image tag. As an example, I have the picture named "profile.jpg" located at "F:\workspace\project\pictures\2", so the corresponding HTML is: This picture exist

Storing and retrieving user uploaded images

2011-02-18 Thread Henrique Boregio
Hi, I'm having trouble storing user uploaded images. In my WicketApplication class, I setup a folder to store users pictures, so I end up with a folder structure similar to this: ROOT FOLDER - user1_folder (pic1.jpg, pic2.jpg, etc...) - user2_folder ( ... ) - ... The issue I am having is that thi

Re: Storing and retrieving user uploaded images

2011-02-19 Thread Henrique Boregio
Thanks everyone, I was able to fix it by doing: When uploading a picture: WebApplication.get().getServletContext().getRealPath("") + "/" + "profilePics" + "/"; When retrieving a picture: WebApplication.get().getServletContext().getContextPath() + "/" + "profilePics" + "/" + userId + "/"; ---

Dynamic activity feed

2011-02-24 Thread Henrique Boregio
Hi, this is more of a design question than a wicket question, but I'm sure someone has done it before. Anyone has any idea if there are any simple libraries to create activity feeds (like the one seen at http://www.bookrenter.com/ or the "Recent Activities" column at http://www.9flats.com). Right

Re: Dynamic activity feed

2011-02-24 Thread Henrique Boregio
Hey Ernesto, I think this is exactly what I am looking for. Will give it a try when I get home later today, thanks! On Thu, Feb 24, 2011 at 11:24 AM, Henrique Boregio wrote: > Hi, this is more of a design question than a wicket question, but I'm > sure someone has done it before. >

Storing and loading escaped special characters.

2011-03-08 Thread Henrique Boregio
Hi, quick question. Wicket automatically escapes special characters so when I type in: This is "my" house. What gets stored in my database is: This is "my" house When I try to display it using a Label, like: new Label("label", DAO.getValue(id)); It does not convert the " to quotes. Is there a w

Before deployment checklist

2011-03-09 Thread Henrique Boregio
Hello. I am getting close to deploying my first wicket web application. It's not huge but it does have lots of classes, components, database stuff, search features, etc. I was wondering if anyone had some kind of checklist on what things to definitely check before deploying a wicket application in

RestartResponseAtInterceptPageException not redirecting to source Page

2011-03-09 Thread Henrique Boregio
Hi, I have a RestartResponseAtInterceptPageException working correctly in one case and not so in another. I have a Login page with a LoginForm. In this form's onSubmit method, right after the user validation takes place, I have: if(!continueToOriginalDestination()) { setResponsePage(Dashboard

FileUpload size limit

2011-03-17 Thread Henrique Boregio
Hi, how can I restrict the size of a file being uploaded, before it gets uploaded? The following code does not work, since wicket first uploads the file to the server, THEN checks its size (I've tried it uploading a 1Gig file): protected void onSubmit() { final FileUpload uplo

Initializing new thread in WicketApplication.init()

2011-05-03 Thread Henrique Boregio
Hi, I have a very simple thread that sleeps most of the time. Every hour, it goes to the database to check what new stuff has been added, and generates a summary of that. This thread is started in my WicketApplication.init() method. The problem is that the run() method of this thread, needs acces

Re: Initializing new thread in WicketApplication.init()

2011-05-03 Thread Henrique Boregio
Thanks Martin...had to do some refactoring but your solution worked great. On Tue, May 3, 2011 at 5:07 PM, Henrique Boregio wrote: > Hi, I have a very simple thread that sleeps most of the time. Every > hour, it goes to the database to check what new stuff has been added, > and ge

Re: Initializing new thread in WicketApplication.init()

2011-05-03 Thread Henrique Boregio
robably already thought of that. My scars are still fresh... -Clint On Tue, May 3, 2011 at 3:37 PM, Henrique Boregio wrote: Thanks Martin...had to do some refactoring but your solution worked great. On Tue, May 3, 2011 at 5:07 PM, Henrique Boregio wrote: Hi, I have a very simple thread that sle

Separate log files (tomcat, hibernate, wicket, etc)

2011-05-06 Thread Henrique Boregio
Hi, I've been searching for a simple way to do this but if I've only found over-complicated tutorials. I am trying to setup my lo4j properties file to do something like: everything wicket --> wicket.log everything hibernate --> hibernate.log everything my_web_app --> my_app.log everything tomcat

Re: Separate log files (tomcat, hibernate, wicket, etc)

2011-05-06 Thread Henrique Boregio
It asks how to redirect all of wicket logging to a separate log file other then the application's log file. So, this is a wicket question. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-ma

Re: Separate log files (tomcat, hibernate, wicket, etc)

2011-05-06 Thread Henrique Boregio
Fine..majority wins, it's a log4j question haha Thanks anyways for the tips. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Clean URLs in PagingNavigator

2011-05-07 Thread Henrique Boregio
Hi, I've implemented different coding strategies throughout my site to have clean/good-looking URLs. There are some places though, where I'm not able to clean them. For example, when using a PagingNavigator..when I click on the default links such as "next", "prev", etc...I am still getting the "?w

New Website up using wicket

2011-05-12 Thread Henrique Boregio
Hey, just wanted to let you guys know that with the help of this community, I was able to build my first "real" website using wicket. Thanks everyone for the support in always trying answering the questions I've answered. I look forward to using wicket in other projects. Oh, its spekios.com if an

Re: New Website up using wicket

2011-05-16 Thread Henrique Boregio
Actually, I didn't even know there was an html compressor for wicket (I'll google it). As for the other question, the backend runs on hibernate. Not 100% hibernate, since I'm actually not mapping all of the relations using hibernate. ---

Killing threads in Application's onDestroy method

2011-05-18 Thread Henrique Boregio
Hi, in my Wicket Application class, I create a couple of thread that sleep most of the time..and come alive every one in a while to do some maintenance tasks. I create them in the init() method of the Wicket Application...and call kill() on them in the onDestroy() method. When I shutdown tomcat a

Re: Killing threads in Application's onDestroy method

2011-05-18 Thread Henrique Boregio
My bad...that's actually what I am doing. I have a stop() method insite my threads that change a boolean value to false inside the while...instead of having while(tru) On Wed, May 18, 2011 at 3:51 PM, Henrique Boregio wrote: > Hi, in my Wicket Application class, I create a couple of thr