Re: dzone refcard
> >>>>> 2321 E 4th St. Ste C-128, Santa Ana CA 92705 > >>>>> ofc: 949-528-6480 > >>>>> fax: 714-782-6024 > >>>>> cell: 714-697-8046 > >>>>> linked-in: http://www.linkedin.com/in/andrewlombardi > >>>>> twitter: http://www.twitter.com/kinabalu > >>>>> > >>>>> Eco-Tip: Printing e-mails is usually a waste. > >>>>> > >>>>> > >>>>> This message is for the named person's use only. You must not, > >>>>> directly or indirectly, use, > >>>>> disclose, distribute, print, or copy any part of this message if you > >>>>> are not the intended recipient. > >>>>> ======== > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>> View this message in context: > >>>> http://www.nabble.com/dzone-refcard-tp24358337p24362753.html > >>>> Sent from the Wicket - User mailing list archive at Nabble.com. > >>>> > >>>> > >>>> - > >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >>>> For additional commands, e-mail: users-h...@wicket.apache.org > >>>> > >>>> > >>>> > >>> To our success! > >>> > >>> Mystic Coders, LLC | Code Magic | www.mysticcoders.com > >>> > >>> ANDREW LOMBARDI | and...@mysticcoders.com > >>> 2321 E 4th St. Ste C-128, Santa Ana CA 92705 > >>> ofc: 949-528-6480 > >>> fax: 714-782-6024 > >>> cell: 714-697-8046 > >>> linked-in: http://www.linkedin.com/in/andrewlombardi > >>> twitter: http://www.twitter.com/kinabalu > >>> > >>> Eco-Tip: Printing e-mails is usually a waste. > >>> > >>> > >>> This message is for the named person's use only. You must not, directly > >>> or > >>> indirectly, use, > >>> disclose, distribute, print, or copy any part of this message if you > are > >>> not the intended recipient. > >>> > >>> > >>> > >>> > > > > To our success! > > > > Mystic Coders, LLC | Code Magic | www.mysticcoders.com > > > > ANDREW LOMBARDI | and...@mysticcoders.com > > 2321 E 4th St. Ste C-128, Santa Ana CA 92705 > > ofc: 949-528-6480 > > fax: 714-782-6024 > > cell: 714-697-8046 > > linked-in: http://www.linkedin.com/in/andrewlombardi > > twitter: http://www.twitter.com/kinabalu > > > > Eco-Tip: Printing e-mails is usually a waste. > > > > > > This message is for the named person's use only. You must not, directly > or > > indirectly, use, > > disclose, distribute, print, or copy any part of this message if you are > > not the intended recipient. > > > > > > > -- Reza Marvan Spagnolo SW & Network Engineer - Freelancer @ :: marv...@gmail.com m :: + 34 608 641 708 skype :: mrvspg
Re: [kind-of-announce] Swit 0.9.0, wicket library for graphics stuff
SUPER COOL ! :) One thing, can you adjust the vertical offset of the text inside the button ? I saw that in the button generator it is not possible. Attach my congrats to the queue ! Marvan
Re: Wicket-like JavaScript Components
Not wanting to go offtopic on the list or start a flame war I would just say to have a look to their license before doing any experiment .. To develop anything not GPL'ed you will need to purchase a commercial license for ExtJS. That is why many migrated to other JS frameworks some time ago when that project changed the licensing model I think. On Mon, Jun 15, 2009 at 6:41 PM, Juan Carlos Garcia M. wrote: > > Have you take a look at > http://extjs.com/ http://extjs.com/ > > > insom wrote: > > > > I'm working on a small project where I'm limited to using only > JavaScript. > > I > > love the Wicket programming model, especially reusable components. Is > > anyone > > aware of a JavaScript framework or JavaScript techniques that would allow > > me > > to approximate Wicket components? > > > > > > -- > View this message in context: > http://www.nabble.com/Wicket-like-JavaScript-Components-tp24038056p24038240.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Reza Marvan Spagnolo SW & Network Engineer - Freelancer @ :: marv...@gmail.com m :: + 34 608 641 708 skype :: mrvspg
Re: newbie help with JavascriptUtils
Thank you Francisco, I attached a behaviour to the page using the snippet you included in your reply as a base and that worked ! I thought I could use JavascriptUtils for quickly adding js code in the markup but that maybe worked in previous versions of wicket or it could work in other contexts, not directly in a page. Cheers, Reza Marvan Spagnolo On Tue, Dec 16, 2008 at 8:56 PM, francisco treacy < francisco.tre...@gmail.com> wrote: > your page should implement IHeaderContributor > > or attach a behaviour to your components. > > for instance (first snippet i found out there): > > private static class MyJSBehavior extends AbstractBehavior { > private static final long serialVersionUID = 1L; > @Override > public void renderHead(IHeaderResponse response) { > super.renderHead(response); > response.renderOnDomReadyJavascript("alert('test');"); > } > } > > > this is widely documented so you should be able to find better > examples, but that's the way to go > > francisco > > > On Tue, Dec 16, 2008 at 8:51 PM, Marvan Spagnolo > wrote: > > Hi, > > I'm trying to write some javascript in a page's markup (subclass of > another > > page using / mechanism) > > via JavascriptUtils.writeJavascript(). > > > > The fact is it doesn't do anything at all nor I can't find anything > related > > in the stack trace (the page displays well with no exceptions nor > problems > > at all), > > the expected javascript is simply not in the generated markup. > > Before calling JavascriptUtils I add a form to the page (which works > > normally as expected). > > > > The actual code looks like: > > > > --- > > public class MyPage extends MyBasePage > > { > > public MyPage() > > { > > add( new MyForm( "formid" )); > > String js = "... javascript code here ..."; > > JavascriptUtils.writeJavascript( getResponse(), js); > > } > > } > > --- > > > > Can anyone please help ? Should I maybe use something else instead of > > getResponse() ? > > I expected that the javascript would have been written before the > > closing tag, or wherever but it's not in the markup at > all. > > I'm using wicket 1.3.5 on tomcat 6 and jdk 1.6. > > > > Reza Marvan Spagnolo > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Reza Marvan Spagnolo SW & Network Engineer - Freelancer @ :: marv...@gmail.com m :: + 34 622 161 746 skype :: mrvspg
newbie help with JavascriptUtils
Hi, I'm trying to write some javascript in a page's markup (subclass of another page using / mechanism) via JavascriptUtils.writeJavascript(). The fact is it doesn't do anything at all nor I can't find anything related in the stack trace (the page displays well with no exceptions nor problems at all), the expected javascript is simply not in the generated markup. Before calling JavascriptUtils I add a form to the page (which works normally as expected). The actual code looks like: --- public class MyPage extends MyBasePage { public MyPage() { add( new MyForm( "formid" )); String js = "... javascript code here ..."; JavascriptUtils.writeJavascript( getResponse(), js); } } --- Can anyone please help ? Should I maybe use something else instead of getResponse() ? I expected that the javascript would have been written before the closing tag, or wherever but it's not in the markup at all. I'm using wicket 1.3.5 on tomcat 6 and jdk 1.6. Reza Marvan Spagnolo
Re: application scope objects in Wicket
Thank you both for your answers, Jeremy and James. The data structure I'll use in the real case will be a collection of objects with one object for each of the user sessions. That same object will be accessed only once outside the user session and then it will be erased. There won't be 2 threads accessing the same object in the collection at the same time but they will access the collection object itself concurrently (even if on separate elements). That's why I thought about using synchronized methods only for removing, setting and adding an element in the Collection, I hope this will work correctly without affecting the performance of the WebApplication object. Don't know if I should incapsulate the collection in another object member of WebApplication and implement the synchronized methods inside it. I didn't post these details because my doubt was really on the correctness of overriding the get() method of WebApplication to enable the use of application scope objects. Thanks for the advice and cheers, Marvan James Perry wrote: Firstly I hope you are enjoying building your first Wicket web app. Is this application scope object immutable? What is the data structure? IMHO, if it's immutable then it's OK to use composition within your WebApplication by adding this object as a field within WebApplication. I would just make it final so it never gets incorrectly pointed to a different object once initialized. However if this has mutable shared data, then do not use the WebApplication's intrinsic lock as you will jeopardize its throughput to process requests. For example: public class FooBarApplication extends WebApplication { private MyAppScopeObject appScopeObject; public synchronized MyAppScopeObject getAppScopeObject(){ return appScopeObject; } public synchronized void setAppScopeObject(MyAppScopeObject appScopeObject) { this.appScopeObject = appScopeObject; } } Instead, use your application-scope object's intrinsic lock or use a suitable mutex in the Java 5/6 API. Best, James. On Mon, Aug 25, 2008 at 12:04 PM, Marvan Spagnolo <[EMAIL PROTECTED]> wrote: Hi all, I'm new to Wicket and developing my first Wicket website. I have some temporary objects created inside a users' session but needed by a parallel process which uses them outside the user session and I would like to avoid temporarily persisting them into a database. I'm looking at using application scope objects but I'm not sure how to do it best in Wicket. I guess I should override the get() method of WebApplication mimicking the pattern used for custom Session objects. public class WicketApplication extends MyWebApplication { private Object applicationScopeObject; public WicketApplication() { setApplicationScopeObject( ); } @Override public static WicketApplication get() { return (WicketApplication) WebApplication.get(); } public Object getApplicationScopeObject(){ return this.applicationScopeObject; } public void setApplicationScopeObject( Object applicationScopeObject ){ this.applicationScopeObject = applicationScopeObject; } [...] } public class PageInsideUserSession { public PageInsideUserSession(){ [...] // object has already been initialized WicketApplication.get().setApplicationScopeObject( object ); } } public class PageOutsideUserSession { public PageOutsideUserSession(){ Object object = WicketApplication.get().getApplicationScopeObject(); [...] } } In my case synchronizing the access to the application scope object should not be needed. Is this approach correct (and efficient) or is there a better solution ? Should I maybe use a separate parent class (parent of WicketApplication and child of WebApplication) for overriding the get() method (in case the override interferes with something else in the framework) ? Cheers, Marvan -- Reza Marvan Spagnolo SW Engineer - Freelancer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
application scope objects in Wicket
Hi all, I'm new to Wicket and developing my first Wicket website. I have some temporary objects created inside a users' session but needed by a parallel process which uses them outside the user session and I would like to avoid temporarily persisting them into a database. I'm looking at using application scope objects but I'm not sure how to do it best in Wicket. I guess I should override the get() method of WebApplication mimicking the pattern used for custom Session objects. public class WicketApplication extends MyWebApplication { private Object applicationScopeObject; public WicketApplication() { setApplicationScopeObject( ); } @Override public static WicketApplication get() { return (WicketApplication) WebApplication.get(); } public Object getApplicationScopeObject(){ return this.applicationScopeObject; } public void setApplicationScopeObject( Object applicationScopeObject ){ this.applicationScopeObject = applicationScopeObject; } [...] } public class PageInsideUserSession { public PageInsideUserSession(){ [...] // object has already been initialized WicketApplication.get().setApplicationScopeObject( object ); } } public class PageOutsideUserSession { public PageOutsideUserSession(){ Object object = WicketApplication.get().getApplicationScopeObject(); [...] } } In my case synchronizing the access to the application scope object should not be needed. Is this approach correct (and efficient) or is there a better solution ? Should I maybe use a separate parent class (parent of WicketApplication and child of WebApplication) for overriding the get() method (in case the override interferes with something else in the framework) ? Cheers, Marvan -- Reza Marvan Spagnolo SW Engineer - Freelancer