Re: Apache Tomcat CSS

2009-05-12 Thread Sean W

Hi Tm,

Figuring out all the paths in wicket with added CSS and javascript always
seems to be a challenge.

For the HTML files in your source folders,   tags seem to automatically
adjusted to the context's root. The same goes for CSS links in your
wicket:head 

Note that you can surround markup with wicket:link, which will cause the
paths of your link attributes in the markup to be adjusted.

Remember that url(...) attributes in CSS are always relative to the location
of the CSS file, which is actually handy, because once you link to the CSS
file, it doesn't matter what the path of the HTML is (like if you're viewing
the HTML vs deploying your app, it will change). For example if your CSS
file is:

/css/hello.css, and your image is in /images/smile.gif, then use
url(../images/smile.gif), and as long as you reference that CSS, the image
will always word.

Because of the edit HTML / deploy wicket app path changing problem, it's
often handy to stick with referencing files using their absolute path (with
the leading slash). Using page parameters in wicket will by default add
paths to the page. This tends to be an issue when adding static javascript
files. Links to files in javascript are always relative to the page's path
that's using the javascript (unlike CSS, where url() is relative to the CSS
file)

Sometimes it's handy to keep two CSS links in your header. One for HTML
editing, and one that works for deployment.

Hope this helps a bit!

-Sean


TradeMark wrote:
 
 Hi there,
 
 has anyone ever encountered problem with these two? I have a simple 
 application and I wanted to add a css file with link rel=... but after 
 deploying nothing happens.
 
 So I copied the CSS in index.html between style tags. This helped but 
 there is still one problem:
 
 #header
 {
 width:100%;
 height:122px;
 background: #44 url('n1.gif') repeat-x;
 }
 
 even though the picture n1.gif is present in the same directory as html 
 file it doesnt load. Is there any solution to this?
 
 tm
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Apache-Tomcat---CSS-tp23503600p23504972.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Apache Tomcat CSS

2009-05-12 Thread Sean W

Hi Tm,

Figuring out all the paths in wicket with added CSS and javascript always
seems to be a challenge.

For the HTML files in your source folders, img src= tags seem to
automatically adjusted to the context's root. The same goes for CSS links in
your wicket:head

Note that you can surround markup with wicket:link, which will cause the
paths of your link attributes in the markup to be adjusted.

Remember that url(...) attributes in CSS are always relative to the location
of the CSS file, which is actually handy, because once you link to the CSS
file, it doesn't matter what the path of the HTML is (like if you're viewing
the HTML vs deploying your app, it will change). For example if your CSS
file is:

/css/hello.css, and your image is in /images/smile.gif, then use
url(../images/smile.gif), and as long as you reference that CSS, the image
will always word.

Because of the edit HTML / deploy wicket app path changing problem, it's
often handy to stick with referencing files using their absolute path (with
the leading slash). Using page parameters in wicket will by default add
paths to the page. This tends to be an issue when adding static javascript
files. Links to files in javascript are always relative to the page's path
that's using the javascript (unlike CSS, where url() is relative to the CSS
file)

Sometimes it's handy to keep two CSS links in your header. One for HTML
editing, and one that works for deployment.

Hope this helps a bit!
-Sean

p.s. Sorry - last message got parsed strangely.
-- 
View this message in context: 
http://www.nabble.com/Apache-Tomcat---CSS-tp23503600p23505003.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: retrieve value at mouse click in palette

2009-04-07 Thread Sean W

Ying, is an HTML color picker perhaps what you are looking for? Try
http://cpicker.com/, I found it to be a good one.


Ying-9 wrote:
 
 Hi,
   I try to retrieve the value of  highlighted choice in palette by
 single click. Is there any sample code to do that anywhere? I cannot
 find anything from google or wicket book.
 
 Ying
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/retrieve-value-at-mouse-click-in-palette-tp22927443p22934528.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



DataView starting Page number

2009-03-25 Thread Sean W

I just discovered my problem, but I decided to post this because it may help
someone.

