Re: Wicket FileUpload problem

2008-10-15 Thread Igor Vaynberg
setup a servlet to receive the post -igor On Wed, Oct 15, 2008 at 11:25 PM, John Fehr <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to figure out how to get a file uploaded using wicket without a > form. That is, a flash piece is sending my wicket piece a file using the > HTTP POST method.

Wicket FileUpload problem

2008-10-15 Thread John Fehr
Hello, I'm trying to figure out how to get a file uploaded using wicket without a form. That is, a flash piece is sending my wicket piece a file using the HTTP POST method. The post will have Content-Type of multipart/form-data, Content-Disposition set to 'Filedata', a filename attribute, and th

Re: form components within an AccordionPanel

2008-10-15 Thread Nino Saturnino Martinez Vazquez Wael
jchappelle wrote: Yea, if it is having the problem in the javascript then it has nothing to do with wicket. I was just hoping you might be a javascript guru. :-) I only change stuff, if it's really needed. You could break a dozen things when correcting stuff.. I have recently found some jav

Re: Empty PageParametyers when using HybridUrlCodingStrategy

2008-10-15 Thread Erik van Oosten
That combination is wrong. If you use the IndexedHybridUrlCodingStrategy the first parameter is called "0". Secondly the AttributeModifier probably overwrites the generated src attribute. This should work (not tested): PageParameters params = new PageParameters(); params.put("0", myUrl);

Domain Model as interfaces

