Re: [Wicket-user] page variations (in 1.2)
can you elaborate how it relates to wicket? Scott Swank wrote on 07/12/07 19:22: May I suggest the "state pattern" :). public class Yours { private YourState state; public Foo someMethod() { return state.getFoo(); } etc. } http://en.wikipedia.org/wiki/State_pattern On 7/12/07, Ittay Dror <[EMAIL PROTECTED]> wrote: Hi, Say I have some entity E, and it can have states A,B,C. now, for each state, I render the entity a bit differently (showing more or less information, changing colors). The page is comprised of many, sometimes nested (in panels) components. What is the best way to achieve those variations, other than sprinkling 'if (state == S)' statements when creating the components? One way could be to allow variations ala xslt on the template html based on the state (remove a div, change color of a label etc.). But this changes the structure of the page, and may make wicket issue errors (no matching markup for component). I would like to hear what others have to say about this issue Thank you, Ittay -- Ittay Dror Chief Architect, R&D, Qlusters Inc. Web: qlusters.com Email: [EMAIL PROTECTED] Phone: +972-3-6081994 openQRM - Data Center Provisioning -- I own this number: D0E008A921FF04A9DB8C12668E4315F4. Get your own at http://www.freedom-to-tinker.com - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Ittay Dror Chief Architect, R&D, Qlusters Inc. Web: qlusters.com Email: [EMAIL PROTECTED] Phone: +972-3-6081994 openQRM - Data Center Provisioning -- I own this number: D0E008A921FF04A9DB8C12668E4315F4. Get your own at http://www.freedom-to-tinker.com - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] page variations (in 1.2)
Hi, Say I have some entity E, and it can have states A,B,C. now, for each state, I render the entity a bit differently (showing more or less information, changing colors). The page is comprised of many, sometimes nested (in panels) components. What is the best way to achieve those variations, other than sprinkling 'if (state == S)' statements when creating the components? One way could be to allow variations ala xslt on the template html based on the state (remove a div, change color of a label etc.). But this changes the structure of the page, and may make wicket issue errors (no matching markup for component). I would like to hear what others have to say about this issue Thank you, Ittay -- Ittay Dror Chief Architect, R&D, Qlusters Inc. Web: qlusters.com Email: [EMAIL PROTECTED] Phone: +972-3-6081994 openQRM - Data Center Provisioning -- I own this number: D0E008A921FF04A9DB8C12668E4315F4. Get your own at http://www.freedom-to-tinker.com - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Change Request (Re: dynamically (client) created form components)
below is a suggestion by me on how to handle repeating components created by javascript, especially for the case where several fields are involved. would love to get a comment on it thanks, ittay Ittay Dror wrote: > > > i think this can be solved inside wicket quite easily: > * FormComponent.getInputAsArray uses > 'getRequest().getParameters(getInputName())'. instead, it would be > 'getParent().getRequestParameters(this, getInputName())', > * the default implementation of getRequestParameters(Component, String) in > Component will be getRequest().getParameters(getInputName()) > * In the above case, when creating a ListView, use a subclass that > modifies getRequestParameters() so it returns the parameters from the nth > occurrence of the parameters (the nth 'atext=xx&acb=yy' segment) > > then, form components can be used as they are. > > ittay > -- View this message in context: http://www.nabble.com/dynamically-%28client%29-created-form-components-tf3325801.html#a9332092 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] dynamically (client) created form components
Ittay Dror wrote: > > > b. have all repeating elements have the same name. the problem is that > components won't be updated correctly if some fields do not appear, or > i'll need to modify getInputAsArray for each (so as to look in the query > string, not the parsed parameters), and give each an index. > > i'm looking for a better way. > > i think this can be solved inside wicket quite easily: * FormComponent.getInputAsArray uses 'getRequest().getParameters(getInputName())'. instead, it would be 'getParent().getRequestParameters(this, getInputName())', * the default implementation of getRequestParameters(Component, String) in Component will be getRequest().getParameters(getInputName()) * In the above case, when creating a ListView, use a subclass that modifies getRequestParameters() so it returns the parameters from the nth occurrence of the parameters (the nth 'atext=xx&acb=yy' segment) then, form components can be used as they are. ittay -- View this message in context: http://www.nabble.com/dynamically-%28client%29-created-form-components-tf3325801.html#a9247234 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] dynamically (client) created form components
Johan Compagner wrote: > >> > I have one of those pages with '+' and '-' buttons that allow to add >> more >> > fields. How do I manage these in wicket without ajax? > > > just links? Or if something should be submitted SubmitLinks? > And in that link.onClick you do the + or the - behavior > > >> another point is this: assume the fields being added are a text (named >> atext) field and a checkbox (named acb). now if the user clicked '+' >> twice, >> he has two of each. if he unchecks the first cb, then on submission, the >> query string will look like this: atext=foo&atext=bar&acb=on >> >> if i were to program directly in a servlet, this would have been natural >> enough, i'd parse the query string to a list of pairs (name=value) and >> iterating the list i can easily tell that the firs acb is missing and so >> conclude it is not checked. > > > So you want form data to be submitted? you can use a form for this and use > submit links. Then ask the checkbox for its state. > ok, didn't explain myself right: i have a page with a form. when submitted, the form contains a list of text and checkbox input elements. the list of elements is generated with javascript, by clicking a '+' at the top of the form, or '-' near an item (see http://www.quirksmode.org/dom/domform.html, there, adding one review and submitting gives the query stringcd1=title&rankingsel1=Rating&review1=Short+review&cd2=title&rankingsel2=Rating&review2=Short+review&something2=test2 ). so '+' and '-' just call javascript functions, they don't submit the form. another button does. in wicket, i would have liked to use a ListView inside the form. there are two alternatives here: a. in the javascript make each form element have a unique name and use the same (id) in wicket. i don't like this because in my real case, the elements are not created by the javascript function, but taken from somewhere else, in a generic way. b. have all repeating elements have the same name. the problem is that components won't be updated correctly if some fields do not appear, or i'll need to modify getInputAsArray for each (so as to look in the query string, not the parsed parameters), and give each an index. i'm looking for a better way. Johan Compagner wrote: > > > johan > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/dynamically-%28client%29-created-form-components-tf3325801.html#a9246999 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] dynamically (client) created form components
Ittay Dror wrote: > > Hi, > > I have one of those pages with '+' and '-' buttons that allow to add more > fields. How do I manage these in wicket without ajax? > > Thanks, > Ittay > another point is this: assume the fields being added are a text (named atext) field and a checkbox (named acb). now if the user clicked '+' twice, he has two of each. if he unchecks the first cb, then on submission, the query string will look like this: atext=foo&atext=bar&acb=on if i were to program directly in a servlet, this would have been natural enough, i'd parse the query string to a list of pairs (name=value) and iterating the list i can easily tell that the firs acb is missing and so conclude it is not checked. but how can i do it in wicket? ittay -- View this message in context: http://www.nabble.com/dynamically-%28client%29-created-form-components-tf3325801.html#a9246510 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] dynamically (client) created form components
Hi, I have one of those pages with '+' and '-' buttons that allow to add more fields. How do I manage these in wicket without ajax? Thanks, Ittay -- View this message in context: http://www.nabble.com/dynamically-%28client%29-created-form-components-tf3325801.html#a9246163 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
i thought about it, and i think i really need a page. the reason is that while the data is static, it doesn't mean the page layout is simple. I might want to break long content into pages, provide 'next' and 'prev' links. igor.vaynberg wrote: > > so what you really want is a shared resource and not a page :) > > -igor > > > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote: >> >> >> the page has an associated markup. it has place holders for the content, >> the >> table of contents and a label (name of file of content). the tag >> contains references to css and javascript. >> >> i think what i'd like is for the Page to be able to save the rendered >> content and when called, to write the content to the servlet response, >> stopping the request cycle. >> >> igor.vaynberg wrote: >> > >> > if i got it right what you are doing is reading a bunch of files and >> > combining the result >> > >> > now you dont want to use cache infront of the appserver because the >> page >> > isnt really static like you said >> > >> > the page itself is just a label that spits out the result of the >> > concatenated text correct? so there is little point to caching the >> page. >> > >> > what you really want to do is to cache the expensive operation which >> isnt >> > creating the page but loading/concatenating that text >> > >> > so what you do is create a concurrenthashmap that lives in application >> > scope, this map will house the results of your loaded+concatenated text >> > via >> > softreferences >> > >> > so the model for you label becomes like this >> > >> > new abstractreadonlymodel() { Object getobject() { >> > Map map=getapplication().getcache(); >> > Key key=..construct cache key used to identify the result >> > String text=map.get(key); >> > if (text==null) { text=constructcontent(); map.put(key, text); } >> > return text; >> > } >> > >> > -igor >> > >> > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> i didn't follow. can you please elaborate? where will the map be used? >> >> >> >> >> >> igor.vaynberg wrote: >> >> > >> >> > i wouldnt cache the page but i would cache the concatenated result >> >> > >> >> > you can have a concurrenthashmap in your application keeping >> >> > softreferences >> >> > to the concatted text >> >> > >> >> > will that work? >> >> > >> >> > -igor >> >> > >> >> > >> >> > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> >> >> >> i read this post already ;) >> >> >> >> >> >> i don't want to add another framework on top of wicket >> >> (reverse-caching >> >> >> HTTP >> >> >> accelerator). and my pages are not exactly static. i read several >> >> static >> >> >> files and combine them (i read the content from one file, a table >> of >> >> >> contents from another and add a Label component whose value is the >> >> file >> >> >> name). once the page is assembled, it is stateless. So what I'm >> >> looking >> >> >> for >> >> >> is saving the assembled code, so when the page is requested again, >> the >> >> >> saved >> >> >> data is served, instead of going through the cycle flow again. >> >> >> >> >> >> >> >> >> Jonathan Locke wrote: >> >> >> > >> >> >> > >> >> >> > >> >> http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket >> >> >> > >> >> >> > read post and comments. >> >> >> > >> >> >> > >> >> >> > Ittay Dror wrote: >> >> >> >> >> >> >> >> Hi, >> >> >> >> >> >> >> >> How can I cache rendered pages (the pages I want to cache are >> >> composed >> >> >> >> dynamically, but from a static content. So after composition >> they >> >&g
Re: [Wicket-user] rendered pages cache
ok. thanks. but how do i create the html output? something like 'String output = " > dont use a page > > create a shared resource that streams the contents see WebResource and > DynamicWebResource > > -igor > > > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote: >> >> >> again, i don't think i follow. >> >> my page's markup looks something like: >> >> >> >>
Re: [Wicket-user] rendered pages cache
again, i don't think i follow. my page's markup looks something like:
Re: [Wicket-user] rendered pages cache
the page has an associated markup. it has place holders for the content, the table of contents and a label (name of file of content). the tag contains references to css and javascript. i think what i'd like is for the Page to be able to save the rendered content and when called, to write the content to the servlet response, stopping the request cycle. igor.vaynberg wrote: > > if i got it right what you are doing is reading a bunch of files and > combining the result > > now you dont want to use cache infront of the appserver because the page > isnt really static like you said > > the page itself is just a label that spits out the result of the > concatenated text correct? so there is little point to caching the page. > > what you really want to do is to cache the expensive operation which isnt > creating the page but loading/concatenating that text > > so what you do is create a concurrenthashmap that lives in application > scope, this map will house the results of your loaded+concatenated text > via > softreferences > > so the model for you label becomes like this > > new abstractreadonlymodel() { Object getobject() { > Map map=getapplication().getcache(); > Key key=..construct cache key used to identify the result > String text=map.get(key); > if (text==null) { text=constructcontent(); map.put(key, text); } > return text; > } > > -igor > > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote: >> >> >> i didn't follow. can you please elaborate? where will the map be used? >> >> >> igor.vaynberg wrote: >> > >> > i wouldnt cache the page but i would cache the concatenated result >> > >> > you can have a concurrenthashmap in your application keeping >> > softreferences >> > to the concatted text >> > >> > will that work? >> > >> > -igor >> > >> > >> > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> i read this post already ;) >> >> >> >> i don't want to add another framework on top of wicket >> (reverse-caching >> >> HTTP >> >> accelerator). and my pages are not exactly static. i read several >> static >> >> files and combine them (i read the content from one file, a table of >> >> contents from another and add a Label component whose value is the >> file >> >> name). once the page is assembled, it is stateless. So what I'm >> looking >> >> for >> >> is saving the assembled code, so when the page is requested again, the >> >> saved >> >> data is served, instead of going through the cycle flow again. >> >> >> >> >> >> Jonathan Locke wrote: >> >> > >> >> > >> >> > >> http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket >> >> > >> >> > read post and comments. >> >> > >> >> > >> >> > Ittay Dror wrote: >> >> >> >> >> >> Hi, >> >> >> >> >> >> How can I cache rendered pages (the pages I want to cache are >> composed >> >> >> dynamically, but from a static content. So after composition they >> >> rarely >> >> >> (even never) change)? >> >> >> >> >> >> Thanks, >> >> >> Ittay >> >> >> >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> >> - >> >> Take Surveys. Earn Cash. Influence the Future of IT >> >> Join SourceForge.net's Techsay panel and you'll get the chance to >> share >> >> your >> >> opinions on IT & business topics through brief surveys-and earn cash >> >> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> >> ___ >> >> Wicket-user mailing list >> >> Wicket-user@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> >> > >> > >> ---
Re: [Wicket-user] rendered pages cache
i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: > > i wouldnt cache the page but i would cache the concatenated result > > you can have a concurrenthashmap in your application keeping > softreferences > to the concatted text > > will that work? > > -igor > > > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote: >> >> >> i read this post already ;) >> >> i don't want to add another framework on top of wicket (reverse-caching >> HTTP >> accelerator). and my pages are not exactly static. i read several static >> files and combine them (i read the content from one file, a table of >> contents from another and add a Label component whose value is the file >> name). once the page is assembled, it is stateless. So what I'm looking >> for >> is saving the assembled code, so when the page is requested again, the >> saved >> data is served, instead of going through the cycle flow again. >> >> >> Jonathan Locke wrote: >> > >> > >> > http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket >> > >> > read post and comments. >> > >> > >> > Ittay Dror wrote: >> >> >> >> Hi, >> >> >> >> How can I cache rendered pages (the pages I want to cache are composed >> >> dynamically, but from a static content. So after composition they >> rarely >> >> (even never) change)? >> >> >> >> Thanks, >> >> Ittay >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033148 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
how about using oscache? afaik, wicket plans to work based on a filter, not a servlet (why?), if so, will using a filter for caching conflict (the order matters here)? Ittay Dror wrote: > > i read this post already ;) > > i don't want to add another framework on top of wicket (reverse-caching > HTTP accelerator). and my pages are not exactly static. i read several > static files and combine them (i read the content from one file, a table > of contents from another and add a Label component whose value is the file > name). once the page is assembled, it is stateless. So what I'm looking > for is saving the assembled code, so when the page is requested again, the > saved data is served, instead of going through the cycle flow again. > > > Jonathan Locke wrote: >> >> >> http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket >> >> read post and comments. >> >> >> Ittay Dror wrote: >>> >>> Hi, >>> >>> How can I cache rendered pages (the pages I want to cache are composed >>> dynamically, but from a static content. So after composition they rarely >>> (even never) change)? >>> >>> Thanks, >>> Ittay >>> >> >> > > -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033123 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: > > > http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket > > read post and comments. > > > Ittay Dror wrote: >> >> Hi, >> >> How can I cache rendered pages (the pages I want to cache are composed >> dynamically, but from a static content. So after composition they rarely >> (even never) change)? >> >> Thanks, >> Ittay >> > > -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] rendered pages cache
Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9028362 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] ExternalLink weirdness
why do this anyway? the link doesn't work. Johan Compagner wrote: > hmm that does seem weird. > Strange thing is that we don't do it for the onclick .. only for the > href attribute.. > > that comment is in my code at another place > > it is this: > // generate the href attribute > tag.put("href", Strings.replaceAll(url, "&", "&")); > > and > > // or generate an onclick JS handler directly > tag.put("onclick", "location.href='" + url + "';"); > > johan > > > On 8/10/06, *Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > in ExternalLink.onComponentTag, if the href is not null, this is the > code: > // or generate an onclick JS handler directly > tag.put("href", Strings.replaceAll(hrefValue.toString(), > "&", "&")); > > > first, the comment seems odd > second, why replace '&' with '&'? can't i have an href like > 'http://mysite.com/page?arg1=val1&arg2=val2 > <http://mysite.com/page?arg1=val1&arg2=val2> '? (we're trying to use > such an href, and it doesn't work) > > thanks, > ittay > > -- > === > Ittay Dror, > Chief architect, openQRM group leader, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > +972-3-6081994 Fax: +972-3-6081841 > > http://www.openQRM.org > - Keeps your Data-Center Up and Running > > - > > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > <https://lists.sourceforge.net/lists/listinfo/wicket-user> > > > > > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM group leader, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] ExternalLink weirdness
in ExternalLink.onComponentTag, if the href is not null, this is the code: // or generate an onclick JS handler directly tag.put("href", Strings.replaceAll(hrefValue.toString(), "&", "&")); first, the comment seems odd second, why replace '&' with '&'? can't i have an href like 'http://mysite.com/page?arg1=val1&arg2=val2'? (we're trying to use such an href, and it doesn't work) thanks, ittay -- === Ittay Dror, Chief architect, openQRM group leader, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Behavior cannot change 'enabled' property inonComponentTag
Martijn Dashorst wrote: > Heh... it sounds like a misuse of behavior ;-) > > What are you trying to achieve with setEnabled(false)? disable the component. we have a form that represents an entity. based on the state of the entity, we want some fields to be disabled. so the page adds all components as enabled and we want the behavior to set the enabled flag according to the state (business logic) what i don't understand is how setEnabled modifies the component hierarchy. > > Martijn > > > On 8/1/06, Nili Adoram <[EMAIL PROTECTED]> wrote: >> Hi all, >> I have added the following behavior to all page components: >> .. >> public void onComponentTag(Component component, ComponentTag tag) { >> if (...) >> component.setEnabled(false); >> } >> >> However, when the page is rendered, the following exception is thrown >> (see forward). >> This looks like a misbehavior of the IBehavior! >> >> Thanks >> Nili >> >> WicketMessage: Cannot modify component hierarchy during render phase >> >> Root cause: >> >> wicket.WicketRuntimeException: Cannot modify component hierarchy during >> render phase >> at wicket.Page.checkHierarchyChange(Page.java:1040) >> at wicket.Page.componentStateChanging(Page.java:957) >> at wicket.Component.addStateChange(Component.java:2273) >> at wicket.Component.setEnabled(Component.java:1845) >> at >> com.qlusters.qrm.web.wicket.behavior.DisableBehavior.onComponentTag(DisableBehavior.java:42) >> at wicket.Component.renderComponentTag(Component.java:2703) >> at wicket.Component.renderComponent(Component.java:1666) >> at wicket.markup.html.WebComponent.onRender(WebComponent.java:61) >> at wicket.Component.render(Component.java:1511) >> at wicket.MarkupContainer.renderNext(MarkupContainer.java:1332) >> at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:980) >> at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:915) >> at wicket.markup.html.form.Form.onComponentTagBody(Form.java:776) >> at wicket.Component.renderComponent(Component.java:1675) >> at wicket.MarkupContainer.onRender(MarkupContainer.java:925) >> at wicket.markup.html.form.Form.onRender(Form.java:847) >> at wicket.Component.render(Component.java:1511) >> at wicket.MarkupContainer.renderNext(MarkupContainer.java:1332) >> at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:980) >> at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:915) >> at wicket.Component.renderComponent(Component.java:1675) >> at wicket.MarkupContainer.onRender(MarkupContainer.java:925) >> at wicket.Component.render(Component.java:1511) >> at wicket.Component.render(Component.java:1477) >> at wicket.MarkupContainer.autoAdd(MarkupContainer.java:196) >> at >> wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66) >> at wicket.MarkupContainer.renderNext(MarkupContainer.java:1359) >> at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:980) >> at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:915) >> at wicket.Component.renderComponent(Component.java:1675) >> at wicket.MarkupContainer.onRender(MarkupContainer.java:925) >> at wicket.Component.render(Component.java:1511) >> at wicket.Component.render(Component.java:1477) >> at wicket.MarkupContainer.autoAdd(MarkupContainer.java:196) >> at >> wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73) >> at wicket.MarkupContainer.renderNext(MarkupContainer.java:1359) >> at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:980) >> at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:915) >> at wicket.Component.renderComponent(Component.java:1675) >> at wicket.MarkupContainer.onRender(MarkupContainer.java:925) >> at wicket.Component.render(Component.java:1511) >> at wicket.MarkupContainer.renderNext(MarkupContainer.java:1332) >> at wicket.MarkupContainer.renderAll(MarkupContainer.java:942) >> at wicket.Page.onRender(Page.java:867) >> >> >> - >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys -- and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> ___ >> Wicket-user mailing list >> Wicket-user@
Re: [Wicket-user] automatic testing
thanx, reply inline Juergen Donnerstag wrote: > and we are using jWebUnit in wicket-examples for in-container tests. > Though the tests are quite simple. > > Wicket-Bench (eclipse IDE) support Selenium (http://www.openqa.org/selenium/) > > Performance tests: we deliver a servlet filter (either in the core or > extension project) which provides response times etc. in performance tests, i meant running test scenarios simultaneously. this is also for discovering threading issues. > > See wicket-examples and the "information" page which provides some > insight into session and memory usage. > > I'm sure there are more possibilities and a kind of (may be MBean > based) console would be great. Including clearing internal caches etc. > Ideas and contributions are more than welcome. > > Juergen > > On 8/2/06, Frank Bille <[EMAIL PROTECTED]> wrote: >> WicketTester >> (http://woogle.billen.dk/search/q/wickettester) is good for >> functional tests. >> >> Frank >> >> >> >> On 8/2/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> What frameworks are suitable for automatic testing of wicket applications? >> I'm interested in functional, regression and performance tests. >>> Is it tricky because of wicket's on-the-fly id generation? >>> >>> Thanks >>> Ittay >>> >>> -- >>> === >>> Ittay Dror, >>> Chief architect, openQRM group leader, >>> R&D, Qlusters Inc. >>> [EMAIL PROTECTED] >>> +972-3-6081994 Fax: +972-3-6081841 >>> >>> http://www.openQRM.org >>> - Keeps your Data-Center Up and Running >>> >>> >> - >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >>> opinions on IT & business topics through brief surveys -- and earn cash >>> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>> ___ >>> Wicket-user mailing list >>> Wicket-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >> >> - >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys -- and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> >> > > ----- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM group leader, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] automatic testing
Hi, What frameworks are suitable for automatic testing of wicket applications? I'm interested in functional, regression and performance tests. Is it tricky because of wicket's on-the-fly id generation? Thanks Ittay -- ======= Ittay Dror, Chief architect, openQRM group leader, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] working with plugins
if the deserialization uses it, then maybe (i'm not sure how it is used). but in our case, every Page subclass may be in its own class loader, separate from others, so using a singleton IClassResolver instance will not help (unless it delegates to all class loaders, which may cause havoc). i think that my proposed solution is straight forward. Igor Vaynberg wrote: > we do have IClassResolver woudnt that help? it helped with osgi > > -Igor > > > On 7/17/06, *Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > done. the request id is 1524019. > > i've added more description of the problem and the solution. i think > this may happen also with osgi integration, or any other case where > an object is used that is found through a classloader different than > the one wicket / tomcat is in. > > Eelco Hillenius wrote: > > I'm afraid I don't get the request. Could you please create a feature > > request with a patch, clearly explaining what is wrong today and what > > your patch fixes? > > > > Thanks, > > > > Eelco > > > > > > On 7/17/06, Ittay Dror <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > >> Hi, > >> > >> We're using plugins similar to Eclipse's to decouple > functionality. Each plugin's classes run in their own class loader. > >> > >> We've encountered a problem in onNewBrowserWindow(). it uses > Objects.cloneObject(), which uses the default ObjectInputStream, > that uses the class loader associated with the execution stack, > rather than the object's. so trying to get the class of the object > when reading it back fails. > >> > >> This can be solved by changing cloneObject to: > >> public static Object cloneObject(final Object object) > >>{ > >>if (object == null) > >>{ > >>return null; > >>} > >>else > >>{ > >>try > >>{ > >>final ByteArrayOutputStream out = new > ByteArrayOutputStream(256); > >>ObjectOutputStream oos = new > ObjectOutputStream(out); > >>oos.writeObject(object); > >>ObjectInputStream ois = new ObjectInputStream(new > ByteArrayInputStream(out > >>.toByteArray())) { > >> protected Class > resolveClass(ObjectStreamClass desc) throws IOException, > >>ClassNotFoundException { > >>String className = desc.getName(); > >>return Class.forName(className, true, > object.getClass().getClassLoader()); } > >>}; > >>return ois.readObject(); > >>} > >>catch (ClassNotFoundException e) > >>{ > >>throw new WicketRuntimeException("Internal error > cloning object", e); > >>} > >>catch (IOException e) > >>{ > >>throw new WicketRuntimeException("Internal error > cloning object", e); > >>} > >>} > >> } > >> > >> i think that it should work fine in this context since the > object is already accessible when writing it. it is working for us. > >> > >> btw, a problem that is caused by this failure (and the throwing > of WicketRuntimeException) is that the PageMap contains null entries > (or rather, the session contains attributes with null values). i > couldn't track why exactly this happens. > >> > >> regards, > >> ittay > >> > >> > >> > >> -- > >> === > >> Ittay Dror, > >> Chief architect, openQRM TL, > >> R&D, Qlusters Inc. > >> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > >> +972-3-6081994 Fax: +972-3-6081841 > >> > >> http://www.openQRM.org > >> - Keeps your Data-Center Up and
Re: [Wicket-user] working with plugins
done. the request id is 1524019. i've added more description of the problem and the solution. i think this may happen also with osgi integration, or any other case where an object is used that is found through a classloader different than the one wicket / tomcat is in. Eelco Hillenius wrote: > I'm afraid I don't get the request. Could you please create a feature > request with a patch, clearly explaining what is wrong today and what > your patch fixes? > > Thanks, > > Eelco > > > On 7/17/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >> Hi, >> >> We're using plugins similar to Eclipse's to decouple functionality. Each >> plugin's classes run in their own class loader. >> >> We've encountered a problem in onNewBrowserWindow(). it uses >> Objects.cloneObject(), which uses the default ObjectInputStream, that uses >> the class loader associated with the execution stack, rather than the >> object's. so trying to get the class of the object when reading it back >> fails. >> >> This can be solved by changing cloneObject to: >> public static Object cloneObject(final Object object) >>{ >>if (object == null) >>{ >>return null; >>} >>else >>{ >>try >>{ >>final ByteArrayOutputStream out = new >> ByteArrayOutputStream(256); >>ObjectOutputStream oos = new ObjectOutputStream(out); >>oos.writeObject(object); >>ObjectInputStream ois = new ObjectInputStream(new >> ByteArrayInputStream(out >>.toByteArray())) { >> protected Class >> resolveClass(ObjectStreamClass desc) throws IOException, >>ClassNotFoundException { >>String className = desc.getName(); >>return Class.forName(className, true, >> object.getClass().getClassLoader()); } >>}; >>return ois.readObject(); >>} >>catch (ClassNotFoundException e) >>{ >>throw new WicketRuntimeException("Internal error cloning >> object", e); >>} >>catch (IOException e) >>{ >>throw new WicketRuntimeException("Internal error cloning >> object", e); >>} >>} >>} >> >> i think that it should work fine in this context since the object is already >> accessible when writing it. it is working for us. >> >> btw, a problem that is caused by this failure (and the throwing of >> WicketRuntimeException) is that the PageMap contains null entries (or >> rather, the session contains attributes with null values). i couldn't track >> why exactly this happens. >> >> regards, >> ittay >> >> >> >> -- >> === >> Ittay Dror, >> Chief architect, openQRM TL, >> R&D, Qlusters Inc. >> [EMAIL PROTECTED] >> +972-3-6081994 Fax: +972-3-6081841 >> >> http://www.openQRM.org >> - Keeps your Data-Center Up and Running >> >> >> - >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] bookmarkable ajax link
Matej Knopp wrote: > This is generated url of the ajax link. you said you open a page in an > iframe, so I asked, what URL do you display in the iframe ( src="??"/> > > How do you create the iframe? it is statically in the page, but hidden. the ajax link calls a javascript that sets the iframe's src to a given url > > -Matej > > Nili Adoram wrote: >> 1. The generated URL is: >> javascript:var >> wcall=wicketAjaxGet('/page;jsessionid=66D2B1310B47081B62EE203A648CDAE8?wicket:interface=:0:statusForm:data:nodeGroups:0:deprovision::IBehaviorListener&wicket:behaviorId=0', >> >> function() { }, function() { }); >> 2. Can you please explain what is th purpose of PageMap in this case? >> Thanks >> -Nili >> >> Matej Knopp wrote: >>> What URL do you exactly display in the iframe? I think the behavior is >>> caused by PageMap in 1.2 which behaves as stack. So to get over this you >>> have to put the page that is shown in the iframe to separate pagemap. >>> >>> You can change the pagemap in which wicket is created by either >>> specifying it in Page constructor or as URL parameter of >>> bookmarkablePages (wicket:pageMapName=myModalPageMap) >>> >>> -Matej >>> >>> Nili Adoram wrote: >>> >>>> Hi all, >>>> I have an AjaxLink that opens a modal dialog (which is implemented as an >>>> iframe that displays the URL of that link). >>>> The link is embedded inside a ListView that refreshes itself every 30 >>>> seconds via ajax. >>>> The URL of that link is generated of course by Ajax and include session >>>> mapping parameters so it is not bookmarkable. >>>> Whenever I click the link just before the table is refreshed, the target >>>> of that link page is expired from session. >>>> Is it possible to generate a bookmarkable ajax link ? >>>> Thanks >>>> Nili >>>> >>>> >>>> - >>>> Using Tomcat but need to do more? Need to support web services, security? >>>> Get stuff done quickly with pre-integrated technology to make your job >>>> easier >>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>>> ___ >>>> Wicket-user mailing list >>>> Wicket-user@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>>> >>>> >>> >>> - >>> Using Tomcat but need to do more? Need to support web services, security? >>> Get stuff done quickly with pre-integrated technology to make your job >>> easier >>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>> ___ >>> Wicket-user mailing list >>> Wicket-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >>> >> >> - >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] working with plugins
Hi, We're using plugins similar to Eclipse's to decouple functionality. Each plugin's classes run in their own class loader. We've encountered a problem in onNewBrowserWindow(). it uses Objects.cloneObject(), which uses the default ObjectInputStream, that uses the class loader associated with the execution stack, rather than the object's. so trying to get the class of the object when reading it back fails. This can be solved by changing cloneObject to: public static Object cloneObject(final Object object) { if (object == null) { return null; } else { try { final ByteArrayOutputStream out = new ByteArrayOutputStream(256); ObjectOutputStream oos = new ObjectOutputStream(out); oos.writeObject(object); ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(out .toByteArray())) { protected Class resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException { String className = desc.getName(); return Class.forName(className, true, object.getClass().getClassLoader()); } }; return ois.readObject(); } catch (ClassNotFoundException e) { throw new WicketRuntimeException("Internal error cloning object", e); } catch (IOException e) { throw new WicketRuntimeException("Internal error cloning object", e); } } } i think that it should work fine in this context since the object is already accessible when writing it. it is working for us. btw, a problem that is caused by this failure (and the throwing of WicketRuntimeException) is that the PageMap contains null entries (or rather, the session contains attributes with null values). i couldn't track why exactly this happens. regards, ittay -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Objects.cloneObject
If i try to clone an object that is not in the ClassLoader of the wicket jar, this will fail on ClassNotFound I don't know enough about serialization, but is there a way to use object.getClassLoader to do the deserialization? Thanks, ittay -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] too much synchronization in wicket?
the thing is that an application in the 90% group may evolve into the 10% group. it may be a simple thing such as a new report, pdf generation, file upload or anything else. it seems easy to add to your application, but then you discover that it influences all of it. and, there's no way out. even if wicket provides a way out, but it will mean rewriting all existing pages, it may mean a huge amount of work. ittay Martijn Dashorst wrote: > Especially if you have a user object retrieved from the database using > Hibernate in your sessoin, that will not work when handling multpile > requests. > > A hibernate object can only be attached to one hibernate session at a > time. It is a very convenient and useful programming paradigm to put > such objects in your session and have them attach/detach with each > request. > > We have seen *a lot* of problems with multiple requests arriving at > the same time for the same session when the synchronization lock was > relaxed. I'm not pro loosening this without a decent test case > ensuring that we don't open up a box of pandorra. Until we have unit > tests in place for testing this behavior, I'm against opening our > synchronization. > > In my opinion the most significant advantages over Tapestry is the > fact that we don't require you to pay (much) attention to > synchronization issues. For most web applications out there, this is > not a problem: the 90% usecase of Wicket. For the other 10% we should > be careful not to create problems or impose specific optimization > strategies as a default on the other 90%. > > Martijn > > On 7/6/06, Johan Compagner <[EMAIL PROTECTED]> wrote: >> As Matej already said that will be to difficutl internally in wicket (for >> example the rendering of a page and another thread setting stuff like new >> components) >> And for the developer code itself. Threading is one of the most difficult >> things there is in programming, there are so many loopholes. >> >> So we could syn around a page (that is pretty much already in) so that you >> can have multiply pages accessed at once. Then only the wicket session >> object >> must be taken care of. But that is also now already the case because there >> are situations like session.attach/detach or if you have your own request >> cycle >> that access the session. Then a session can be accessed by multiply threads. >> >> johan >> >> >> >> >> On 7/6/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >>> anyone care to comment? >>> >>> just to reiterate the problem: if i work with two windows/tabs, pointing >> to the same wicket app, and in one i do some lengthy operation, then in the >> other i cannot work. i'm not sure if this is the case, but if i want to >> build a flicker like site, then i can't browse the site while uploading >> images >>> ittay >>> >>> Johan Compagner wrote: >>>> if you don't lock then pages and sessions must take care of that they >>>> are not thread safe >>>> currently wicket is for the most part (99%) thread safe. >>>> >>>> Maybe we could loose it a bit and say we only sync around the active >> page. >>>> But then if you hold a page in another page. And set that as a respond >>>> then we can have again >>>> threaded access to that page that is get from a 'pool' >>>> >>>> johan >>>> >>>> >>>> On 7/5/06, *Ittay Dror* <[EMAIL PROTECTED] >>>> <mailto:[EMAIL PROTECTED]>> wrote: >>>> >>>> thanks for the quick response. >>>> >>>> is there any way around it? what happens if i don't lock? >>>> >>>> Matej Knopp wrote: >>>> > Ittay Dror wrote: >>>> >> this is from RequestCycle: >>>> >> private final void processEventsAndRespond() >>>> >> { >>>> >> // Use any synchronization lock provided by the >>>> target >>>> >> Object lock = >> getRequestTarget().getLock(this); >>>> >> if (lock != null) >>>> >> { >>>> >> synchronized (lock) >>>> >> { >>>> >> >>>> doProcessEventsAndRespond(processor); >>>> >> } >>>> >>
Re: [Wicket-user] too much synchronization in wicket?
anyone care to comment? just to reiterate the problem: if i work with two windows/tabs, pointing to the same wicket app, and in one i do some lengthy operation, then in the other i cannot work. i'm not sure if this is the case, but if i want to build a flicker like site, then i can't browse the site while uploading images ittay Johan Compagner wrote: > if you don't lock then pages and sessions must take care of that they > are not thread safe > currently wicket is for the most part (99%) thread safe. > > Maybe we could loose it a bit and say we only sync around the active page. > But then if you hold a page in another page. And set that as a respond > then we can have again > threaded access to that page that is get from a 'pool' > > johan > > > On 7/5/06, *Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > thanks for the quick response. > > is there any way around it? what happens if i don't lock? > > Matej Knopp wrote: > > Ittay Dror wrote: > >> this is from RequestCycle: > >> private final void processEventsAndRespond() > >> { > >> // Use any synchronization lock provided by the > target > >> Object lock = getRequestTarget().getLock(this); > >> if (lock != null) > >> { > >> synchronized (lock) > >> { > >> > doProcessEventsAndRespond(processor); > >> } > >> } > >> else > >> { > >> doProcessEventsAndRespond(processor); > >> } > >> } > >> > >> > >> this is from BookmarkablePageRequestTarget: > >> /** > >> * @see wicket.IRequestTarget#getLock(RequestCycle) > >> */ > >> public Object getLock(RequestCycle requestCycle) > >> { > >> // we need to lock when we are not redirecting, > i.e. we are > >> // actually rendering the page > >> return !requestCycle.getRedirect() ? > requestCycle.getSession() : null; > >> } > >> > >> > >> as far as i could see, requestCycle.getSession() returns a > Session from the HttpSession > >> > >> this means that if i open two tabs to a wicket application, and > in one i do some lengthy operation, and then try to load an > unrelated page in the other, it will be stuck, right? > > > > right. > > > > -Matej > > > >> ittay > >> > >> > > > > > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make > your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > -- > === > Ittay Dror, > Chief architect, openQRM TL, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > +972-3-6081994 Fax: +972-3-6081841 > > http://www.openQRM.org > - Keeps your Data-Center Up and Running > > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > ___ > Wicket-user mailing
Re: [Wicket-user] too much synchronization in wicket?
Johan Compagner wrote: > if you don't lock then pages and sessions must take care of that they > are not thread safe > currently wicket is for the most part (99%) thread safe. > > Maybe we could loose it a bit and say we only sync around the active page. > But then if you hold a page in another page. And set that as a respond > then we can have again > threaded access to that page that is get from a 'pool' why not require that pages be thread safe? maybe provide this locking optionally, for those that don't want to mess with synchronization > > johan > > > On 7/5/06, *Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > thanks for the quick response. > > is there any way around it? what happens if i don't lock? > > Matej Knopp wrote: > > Ittay Dror wrote: > >> this is from RequestCycle: > >> private final void processEventsAndRespond() > >> { > >> // Use any synchronization lock provided by the > target > >> Object lock = getRequestTarget().getLock(this); > >> if (lock != null) > >> { > >> synchronized (lock) > >> { > >> > doProcessEventsAndRespond(processor); > >> } > >> } > >> else > >> { > >> doProcessEventsAndRespond(processor); > >> } > >> } > >> > >> > >> this is from BookmarkablePageRequestTarget: > >> /** > >> * @see wicket.IRequestTarget#getLock(RequestCycle) > >> */ > >> public Object getLock(RequestCycle requestCycle) > >> { > >> // we need to lock when we are not redirecting, > i.e. we are > >> // actually rendering the page > >> return !requestCycle.getRedirect() ? > requestCycle.getSession() : null; > >> } > >> > >> > >> as far as i could see, requestCycle.getSession() returns a > Session from the HttpSession > >> > >> this means that if i open two tabs to a wicket application, and > in one i do some lengthy operation, and then try to load an > unrelated page in the other, it will be stuck, right? > > > > right. > > > > -Matej > > > >> ittay > >> > >> > > > > > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make > your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > -- > === > Ittay Dror, > Chief architect, openQRM TL, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > +972-3-6081994 Fax: +972-3-6081841 > > http://www.openQRM.org > - Keeps your Data-Center Up and Running > > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > ---
Re: [Wicket-user] too much synchronization in wicket?
thanks for the quick response. is there any way around it? what happens if i don't lock? Matej Knopp wrote: > Ittay Dror wrote: >> this is from RequestCycle: >> private final void processEventsAndRespond() >> { >> // Use any synchronization lock provided by the target >> Object lock = getRequestTarget().getLock(this); >> if (lock != null) >> { >> synchronized (lock) >> { >> doProcessEventsAndRespond(processor); >> } >> } >> else >> { >> doProcessEventsAndRespond(processor); >> } >> } >> >> >> this is from BookmarkablePageRequestTarget: >> /** >> * @see wicket.IRequestTarget#getLock(RequestCycle) >> */ >> public Object getLock(RequestCycle requestCycle) >> { >> // we need to lock when we are not redirecting, i.e. we are >> // actually rendering the page >> return !requestCycle.getRedirect() ? >> requestCycle.getSession() : null; >> } >> >> >> as far as i could see, requestCycle.getSession() returns a Session from the >> HttpSession >> >> this means that if i open two tabs to a wicket application, and in one i do >> some lengthy operation, and then try to load an unrelated page in the other, >> it will be stuck, right? > > right. > > -Matej > >> ittay >> >> > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] too much synchronization in wicket?
this is from RequestCycle: private final void processEventsAndRespond() { // Use any synchronization lock provided by the target Object lock = getRequestTarget().getLock(this); if (lock != null) { synchronized (lock) { doProcessEventsAndRespond(processor); } } else { doProcessEventsAndRespond(processor); } } this is from BookmarkablePageRequestTarget: /** * @see wicket.IRequestTarget#getLock(RequestCycle) */ public Object getLock(RequestCycle requestCycle) { // we need to lock when we are not redirecting, i.e. we are // actually rendering the page return !requestCycle.getRedirect() ? requestCycle.getSession() : null; } as far as i could see, requestCycle.getSession() returns a Session from the HttpSession this means that if i open two tabs to a wicket application, and in one i do some lengthy operation, and then try to load an unrelated page in the other, it will be stuck, right? ittay -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is it possible to embed jsp in wicket ?
Eelco Hillenius wrote: > Thanks a lot for the contributions. I haven't looked to deep into the > details, but I noticed your way of turning off redirects. I think what > you're actually looking for is: > > getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER); > > which you should call in YourWebApplication.init > > Read more about it in IRequestCycleSettings's javadocs. Wouldn't that > suit your purposes better? hmm, what about if my page has errors? would this strategy still prevent redirection to the error page? and also, i want just these pages to not redirect, because they are embedded. > > Eelco > > > > On 6/28/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >> ok, created http://www.wicket-wiki.org.uk/wiki/index.php/Jsp_Integration >> >> Eelco Hillenius wrote: >>> I think it might help a lot of users to write a WIKI page on this. >>> Ittay and John, it would be welcome to share your experiences :) >>> >>> Eelco >>> >>> >>> On 6/28/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >>>> i have done the reverse: embedding wicket in a jsp page. if that interests >>>> you, i'll be glad to help >>>> >>>> Ingram Chen wrote: >>>>> We want to merge wicket into exist struts project and there are some >>>>> parts >>>>> of system still requires jsp. Could I include jsp (output of jsp) in >>>>> wicket page ? >>>>> >>>>> Any suggestion are welcome ! >>>>> >>>>> -- >>>>> Ingram Chen >>>>> Java [EMAIL PROTECTED] >>>>> Institue of BioMedical Sciences Academia Sinica Taiwan >>>>> blog: http://www.javaworld.com.tw/roller/page/ingramchen >>>>> <http://www.javaworld.com.tw/roller/page/ingramchen> >>>>> >>>>> >>>>> >>>>> >>>>> Using Tomcat but need to do more? Need to support web services, security? >>>>> Get stuff done quickly with pre-integrated technology to make your job >>>>> easier >>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>> >>>>> >>>>> >>>>> >>>>> ___ >>>>> Wicket-user mailing list >>>>> Wicket-user@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>>> -- >>>> === >>>> Ittay Dror, >>>> Chief architect, openQRM TL, >>>> R&D, Qlusters Inc. >>>> [EMAIL PROTECTED] >>>> +972-3-6081994 Fax: +972-3-6081841 >>>> >>>> http://www.openQRM.org >>>> - Keeps your Data-Center Up and Running >>>> >>>> Using Tomcat but need to do more? Need to support web services, security? >>>> Get stuff done quickly with pre-integrated technology to make your job >>>> easier >>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>>> ___ >>>> Wicket-user mailing list >>>> Wicket-user@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>>> >>> Using Tomcat but need to do more? Need to support web services, security? >>> Get stuff done quickly with pre-integrated technology to make your job >>> easier >>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>> ___ >>> Wicket-user mailing list >>> Wicket-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >> >> -- >> === >> Ittay Dror, >> Chief architect, openQRM TL, >> R&D, Qlusters Inc. >> [EMAIL PROTECTED] >> +972-3-6081994 Fax: +972-3-6081841 >> >> http://www.openQRM.org >> - Keeps your Data-
Re: [Wicket-user] Is it possible to embed jsp in wicket ?
ok, created http://www.wicket-wiki.org.uk/wiki/index.php/Jsp_Integration Eelco Hillenius wrote: > I think it might help a lot of users to write a WIKI page on this. > Ittay and John, it would be welcome to share your experiences :) > > Eelco > > > On 6/28/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >> i have done the reverse: embedding wicket in a jsp page. if that interests >> you, i'll be glad to help >> >> Ingram Chen wrote: >>> We want to merge wicket into exist struts project and there are some >>> parts >>> of system still requires jsp. Could I include jsp (output of jsp) in >>> wicket page ? >>> >>> Any suggestion are welcome ! >>> >>> -- >>> Ingram Chen >>> Java [EMAIL PROTECTED] >>> Institue of BioMedical Sciences Academia Sinica Taiwan >>> blog: http://www.javaworld.com.tw/roller/page/ingramchen >>> <http://www.javaworld.com.tw/roller/page/ingramchen> >>> >>> >>> >>> >>> Using Tomcat but need to do more? Need to support web services, security? >>> Get stuff done quickly with pre-integrated technology to make your job >>> easier >>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>> >>> >>> ---- >>> >>> ___ >>> Wicket-user mailing list >>> Wicket-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> -- >> === >> Ittay Dror, >> Chief architect, openQRM TL, >> R&D, Qlusters Inc. >> [EMAIL PROTECTED] >> +972-3-6081994 Fax: +972-3-6081841 >> >> http://www.openQRM.org >> - Keeps your Data-Center Up and Running >> >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is it possible to embed jsp in wicket ?
i have done the reverse: embedding wicket in a jsp page. if that interests you, i'll be glad to help Ingram Chen wrote: > We want to merge wicket into exist struts project and there are some > parts > of system still requires jsp. Could I include jsp (output of jsp) in > wicket page ? > > Any suggestion are welcome ! > > -- > Ingram Chen > Java [EMAIL PROTECTED] > Institue of BioMedical Sciences Academia Sinica Taiwan > blog: http://www.javaworld.com.tw/roller/page/ingramchen > <http://www.javaworld.com.tw/roller/page/ingramchen> > > > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] help writing an encoding strategy
Johan Compagner wrote: > So you want a special bookmarkable url encoding? > Can you just use Package mounting? Or see how that works and copy parts > of it to fit your needs? package mounting is for one package, i want all packages with the same prefix to be mounted. the problem i'm facing is not encoding the bookmarkable urls, this works fine. the problem is that it seems i have a lot of other targets i need to encode: listener interface target (for redirects) - the rendering itself is found, but the page has relative urls to javascript/css (so it can be previewable) - because the encoding is something like /context?interface-params, the js/css can't be found references to resources - less of an issue, because we worked around it differently, but for the same reason - i need to encode the urls that the page references. > > Listener interface request are not bookmarkable they are internal wicket > urls. And those urls are used for the redirect to buffer > So that shouldn't be a problem for you. Because bookmarkable urls don't > use redirect to buffer at all. but if i load a page, and it redirects to a url that is transient, i can't bookmark that url. > > johan > > > On 6/25/06, *Ittay Dror* < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > also, i found that for redirects, only the query part of the url is > used to save the rendered page. so i must create a url where all the > details are in the query part, if i want to use REDIRECT_TO_BUFFER. > is that true? > > Ittay Dror wrote: > > Hello, > > > > I'm trying to write a coding strategy that maps all pages with a > given package prefix to a url prefix. so a.b.c.Page, and the prefix > a.b, and url prefix 1/2, will be mapped to 1/2/c/Page. > > > > I keep running into needing to reimplement functions in > WebRequestCodingStrategy. Like encoding/decoding the page map (for > the double window handling), encoding/decoding listener interface > targets (btw, how is that bookmarkable?) - to handle redirects, > encoding/decoding references to resources. > > > > What is the best way to reuse the code/logic in > WebRequestCodingStrategy? > > > > Thank you, > > Ittay > > > > > -- > === > Ittay Dror, > Chief architect, openQRM TL, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > +972-3-6081994 Fax: +972-3-6081841 > > http://www.openQRM.org > - Keeps your Data-Center Up and Running > > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > <https://lists.sourceforge.net/lists/listinfo/wicket-user> > > > > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] help writing an encoding strategy
also, i found that for redirects, only the query part of the url is used to save the rendered page. so i must create a url where all the details are in the query part, if i want to use REDIRECT_TO_BUFFER. is that true? Ittay Dror wrote: > Hello, > > I'm trying to write a coding strategy that maps all pages with a given > package prefix to a url prefix. so a.b.c.Page, and the prefix a.b, and url > prefix 1/2, will be mapped to 1/2/c/Page. > > I keep running into needing to reimplement functions in > WebRequestCodingStrategy. Like encoding/decoding the page map (for the double > window handling), encoding/decoding listener interface targets (btw, how is > that bookmarkable?) - to handle redirects, encoding/decoding references to > resources. > > What is the best way to reuse the code/logic in WebRequestCodingStrategy? > > Thank you, > Ittay > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] help writing an encoding strategy
Hello, I'm trying to write a coding strategy that maps all pages with a given package prefix to a url prefix. so a.b.c.Page, and the prefix a.b, and url prefix 1/2, will be mapped to 1/2/c/Page. I keep running into needing to reimplement functions in WebRequestCodingStrategy. Like encoding/decoding the page map (for the double window handling), encoding/decoding listener interface targets (btw, how is that bookmarkable?) - to handle redirects, encoding/decoding references to resources. What is the best way to reuse the code/logic in WebRequestCodingStrategy? Thank you, Ittay -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] page reloades infinitely
one other question. the original page map name is still 'null'. is this ok? Ittay Dror wrote: > ok, i did the same magic in my coding strategy and it works. in new tabs > the url now looks like > http://localhost/page/SomePage?wicket:bookmarkablePage=wicket-0:com.package.SomePage > > > > can someone explain the mechanism to me? also, why should i take care of > this and not WebRequestCodingStrategy? > > thanx, > ittay > > Ittay Dror wrote: >> well, this is the code in WebRequestCodingStrategy: >> public final CharSequence encode(final RequestCycle requestCycle, >> final IRequestTarget requestTarget) >> { >> // first check whether the target was mounted >> CharSequence path = pathForTarget(requestTarget); >> if (path != null) >> { >> CharSequence prefix = urlPrefix(requestCycle); >> final AppendingStringBuffer buffer = new >> AppendingStringBuffer(prefix.length() >> + path.length()); >> buffer.append(prefix); >> buffer.append(path); >> return requestCycle.getOriginalResponse().encodeURL(buffer); >> } >> >> >> the page (target) is indeed mounted, so pathForTarget goes to the >> encoding strategy to encode the path. in case the target was not >> mounted, it would have encoded the url itself (in my case, the target >> is IBookmarkablePageRequestTarget) >> >> the code there is less than trivial, should i copy & paste? can i >> reference it somehow? >> >> >> ittay >> >> >> Matej Knopp wrote: >>> Hmm.. The problem with this kind of bugs is that it's very difficult >>> to reproduce. >>> >>> IMHO The problem is in this line: >>> else {document.location.href = >>> '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} >>> >>> The url should contain pagemap name (something like wicket-1). >>> >>> In wicket-1.2 the url is built in PageMapChecker#renderHead >>> (WebPage.java line 388 - >>> IBookmarkablePageRequestTarget current = >>> (IBookmarkablePageRequestTarget)target; >>> BookmarkablePageRequestTarget redirect = new >>> BookmarkablePageRequestTarget( >>> getSession().createAutoPageMapName(), current.getPageClass(), >>> current.getPageParameters()); >>> url = cycle.urlFor(redirect); >>> ) >>> >>> I wonder why the generated url doesn't contain the pageMap name. >>> >>> -Matej >>> >>> Ittay Dror wrote: >>>> further investigation shows that for IE and openning new windows, it >>>> works fine - a PageMap instance is created, and the page loads fine. >>>> >>>> i've also started firefox with a new profile (no extensions), to >>>> make sure it's not extension related, and no, it happens there also, >>>> and also when i open a new window instead of new tab. it seems to be >>>> related to differences in cookie (session) handling between firefox >>>> and IE. >>>> ittay >>>> >>>> Ittay Dror wrote: >>>>> Hi, >>>>> >>>>> I'm using firefox. when i duplicate a tab, the tab reloads in an >>>>> infinite loop. >>>>> >>>>> this is the reason: >>>>> <!--//--><![CDATA[//><!-- >>>>> var pagemapcookie = getWicketCookie('pm-nullwicket'); >>>>> if(!pagemapcookie && pagemapcookie != >>>>> '1'){setWicketCookie('pm-nullwicket',1);} >>>>> else {document.location.href = >>>>> '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} >>>>> >>>>> //--><!]]> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> what happens is that the pagemapcookie is there when the page is >>>>> rendered, because the previous page was not unloaded, so the >>>>> document's href is changed to itself. of course, when the page >>>>> loads, the cookie is still 1, so the loop continues. the same will >>>>> happen if i just open a new tab and load the same url. >>>>> >>>>> what gives? >>>>> >>>>> >>>>> also, the code that writes this script is W
Re: [Wicket-user] page reloades infinitely
ok, i did the same magic in my coding strategy and it works. in new tabs the url now looks like http://localhost/page/SomePage?wicket:bookmarkablePage=wicket-0:com.package.SomePage can someone explain the mechanism to me? also, why should i take care of this and not WebRequestCodingStrategy? thanx, ittay Ittay Dror wrote: > well, this is the code in WebRequestCodingStrategy: > public final CharSequence encode(final RequestCycle requestCycle, > final IRequestTarget requestTarget) > { > // first check whether the target was mounted > CharSequence path = pathForTarget(requestTarget); > if (path != null) > { > CharSequence prefix = urlPrefix(requestCycle); > final AppendingStringBuffer buffer = new > AppendingStringBuffer(prefix.length() > + path.length()); > buffer.append(prefix); > buffer.append(path); > return > requestCycle.getOriginalResponse().encodeURL(buffer); > } > > > the page (target) is indeed mounted, so pathForTarget goes to the encoding > strategy to encode the path. in case the target was not mounted, it would > have encoded the url itself (in my case, the target is > IBookmarkablePageRequestTarget) > > the code there is less than trivial, should i copy & paste? can i reference > it somehow? > > > ittay > > > Matej Knopp wrote: >> Hmm.. The problem with this kind of bugs is that it's very difficult to >> reproduce. >> >> IMHO The problem is in this line: >> else {document.location.href = >> '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} >> >> The url should contain pagemap name (something like wicket-1). >> >> In wicket-1.2 the url is built in PageMapChecker#renderHead >> (WebPage.java line 388 - >> IBookmarkablePageRequestTarget current = >> (IBookmarkablePageRequestTarget)target; >> BookmarkablePageRequestTarget redirect = new >> BookmarkablePageRequestTarget( >> getSession().createAutoPageMapName(), >> current.getPageClass(), current.getPageParameters()); >> url = cycle.urlFor(redirect); >> ) >> >> I wonder why the generated url doesn't contain the pageMap name. >> >> -Matej >> >> Ittay Dror wrote: >>> further investigation shows that for IE and openning new windows, it works >>> fine - a PageMap instance is created, and the page loads fine. >>> >>> i've also started firefox with a new profile (no extensions), to make sure >>> it's not extension related, and no, it happens there also, and also when i >>> open a new window instead of new tab. it seems to be related to differences >>> in cookie (session) handling between firefox and IE. >>> >>> ittay >>> >>> Ittay Dror wrote: >>>> Hi, >>>> >>>> I'm using firefox. when i duplicate a tab, the tab reloads in an infinite >>>> loop. >>>> >>>> this is the reason: >>>> <!--//--><![CDATA[//><!-- >>>> var pagemapcookie = getWicketCookie('pm-nullwicket'); >>>> if(!pagemapcookie && pagemapcookie != >>>> '1'){setWicketCookie('pm-nullwicket',1);} >>>> else {document.location.href = >>>> '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} >>>> >>>> //--><!]]> >>>> >>>> >>>> >>>> >>>> >>>> what happens is that the pagemapcookie is there when the page is rendered, >>>> because the previous page was not unloaded, so the document's href is >>>> changed to itself. of course, when the page loads, the cookie is still 1, >>>> so the loop continues. the same will happen if i just open a new tab and >>>> load the same url. >>>> >>>> what gives? >>>> >>>> >>>> also, the code that writes this script is WebPage.PageMapChecker the >>>> comment in the code is: >>>> /** >>>> * Tries to determine whether this page was opened in a new window or >>>> tab. >>>> * If it is (and this checker were able to recognize that), a new page >>>> map >>>> * is created for this page instance, so that it will start using it's >>>&g
Re: [Wicket-user] page reloades infinitely
well, this is the code in WebRequestCodingStrategy: public final CharSequence encode(final RequestCycle requestCycle, final IRequestTarget requestTarget) { // first check whether the target was mounted CharSequence path = pathForTarget(requestTarget); if (path != null) { CharSequence prefix = urlPrefix(requestCycle); final AppendingStringBuffer buffer = new AppendingStringBuffer(prefix.length() + path.length()); buffer.append(prefix); buffer.append(path); return requestCycle.getOriginalResponse().encodeURL(buffer); } the page (target) is indeed mounted, so pathForTarget goes to the encoding strategy to encode the path. in case the target was not mounted, it would have encoded the url itself (in my case, the target is IBookmarkablePageRequestTarget) the code there is less than trivial, should i copy & paste? can i reference it somehow? ittay Matej Knopp wrote: > Hmm.. The problem with this kind of bugs is that it's very difficult to > reproduce. > > IMHO The problem is in this line: > else {document.location.href = > '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} > > The url should contain pagemap name (something like wicket-1). > > In wicket-1.2 the url is built in PageMapChecker#renderHead > (WebPage.java line 388 - > IBookmarkablePageRequestTarget current = > (IBookmarkablePageRequestTarget)target; > BookmarkablePageRequestTarget redirect = new > BookmarkablePageRequestTarget( > getSession().createAutoPageMapName(), > current.getPageClass(), current.getPageParameters()); > url = cycle.urlFor(redirect); > ) > > I wonder why the generated url doesn't contain the pageMap name. > > -Matej > > Ittay Dror wrote: >> further investigation shows that for IE and openning new windows, it works >> fine - a PageMap instance is created, and the page loads fine. >> >> i've also started firefox with a new profile (no extensions), to make sure >> it's not extension related, and no, it happens there also, and also when i >> open a new window instead of new tab. it seems to be related to differences >> in cookie (session) handling between firefox and IE. >> >> ittay >> >> Ittay Dror wrote: >>> Hi, >>> >>> I'm using firefox. when i duplicate a tab, the tab reloads in an infinite >>> loop. >>> >>> this is the reason: >>> <!--//--><![CDATA[//><!-- >>> var pagemapcookie = getWicketCookie('pm-nullwicket'); >>> if(!pagemapcookie && pagemapcookie != >>> '1'){setWicketCookie('pm-nullwicket',1);} >>> else {document.location.href = >>> '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} >>> >>> //--><!]]> >>> >>> >>> >>> >>> >>> what happens is that the pagemapcookie is there when the page is rendered, >>> because the previous page was not unloaded, so the document's href is >>> changed to itself. of course, when the page loads, the cookie is still 1, >>> so the loop continues. the same will happen if i just open a new tab and >>> load the same url. >>> >>> what gives? >>> >>> >>> also, the code that writes this script is WebPage.PageMapChecker the >>> comment in the code is: >>> /** >>> * Tries to determine whether this page was opened in a new window or >>> tab. >>> * If it is (and this checker were able to recognize that), a new page >>> map >>> * is created for this page instance, so that it will start using it's >>> own >>> * history in sync with the browser window or tab. >>> */ >>> >>> i've tried to debug this, but it doesn't look like a new PageMap is created >>> (i don't use it, so the PageMap instance is the default one). so it seems i >>> *don't* get a history per tab. >>> >>> can/should i remove the AutomaticMultiWindowSupport setting? >>> >>> thanx, >>> ittay >> > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] page reloades infinitely
Matej Knopp wrote: > Hmm.. The problem with this kind of bugs is that it's very difficult to > reproduce. > > IMHO The problem is in this line: > else {document.location.href = > '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} > > The url should contain pagemap name (something like wicket-1). > > In wicket-1.2 the url is built in PageMapChecker#renderHead > (WebPage.java line 388 - > IBookmarkablePageRequestTarget current = > (IBookmarkablePageRequestTarget)target; > BookmarkablePageRequestTarget redirect = new > BookmarkablePageRequestTarget( > getSession().createAutoPageMapName(), > current.getPageClass(), current.getPageParameters()); > url = cycle.urlFor(redirect); > ) > > I wonder why the generated url doesn't contain the pageMap name. ok, i will look into that. thanx for the tip. > > -Matej > > Ittay Dror wrote: >> further investigation shows that for IE and openning new windows, it works >> fine - a PageMap instance is created, and the page loads fine. >> >> i've also started firefox with a new profile (no extensions), to make sure >> it's not extension related, and no, it happens there also, and also when i >> open a new window instead of new tab. it seems to be related to differences >> in cookie (session) handling between firefox and IE. >> >> ittay >> >> Ittay Dror wrote: >>> Hi, >>> >>> I'm using firefox. when i duplicate a tab, the tab reloads in an infinite >>> loop. >>> >>> this is the reason: >>> <!--//--><![CDATA[//><!-- >>> var pagemapcookie = getWicketCookie('pm-nullwicket'); >>> if(!pagemapcookie && pagemapcookie != >>> '1'){setWicketCookie('pm-nullwicket',1);} >>> else {document.location.href = >>> '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} >>> >>> //--><!]]> >>> >>> >>> >>> >>> >>> what happens is that the pagemapcookie is there when the page is rendered, >>> because the previous page was not unloaded, so the document's href is >>> changed to itself. of course, when the page loads, the cookie is still 1, >>> so the loop continues. the same will happen if i just open a new tab and >>> load the same url. >>> >>> what gives? >>> >>> >>> also, the code that writes this script is WebPage.PageMapChecker the >>> comment in the code is: >>> /** >>> * Tries to determine whether this page was opened in a new window or >>> tab. >>> * If it is (and this checker were able to recognize that), a new page >>> map >>> * is created for this page instance, so that it will start using it's >>> own >>> * history in sync with the browser window or tab. >>> */ >>> >>> i've tried to debug this, but it doesn't look like a new PageMap is created >>> (i don't use it, so the PageMap instance is the default one). so it seems i >>> *don't* get a history per tab. >>> >>> can/should i remove the AutomaticMultiWindowSupport setting? >>> >>> thanx, >>> ittay >> > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] page reloades infinitely
Matej Knopp wrote: > Strange. I'm looking into PageMapChecker#renderHead and it doesn't seem > obvious why the generated url doesn't contain pageMap name. > > Are you using a custom URL encoding scheme or anything like that? yes about the custom schema. the page map name is mull. does it cause any harm? if i manage to figure out how to create a PageMap, will it be created on every page request (do i need somehow to generate a new name per tab/window, how?)? or is it still per session? if it is per session, then i think that the tabs / windows share the session, which means the same cookie, which causes the infinite reloading. > > -Matej > > Ittay Dror wrote: >> Hi, >> >> I'm using firefox. when i duplicate a tab, the tab reloads in an infinite >> loop. >> >> this is the reason: >> <!--//--><![CDATA[//><!-- >> var pagemapcookie = getWicketCookie('pm-nullwicket'); >> if(!pagemapcookie && pagemapcookie != >> '1'){setWicketCookie('pm-nullwicket',1);} >> else {document.location.href = >> '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} >> >> //--><!]]> >> >> >> >> >> >> what happens is that the pagemapcookie is there when the page is rendered, >> because the previous page was not unloaded, so the document's href is >> changed to itself. of course, when the page loads, the cookie is still 1, so >> the loop continues. the same will happen if i just open a new tab and load >> the same url. >> >> what gives? >> >> >> also, the code that writes this script is WebPage.PageMapChecker the comment >> in the code is: >> /** >> * Tries to determine whether this page was opened in a new window or >> tab. >> * If it is (and this checker were able to recognize that), a new page >> map >> * is created for this page instance, so that it will start using it's >> own >> * history in sync with the browser window or tab. >> */ >> >> i've tried to debug this, but it doesn't look like a new PageMap is created >> (i don't use it, so the PageMap instance is the default one). so it seems i >> *don't* get a history per tab. >> >> can/should i remove the AutomaticMultiWindowSupport setting? >> >> thanx, >> ittay > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] page reloades infinitely
further investigation shows that for IE and openning new windows, it works fine - a PageMap instance is created, and the page loads fine. i've also started firefox with a new profile (no extensions), to make sure it's not extension related, and no, it happens there also, and also when i open a new window instead of new tab. it seems to be related to differences in cookie (session) handling between firefox and IE. ittay Ittay Dror wrote: > Hi, > > I'm using firefox. when i duplicate a tab, the tab reloads in an infinite > loop. > > this is the reason: > <!--//--><![CDATA[//><!-- > var pagemapcookie = getWicketCookie('pm-nullwicket'); > if(!pagemapcookie && pagemapcookie != > '1'){setWicketCookie('pm-nullwicket',1);} > else {document.location.href = > '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} > > //--><!]]> > > > > > > what happens is that the pagemapcookie is there when the page is rendered, > because the previous page was not unloaded, so the document's href is changed > to itself. of course, when the page loads, the cookie is still 1, so the loop > continues. the same will happen if i just open a new tab and load the same > url. > > what gives? > > > also, the code that writes this script is WebPage.PageMapChecker the comment > in the code is: > /** >* Tries to determine whether this page was opened in a new window or > tab. >* If it is (and this checker were able to recognize that), a new page > map >* is created for this page instance, so that it will start using it's > own >* history in sync with the browser window or tab. >*/ > > i've tried to debug this, but it doesn't look like a new PageMap is created > (i don't use it, so the PageMap instance is the default one). so it seems i > *don't* get a history per tab. > > can/should i remove the AutomaticMultiWindowSupport setting? > > thanx, > ittay -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] page reloades infinitely
Hi, I'm using firefox. when i duplicate a tab, the tab reloads in an infinite loop. this is the reason: <!--//--><![CDATA[//><!-- var pagemapcookie = getWicketCookie('pm-nullwicket'); if(!pagemapcookie && pagemapcookie != '1'){setWicketCookie('pm-nullwicket',1);} else {document.location.href = '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';} //--><!]]> what happens is that the pagemapcookie is there when the page is rendered, because the previous page was not unloaded, so the document's href is changed to itself. of course, when the page loads, the cookie is still 1, so the loop continues. the same will happen if i just open a new tab and load the same url. what gives? also, the code that writes this script is WebPage.PageMapChecker the comment in the code is: /** * Tries to determine whether this page was opened in a new window or tab. * If it is (and this checker were able to recognize that), a new page map * is created for this page instance, so that it will start using it's own * history in sync with the browser window or tab. */ i've tried to debug this, but it doesn't look like a new PageMap is created (i don't use it, so the PageMap instance is the default one). so it seems i *don't* get a history per tab. can/should i remove the AutomaticMultiWindowSupport setting? thanx, ittay -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] errors on servlet init
i get this stack trace the first time i try to access a page. the page is a simple form (no ajax/upload) javax.servlet.ServletException: Servlet.init() for servlet wicket threw exception Stack Trace: * Message: javax.servlet.ServletException: Servlet.init() for servlet wicket threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1146) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) * Message: java.lang.NoSuchFieldError: EXTENSION_JS at wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar$ComponentInitializer.init(UploadProgressBar.java:83) at wicket.extensions.Initializer.init(Initializer.java:41) at wicket.Application.initialize(Application.java:621) at wicket.Application.initializeComponents(Application.java:684) at wicket.Application.initializeComponents(Application.java:661) at wicket.Application.internalInit(Application.java:589) at wicket.protocol.http.WebApplication.internalInit(WebApplication.java:391) at wicket.protocol.http.WicketServlet.init(WicketServlet.java:270) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] link cannot be resolved
Nili Adoram wrote: > Hi all, > > I have a problem resolving a stylesheet link as follows: > > This is the markup: > rel="stylesheet" type="text/css"> why is globalCss needed? the servlet gets a request for a url, which is mounted, so it can just request the resource locator of the mount to locate this file > > This is the component: > add(new StyleSheetReference("globalCss",new > PackageResourceReference(Application.get(), > RssSettings.class, "include/global_en.css"))); > > The PackageResourceReference indeed exists but the rendering fails. > > In MarkupContainer.renderNext(), no component resolver is able to > resolve this tag > ( AutoLinkResolver is unable to resolve it since it has a wicket:id > attribute and WicketLinkResolver is unable to resolve it since it is not > defined as ) > so I get the markup exception: 'Unable to find component with id > "globalCss"' > > Please advise, > > Thanks, > Nili > > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] in head contribution
ok, at least an easy fix is for the prepender to check if the path is relative, and if so not modify it. ittay Igor Vaynberg wrote: > yeah, that would be nice to have, but - the prepender knows nothing > about mounted pages or runtime urls. it only knows about markup and your > context path. furthermore the big advantage of the way it works now is > that the replacement only happens once when the markup is loaded and > before it is cached so it doesnt cause a performance hit. > > you can write your own prepender if you want that works the way you > want, or maybe juergen can come up with a better idea. > > -Igor > > > On 6/19/06, * Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > if i understand correctly, this is how it goes: > > i have a directory named 'web' with a tree of directories containing > html and css files. the html files link to the css files by relative > paths (../include/some.css) > the servlet is on the url pattern /pages/* the directory is mounted > under pages/plugins/foo > > this means, that if i have a page at > pages/plugins/foo/somedir/page.html, and it references its css as > the above, then the full path should be > pages/plugins/foo/include/some.css. however, the prepender will take > the application's context path (/pages), and prepend it to the > relative url, thus getting /pages/../include/some.css, which doesn't > point to the right place. > > i think the prepender should use the mount path (ages/plugins/foo) > for absolute urls and the page's path (pages/plugins/foo/somedir/) > for relative urls > > ittay > > > Igor Vaynberg wrote: > > let me just pipe in for a sec and explain why we do it that way. the > > problem with relative paths in wicket is that a page can be > mounted at > > any point, so the relative's path point can vary - making > relative paths > > useless somewhat. this is why we built the prepender - it turns all > > relative paths into absolute paths so that a page can be mounted > on any > > mount /app/a or /app/a/b/c and all the hardcoded links to resources > > (js/css/img) still work. > > > > just giving some background > > > > -Igor > > > > > > On 6/19/06, *Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > > > Hi Juergen, > > > > the class that adds the '/' is > > wicket.markup.parser.filter.PrependContextPathHandler . it > adds the > > application's context path to all href attributes. > > > > the thing is, it doesn't work with relative paths, as the one > we're > > using. if my application is at /foo, and i have a page in > > /foo/bar/page.html, and it uses with > href=../zoo/my.css, then > > adding /foo/ will create an invalid link element. > > > > i think it should either check the path is not relative to > the page, > > or, always use the page's path. > > > > ittay > > > > > > > > Juergen Donnerstag wrote: > > > And this is your base page? Would you please a junit test > case. > > > > > > Juergen > > > > > > On 6/15/06, Ittay Dror < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > >> (i've sent this an hour ago, but can's see it on the > list. so > > i'm resending, sorry if it appears twice) > > >> > > >> > > >> i'm using markup inheritance with head contribution: > > >> > > >> > type="text/css"> > > >> > > >> > > >> the output is: > > >> > > >> > rel="stylesheet"> > > >> > > >> notice that the href now is absolute :-( > > >> > > >> thanks, > > >> ittay > > >> > > &
Re: [Wicket-user] in head contribution
if i understand correctly, this is how it goes: i have a directory named 'web' with a tree of directories containing html and css files. the html files link to the css files by relative paths (../include/some.css) the servlet is on the url pattern /pages/* the directory is mounted under pages/plugins/foo this means, that if i have a page at pages/plugins/foo/somedir/page.html, and it references its css as the above, then the full path should be pages/plugins/foo/include/some.css. however, the prepender will take the application's context path (/pages), and prepend it to the relative url, thus getting /pages/../include/some.css, which doesn't point to the right place. i think the prepender should use the mount path (ages/plugins/foo) for absolute urls and the page's path (pages/plugins/foo/somedir/) for relative urls ittay Igor Vaynberg wrote: > let me just pipe in for a sec and explain why we do it that way. the > problem with relative paths in wicket is that a page can be mounted at > any point, so the relative's path point can vary - making relative paths > useless somewhat. this is why we built the prepender - it turns all > relative paths into absolute paths so that a page can be mounted on any > mount /app/a or /app/a/b/c and all the hardcoded links to resources > (js/css/img) still work. > > just giving some background > > -Igor > > > On 6/19/06, *Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hi Juergen, > > the class that adds the '/' is > wicket.markup.parser.filter.PrependContextPathHandler . it adds the > application's context path to all href attributes. > > the thing is, it doesn't work with relative paths, as the one we're > using. if my application is at /foo, and i have a page in > /foo/bar/page.html, and it uses with href=../zoo/my.css, then > adding /foo/ will create an invalid link element. > > i think it should either check the path is not relative to the page, > or, always use the page's path. > > ittay > > > > Juergen Donnerstag wrote: > > And this is your base page? Would you please a junit test case. > > > > Juergen > > > > On 6/15/06, Ittay Dror <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > >> (i've sent this an hour ago, but can's see it on the list. so > i'm resending, sorry if it appears twice) > >> > >> > >> i'm using markup inheritance with head contribution: > >> > >> type="text/css"> > >> > >> > >> the output is: > >> > >> rel="stylesheet"> > >> > >> notice that the href now is absolute :-( > >> > >> thanks, > >> ittay > >> > >> -- > >> === > >> Ittay Dror, > >> Chief architect, openQRM TL, > >> R&D, Qlusters Inc. > >> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > >> +972-3-6081994 Fax: +972-3-6081841 > >> > >> http://www.openQRM.org > >> - Keeps your Data-Center Up and Running > >> > >> > >> > >> ___ > >> Wicket-user mailing list > >> Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > > > > > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/wicket-user > <https://lists.sourceforge.net/lists/listinfo/wicket-user> > > > > > -- > === > Ittay Dror, > Chief architect, openQRM TL, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > +972-3-6081994 Fax: +972-3-6081841 > > http://www.openQRM.org > - Keeps your Data-Center Up and Running > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] in head contribution
Hi Juergen, the class that adds the '/' is wicket.markup.parser.filter.PrependContextPathHandler. it adds the application's context path to all href attributes. the thing is, it doesn't work with relative paths, as the one we're using. if my application is at /foo, and i have a page in /foo/bar/page.html, and it uses with href=../zoo/my.css, then adding /foo/ will create an invalid link element. i think it should either check the path is not relative to the page, or, always use the page's path. ittay Juergen Donnerstag wrote: > And this is your base page? Would you please a junit test case. > > Juergen > > On 6/15/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >> (i've sent this an hour ago, but can's see it on the list. so i'm resending, >> sorry if it appears twice) >> >> >> i'm using markup inheritance with head contribution: >> >> >> >> >> the output is: >> >> >> >> notice that the href now is absolute :-( >> >> thanks, >> ittay >> >> -- >> === >> Ittay Dror, >> Chief architect, openQRM TL, >> R&D, Qlusters Inc. >> [EMAIL PROTECTED] >> +972-3-6081994 Fax: +972-3-6081841 >> >> http://www.openQRM.org >> - Keeps your Data-Center Up and Running >> >> >> >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] in head contribution
maybe WicketLinkTagHandler has something to do with it? it says in the comment: /** * This is a markup inline filter. It identifies xml tags which include a href * attribute and which are not Wicket specific components and flags these tags * (ComponentTag) as autolink enabled. A component resolver will later resolve * the href and assign a BookmarkablePageLink to it (automatically). * my use case may need a bit of clarification, if this is the case. i mount the java code using WebApplication.mount. the AbstractRequestTargetUrlCodingStrategy extension i use encodes the url as the class name minus a package prefix. i also use a resource locator that translates the location of the html to another folder. maybe the component resolver can't find the relative reference because of this? can i turn this handling of off? thanks, ittay Ittay Dror wrote: > my base page is: > > > > > > > > > > > > > > > > > > > > > > my sub page is: > > > > > > My Title > > > > > > > > > > > > > ittay > > Juergen Donnerstag wrote: >> And this is your base page? Would you please a junit test case. >> >> Juergen >> >> On 6/15/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >>> (i've sent this an hour ago, but can's see it on the list. so i'm >>> resending, sorry if it appears twice) >>> >>> >>> i'm using markup inheritance with head contribution: >>> >>> >>> >>> >>> the output is: >>> >>> >>> >>> notice that the href now is absolute :-( >>> >>> thanks, >>> ittay >>> >>> -- >>> === >>> Ittay Dror, >>> Chief architect, openQRM TL, >>> R&D, Qlusters Inc. >>> [EMAIL PROTECTED] >>> +972-3-6081994 Fax: +972-3-6081841 >>> >>> http://www.openQRM.org >>> - Keeps your Data-Center Up and Running >>> >>> >>> >>> ___ >>> Wicket-user mailing list >>> Wicket-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >> >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] in head contribution
my base page is: my sub page is: My Title ittay Juergen Donnerstag wrote: > And this is your base page? Would you please a junit test case. > > Juergen > > On 6/15/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >> (i've sent this an hour ago, but can's see it on the list. so i'm resending, >> sorry if it appears twice) >> >> >> i'm using markup inheritance with head contribution: >> >> >> >> >> the output is: >> >> >> >> notice that the href now is absolute :-( >> >> thanks, >> ittay >> >> -- >> === >> Ittay Dror, >> Chief architect, openQRM TL, >> R&D, Qlusters Inc. >> [EMAIL PROTECTED] >> +972-3-6081994 Fax: +972-3-6081841 >> >> http://www.openQRM.org >> - Keeps your Data-Center Up and Running >> >> >> >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] in head contribution
i'm using markup inheritance with head contribution: the output is: notice that the href now is absolute :-( thanks, ittay -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] in head contribution
(i've sent this an hour ago, but can's see it on the list. so i'm resending, sorry if it appears twice) i'm using markup inheritance with head contribution: the output is: notice that the href now is absolute :-( thanks, ittay -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] bookmarkable ajax components?
Igor Vaynberg wrote: > components are stand alone but they need to live inside a container (the > page) because they are stored in it. this is how the urls are built, and > some other services componetns depend on are provided. > > what you might do is create a generic container page that does nothing > more then read off the url what kind of component you want and > instantiate it. cool! but aren't components instanciated in the constructor? i'll need to remove older ones, right? what about the constructor change in wicket 2.0? > > -Igor > > > On 6/11/06, *Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > yes, i can do that, but i was wondering if there is a way without > needing to write a page (i'm planning on having many such components) > > thanx, > ittay > > Igor Vaynberg wrote: > > why not just create a page that only shows the table? > > > > -Igor > > > > > > On 6/11/06, *Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > > > Hi, > > > > Since by using ajax components can be refreshed individually, can > > they be "bookmarked". What I mean is, can I have a URL such that > > loading it will give me the html snippet of the component? > Can this > > be done from an external page? My use case is to be able to > embedd a > > table showing some data in another page, which is not constructed > > with wicket.For example, put the url in an iframe. > > > > Thanks, > > Ittay > > > > -- > > === > > Ittay Dror, > > Chief architect, openQRM TL, > > R&D, Qlusters Inc. > > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > +972-3-6081994 Fax: +972-3-6081841 > > > > http://www.openQRM.org > > - Keeps your Data-Center Up and Running > > > > > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > > <mailto:Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net>> > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > <https://lists.sourceforge.net/lists/listinfo/wicket-user> > > > > > > > > > > > > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > -- > === > Ittay Dror, > Chief architect, openQRM TL, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > +972-3-6081994 Fax: +972-3-6081841 > > http://www.openQRM.org <http://www.openQRM.org> > - Keeps your Data-Center Up and Running > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] bookmarkable ajax components?
yes, i can do that, but i was wondering if there is a way without needing to write a page (i'm planning on having many such components) thanx, ittay Igor Vaynberg wrote: > why not just create a page that only shows the table? > > -Igor > > > On 6/11/06, *Ittay Dror* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hi, > > Since by using ajax components can be refreshed individually, can > they be "bookmarked". What I mean is, can I have a URL such that > loading it will give me the html snippet of the component? Can this > be done from an external page? My use case is to be able to embedd a > table showing some data in another page, which is not constructed > with wicket.For example, put the url in an iframe. > > Thanks, > Ittay > > -- > === > Ittay Dror, > Chief architect, openQRM TL, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > +972-3-6081994 Fax: +972-3-6081841 > > http://www.openQRM.org > - Keeps your Data-Center Up and Running > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > <https://lists.sourceforge.net/lists/listinfo/wicket-user> > > > > > > _______ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] bookmarkable ajax components?
Hi, Since by using ajax components can be refreshed individually, can they be "bookmarked". What I mean is, can I have a URL such that loading it will give me the html snippet of the component? Can this be done from an external page? My use case is to be able to embedd a table showing some data in another page, which is not constructed with wicket.For example, put the url in an iframe. Thanks, Ittay -- ======= Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Upload of 1.2 to maven repo complete
what about maven 1? Martijn Dashorst wrote: All, The maven team has uploaded all our libraries of wicket 1.2 to their main repository (http://repo1.maven.org/maven2/wicket) I wasn't able to check out ibiblio, it seems that repository is out of order at the moment. Martijn -- Download Wicket 1.2 now! Write Ajax applications without touching JavaScript! -- http://wicketframework.org -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
Eelco Hillenius wrote: so, no separation There is, but not stricktly to the MVC pattern. There is no Java framework that I know of that adhers to that original pattern anyway. Certainly not the frameworks that claim to be 'MVC' frameworks. Wicket comes closest to Swing. The components combine controller + view - though Wicket seperates a few of these things with e.g. converters and markup, and the model is a seperate thing. But I think it is more useful to look at the actual seperation and where you need it, than trying to fold discussion into what probably is the most widely misused pattern in software engineering today ;) about the controllers. i thought something like: go over all components, collect the controllers, filter the duplicates and then call each controller's validate(), convert() and updateModel(). if several components share the same controller, then it will collect the raw data from all of them, combine it, and set the combined value in the model It sounds interesting. If someone wants to create a poc for this... I like to discuss with actual code ;) well, sadly (for me), i give up doing this. doing it right (as i see it) requires too many changes for me to handle. and doing it on the basis of the current architecture leaves too many gaps for my taste. Eelco --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
this is what the CompositeComponent i posted a while ago does. what i don't like so much about it is that it is not a real component, in the sense it renders nothing. it is just a mediator between the actual model and other components. anyways, Johan Compagner wrote: Isn't youre controller just the Parent formcomponent that can have childs (form components) Then you can attach validators to the childs to make sure that input is right. (the partial input) And you can attach validators to the parent formcomponent and that parent component has the connection with the "real" model. (the childs have there "inbetween model" from the parent formcomponent to get the data they want to display) Then with that parent formcomponent you override getInputAsArray and convertValue() And youre are done. When the value is converted youre parent validators run over that converted value and if that work that value is stored in the real model. johan On 5/18/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: i guess i should have kept my mouth shut ;-) (or my fingers away from the keyboard) ok, i'll try to kick start it. what code base to use? HEAD? do you have some kind of design phase (documents)? Igor Vaynberg wrote: > > > > It sounds interesting. If someone wants to create a poc for this... I > > like to discuss with actual code ;) > > i'd be interested, but i probably don't know enough about the code, > or design rational. i also can't commit on the time i can spend on this. > > > its your idea and from this discussion it is clear you are the only one > with the understanding of what is required. so who better to write the > initial code? > > -Igor > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net <mailto:Wicket-user@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/wicket-user <https://lists.sourceforge.net/lists/listinfo/wicket-user> -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
i guess i should have kept my mouth shut ;-) (or my fingers away from the keyboard) ok, i'll try to kick start it. what code base to use? HEAD? do you have some kind of design phase (documents)? Igor Vaynberg wrote: > > It sounds interesting. If someone wants to create a poc for this... I > like to discuss with actual code ;) i'd be interested, but i probably don't know enough about the code, or design rational. i also can't commit on the time i can spend on this. its your idea and from this discussion it is clear you are the only one with the understanding of what is required. so who better to write the initial code? -Igor -- ======= Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
i looked at the code of CheckGroup and it works because Check is written to use it. what i'm asking/suggesting is a container which works with ordinary components. ittay Johan Compagner wrote: The kind of component you want to make is already there inside wicket RadioGroup and CheckGroup Those are both formcomponents but they itself don't have input.. because they aren't html components by itself. and with getInputArray() and/or convertValue you have pretty much all the needed hooks you want. johan On 5/17/06, *Ittay Dror* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Igor Vaynberg wrote: > > i thought the component is the view. > > > no, the component is the mvc not just the view. it handles its own > events and responds to them. so, no separation about the controllers. i thought something like: go over all components, collect the controllers, filter the duplicates and then call each controller's validate(), convert() and updateModel(). if several components share the same controller, then it will collect the raw data from all of them, combine it, and set the combined value in the model > > > > hmmm, > class Component { > > > protected IController getController() { > return new TrivialController(this, this.getModel()); > } > } > > > yes, but what would the IController look like? it would have the same > two getObject/setObject that the IModel has? so whats the point? > > -Igor > > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net <mailto:Wicket-user@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
Eelco Hillenius wrote: so, no separation There is, but not stricktly to the MVC pattern. There is no Java framework that I know of that adhers to that original pattern anyway. Certainly not the frameworks that claim to be 'MVC' frameworks. Wicket comes closest to Swing. The components combine controller + view - though Wicket seperates a few of these things with e.g. converters and markup, and the model is a seperate thing. But I think it is more useful to look at the actual seperation and where you need it, than trying to fold discussion into what probably is the most widely misused pattern in software engineering today ;) yes i agree. i got carried away, sorry. the point is that components today are tied in a 1:1 relationship with the model values, converters, etc. the idea of the controller is to break that limitation. about the controllers. i thought something like: go over all components, collect the controllers, filter the duplicates and then call each controller's validate(), convert() and updateModel(). if several components share the same controller, then it will collect the raw data from all of them, combine it, and set the combined value in the model It sounds interesting. If someone wants to create a poc for this... I like to discuss with actual code ;) i'd be interested, but i probably don't know enough about the code, or design rational. i also can't commit on the time i can spend on this. Eelco --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
Igor Vaynberg wrote: i thought the component is the view. no, the component is the mvc not just the view. it handles its own events and responds to them. so, no separation about the controllers. i thought something like: go over all components, collect the controllers, filter the duplicates and then call each controller's validate(), convert() and updateModel(). if several components share the same controller, then it will collect the raw data from all of them, combine it, and set the combined value in the model hmmm, class Component { protected IController getController() { return new TrivialController(this, this.getModel()); } } yes, but what would the IController look like? it would have the same two getObject/setObject that the IModel has? so whats the point? -Igor -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
Eelco Hillenius wrote: it will be the mediator between the components and the model (like the Controller in MVC) Currently the component is the controller, so it would be an extra indirection. i thought the component is the view. if the framework interacts with the manager, rather than directly with the components, for the purpose of updating the model, then one manager can be associated with two components. thus, when its 'updateModel()' method is called, it will interact with the two components, query their raw value and set it in the model. Could you give some dummy code on how that would look like from a client's perspective? hmmm, class Component { protected IController getController() { return new TrivialController(this, this.getModel()); } } and when someone wants better, extend and override so basically it remains transparent for most cliens (that keep doing 'add(new MyComponent("my", new Model(...)))') Eelco --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
i agree, but each component sets the object individually. with a ComponentController (name changed for marketing reasons ;-) ), the controller is asked to update the model, it can then query m components and set n values. also, i think of IModel as an adapter to the actual model, so it reflects the underlying model 1:1. Igor Vaynberg wrote: on the same page two components can share an IModel instance, so you can fold the manager abstraction directly into the IModel implementation. you have the context already - setObject(Component context, Object o) -Igor On 5/17/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Eelco Hillenius wrote: > On 5/17/06, Ittay Dror <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: >> what if the framework will allow a ComponentManager to be associate >> with a component? > > What would it do though? The naming implies it might do anything, > while this topic is about models or even more specifically model > updates. it will be the mediator between the components and the model (like the Controller in MVC) > >> it can then manage these issues. by default, every component will have >> its own manager (or, > set the manager to 'this') > > I'm looking for the general case, which seems to be either > transactional updating of models (though that wouldn't really help > with immutables) or a more sophisticated mechanism for cooperating > models. if the framework interacts with the manager, rather than directly with the components, for the purpose of updating the model, then one manager can be associated with two components. thus, when its 'updateModel()' method is called, it will interact with the two components, query their raw value and set it in the model. this allows an n:m relationship between components and model values. > > Eelco > > > --- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 <http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642> > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org <http://www.openQRM.org> - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> _______ Wicket-user mailing list Wicket-user@lists.sourceforge.net <mailto:Wicket-user@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
Eelco Hillenius wrote: On 5/17/06, Ittay Dror <[EMAIL PROTECTED]> wrote: what if the framework will allow a ComponentManager to be associate with a component? What would it do though? The naming implies it might do anything, while this topic is about models or even more specifically model updates. it will be the mediator between the components and the model (like the Controller in MVC) it can then manage these issues. by default, every component will have its own manager (or, > set the manager to 'this') I'm looking for the general case, which seems to be either transactional updating of models (though that wouldn't really help with immutables) or a more sophisticated mechanism for cooperating models. if the framework interacts with the manager, rather than directly with the components, for the purpose of updating the model, then one manager can be associated with two components. thus, when its 'updateModel()' method is called, it will interact with the two components, query their raw value and set it in the model. this allows an n:m relationship between components and model values. Eelco --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: How to write model for immutable compound value object?
what if the framework will allow a ComponentManager to be associate with a component? it can then manage these issues. by default, every component will have its own manager (or, set the manager to 'this') ittay Eelco Hillenius wrote: I think what Ittay's and your case have in common is that you try to make an update of multiple fields atomic. Wicket doesn't support transactional updating of properties, and honestly I would know how to fold such a thing elegantly in Wicket without making things a lot more complicated. Typically, I would do such a thing just in a submit method, where I would check some temporary properties 'manually' and if I'm happy with the input, I would direcly update/ construct the objects I'd need. That looks a lot easier than how you two do things, BUT the great advantage of your approaches is that it is a better fit with reusable components. So, I think that if this is really something we have to fix with Wicket - mind you that currently I think the case is not common enough, while there are several approach to acchieve the same thing - we should do this not by opening up the internal processing of components even further, but instead come up with transactional model updating. But that doesn't seem like something trivial. Eelco On 5/17/06, Pekka Enberg <[EMAIL PROTECTED]> wrote: At some point in time, Ittay Dror wrote: > i have a similar use case. below is the code for a component i wrote. > it is a markup container, so you can add > components to it, which can be referenced from the html: [snip] Thanks. We ended up using a different approach which I have included below. Pekka  - package wicket.sets; import wicket.Component; import wicket.markup.html.form.Form; import wicket.markup.html.form.FormComponent; import wicket.markup.html.form.TextField; import wicket.markup.html.form.validation.AbstractFormValidator; import wicket.markup.html.panel.Panel; import wicket.model.IModel; import wicket.model.IModelComparator; import wicket.model.Model; import sets.IntegerRange; /** * @author Pekka Enberg */ public class IntegerRangeField extends Panel { private final TextField minimum; private final TextField maximum; public IntegerRangeField(Form parent, String id) { this(parent, id, null); } public IntegerRangeField(Form parent, String id, IModel/**/model) { super(id, model); minimum = new TextField("min", new Model(defaultMinimumValue()), Integer.class); maximum = new MaximumField("max", new Model(defaultMaximumValue()) { @Override public void setObject(Component component, Object object) { super.setObject(component, object); try { IntegerRange newRange = null; if (minimumValue() != null && maximumValue() != null) { newRange = new IntegerRange(minimumValue(), maximumValue()); } IntegerRangeField.this.setModelObject(newRange); } catch (IllegalArgumentException e) { /* * Ignore the exception. We don't want to update the * actual model when user input is invalid. */ } } }); maximum.setType(Integer.class); add(minimum); add(maximum); parent.add(new Validator(this)); } private Integer defaultMinimumValue() { if (rangeValue() == null) { return null; } return rangeValue().getMinimum(); } private Integer defaultMaximumValue() { if (rangeValue() == null) { return null; } return rangeValue().getMaximum(); } private IntegerRange rangeValue() { return (IntegerRange) getModelObject(); } private Integer minimumValue() { return (Integer) minimum.getModelObject(); } private Integer maximumValue() { return (Integer) maximum.getModelObject(); } private final class MaximumField extends TextField { private MaximumField(String id, IModel object) { super(id, object); } @Override protected IModelComparator getModelComparator() { /* * We need this to ensure Model.setObject() is called for maximum * even if only minimum value was changed by user. */ return new IModelComparator() { public boolean compare(Component component, Object newObject) { return false; } }; } } public static class Validator extends AbstractFormValidator { private final IntegerRangeField range; public V
Re: [Wicket-user] Re: How to write model for immutable compound value object?
uals(getTimeId())) { return timeFormatter.parse(timeFormatter.format(modelObject)); } } catch (ParseException e) { // cannot happen throw new RuntimeException("Parsing partial of " + modelObject + " failed", e); } return null; } /* * (non-Javadoc) * * @see wicket.Component#getConverter() */ @Override public IConverter getConverter() { return new DateConverter(dateFormat + " " + timeFormat, false); } } Pekka Enberg wrote: Hi Johan, (Please cc me as I am not subscribed to the list.) At some point in time, Johan Compagner wrote: you could use a FormValidator to validate those 2 fields (as it was one) Yeah, this I already have. At some point in time, Johan Compagner wrote: to combine the 2 as one value (because the can't et the min and max inside the IntegerRange object?) You could wrap the 2 text fields in a formcomponent and use only a MarkupContainer for those textfields (so not really textfields) So that from the form point of view there is only one formcomponent touching the IntegerRange object and that one can do convertValue() to convert it to a IntegerRange object and test it then and if that all is ok the converted input will be pushed to the model. Sounds good. So now that I have use FormComponent, I suppose I can't use a HTML template but have to do the rendering in Component.onComponentTag() myself? Pekka --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stale session on form submit
i have an existing application built with struts, the wicket pages are (for now) embedded in other pages as tabs. so when the user first hits the application he gets a struts homepage. Igor Vaynberg wrote: what do you mean there is no homepage? it is a page that the user comes to the first time they hit an application. -Igor On 5/15/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: if i have a page loaded in the browser and i relaunch the web server, and then submit the page, i get an exception: java.lang.IllegalArgumentException: Page class for bookmarkable link cannot be null at wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:73) at wicket.markup.html.link.BookmarkablePageLink .(BookmarkablePageLink.java:53) at wicket.markup.html.WebPage.homePageLink(WebPage.java:228) at wicket.markup.html.pages.PageExpiredErrorPage.(PageExpiredErrorPage.java:38) at java.lang.reflect.Constructor.newInstance (Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) at wicket.session.DefaultPageFactory.newPage (DefaultPageFactory.java:100) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:27) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:22) at wicket.request.target.component.BookmarkablePageRequestTarget.newPage (BookmarkablePageRequestTarget.java:265) at wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:284) at wicket.request.target.component.BookmarkablePageRequestTarget.processEvents (BookmarkablePageRequestTarget.java:204) at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents (AbstractCompoundRequestCycleProcessor.java:57) this is because there's no home page for the application. in my scenario, i can't use one. my question is, is there a way for a page not to be expired? thanks, ittay -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net <mailto:Wicket-user@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stale session on form submit
how can i tell if a Page is bookmarkable or not? Johan Compagner wrote: What you could do is is something like this: override onComponentTag of Form do the super call and then do this: tag.put("action", abookmarkableurl); and then that bookmarkable url will be pointing to a page. That handles the form submit. johan On 5/16/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Johan Compagner wrote: > did you aks that same question 2 days ago and i also replied on it: sorry, there was probably something wrong with the lists, as i didn't see my post nor your reply > > " > if a http session gets expired then pages are expired there is no way > around that. > Or you have to use your own cookies to build the wicket session and > store pages somewhere else. > > If you don't specify a homepage in youre application then you must > override the expired page > else you will get the underlying error. Because by default the expired > page will try to make a alink > to the homepage. > > for 2.0 we are planning to have BookmarkableForms (or how it is called > implemented) for now you can cool! > do that by making forms do the submit to a Bookmarkable url. Then if > they submit the page will be created again. hmm, can you explain more? the class Form uses some encoding of a listener when it renders the action part. should i just override that? > " > > johan > > > > On 5/16/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > if i have a page loaded in the browser and i relaunch the web > server, and then submit the page, i get an exception: > java.lang.IllegalArgumentException: Page class for bookmarkable link > cannot be null >at > wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:73) >at wicket.markup.html.link.BookmarkablePageLink > .( BookmarkablePageLink.java:53) >at wicket.markup.html.WebPage.homePageLink(WebPage.java:228) >at > wicket.markup.html.pages.PageExpiredErrorPage.(PageExpiredErrorPage.java:38) >at java.lang.reflect.Constructor.newInstance (Constructor.java:494) >at java.lang.Class.newInstance0(Class.java:350) >at java.lang.Class.newInstance(Class.java:303) >at > wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) >at wicket.session.DefaultPageFactory.newPage > (DefaultPageFactory.java:100) >at > com.qlusters.qrm.web.wicket.WebPageFactory.newPage (WebPageFactory.java:27) >at > com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:22) >at > wicket.request.target.component.BookmarkablePageRequestTarget.newPage > (BookmarkablePageRequestTarget.java:265) >at > wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:284) >at > wicket.request.target.component.BookmarkablePageRequestTarget.processEvents > (BookmarkablePageRequestTarget.java:204) >at > wicket.request.compound.DefaultEventProcessorStrategy.processEvents (DefaultEventProcessorStrategy.java:65) >at > wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents > (AbstractCompoundRequestCycleProcessor.java:57) > > > this is because there's no home page for the application. in my > scenario, i can't use one. > > my question is, is there a way for a page not to be expired? > > thanks, > ittay > > > > -- > === > Ittay Dror > Chief architect, openQRM TL, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > +972-3-6081994 Fax: +972-3-6081841 > > http://www.openQRM.org <http://www.openQRM.org> > - Keeps your Data-Center Up and Running > > > > > --- > Using Tomcat but need to do more? Need to sup
[Wicket-user] stale session on form submit
if i have a page loaded in the browser and i relaunch the web server, and then submit the page, i get an exception: java.lang.IllegalArgumentException: Page class for bookmarkable link cannot be null at wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:73) at wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:53) at wicket.markup.html.WebPage.homePageLink(WebPage.java:228) at wicket.markup.html.pages.PageExpiredErrorPage.(PageExpiredErrorPage.java:38) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:100) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:27) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:22) at wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:265) at wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:284) at wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:204) at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57) this is because there's no home page for the application. in my scenario, i can't use one. my question is, is there a way for a page not to be expired? thanks, ittay -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stale session on form submit
great. thanx. Johan Compagner wrote: if it has one of the following constructors: default: () pageparameters: (PageParameters params) and you need ofcourse the second because else you can't get the form values. johan On 5/16/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: how can i tell if a Page is bookmarkable or not? Johan Compagner wrote: > What you could do is is something like this: > > override onComponentTag of Form > do the super call > and then do this: > > tag.put("action", abookmarkableurl); > > and then that bookmarkable url will be pointing to a page. That handles > the form submit. > > johan > > > > On 5/16/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > > > Johan Compagner wrote: > > did you aks that same question 2 days ago and i also replied on it: > > sorry, there was probably something wrong with the lists, as i > didn't see my post nor your reply > > > > > " > > if a http session gets expired then pages are expired there is no way > > around that. > > Or you have to use your own cookies to build the wicket session and > > store pages somewhere else. > > > > If you don't specify a homepage in youre application then you must > > override the expired page > > else you will get the underlying error. Because by default the > expired > > page will try to make a alink > > to the homepage. > > > > for 2.0 we are planning to have BookmarkableForms (or how it is > called > > implemented) for now you can > > cool! > > > do that by making forms do the submit to a Bookmarkable url. Then if > > they submit the page will be created again. > > hmm, can you explain more? the class Form uses some encoding of a > listener when it renders the action part. should i just override that? > > > " > > > > johan > > > > > > > > On 5/16/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > mailto:[EMAIL PROTECTED]>> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote: > > > > if i have a page loaded in the browser and i relaunch the web > > server, and then submit the page, i get an exception: > > java.lang.IllegalArgumentException: Page class for > bookmarkable link > > cannot be null > >at > > > wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:73) > >at wicket.markup.html.link.BookmarkablePageLink > > .( BookmarkablePageLink.java:53) > >at wicket.markup.html.WebPage.homePageLink(WebPage.java:228) > >at > > > wicket.markup.html.pages.PageExpiredErrorPage.(PageExpiredErrorPage.java:38) > > >at java.lang.reflect.Constructor.newInstance > (Constructor.java :494) > >at java.lang.Class.newInstance0(Class.java:350) > >at java.lang.Class.newInstance(Class.java:303) > >at > > > wicket.session.DefaultPageFactory.newPage (DefaultPageFactory.java:58) > >at wicket.session.DefaultPageFactory.newPage > > (DefaultPageFactory.java:100) > >at > > com.qlusters.qrm.web.wicket.WebPageFactory.newPage > (WebPageFactory.java:27) > >at > > > com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:22) > >at > > > wicket.request.target.component.BookmarkablePageRequestTarget.newPage > > (BookmarkablePageRequestTarget.java:265) > >at > > > wicket.request.target.component.Boo
Re: [Wicket-user] stale session on form submit
Johan Compagner wrote: did you aks that same question 2 days ago and i also replied on it: sorry, there was probably something wrong with the lists, as i didn't see my post nor your reply " if a http session gets expired then pages are expired there is no way around that. Or you have to use your own cookies to build the wicket session and store pages somewhere else. If you don't specify a homepage in youre application then you must override the expired page else you will get the underlying error. Because by default the expired page will try to make a alink to the homepage. for 2.0 we are planning to have BookmarkableForms (or how it is called implemented) for now you can cool! do that by making forms do the submit to a Bookmarkable url. Then if they submit the page will be created again. hmm, can you explain more? the class Form uses some encoding of a listener when it renders the action part. should i just override that? " johan On 5/16/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: if i have a page loaded in the browser and i relaunch the web server, and then submit the page, i get an exception: java.lang.IllegalArgumentException: Page class for bookmarkable link cannot be null at wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:73) at wicket.markup.html.link.BookmarkablePageLink .(BookmarkablePageLink.java:53) at wicket.markup.html.WebPage.homePageLink(WebPage.java:228) at wicket.markup.html.pages.PageExpiredErrorPage.(PageExpiredErrorPage.java:38) at java.lang.reflect.Constructor.newInstance (Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) at wicket.session.DefaultPageFactory.newPage (DefaultPageFactory.java:100) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:27) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:22) at wicket.request.target.component.BookmarkablePageRequestTarget.newPage (BookmarkablePageRequestTarget.java:265) at wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:284) at wicket.request.target.component.BookmarkablePageRequestTarget.processEvents (BookmarkablePageRequestTarget.java:204) at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents (AbstractCompoundRequestCycleProcessor.java:57) this is because there's no home page for the application. in my scenario, i can't use one. my question is, is there a way for a page not to be expired? thanks, ittay -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net <mailto:Wicket-user@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror, Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] stale session on form submit
if i have a page loaded in the browser and i relaunch the web server, and then submit the page, i get an exception: java.lang.IllegalArgumentException: Page class for bookmarkable link cannot be null at wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:73) at wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:53) at wicket.markup.html.WebPage.homePageLink(WebPage.java:228) at wicket.markup.html.pages.PageExpiredErrorPage.(PageExpiredErrorPage.java:38) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:100) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:27) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:22) at wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:265) at wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:284) at wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:204) at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57) this is because there's no home page for the application. in my scenario, i can't use one. my question is, is there a way for a page not to be expired? thanks, ittay -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] stale session on form submit
if i have a page loaded in the browser and i relaunch the web server, and then submit the page, i get an exception: java.lang.IllegalArgumentException: Page class for bookmarkable link cannot be null at wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:73) at wicket.markup.html.link.BookmarkablePageLink.(BookmarkablePageLink.java:53) at wicket.markup.html.WebPage.homePageLink(WebPage.java:228) at wicket.markup.html.pages.PageExpiredErrorPage.(PageExpiredErrorPage.java:38) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:100) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:27) at com.qlusters.qrm.web.wicket.WebPageFactory.newPage(WebPageFactory.java:22) at wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:265) at wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:284) at wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:204) at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57) this is because there's no home page for the application. in my scenario, i can't use one. my question is, is there a way for a page not to be expired? thanks, ittay -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] wicket legacy integration (high level suggestion)
i think it will help wicket's cause if it has some way of integrating into existing applications, especially existing pages. what can be done is to have a way for the page's markup (the html), to be a url which is then retrieved to get the html page. if this url points to struts/jsp/servlet, then those technologies will render it with what they have, and if there are wicket:id attributes, they will appear in the resulting html, which wicket can now process or, support embedding wicket generated html snippet in another page (by jsp:include). i've done some work here (and posted most of it), but there is still a strong tie with Page classes (that is, the embedded snippet needs to be a Page implementation). ittay -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] conversion
the case here is different i think - the component has the converter - the component doesn't have the type set --> the converter is not used in convert() --> the converter *is* used when setting the object model. --> the conversion fails, but not in a nice way (because it is late in the process) Eelco Hillenius wrote: Yeah, I'm not totally crazy about that either. But the fact that we only try to convert when there is a converter set comes from: * some components, like CheckBox use their own kind of conversion, and thus override the convertValue method * some users strongly objected against Wicket always trying to use converters. In older Wicket versions, it was integrated in it's adoption of OGNL. But users wanted less magic. Eelco On 5/10/06, Ittay Dror <[EMAIL PROTECTED]> wrote: i created a TextField, without setting its type, but with overriding of getConverter(), i also used a CompoundPropertyModel what happened is that this converter was not used in convert(), but was used by the property resolver. inside the PropertyResolver code, it threw an exception, which, was rethrown as InvocationException, which was considered unexpected, and so the page was redirected to the error page (rather than showing a conversion error) ittay -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] conversion
yes, after i saw the exception, and looked at the code to find the exact reason, i added the type Johan Compagner wrote: we try to do it: if (object instanceof String) { // and that String is not empty final String string = (String)object; if (!Strings.isEmpty(string)) { // and there is a non-null property type for the component final Class propertyType = propertyType(component); if (propertyType != null) { // convert the String to the right type object = component.getConverter().convert(string, propertyType); } } } PropertyResolver.setValue(expression, modelObject, object, component==null ? null:component.getConverter()); But if you use a compound/propertymodel as the texfields own root model then the component isn't there so the Session will be used. Why don't you se the right type on the textfields? That is the prefered way because the error is catched much earlier and validators can work on the right object. On 5/10/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: i created a TextField, without setting its type, but with overriding of getConverter(), i also used a CompoundPropertyModel what happened is that this converter was not used in convert(), but was used by the property resolver. inside the PropertyResolver code, it threw an exception, which, was rethrown as InvocationException, which was considered unexpected, and so the page was redirected to the error page (rather than showing a conversion error) ittay -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net <mailto:Wicket-user@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] conversion
i created a TextField, without setting its type, but with overriding of getConverter(), i also used a CompoundPropertyModel what happened is that this converter was not used in convert(), but was used by the property resolver. inside the PropertyResolver code, it threw an exception, which, was rethrown as InvocationException, which was considered unexpected, and so the page was redirected to the error page (rather than showing a conversion error) ittay -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] composite component
Johan Compagner wrote: why this strange method: private CompositeComponent getThis() { return this; } why not CompositeComponent.this on the places where you use that. also i see a nullpointer: public String[] getInputAsArray() { // go over all children, and create a list. final List list = null; you don't create the list. but do access it in the innerclass. thanx, yes, you're right. cleaning up and not testing... And are the children you put in that composite also again formcomponents? Why why aren't that just Check or Radio classes normal webcontainers Because you are now creating a hierchy in FormComponents? i didn't understand you. i use getInputAsArray(), which is defined in FormComponent. I'm trying to acheive an effect of several form components acting, for the model (set/get) as one. On 5/10/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: after troubling many people here, and thankful for their help, here is the CompositeComponent component. you just overwrite two methods, and voila! hope it is useful for someone else. it is part of the product i'm working on, so it's MPL licensed. public abstract class CompositeComponent extends FormComponent{ public CompositeComponent(String id) { this(id, null); } public CompositeComponent(String id, IModel model) { // XXX: can make it in omModelChanged, but then i have to do some ugly checks super(id); setModel(new PartialModel(model)); } abstract protected String[] getCompositeInput(List list); abstract protected Object getPartialObject(Component component, Object modelObject); /* (non-Javadoc) * @see wicket.markup.html.form.FormComponent#getInput() */ @Override public String[] getInputAsArray() { // go over all children, and create a list. final List list = null; visitChildren(FormComponent.class , new Component.IVisitor(){ public Object component(Component component) { list.add(((FormComponent)component).getInputAsArray()); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); return getCompositeInput(list); } private CompositeComponent getThis() { return this; } private class PartialModel implements ICompoundModel { private IModel selfModel; public PartialModel(IModel model) { selfModel = model; } public IModel getNestedModel() { return null; } public Object getObject(Component component) { resolveSelfModel(); return getPartialObject(component, selfModel.getObject(getThis())); } public void setObject(Component component, Object object) { if (component == null) { resolveSelfModel(); selfModel.setObject(getThis(), object); } } private void resolveSelfModel() { if (selfModel == null) { selfModel = getParent().getModel(); } } public void detach() { // TODO Auto-generated method stub } } } -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net <mailto:Wicke
[Wicket-user] getting id attribute from preview
hi, i am trying to write something similar to the date picker - i have an input field and a javascript needs to write to it. therefore, when generating the javascript, i want to give it the field's id. so, creating this MyDatePicker component, i pass to it the other component in the ctor. then, it uses otherComponent.getPath() to get the id the component will be rendered with. my problem is that i saw that if in the html i give an id to the input field, then that id is retained, and then using getPath() doesn't work. so, in one component, how can i reliably get the html id of another, and where in the code? thanx, ittay -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] composite component
after troubling many people here, and thankful for their help, here is the CompositeComponent component. you just overwrite two methods, and voila! hope it is useful for someone else. it is part of the product i'm working on, so it's MPL licensed. public abstract class CompositeComponent extends FormComponent{ public CompositeComponent(String id) { this(id, null); } public CompositeComponent(String id, IModel model) { // XXX: can make it in omModelChanged, but then i have to do some ugly checks super(id); setModel(new PartialModel(model)); } abstract protected String[] getCompositeInput(List list); abstract protected Object getPartialObject(Component component, Object modelObject); /* (non-Javadoc) * @see wicket.markup.html.form.FormComponent#getInput() */ @Override public String[] getInputAsArray() { // go over all children, and create a list. final List list = null; visitChildren(FormComponent.class, new Component.IVisitor(){ public Object component(Component component) { list.add(((FormComponent)component).getInputAsArray()); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); return getCompositeInput(list); } private CompositeComponent getThis() { return this; } private class PartialModel implements ICompoundModel { private IModel selfModel; public PartialModel(IModel model) { selfModel = model; } public IModel getNestedModel() { return null; } public Object getObject(Component component) { resolveSelfModel(); return getPartialObject(component, selfModel.getObject(getThis())); } public void setObject(Component component, Object object) { if (component == null) { resolveSelfModel(); selfModel.setObject(getThis(), object); } } private void resolveSelfModel() { if (selfModel == null) { selfModel = getParent().getModel(); } } public void detach() { // TODO Auto-generated method stub } } } -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] (conceptual) bug in getModelObject()?
i think the compound concept needs to be generalized. the ICompoundModel is really IAutomaticallyInheritedModel. whether it is compound (a model simulating holding other models) is not important i think. Matej Knopp wrote: On the other side, you still have component parameter in IModel#getModelObject, which makes only sense when the model is compound, so maybe getRootObject() in ICompoundModel wouldn't improve things anyway. -Matej Matej Knopp wrote: Hmm. maybe having getRootObjecT() in ICompoundModel would make things little easier to understand, wonder what core developers would think. anyway, the model can't decide, whether to return null or not. it depends on the component. but the component would know whether to call getObject(this) or getRootObject(), according to FLAG_HAS_ROOT_MODEL. -Matej Ittay Dror wrote: then i think this should be more explicit. e.g., add to ICompoundModel a getRootObject(), and i think that if that returns null, then return getObject(this) Matej Knopp wrote: Ittay Dror wrote: public final Object getModelObject() { final IModel model = getModel(); if (model != null) { // If this component has the root model for a compound model if (getFlag(FLAG_HAS_ROOT_MODEL)) { // we need to return the root model and not a property of the // model return getRootModel(model).getObject(null); } // Get model value for this component return model.getObject(this); } else { return null; } } note the statement: getRootModel(model).getObject(null); why use null? I believe it's because of compound models. e.g. when you have compound property model, getObject(Component) returns you the property of the model object which name is sme as component id. getObject(null) returns you the whole model object. If you have a form for instance and set it a compoundpropertymodel, the modelObject of the form is the object you put to the model. but the model objects of components placed into the form are actually properties of the object you set to the model. (as the components will inherit the model from the form) -Matej --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] (conceptual) bug in getModelObject()?
then i think this should be more explicit. e.g., add to ICompoundModel a getRootObject(), and i think that if that returns null, then return getObject(this) Matej Knopp wrote: Ittay Dror wrote: public final Object getModelObject() { final IModel model = getModel(); if (model != null) { // If this component has the root model for a compound model if (getFlag(FLAG_HAS_ROOT_MODEL)) { // we need to return the root model and not a property of the // model return getRootModel(model).getObject(null); } // Get model value for this component return model.getObject(this); } else { return null; } } note the statement: getRootModel(model).getObject(null); why use null? I believe it's because of compound models. e.g. when you have compound property model, getObject(Component) returns you the property of the model object which name is sme as component id. getObject(null) returns you the whole model object. If you have a form for instance and set it a compoundpropertymodel, the modelObject of the form is the object you put to the model. but the model objects of components placed into the form are actually properties of the object you set to the model. (as the components will inherit the model from the form) -Matej --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- ======= Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] (conceptual) bug in getModelObject()?
same in setModelObject Ittay Dror wrote: public final Object getModelObject() { final IModel model = getModel(); if (model != null) { // If this component has the root model for a compound model if (getFlag(FLAG_HAS_ROOT_MODEL)) { // we need to return the root model and not a property of the // model return getRootModel(model).getObject(null); } // Get model value for this component return model.getObject(this); } else { return null; } } note the statement: getRootModel(model).getObject(null); why use null? -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Component.FLAG_XXX are private
i want to overcome the issue which i've just posted about, and to set the FLAG_HAS_ROOT_MODEL to false, but the value is private. can it be made protected? thanx, ittay -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] (conceptual) bug in getModelObject()?
public final Object getModelObject() { final IModel model = getModel(); if (model != null) { // If this component has the root model for a compound model if (getFlag(FLAG_HAS_ROOT_MODEL)) { // we need to return the root model and not a property of the // model return getRootModel(model).getObject(null); } // Get model value for this component return model.getObject(this); } else { return null; } } note the statement: getRootModel(model).getObject(null); why use null? -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
Igor Vaynberg wrote: hrm, so now if you want to join the two what do you do in getMessages() of the compound impl? create a new arraylist and merge messages from the other two? do you do the merged array generation on every call or keep it in a transient field? i copy the code from FeeedbackMessagesModel ;-) (it keeps the array in a transient field) -Igor On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: ok, i have it. how do i send it? i created an AbstractFeedbackMessages, which has 2 abstract methods: isReadonly() and getMessages(). the rest use them i'm thinking of maybe change it to ReadonlyFeedbackMessages and FeedbackMessages which will extend it, and CompoundFeedbackMessages will extend it also. what do you think? Igor Vaynberg wrote: > maybe you can submit a patch > > here is what i would suggest > > extract IFeedbackMessages interface from FeedbackMessages and create a > CompoundFeedbackMessages impl, that way you can join the session and > page messages yourself and still use the same utility methods in > FeedbackMessages on the joined collection. > > how does that sound? > > -Igor > > > On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > > > Igor Vaynberg wrote: > > so you want to use it outside the model? > > outside of an IModel context, yes. > > > > > but then feedbackpanel.anyMessage(int level) is just > > > > Page.getFeedbackMessages ().hasAnyMessage(new > > ErrorLevelFeedbackMessage(level)) no? > > no, because the model joins the page messages and session messages > > > > > -Igor > > > > > > On 5/9/06, *Ittay Dror* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > mailto:[EMAIL PROTECTED]>> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote: > > > > it will be too much of a pain, since most issues are because i'm > > using wicket in an existing application, built on struts. > > > > however, i would appriciate it if you could answer some specific > > questions. > > > > i'm trying to create my own feedback panel. an issue i > encountered > > is that FeedbackPanel has the anyMessages() method, which i also > > need, i can copy the code, but isn't it better to move it to > > FeedbackMessage, as static utility methods? or, better yet, > create a > > FeedbackMessages class which has the logic found in > > FeedbackMessagesModel, so it can be reused outside of the > context of > > a model? > > > > ittay > > > > Igor Vaynberg wrote: > > > give us an html snippet of what you want as the end result > and > > tell us > > > where the components are. it is very difficult to talk on > such a huge > > > abstraction level. > > > > > > -Igor > > > > > > > > > On 5/9/06, *Ittay Dror* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> > > > mailto:[EMAIL PROTECTED]> mailto:[EMAIL PROTECTED]>> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>>> wrote: > > > > > > > > > > > > Igor Vaynberg wrote: > > > > but what is really a problem then i dont > understand? all > > you want > > > to do >
Re: [Wicket-user] using feedback not based on labels
ok, i have it. how do i send it? i created an AbstractFeedbackMessages, which has 2 abstract methods: isReadonly() and getMessages(). the rest use them i'm thinking of maybe change it to ReadonlyFeedbackMessages and FeedbackMessages which will extend it, and CompoundFeedbackMessages will extend it also. what do you think? Igor Vaynberg wrote: maybe you can submit a patch here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound? -Igor On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Igor Vaynberg wrote: > so you want to use it outside the model? outside of an IModel context, yes. > > but then feedbackpanel.anyMessage(int level) is just > > Page.getFeedbackMessages ().hasAnyMessage(new > ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages > > -Igor > > > On 5/9/06, *Ittay Dror* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > it will be too much of a pain, since most issues are because i'm > using wicket in an existing application, built on struts. > > however, i would appriciate it if you could answer some specific > questions. > > i'm trying to create my own feedback panel. an issue i encountered > is that FeedbackPanel has the anyMessages() method, which i also > need, i can copy the code, but isn't it better to move it to > FeedbackMessage, as static utility methods? or, better yet, create a > FeedbackMessages class which has the logic found in > FeedbackMessagesModel, so it can be reused outside of the context of > a model? > > ittay > > Igor Vaynberg wrote: > > give us an html snippet of what you want as the end result and > tell us > > where the components are. it is very difficult to talk on such a huge > > abstraction level. > > > > -Igor > > > > > > On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote: > > > > > > > > Igor Vaynberg wrote: > > > but what is really a problem then i dont understand? all > you want > > to do > > > is write out some javascript based on feedback messages? > instead of > > > using a feedbackpanel add a label that writes out the > javascript you > > > want. you can get the messages using > Page.getFeedbackMessages () > > > > > > so something like this: > > > > > > > > > add(new Label("js", new AbstractReadOnlyModel() { > > > Object getObject(Component c) { > > > FeedbackMessages msgs=c.getPage > ().getFeedbackMessages(); > > > AppendingStringBuffer js=new > AppendingStringBuffer(); > > > fill in javascript into js > > > return js.toString(); > > > }).setEscapeModelStrings(false)); > > > > > > and you should be good to go right? > > > > the javascript has a lot of GUI code in it, so it looks to me > like > > something from the early days of servlets. i'm not looking for > > something that works, but, for something that works "the > wicket way" > > > > > > > -- > === > Ittay Dror > Chief architect, openQRM TL, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> mailto:[EMAIL PROTECT
Re: [Wicket-user] using feedback not based on labels
yep although i think an abstract base class suffices will try to do it shortly. Igor Vaynberg wrote: maybe you can submit a patch here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound? -Igor On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Igor Vaynberg wrote: > so you want to use it outside the model? outside of an IModel context, yes. > > but then feedbackpanel.anyMessage(int level) is just > > Page.getFeedbackMessages ().hasAnyMessage(new > ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages > > -Igor > > > On 5/9/06, *Ittay Dror* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > it will be too much of a pain, since most issues are because i'm > using wicket in an existing application, built on struts. > > however, i would appriciate it if you could answer some specific > questions. > > i'm trying to create my own feedback panel. an issue i encountered > is that FeedbackPanel has the anyMessages() method, which i also > need, i can copy the code, but isn't it better to move it to > FeedbackMessage, as static utility methods? or, better yet, create a > FeedbackMessages class which has the logic found in > FeedbackMessagesModel, so it can be reused outside of the context of > a model? > > ittay > > Igor Vaynberg wrote: > > give us an html snippet of what you want as the end result and > tell us > > where the components are. it is very difficult to talk on such a huge > > abstraction level. > > > > -Igor > > > > > > On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote: > > > > > > > > Igor Vaynberg wrote: > > > but what is really a problem then i dont understand? all > you want > > to do > > > is write out some javascript based on feedback messages? > instead of > > > using a feedbackpanel add a label that writes out the > javascript you > > > want. you can get the messages using > Page.getFeedbackMessages () > > > > > > so something like this: > > > > > > > > > add(new Label("js", new AbstractReadOnlyModel() { > > > Object getObject(Component c) { > > > FeedbackMessages msgs=c.getPage > ().getFeedbackMessages(); > > > AppendingStringBuffer js=new > AppendingStringBuffer(); > > > fill in javascript into js > > > return js.toString(); > > > }).setEscapeModelStrings(false)); > > > > > > and you should be good to go right? > > > > the javascript has a lot of GUI code in it, so it looks to me > like > > something from the early days of servlets. i'm not looking for > > something that works, but, for something that works "the > wicket way" > > > > > > > -- > === > Ittay Dror > Chief architect, openQRM TL, > R&D, Qlusters Inc. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> mailto:[EMAIL PROTECTED]>> > +972-3-6081994 Fax: +972-3-6081841 > > http://www.openQRM.org > - Keeps your Data-Center Up and Running > > > ---
Re: [Wicket-user] using feedback not based on labels
Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages -Igor On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: > give us an html snippet of what you want as the end result and tell us > where the components are. it is very difficult to talk on such a huge > abstraction level. > > -Igor > > > On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > > > Igor Vaynberg wrote: > > but what is really a problem then i dont understand? all you want > to do > > is write out some javascript based on feedback messages? instead of > > using a feedbackpanel add a label that writes out the javascript you > > want. you can get the messages using Page.getFeedbackMessages() > > > > so something like this: > > > > > > add(new Label("js", new AbstractReadOnlyModel() { > > Object getObject(Component c) { > > FeedbackMessages msgs=c.getPage ().getFeedbackMessages(); > > AppendingStringBuffer js=new AppendingStringBuffer(); > > fill in javascript into js > > return js.toString(); > > }).setEscapeModelStrings(false)); > > > > and you should be good to go right? > > the javascript has a lot of GUI code in it, so it looks to me like > something from the early days of servlets. i'm not looking for > something that works, but, for something that works "the wicket way" > > -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net <mailto:Wicket-user@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Igor Vaynberg wrote: > but what is really a problem then i dont understand? all you want to do > is write out some javascript based on feedback messages? instead of > using a feedbackpanel add a label that writes out the javascript you > want. you can get the messages using Page.getFeedbackMessages() > > so something like this: > > > add(new Label("js", new AbstractReadOnlyModel() { > Object getObject(Component c) { > FeedbackMessages msgs=c.getPage().getFeedbackMessages(); > AppendingStringBuffer js=new AppendingStringBuffer(); > fill in javascript into js > return js.toString(); > }).setEscapeModelStrings(false)); > > and you should be good to go right? the javascript has a lot of GUI code in it, so it looks to me like something from the early days of servlets. i'm not looking for something that works, but, for something that works "the wicket way" -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
Igor Vaynberg wrote: but what is really a problem then i dont understand? all you want to do is write out some javascript based on feedback messages? instead of using a feedbackpanel add a label that writes out the javascript you want. you can get the messages using Page.getFeedbackMessages() so something like this: add(new Label("js", new AbstractReadOnlyModel() { Object getObject(Component c) { FeedbackMessages msgs=c.getPage().getFeedbackMessages(); AppendingStringBuffer js=new AppendingStringBuffer(); fill in javascript into js return js.toString(); }).setEscapeModelStrings(false)); and you should be good to go right? the javascript has a lot of GUI code in it, so it looks to me like something from the early days of servlets. i'm not looking for something that works, but, for something that works "the wicket way" -Igor On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: thanx, i did look and you do amazing things with wicket however, i still want to do it as i first suggested. the reason is that the function i mentioned is not that simple and has a lot of "gui" logic in it, which i don't want to move inside my java code. thanx, ittay Eelco Hillenius wrote: > It's explained in the javadocs. And check out the YUI projects from > wicket-stuff and like at the Slider component which has an example of > it. Also, see bottom of > http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ > > > Eelco > > > On 5/9/06, Ittay Dror <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: >> >> >> Eelco Hillenius wrote: >> > Or take a look at what's in wicket.extensions.util.resource and look >> > at the Slider component in YUI for an example. I think it's cleaner >> > like that (keep the javascript in seperate files and run some variable >> > substitution over it). >> >> what do you mean by 'variable substitution'? how can i do that? >> >> > >> > Eelco >> > >> > On 5/9/06, Ittay Dror < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: >> >> hi, >> >> >> >> i have a feedback based on javascript. basically, i want to populate a >> >> javascript function's body with all messages, so it will show them one >> >> by one. >> >> >> >> the final result will be like: >> >> function showFeedback() { >> >> var message; >> >> message += "first feedback\n"; >> >> message += "second feedback\n"; >> >> >> >> alert(message); >> >> } >> >> >> >> theoretically, in wicket, create a panel with something like: >> >> function showFeedback() { >> >> var message; >> >> >> >> message += " >> >> >> >> alert(message); >> >> } >> >> >> >> but, will the parser handle this? will the 'span' tags be replaced? i >> >> thing that at least the 'message' span will not, since it uses Label, >> >> which replaces the body, not the tag. >> >> >> >> how can i do this? >> >> >> >> -- >> >> === >> >> Ittay Dror >> >> Chief architect, openQRM TL, >> >> R&D, Qlusters Inc. >> >> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >> >> +972-3-6081994 Fax: +972-3-6081841 >> >> >> >> http://www.openQRM.org >> >> - Keeps your Data-Center Up and Running >> >> >> >> >> >> --- >> >> Using Tomcat but need to do more? Need to support web services, >> security? >> >> Get stuff done quickly with pre-integrated technology to make your job >> >> easier >> >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> >> Geronimo >> >> >> http://sel.as
[Wicket-user] can feedback panel be generalized?
the FeedbackPanel component has a lot of non-trivial functionality, that makes it hard to write my own customized version of it. especially, adding other components, or controlling existing ones is hackish (i have to use Component.get() and visitChildren) maybe have FeedbackPanel use a FeedbackComponent, created through newFeedbackComponent, provided by subclasses? -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Localization
Eelco Hillenius wrote: On 5/9/06, Matej Knopp <[EMAIL PROTECTED]> wrote: Igor Vaynberg wrote: I don't mind API breaks. Not at all. If I touch code that is not a part of "Stable" API, I take the risk of having to change my code when wicket version changes. I really don't mind. Well, not everyone agrees with you. Some people started to be seriously grumpy about it the last two months. for what it's worth, as a user, i *would* like API to change, if it means a more natural API and functionality. wicket is great, but i feel the API/functionality is not mature, in the sense that when i look in the code, some things feel hackish. can't refactoring tools help? maybe provide a wicket-compatability package (jar)? - Hide quoted text - What I do mind is the (occasional) lack of flexibility and things that keep me from extending the framework the way I want. The only thing that will not happen is if we know beforehand what that'll be. The truth is that this kind of "protection" doesn't work very well. When I was porting my application from 1.0 to 1.1, there were couple of things that didn't work and had to be redone. When porting the application from 1.1 to 1.2 things were even worse. The whole parsing process was changed and my code didn't work anymore (I had my own XMLPullParser that wrapped wicket default one). And I didn't touch any internal stuff. Imagine what it would have been like if we didn't protect so much. Seriously, there would be no beginning to it as you probably would have 'customized' it so much that there wouldn't be a start. Furthermore - and I feel this is very important - the fact that we have guys like you complaining about features and extension points you miss, tells us (and the rest of the readers here) what kind of use cases there may be and the discussion hopefully concludes in something really usefull. It has been like that many times, and if we opened up prematurely, you might have been able to profit from it from time to time, but Wicket wouldn't have been as good. So, I think we're doing just fine. We should look for something that works good out of the box on top of extension points that are useful. Eelco --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
thanx, i did look and you do amazing things with wicket however, i still want to do it as i first suggested. the reason is that the function i mentioned is not that simple and has a lot of "gui" logic in it, which i don't want to move inside my java code. thanx, ittay Eelco Hillenius wrote: It's explained in the javadocs. And check out the YUI projects from wicket-stuff and like at the Slider component which has an example of it. Also, see bottom of http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ Eelco On 5/9/06, Ittay Dror <[EMAIL PROTECTED]> wrote: Eelco Hillenius wrote: > Or take a look at what's in wicket.extensions.util.resource and look > at the Slider component in YUI for an example. I think it's cleaner > like that (keep the javascript in seperate files and run some variable > substitution over it). what do you mean by 'variable substitution'? how can i do that? > > Eelco > > On 5/9/06, Ittay Dror <[EMAIL PROTECTED]> wrote: >> hi, >> >> i have a feedback based on javascript. basically, i want to populate a >> javascript function's body with all messages, so it will show them one >> by one. >> >> the final result will be like: >> function showFeedback() { >> var message; >> message += "first feedback\n"; >> message += "second feedback\n"; >> >> alert(message); >> } >> >> theoretically, in wicket, create a panel with something like: >> function showFeedback() { >> var message; >> >> message += " >> >> alert(message); >> } >> >> but, will the parser handle this? will the 'span' tags be replaced? i >> thing that at least the 'message' span will not, since it uses Label, >> which replaces the body, not the tag. >> >> how can i do this? >> >> -- >> === >> Ittay Dror >> Chief architect, openQRM TL, >> R&D, Qlusters Inc. >> [EMAIL PROTECTED] >> +972-3-6081994 Fax: +972-3-6081841 >> >> http://www.openQRM.org >> - Keeps your Data-Center Up and Running >> >> >> --- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job >> easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > --- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- ===
Re: [Wicket-user] using feedback not based on labels
ok, i got most of it. last question: can the template have a way to loop on a list? if not, then how do you suggest i templatize the messages, so their formatting is kept in the js file? thanx, ittay Ittay Dror wrote: Eelco Hillenius wrote: Or take a look at what's in wicket.extensions.util.resource and look at the Slider component in YUI for an example. I think it's cleaner like that (keep the javascript in seperate files and run some variable substitution over it). what do you mean by 'variable substitution'? how can i do that? Eelco On 5/9/06, Ittay Dror <[EMAIL PROTECTED]> wrote: hi, i have a feedback based on javascript. basically, i want to populate a javascript function's body with all messages, so it will show them one by one. the final result will be like: function showFeedback() { var message; message += "first feedback\n"; message += "second feedback\n"; alert(message); } theoretically, in wicket, create a panel with something like: function showFeedback() { var message; message += " alert(message); } but, will the parser handle this? will the 'span' tags be replaced? i thing that at least the 'message' span will not, since it uses Label, which replaces the body, not the tag. how can i do this? -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
Eelco Hillenius wrote: Or take a look at what's in wicket.extensions.util.resource and look at the Slider component in YUI for an example. I think it's cleaner like that (keep the javascript in seperate files and run some variable substitution over it). what do you mean by 'variable substitution'? how can i do that? Eelco On 5/9/06, Ittay Dror <[EMAIL PROTECTED]> wrote: hi, i have a feedback based on javascript. basically, i want to populate a javascript function's body with all messages, so it will show them one by one. the final result will be like: function showFeedback() { var message; message += "first feedback\n"; message += "second feedback\n"; alert(message); } theoretically, in wicket, create a panel with something like: function showFeedback() { var message; message += " alert(message); } but, will the parser handle this? will the 'span' tags be replaced? i thing that at least the 'message' span will not, since it uses Label, which replaces the body, not the tag. how can i do this? -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] using feedback not based on labels
hi, i have a feedback based on javascript. basically, i want to populate a javascript function's body with all messages, so it will show them one by one. the final result will be like: function showFeedback() { var message; message += "first feedback\n"; message += "second feedback\n"; alert(message); } theoretically, in wicket, create a panel with something like: function showFeedback() { var message; message += " alert(message); } but, will the parser handle this? will the 'span' tags be replaced? i thing that at least the 'message' span will not, since it uses Label, which replaces the body, not the tag. how can i do this? -- === Ittay Dror Chief architect, openQRM TL, R&D, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] component input handling
Johan Compagner wrote: there are several components in html that return multipy entries for example ListMultiplyChoice (SELECT tag) or Checkboxes withing the same group. convertedinput and rawinput are 2 completely seperate things. rawinput really caches the raw string data. So that forms can render themselfs again without doing any validation or conversion. why not use getInput()? why not have getInput() use rawInput internally, for caching? ConvertedInput is only there when required check is ok and the conversion did work. After that the validators will be runned. my suggestion is to not access convertedInput anywhere but in getConvertedInput. the validators will run on the result by getConvertedInput. you can return null, or throw exception, or some special String reference to show errors in conversion. rawinput for example is used to cache some results between 2 page loads. With the help of an Button that has the DefaultFormProcessing boolean on false. johan On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: for me, it is hard to distinguish getInput from getInputAsArray. what use cases do you have of the returned array having more than 1 string? if that happens, why not use several components, each assigned an index, and still returning getInput (by getRequest().getParameters(name)[idx]). returning object can still be nice to allow getting input which is not from http (e.g, maybe RMI based components?) what about convertedInput and rawInput? their use is hard to track. why not just have getConvertedInput, which can cache the data if it wants ittay Johan Compagner wrote: > Object? > ughh > > Then we have to cast and or check for it everywhere. Because getInput() > is used for a lot of things, > What it could be is always and String[] but then we just have > getInputAsArray() > and i guess thats the method we should use as much as possible everywhere. > which we already do for the convertValue and so on. > > if we fall to the Converter then we use plain getInput() but that is > because for FormComponent > that specify type the input is always pure text. And if we give to that > an array. Then the converter > will be much harder to build for people. > > So when input comes in. > We use getInputAsArray() when components do the conversions themselfs > If there is a type specified we let the converter handle the conversion > fron String->Type > and we use getInput() > > And we want to change the converter interface so that it is something > like this: > > convertInput(String, Class); > convertValue(Object); > > So that it is for developers much easier to build a converter and know > what in and out going is. > Maybe we could make a > convertInput(String[], Class); > instead then it is all type save. And we can use the getInputAsArray() > everywhere. > > johan > > On 5/9/06, * Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > i don't see why there should be a getInputAsArray. it seems to me > there should be an 'Object getInput()', which will usually return > getRequest().getParameter(getInputName()), but for some components, > that for some reason require multiple inputs, it will > return getRequest().getParameters(getInputName()) > > then, if there needs to be a conversion from that object to a String > (which i don't see why), then the converter needs to take care of it. > > > > Johan Compagner wrote: > > rawinput should also be a string[] but the problem is if we > change that > > then getValue()/getRawInput() and maybe als getModelValue all should > > also change and that will affect a lot... > > > > johan > > > > > > On 5/9/06, *Igor Vaynberg* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote: > > > > i was just looking at that. i think we messed up a little bit > there. > > now that g
Re: [Wicket-user] component input handling
for me, it is hard to distinguish getInput from getInputAsArray. what use cases do you have of the returned array having more than 1 string? if that happens, why not use several components, each assigned an index, and still returning getInput (by getRequest().getParameters(name)[idx]). returning object can still be nice to allow getting input which is not from http (e.g, maybe RMI based components?) what about convertedInput and rawInput? their use is hard to track. why not just have getConvertedInput, which can cache the data if it wants ittay Johan Compagner wrote: Object? ughh Then we have to cast and or check for it everywhere. Because getInput() is used for a lot of things, What it could be is always and String[] but then we just have getInputAsArray() and i guess thats the method we should use as much as possible everywhere. which we already do for the convertValue and so on. if we fall to the Converter then we use plain getInput() but that is because for FormComponent that specify type the input is always pure text. And if we give to that an array. Then the converter will be much harder to build for people. So when input comes in. We use getInputAsArray() when components do the conversions themselfs If there is a type specified we let the converter handle the conversion fron String->Type and we use getInput() And we want to change the converter interface so that it is something like this: convertInput(String, Class); convertValue(Object); So that it is for developers much easier to build a converter and know what in and out going is. Maybe we could make a convertInput(String[], Class); instead then it is all type save. And we can use the getInputAsArray() everywhere. johan On 5/9/06, * Ittay Dror* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: i don't see why there should be a getInputAsArray. it seems to me there should be an 'Object getInput()', which will usually return getRequest().getParameter(getInputName()), but for some components, that for some reason require multiple inputs, it will return getRequest().getParameters(getInputName()) then, if there needs to be a conversion from that object to a String (which i don't see why), then the converter needs to take care of it. Johan Compagner wrote: > rawinput should also be a string[] but the problem is if we change that > then getValue()/getRawInput() and maybe als getModelValue all should > also change and that will affect a lot... > > johan > > > On 5/9/06, *Igor Vaynberg* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > i was just looking at that. i think we messed up a little bit there. > now that getinputasarray() is public i made getinput() go through > that instead of request parameters directly. > > -Igor > > > > On 5/8/06, *Ittay Dror* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > on the off chance that not only igor is patient with this thread > > i noticed that there is an inconsistency (in my view) in how > input is handled: > there's Component.getInput() > then FormComponent.inputAsStringArray () > which is used to set > convertedInput - by convert() > and > rawInput - by inputChanged() > > which are used all over the place. for example, getValue returns > the rawInput if it was set and getModelValue otherwise (which, > btw, uses the converter directly, rather than calling > convert()). this may cause surprises. > > for convertedInput, i think it should be considered a caching > value. the method getConvertedInput() should check it, if it is > null, it does the conversion and sets it. it then returns it. > calling 'convert' explicitely from other places is not needed. > whoever needs a converted input should call getConvertedInput. > > i don't know about rawInput, and why it is used, so i can't > comment much, but i also think it should be used as cached > value. it seems odd though, that getInput is not 'raw' enough. > > of course inputChanged should just invalidate the caches. > > ittay > > > > Ittay Dror wro