When using a DataView, be sure to use .setItemsPerPage( before using
.setCurrentPage( or else you will get the exception:
IndexOutOfBoundsException: argument [page]=1, must be 0=page1

Perhaps the documentation could make this obvious. ciao.
-- 
View this message in context: 
http://www.nabble.com/DataView-starting-Page-number-tp22710223p22710223.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Multiple Copies of One Wicket App

2009-01-09 Thread Sean W

path:
/ContextPath/wicket/BookmarkablePage

It appears to me that using Wicket you cannot place anything in the path
between the context path and the mounted name except for wicket, which is
defined as your url-pattern. In other words, a mounted page cannot be
referenced from more than one path. This also means Wicket can't support
sub contexts.

Perhaps I'll have to try and deploy a single app 200 times in tomcat with
the same WAR. :-S
-- 
View this message in context: 
http://www.nabble.com/Multiple-Copies-of-One-Wicket-App-tp21355510p21372369.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Multiple Copies of One Wicket App

2009-01-08 Thread Sean W

Greetings,

I am trying to set up a single WAR (web app) that can use as many as 200
different databases depending on the request path.

Normally we have:
/ContextPath/WicketServlet/BookmarkablePage

I am trying to make:
/ContextPath/FileName/WicketServlet/BookmarkablePage

Where FileName is a configuration file on the server containing database
connection info.

Is there a way to pass this FileName to wicket's Application object? Is it
possible to use WicketFilter for this? I'm having trouble finding relevant
examples. Any help or alternate approaches would be helpful. 

Thanks!

FYI: I currently have a 1-web app, 1-servlet, 1-application setup. I
basically need to make a couple hundred seemingly-independent copies of the
same program (more multiple clients) using most efficient method.
-- 
View this message in context: 
http://www.nabble.com/Multiple-Copies-of-One-Wicket-App-tp21355510p21355510.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Page access/security - forwarding in constructor

2008-12-09 Thread Sean W

Greetings,

I'm building an multiple-page wicket application. My Session class holds
permission values dictating which pages the current user of the session can
access. (These permission values are set when a user logs in)

My question is: If the user tries to access a page to which they do not have
access, we discover this in the page's constructor, but how can you forward
this request to another page in the constructor (to block access to the
page)? Perhaps there is a better way to do this?

Thanks!
-Sean
-- 
View this message in context: 
http://www.nabble.com/Page-access-security---forwarding-in-constructor-tp20920192p20920192.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Back-button Page instance cloning issue

2008-10-29 Thread Sean W

Greetings,

I have spent a couple days trying to fix this issue, any help would be
appreciated:

Action sequence:
1. User of my application loads a wicket/html form page
2. User clicks a link and goes to another page
3. User clicks the browser's BACK button
4. User edits form's content and clicks submit

By debugging and breaking in the onSubmit handler of the form, I notice that
all the variables I used to originally construct the form page have been
replaced with cloned instances! This is a problem because the object that
was edited no longer refers to original object (which is held at the
application level), and therefore the changes do not get seen, since the
responding page uses the original object.

Is there a way to disable this component cloning behavior, or should I code
in a way that I only ever rely on id values and never the actual object
instance? :sleep:

Thanks in advance!
-Sean
-- 
View this message in context: 
http://www.nabble.com/Back-button-Page-instance-cloning-issue-tp20235001p20235001.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Back-button Page instance cloning issue

2008-10-29 Thread Sean W

Ah, I get It. I thought we could count on direct object references to the
application level for at least the duration of the user session, but now i
see it's not a good idea, especially if you want proper back-button
functionality  serialization. LoadableDetachableModel sounds good, thanks.


igor.vaynberg wrote:
 
 wicket can clone your model objects for versioning or serialize the
 entire page to disk. it is not a good idea to hold direct references
 to object's whose lifecycle is independent of wicket components, for
 that you should use loadabledetachablemodel or something like it.
 
 -igor
 
 On Wed, Oct 29, 2008 at 1:12 PM, Sean W [EMAIL PROTECTED] wrote:

 Greetings,

 I have spent a couple days trying to fix this issue, any help would be
 appreciated:

 Action sequence:
 1. User of my application loads a wicket/html form page
 2. User clicks a link and goes to another page
 3. User clicks the browser's BACK button
 4. User edits form's content and clicks submit

 By debugging and breaking in the onSubmit handler of the form, I notice
 that
 all the variables I used to originally construct the form page have been
 replaced with cloned instances! This is a problem because the object that
 was edited no longer refers to original object (which is held at the
 application level), and therefore the changes do not get seen, since the
 responding page uses the original object.

 Is there a way to disable this component cloning behavior, or should I
 code
 in a way that I only ever rely on id values and never the actual object
 instance? :sleep:

 Thanks in advance!
 -Sean
 --
 View this message in context:
 http://www.nabble.com/Back-button-Page-instance-cloning-issue-tp20235001p20235001.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Back-button-Page-instance-cloning-issue-tp20235001p20235720.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]