2008-10-15 Thread Edgar Merino
Hello, I couldn't find any other place to post this, so I'm doing it here, (it's related to java web development anyway). I've been working on a project where wicket has access to the domain layer through interfaces because I didn't want my project to depend on any dbms, however I've been

Re: Is there a way to get stateless DDC with onchange notification?

2008-10-15 Thread Ritesh Trivedi
Anyone? Ritesh Trivedi wrote: > > Hi, > > Is there a way to get stateless DDC with onchange notifications? Also > would be helpful if someone could explain why the wantOnChangeNotification > makes DDC stateful even if its enclosed within stateless form and in the > stateless bookmarkable page?

Re: Guice: injection outside Component

2008-10-15 Thread Edgar Merino
Let me correct that last post, I forgot to add the @Inject annotation to the service... it's working... thank you! Edgar Merino Edgar Merino escribió: Thank you Jeremy, I've tried that but it did not work: public class Instantiator { public Instantiator() { Injector injector = (

Re: Guice: injection outside Component

2008-10-15 Thread Edgar Merino
Thank you Jeremy, I've tried that but it did not work: public class Instantiator { public Instantiator() { Injector injector = ( (GuiceInjectorHolder) CmsApplication.get() .getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector(); injector.injectMembers(this);

Re: Guice: injection outside Component

2008-10-15 Thread Igor Vaynberg
or use salve.googlecode.com and live headache-free :) -igor On Wed, Oct 15, 2008 at 4:53 PM, Jeremy Thomerson <[EMAIL PROTECTED] > wrote: > Try adding a constructor and putting this line in it: > > *InjectorHolder*.*getInjector*().*inject*(*this*); > > Works with Spring - haven't used Guice pers

Re: Guice: injection outside Component

2008-10-15 Thread Jeremy Thomerson
Try adding a constructor and putting this line in it: *InjectorHolder*.*getInjector*().*inject*(*this*); Works with Spring - haven't used Guice personally. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Oct 15, 2008 at 6:42 PM, Edgar Merino <[EMAIL PROTECTED]> wrote: > Hello again

Guice: injection outside Component

2008-10-15 Thread Edgar Merino
Hello again, using guice's @Inject inside any component works perfect, however I've got some objects (not components) that reside inside a component and need an injected service, since wicket-guice handles only injection inside components, I'm getting null services: public class Instantia

Re: ModalWindow slow in Firefox3

2008-10-15 Thread Matej Knopp
I'm using FF3 on Mac and haven't noticed any speed problems. -Matej 2008/10/15 xiefei <[EMAIL PROTECTED]>: > Anyone else suffer the problem that wicket ModalWindow run slow in Firefox3? > > This never happens in IE6, and Firefox2, as I remember. > > We are using 1.4m2 > > > > > > > > > > > >

Re: GuiceInjectorHolder inside WebApplication

2008-10-15 Thread Edgar Merino
Ok, using wicket-guice now, problem solved... I didn't want to depend on guice inside my wicket components, but integration is perfect, so I guess I'll just leave it like that, thank you Igor. Edgar Merino Igor Vaynberg escribió: right. you are not keeping a reference to the injector itself

Re: GuiceInjectorHolder inside WebApplication

2008-10-15 Thread Igor Vaynberg
right. you are not keeping a reference to the injector itself, but you are giving webpage a reference to a service that is not serializable...thus your problem. i suggest using wicket-guice, it has provisions to make serialization work seamlessly when you pass instances of guice services into comp

Re: GuiceInjectorHolder inside WebApplication

2008-10-15 Thread Edgar Merino
This is happening when using a WebPage, but I'm not using an injector there... I have a class that receives a service as a parameter, that service is being fetch by the guice injector and passed to the component in the WebApplication: public class MyApp extends WebApplication { private Inje

Re: GuiceInjectorHolder inside WebApplication

2008-10-15 Thread Igor Vaynberg
the application class is not serialized, so there should be no serializatoin problems. can you post the stack trace? -igor On Wed, Oct 15, 2008 at 12:57 PM, Edgar Merino <[EMAIL PROTECTED]> wrote: > But I only need to keep a reference to a Guice injector in my > WebApplication to use it across s

Re: Strange exception when trying to use wicketstuff-annotation library

2008-10-15 Thread Timo Rantalaiho
On Wed, 15 Oct 2008, Azzeddine Daddah wrote: > When trying to use the wicketstuff-annotation library I got a very strange > Exception: "*log4j:ERROR Error occured while converting date.*". This causes > that my application couldn't be started up. > When removing this jar and his dependencies from t

Re: GuiceInjectorHolder inside WebApplication

2008-10-15 Thread Edgar Merino
But I only need to keep a reference to a Guice injector in my WebApplication to use it across some methods in it, I don't need it inside my wicket components... I think the wicket-guice integration serves a different purpose, correct me if I'm wrong. Edgar Merino richardwilko escribió: Have

Re: right click popup context menu

2008-10-15 Thread mkamneng
Hi Doug, thank you very much for your time and patience. I try it again using only the dependencies from the contrib-yui-examples AND IT'S WORKING. Unfortunately we strongly use the generic concept from java and the current context2menu is at the moment only supported by wicket1.3, which is not

Re: Multiple RadioGroups in an Table....

2008-10-15 Thread Igor Vaynberg
tada https://issues.apache.org/jira/browse/WICKET-1055 -igor On Wed, Oct 15, 2008 at 8:49 AM, Igor Vaynberg <[EMAIL PROTECTED]>wrote: > there is an issue in jira which provides a patch for this so you can lookat > that. the change is pretty simple. i will try to roll it into 1.4 soon if i > have

Re: form components within an AccordionPanel

2008-10-15 Thread jchappelle
Yea, if it is having the problem in the javascript then it has nothing to do with wicket. I was just hoping you might be a javascript guru. :-) I have recently found some javascript that works for me and I've almost got a component in wicket created for it. It will work for now. However, it woul

Re: form components within an AccordionPanel

2008-10-15 Thread Nino Saturnino Martinez Vazquez Wael
Great that you have done some extensive diagnostics.. jchappelle wrote: Thanks for the quick response. I am using wicket 1.3.4. I have been able to reproduce my problem with a very simplified example that is just an extension of the wicket-contrib-accordion-examples project. I have taken the Acc

Re: Highlight some words in the markup content

2008-10-15 Thread Jeremy Thomerson
If you are displaying search results dynamically, and it's not part of your static markup, you can also do something like this: class HighlightingModel extends LoadableDetachableModel { private transient IModel text; private transient IModel searchWord;

Re: Is it a wrong idea to implement injection on Models?

2008-10-15 Thread Igor Vaynberg
there is no easy way for us to support this because imodel is an interface and users implement their own implementations quiet frequently, so there is no way for us to intercept its creation like there is with Component which is a concrete class. what is needed in java is a general mechanism for s

Is it a wrong idea to implement injection on Models?

2008-10-15 Thread Daniel Jomphe
Hi, I read a few other threads related to this issue, but saw only technical means of freeing ourselves of the injection-is-only-for-Components limitation. Context After refactoring my code to make it so that the Guice injection no more happens on our Components but on our Models instead, I was s

RE: Trouble printing image

2008-10-15 Thread Dane Laverty
This ended up working for Firefox, but not for IE. The image served in Firefox will Save As "x.png", but the image in IE still shows as "untitled.bmp". Thanks for the suggestion though, it at least taught me a lot about resources and setting headers :) Dane -Original Message- From: Serkan

Re: Highlight some words in the markup content

2008-10-15 Thread Igor Vaynberg
as far as i know the response filter runs within the request cycle and request cycle has metadata facility, so -igor On Wed, Oct 15, 2008 at 10:07 AM, Thomas Singer <[EMAIL PROTECTED]> wrote: > Thanks. But how the filter should know about the request which contains the > information about wh

Re: Highlight some words in the markup content

2008-10-15 Thread Thomas Singer
Thanks. But how the filter should know about the request which contains the information about what to highlight? -- Cheers, Tom Igor Vaynberg wrote: iresponsefilter -igor On Wed, Oct 15, 2008 at 8:22 AM, Thomas Singer <[EMAIL PROTECTED]> wrote: OK, this looks trivial, but were should I pl

Re: form components within an AccordionPanel

2008-10-15 Thread jchappelle
Thanks for the quick response. I am using wicket 1.3.4. I have been able to reproduce my problem with a very simplified example that is just an extension of the wicket-contrib-accordion-examples project. I have taken the AccordionPage and added another menu item that has a TextField inside of it.

Re: Highlight some words in the markup content

2008-10-15 Thread Igor Vaynberg
iresponsefilter -igor On Wed, Oct 15, 2008 at 8:22 AM, Thomas Singer <[EMAIL PROTECTED]> wrote: > OK, this looks trivial, but were should I place this code to replace all > content, no matter whether it comes from a page template, border or > fragment? > > -- > Cheers, > Tom > > > > Martijn Dash

Re: Multiple RadioGroups in an Table....

2008-10-15 Thread Igor Vaynberg
there is an issue in jira which provides a patch for this so you can lookat that. the change is pretty simple. i will try to roll it into 1.4 soon if i have time. -igor On Wed, Oct 15, 2008 at 3:00 AM, Joel Halbert <[EMAIL PROTECTED]> wrote: > Hi, > > In follow up to the following thread: > > >

Re: Empty PageParametyers when using HybridUrlCodingStrategy

2008-10-15 Thread itayh
Creating the InlineFrame component: PageParameters params = new PageParameters(); params.add("url", myUrl); InlineFrame myFrame = new InlineFrame("MyFrame", this.getPageMap(), MyFrame.class, params); myFrame.add(new AttributeModifier("src", new Model("/myapp/app/iframe/MyFrame))); add(myFrame); C

Re: Highlight some words in the markup content

2008-10-15 Thread Thomas Singer
OK, this looks trivial, but were should I place this code to replace all content, no matter whether it comes from a page template, border or fragment? -- Cheers, Tom Martijn Dashorst wrote: tekst.replaceAll(searchword, "" + searchword + ""); label.setEscapeModelStrings(false); Martijn On W

Re: GuiceInjectorHolder inside WebApplication

2008-10-15 Thread richardwilko
Have you looked at the wicket guice integration? I think that does it already. Richard Edgar Merino wrote: > > Let me correct that last response: the problem is not solved yet. I > thought it was but after redeploying my application again I got a > serialization exception, why didn't the p

Strange exception when trying to use wicketstuff-annotation library

2008-10-15 Thread Azzeddine Daddah
Hi, When trying to use the wicketstuff-annotation library I got a very strange Exception: "*log4j:ERROR Error occured while converting date.*". This causes that my application couldn't be started up. When removing this jar and his dependencies from the lib and just use the normal Wicket mounting s

Re: Highlight some words in the markup content

2008-10-15 Thread Martijn Dashorst
tekst.replaceAll(searchword, "" + searchword + ""); label.setEscapeModelStrings(false); Martijn On Wed, Oct 15, 2008 at 3:56 PM, Thomas Singer <[EMAIL PROTECTED]> wrote: > We are using Wicket as base for our website (www.syntevo.com). We have a > simple search feature on the website, but want to

Highlight some words in the markup content

2008-10-15 Thread Thomas Singer
We are using Wicket as base for our website (www.syntevo.com). We have a simple search feature on the website, but want to extend it like it is known to work in forums: the searched words should be highlighted. Does someone already has implemented such a feature to surround plain words in the

Re: Empty PageParametyers when using HybridUrlCodingStrategy

2008-10-15 Thread Erik van Oosten
Itayh, What you do seems alright. Please show us complete code fragments. Both the part where you create the InlineFrame component, and the constructor of the MyFrame class. Regards, Erik. itayh schreef: Any Idea? itayh wrote: Thx for the quick response. I cahnged the url mount in

Re: Empty PageParametyers when using HybridUrlCodingStrategy

2008-10-15 Thread itayh
Any Idea? itayh wrote: > > Thx for the quick response. > > I cahnged the url mount in my application to > mount(new IndexedHybridUrlCodingStrategy("/iframe/MyFrame", > MyFrame.class)) ... > > My problem is that still when i try to create iframe like: > PageParameters params = new PageParamet

Re: WebPage constructor

2008-10-15 Thread Nino Saturnino Martinez Vazquez Wael
Not because I want to hijact the thread.. But you could use a compound property model inorder to get rid of all the propertymodels.. jensiator wrote: Oh and to you that has read this thread looking for code examples. Here is my code for doing this. (Hope it's the right way of doing it) There is

HTTPS, again

2008-10-15 Thread kan
I have web-site with login form in header, so the form does appear on all pages. Normally it does work insecure, so the page could be viewed insecure, but the form on it must be secure, otherwise it will send username/password over insecure http. I found in wicket wiki a solution for a page it che

Re: Small question about URL rewriting

2008-10-15 Thread Witold Czaplewski
Hmm...could be. Google shows only one urls [1] Maybe amazon uses other techniques like robots.txt or the meta-tag robots to block the other urls. But i didn't look at it. If you are interested in duplicate content, the google webmaster central blog has some very nice posts [2] [3]. [1] http://ww

Re: Small question about URL rewriting

2008-10-15 Thread Jon Stockdill
Django adds a "slug" field, which is unique, for its urls. Then you look up the content by slug instead of id Its admin interface suggests a slug, which is alterable if it is not unique. On 10/15/08, James Carman <[EMAIL PROTECTED]> wrote: > To be fair, I didn't find that second URL. I hand-

Re: errors on the WicketStuff Dojo split container example

2008-10-15 Thread Nino Saturnino Martinez Vazquez Wael
Hi I never get the response from Fernando, I asked for a snip of code.. It looked that his problem were something with YUI clashing, different versions between YUI and accordion panel.. jchappelle wrote: Did someone solve this? I am having the same issue. Thanks, Josh Fernando Wermus-2 w

Re: Small question about URL rewriting

2008-10-15 Thread James Carman
To be fair, I didn't find that second URL. I hand-crafted it. So, maybe Amazon doesn't let the search engines find those types of URLs by crawling. Wouldn't that help? On Wed, Oct 15, 2008 at 7:32 AM, Witold Czaplewski <[EMAIL PROTECTED]> wrote: > Btw... > > amazon.com is a very bad example for

Re: Open Modal Dialog at specific position on screen (not center)

2008-10-15 Thread Daniel Frisk
Hi! You have to set the parameter wmode="opaque" in your flash-object tag. That will make it a part of normal z-ordering. http://www.communitymx.com/content/source/E5141/wmodeopaque.htm // Daniel jalbum.net On 2008-10-14, at 22:42, groffhibbitz wrote: Hi, I'm running into a problem wher

Re: Small question about URL rewriting

2008-10-15 Thread Witold Czaplewski
Btw... amazon.com is a very bad example for a search engine friendly site. Duplicate content like the posted urls are more problematic than non-friendly urls. The perfect solution (unfortunately not always possible) is only one friendly or meaningful url for every unique page. Witold Am Wed, 15

Re: Session destruction due to timeout...

2008-10-15 Thread Nino Saturnino Martinez Vazquez Wael
Hi I use this approach: @Override protected ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new DiskPageStore()) { @Override protected void onBind(Request request, Session newSession) { sessionMap.put(newSession.g

Re: Small question about URL rewriting

2008-10-15 Thread Daan van Etten
Now thats *really* friendly :-) On 15 okt 2008, at 13:11, James Carman wrote: Right, I guess that's what I meant by "friendly" too. Friendly to search engines, not just our eyes. On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten <[EMAIL PROTECTED]> wrote: Keeping keywords in URLs also improves

Re: Small question about URL rewriting

2008-10-15 Thread James Carman
Right, I guess that's what I meant by "friendly" too. Friendly to search engines, not just our eyes. On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten <[EMAIL PROTECTED]> wrote: > Keeping keywords in URLs also improves search engine rankings. > > Regards, > > Daan > > On 15 okt 2008, at 13:01, Jame

Re: Small question about URL rewriting

2008-10-15 Thread Daan van Etten
Keeping keywords in URLs also improves search engine rankings. Regards, Daan On 15 okt 2008, at 13:01, James Carman wrote: When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to

Re: Small question about URL rewriting

2008-10-15 Thread James Carman
When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to someone): http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063 http://www.amazon.com/dp/0974514063

Re: GuiceInjectorHolder inside WebApplication

2008-10-15 Thread Edgar Merino
Let me correct that last response: the problem is not solved yet. I thought it was but after redeploying my application again I got a serialization exception, why didn't the previously supplied "solution" didn't work? can anyone give me a hand on this? thanks in advance. Edgar Merino Edgar

Re: Small question about URL rewriting

2008-10-15 Thread Daan van Etten
Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so

Multiple RadioGroups in an Table....

2008-10-15 Thread Joel Halbert
Hi, In follow up to the following thread: http://wicket.markmail.org/search/?q=multiple%20radiogroup%20in%20table#query:multiple%20radiogroup%20in%20table+page:1+mid:4mgyvni2ggbffkfq+state:results Can anyone offer any suggestions as to how one might roll their own component, as suggested, to a

Re: Small question about URL rewriting

2008-10-15 Thread Azzeddine Daddah
Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wicket

Re: Small question about URL rewriting

2008-10-15 Thread Daan van Etten
Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:

Re: WebPage constructor

2008-10-15 Thread jensiator
Oh and to you that has read this thread looking for code examples. Here is my code for doing this. (Hope it's the right way of doing it) There is no form or repeater in the page. It only shows a persons data from the database. Even when hitting refresh in browser. In page constructor public MyCons

Re: GuiceInjectorHolder inside WebApplication

2008-10-15 Thread Edgar Merino
Ok I re-read the javadoc for the GuiceInjectorHolder and found out I had to use it as a MetaDataKey, so I did that in my application: public void init() { //initialization code Injector injector = Guice.createInjector(); setMetaData(GuiceInjectorHolder.INJECTOR_KEY, new GuiceInjectorHo

Re: How to change field values in a validator?

2008-10-15 Thread Matthias Keller
Hi Igor Thanks, you saved my day. That was much more what I was looking for. I extended FormComponentPanel not to require a separate HTML file but live with what is in the original source which makes the usage much much easier. With that, I was able to implement my logic in no time. Since I'

GuiceInjectorHolder inside WebApplication

2008-10-15 Thread Edgar Merino
Hello, I need to hold a reference to a Guice injector inside my WebApplication, however since the injector is not serializable I tried using a GuiceInjectorHolder and keeping a reference to it in my WebApplication, but I'm still getting serialization exceptions when redeploying my applicat

Re: Session destruction due to timeout...

2008-10-15 Thread Johan Compagner
no you cant and Application.get() will never work then because the auto destruct of a container doesnt do that in a request ofcourse but just somewhere on some thread. if you need an application object you could try: Application.get(String applicationKey) The session object is gone so you cant a

Session destruction due to timeout...

2008-10-15 Thread Mendeleev
I need to add functionality to my Wicket application that allows me to record in the MySQL database the exact time a user logs out of the application. This includes recording the time the session is destroyed by the web container due to user inactivity. I tried: 1. An implementation of HttpSessi

Re: WebPage constructor

2008-10-15 Thread jensiator
Thanks Mårten and Johan. Now I know what to do. Sometime you just need to discuss issues in wicket because there is not so many bestpractise aricticles. Like in the Struts Framework. But it will change in time... Jens -- View this message in context: http://www.nabble.com/WebPage-constructor-tp

Re: WebPage constructor

2008-10-15 Thread Maarten Bosteels
http://cwiki.apache.org/WICKET/working-with-wicket-models.html Maarten On Wed, Oct 15, 2008 at 9:40 AM, Johan Compagner <[EMAIL PROTECTED]>wrote: > no everytime you want to fetch data from a database you should do that in > your models > load the data an detach the data see detachable models > >

Re: WebPage constructor

2008-10-15 Thread Johan Compagner
no everytime you want to fetch data from a database you should do that in your models load the data an detach the data see detachable models On Wed, Oct 15, 2008 at 9:30 AM, jensiator <[EMAIL PROTECTED]> wrote: > > Thanks Johan > So that means that if you would like to fetch data every time the p

Re: Stream/download files through portlet

2008-10-15 Thread Rob Sonke
Thijs and I debugged the code together this morning because when he read this thread he was sure that both options (overriding setheaders and onclick) should work. After some debugging we found a bug in Liferay which could be easily fixed in our used version. The current (5.1.2) version has a l

Re: WebPage constructor

2008-10-15 Thread jensiator
Thanks Johan So that means that if you would like to fetch data every time the page is shown you would need to call the database in the onrender method. I'm not using a repeater, only labels to display the data.(With a repeater I could use the "populatemethods" that runs during onrender). Or migh