Re: aj Component twice in markup while ax refresh in Wicket 6.7 (migrated from 1.5.10)

2013-05-29 Thread Nico
I followed Martin's hint and with wicket 6.7.0 I manually changed the 
replacement in the javascript from 

jQuery(element).after($newElement).remove();
to
jQuery(element).replaceWith($newElement);


But I just saw, that in Github 
(https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L1617)
 "replaceWith" is now the standard replacement.

Will this appear in Wicket 6.9.0?

Best
Nico


Am 28.05.2013 um 21:12 schrieb Maxim Solodovnik [via Apache Wicket]:

> I also saw this behavior using 6.8.0 
> The component with additional id was replaced, but there was time period 
> when 2 components are present on page 
> 
> 
> On Wed, May 29, 2013 at 12:12 AM, Heikki Uotinen < 
> [hidden email]> wrote: 
> 
> > Hi, 
> > 
> > we had similar issue and could not find jira ticket for this, thus created 
> > WICKET-5210 with quickstart. 
> > 
> > Our workaround was changing our jQuery('#someid').. to 
> > jQuery('[id=someid]').. to match all same (two) ids. 
> > 
> > Rgds, 
> > Heikki 
> > 
> > -Original Message- 
> > From: Nico [mailto:[hidden email]] 
> > Sent: 15. toukokuuta 2013 11:07 
> > To: [hidden email] 
> > Subject: Re:aj Component twice in markup while ax refresh in Wicket 6.7 
> > (migrated from 1.5.10) 
> > 
> > Hi, 
> > 
> > thanks for you quick replies! I will create the quick start and attach it 
> > to a jira ticket. 
> > 
> > Thanks to your hint Martin, for the moment I will use jQuery#replaceWith() 
> > to make sure my app runs as expected. 
> > 
> > Best 
> > Nico 
> > 
> > 
> > Am 14.05.2013 um 16:56 schrieb Martin Grigorov-4 [via Apache Wicket]: 
> > 
> > > Hi, 
> > > 
> > > We use 
> > > https://github.com/apache/wicket/blob/master/wicket-core/src/main/java
> > > /org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L1617 
> > > because 
> > > it is faster than jQuery#replaceWith(). 
> > > So yes, there is a small period when both the old and the new are in 
> > > the DOM. 
> > > As Sven asked - please create a quicktart and attach it to a ticket so 
> > > we can see whether we will find a solution or we will have to use the 
> > > slower way to replace. 
> > > 
> > > 
> > > On Tue, May 14, 2013 at 4:48 PM, Sven Meier <[hidden email]> wrote: 
> > > 
> > > > Create a quickstart and attach it to a Jira issue please. 
> > > > 
> > > > Sven 
> > > > 
> > > > 
> > > > On 05/14/2013 04:37 PM, Nico wrote: 
> > > > 
> > > >> Hi 
> > > >> 
> > > >> I migrated my application from Wicket 1.5.10 to 6.7 
> > > >> 
> > > >> During testing I recognized that during an ajax update 
> > > >> (replacement) of a component, the markup of the component is twice 
> > > >> in the HTML markup (the old and the new markup). Thus the execution 
> > > >> of javascript inside a component may fail due to the fact, that two 
> > > >> components with the same id are present in the HTML markup. 
> > > >> 
> > > >> EXAMPLE 
> > > >> 
> > > >> 
> > > >> *HTML:* 
> > > >> <a wicket:id="testlink"**>testlink</a> 
> > > >> <div wicket:id="testbox" style="width: 100px; 
> > height: 
> > > >> 100px; border: 1px solid #ccc;"> 
> > > >> <script type="text/javascript&**quot;> 
> > > >> alert('hello'); 
> > > >> </script> 
> > > >> </div> 
> > > >> 
> > > >> *JAVA:* 
> > > >> final WebMarkupContainer testbox = new 
> > > >> WebMarkupContainer("testbox"); testbox.setOutputMarkupId(**true); 
> > > >> add(testbox); 
> > > >> 
> > > >> add(new AjaxLink("testlink") { 
> > > >> private static final long serialVersionUID = 1L; 
> > > >> 
> > > >> @Override 
> > > >> public void onClick(AjaxRequestTarget target) { 
> > > >> target.add(testbox); 
> > > >> } 
> > > >> }); 
> > > >> 
> > > >> 
> > > >> So while the ajax update is processed th

Re: Component twice in markup while ajax refresh in Wicket 6.7 (migrated from 1.5.10)

2013-05-15 Thread Nico
Hi,

thanks for you quick replies! I will create the quick start and attach it to a 
jira ticket.

Thanks to your hint Martin, for the moment I will use jQuery#replaceWith() to 
make sure my app runs as expected.

Best
Nico


Am 14.05.2013 um 16:56 schrieb Martin Grigorov-4 [via Apache Wicket]:

> Hi, 
> 
> We use 
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L1617
> because 
> it is faster than jQuery#replaceWith(). 
> So yes, there is a small period when both the old and the new are in the 
> DOM. 
> As Sven asked - please create a quicktart and attach it to a ticket so we 
> can see whether we will find a solution or we will have to use the slower 
> way to replace. 
> 
> 
> On Tue, May 14, 2013 at 4:48 PM, Sven Meier <[hidden email]> wrote: 
> 
> > Create a quickstart and attach it to a Jira issue please. 
> > 
> > Sven 
> > 
> > 
> > On 05/14/2013 04:37 PM, Nico wrote: 
> > 
> >> Hi 
> >> 
> >> I migrated my application from Wicket 1.5.10 to 6.7 
> >> 
> >> During testing I recognized that during an ajax update (replacement) of a 
> >> component, the markup of the component is twice in the HTML markup (the 
> >> old 
> >> and the new markup). Thus the execution of javascript inside a component 
> >> may 
> >> fail due to the fact, that two components with the same id are present in 
> >> the HTML markup. 
> >> 
> >> EXAMPLE 
> >> 
> >> 
> >> *HTML:* 
> >> <a wicket:id="testlink"**>testlink</a> 
> >> <div wicket:id="testbox" style="width: 100px; height: 
> >> 100px; border: 1px solid #ccc;"> 
> >> <script type="text/javascript&**quot;> 
> >> alert('hello'); 
> >> </script> 
> >> </div> 
> >> 
> >> *JAVA:* 
> >> final WebMarkupContainer testbox = new WebMarkupContainer("testbox"); 
> >> testbox.setOutputMarkupId(**true); 
> >> add(testbox); 
> >> 
> >> add(new AjaxLink("testlink") { 
> >> private static final long serialVersionUID = 1L; 
> >> 
> >> @Override 
> >> public void onClick(AjaxRequestTarget target) { 
> >> target.add(testbox); 
> >> } 
> >> }); 
> >> 
> >> 
> >> So while the ajax update is processed the 'testbox' DIV and its javascript 
> >> are present twice (the old and new DIV). If the javascript is a little 
> >> more 
> >> complex and for example changes stuff inside the DIV, the javascript will 
> >> change stuff in the old instead of the new DIV container. 
> >> 
> >> My javascript relies on the fact, that an id should always be present just 
> >> once. 
> >> 
> >> Why is the old DIV not removed first, before the new DIV is appended? Can 
> >> I 
> >> change this behavior somehow? 
> >> 
> >> Thanks in advance 
> >> Nico 
> >> 
> >> 
> >> 
> >> -- 
> >> View this message in context: http://apache-wicket.1842946.**
> >> n4.nabble.com/Component-twice-**in-markup-while-ajax-refresh-** 
> >> in-Wicket-6-7-migrated-from-1-**5-10-tp4658789.html<http://apache-wicket.1842946.n4.nabble.com/Component-twice-in-markup-while-ajax-refresh-in-Wicket-6-7-migrated-from-1-5-10-tp4658789.html>
> >>  
> >> Sent from the Users forum mailing list archive at Nabble.com. 
> >> 
> >> --**--**- 
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<[hidden 
> >> email]> 
> >> For additional commands, e-mail: [hidden email] 
> >> 
> >> 
> > 
> > --**--**- 
> > To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<[hidden 
> > email]> 
> > For additional commands, e-mail: [hidden email] 
> > 
> >
> 
> 
> -- 
> Martin Grigorov 
> Wicket Training & Consulting 
> http://jWeekend.com <http://jweekend.com/> 
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://apache-wicket.1842946.n4.nabble.com/Component-twice-in-markup-while-ajax-refresh-in-Wicket-6-7-migrated-from-1-5-10-tp4658789p4658791.html
> To unsubscribe from Component twice in markup while ajax refresh in Wicket 
> 6.7 (migrated from 1.5.10), click here.
> NAML





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Component-twice-in-markup-while-ajax-refresh-in-Wicket-6-7-migrated-from-1-5-10-tp4658789p4658813.html
Sent from the Users forum 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



Component twice in markup while ajax refresh in Wicket 6.7 (migrated from 1.5.10)

2013-05-14 Thread Nico
Hi

I migrated my application from Wicket 1.5.10 to 6.7

During testing I recognized that during an ajax update (replacement) of a
component, the markup of the component is twice in the HTML markup (the old
and the new markup). Thus the execution of javascript inside a component may
fail due to the fact, that two components with the same id are present in
the HTML markup.

EXAMPLE


*HTML:*
<a wicket:id="testlink">testlink</a>
<div wicket:id="testbox" style="width: 100px; height:
100px; border: 1px solid #ccc;">
<script type="text/javascript">
alert('hello');
</script>
</div>

*JAVA:*
final WebMarkupContainer testbox = new WebMarkupContainer("testbox");
testbox.setOutputMarkupId(true);
add(testbox);

add(new AjaxLink("testlink") {
private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
target.add(testbox);
}
});


So while the ajax update is processed the 'testbox' DIV and its javascript
are present twice (the old and new DIV). If the javascript is a little more
complex and for example changes stuff inside the DIV, the javascript will
change stuff in the old instead of the new DIV container.

My javascript relies on the fact, that an id should always be present just
once.

Why is the old DIV not removed first, before the new DIV is appended? Can I
change this behavior somehow?

Thanks in advance
Nico



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Component-twice-in-markup-while-ajax-refresh-in-Wicket-6-7-migrated-from-1-5-10-tp4658789.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Memory Leak in 1.4.13?

2010-11-11 Thread Nico Guba
Wouldn't a profiler help pinpoint the culprit?

Sent from my iPhone

On 12 Nov 2010, at 00:06, Mark Doyle  wrote:

> I don't have any details to add except I say I saw this today too.
> 
> I have a page with a lot of ajax panels on that are switched in and out.  If
> I refreshed the page without doing anything the session size would grow
> continuously.
> 
> I also noticed some odd memory size (2.1MB +) related to the
> AutoCompleteBehaviour.
> 
> I switched back to 1.4.12 and it seems to have disappeared.
> 
> 
> EDIT: I still get the large sizes related to the AutoCompleteBehavior
> (although not as large) so that's probably something stupid I have done :)
> 
>  From session inspector:
> 
>   - 
> Interface[target:SolrSearchFormPanel$SolrQueryForm$1(basicSearch:searchForm:solrSearchForm:searchKeyword),
>   page: org.esa.huginn.webapp.HuginnHomePageV2(32), interface:
>   IActivePageBehaviorListener.onRequest]
>   -
>   
> org.apache.wicket.extensions.ajax.markup.html.autocomplete.autocompletebehavio...@191ac0df
>   - Session updatedPageMap updated, name: DEFAULT
>   - 1.2M
> 
> 
> On Thu, Nov 11, 2010 at 7:44 PM, Pedro Santos  wrote:
> 
>> Hi guys, can you give a try?
>> 
>> 
>> https://issues.apache.org/jira/browse/WICKET-3108?focusedCommentId=12931123&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12931123
>> 
>> On Thu, Nov 11, 2010 at 10:05 AM, Martijn Dashorst <
>> martijn.dasho...@gmail.com> wrote:
>> 
>>> It is real, in our application we encountered this as well, but
>>> thought it was something we did wrong. Switching to httpsessionstore
>>> solved our immediate problem, so we didn't think to investigate
>>> further.
>>> 
>>> The culprit might be the commits related to
>>> https://issues.apache.org/jira/browse/WICKET-3108
>>> 
>>> If you could, revert those changes in a local wicket copy and see if
>>> the problem still persists.
>>> 
>>> Initial investigation shows that it is not easy to reproduce.
>>> 
>>> Martijn
>>> 
>>> On Thu, Nov 11, 2010 at 6:00 AM, Brad Grier 
>>> wrote:
 Hopefully I can recreate in a quickstart. The pages in our app are
 dynamically created. If this leak is somehow related to how the layout
 engine works it might be difficult. I'll see what I can do.
 
 -Original Message- From: Jeremy Thomerson
 Sent: Wednesday, November 10, 2010 5:23 PM
 To: users@wicket.apache.org
 Subject: Re: Memory Leak in 1.4.13?
 
 On Wed, Nov 10, 2010 at 5:57 PM, Brad Grier
 wrote:
 
> I recently upgraded our app from 1.4.12 to 1.4.13. Our app has an
>> admin
> screen that shows the current session size using Session’s
>>> getSizeInBytes
> method. This screen is just a panel that gets replaced/refreshed via
>>> Ajax
> when a link is clicked. Today I noticed that every time I clicked the
>>> link
> to reload the panel the session size grows by around 3000 KB and never
> does
> a gc. If I roll back to 1.4.12 and the problem goes away.
> 
> In the Netbeans profiler, the only thing I see spiraling out of
>> control
> are
> byte[] objects (serialized objects?). Nothing unusual appears with the
> size
> or number of my application specific objects. For now I’m rolling back
>>> to
> 1.4.12 as I’m not sure how this is affecting things outside this
>>> specific
> screen.
> 
> Thanks.
 
 
 Please create a quickstart and see if you can reproduce this.  If you
>>> can,
 attach it to a JIRA.  We'll fix it.
 
 --
 Jeremy Thomerson
 http://wickettraining.com
 *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
>>> 
>>> 
>>> 
>>> --
>>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
>> 
>> 
>> --
>> Pedro Henrique Oliveira dos Santos
>> 

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



Re: Need Wicket Book

2010-11-11 Thread Nico Guba
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wouldn't the imminent release of Wicket 1.5 warrant a second edition?
It would be most welcome indeed :)

On 11/11/2010 1:00 PM, Martijn Dashorst wrote:
> You can download the first 4 chapters of EWDWW for free iirc, just as
> you can download 3 WiA chapters (2 from the book, one as an extra).
> Read those and see which writing style is more to your liking.
> 
> As far as Wicket in Action is concerned: we tried to be as practical
> as possible, and go in depth when necessary to explain the underlying
> ideas. I think we got the balance right: enough code examples to try
> out and see how things should be, but no listings that span for pages
> without any explanation. Despite having to read WiA a couple of
> hundred times while writing it, I still think it is a book I would
> love to read if I wasn't one of the authors.
> 
> As for 'missing' versioning in the ToC: we had to make choices in what
> to discuss. Versioning is such a deep technical detail which both
> Eelco and myself haven't had much to work with directly, that we
> didn't want to include it. It would open up a can of worms and it
> would be obsolete with Wicket 1.5 (which doesn't do versioning in the
> same way). I see versioning in Wicket to be an implementation detail
> not worth too much attention—until you run into a problem, and then
> the user@ list is a much better resource than a book.
> 
> Martijn
> 
> On Thu, Nov 11, 2010 at 1:24 PM, Arjun Dhar  wrote:
>>
>> I've been playing with Wicket for a while now and i think in certain areas
>> (specially internal architecture) i need to still connect the dots at a
>> larger scale so was researching books.
>>
>> "Wicket In Action" & "Enjoying Web Development with Wicket"  seem to emerge.
>>
>> Wicket In Action --> Seems more conceptual (Deeper understanding)
>> Enjoying Web Development with Wicket --> For practical programming and
>> explaining existing components etc.
>>
>> Anyone who has read both?
>> As a test I did not find the concept of "Versioning" mentioned in the TOC
>> atleast.
>>
>> ..and how come Igor hasn't written a book?, his answers are never more than
>> 2 lines (except when he is pissed off)  heh :)
>>
>> .anyway I dont mind buying both but one has to also read  them ;) [Phew i
>> prefer to Hack and try]
>> Any suggestions ?
>>
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Need-Wicket-Book-tp1888069p3037727.html
>> Sent from the Users forum 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
>>
>>
> 
> 
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzb7IkACgkQ0e+uUuMKv40j7gCfToeyAh8XF9Y8qeML3kOlROdB
1K8An13k91EkdaxtIHIMRGVZDisMxNQL
=XzRk
-END PGP SIGNATURE-

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



Re: Wicket 1.5 and OSGi

2010-10-06 Thread Nico Guba

 On 10/3/2010 1:35 PM, Eike Kettner wrote:

Just want to mention that with this change in wicket 1.5, wicket cannot
be used in OSGi environments as easiliy as wicket 1.4. One usually has
to create a wrapped jar somehow. Maybe this is worth to mention on the
migration guide wiki page?

Maybe this project helps reduce the complexity working with OSGI?

http://wiki.ops4j.org/display/ops4j/Pax+Wicket


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



Re: Persistence.xml problem

2010-04-25 Thread Nico Guba
I can assure you that there are no apparent problems/conflicts in using 
EclipseLink alongside Wicket.  I'm doing it constantly :)

It is likely that there is an issue with how your IDE is setup or packages the 
files.  Some tools write their own META-INF directory in a war instead of using 
the one designated in your sources.   That may need some tweaking but it's a 
stab in the dark since my setup is a Maven/Eclipse combo, so I cannot help on 
IDE specific issues.  The principle remains the same though.

It may be worth looking at the actual war archive and see whether the 
persistence.xml file is actually included at the right spot.

Try changing the persistence unit's name and see whether the new name is 
recognised when you instantiate your PersistenceManagerFactory.

Hope this helps

On 25 Apr 2010, at 16:43, Matias Pansa wrote:

> 
> No , is ant .
> 
>> Subject: Re: Persistence.xml problem
>> From: ng...@mac.com
>> Date: Sun, 25 Apr 2010 15:41:07 +0100
>> To: users@wicket.apache.org
>> 
>> Is maven your build system?
>> 
>> On 25 Apr 2010, at 14:46, Matias Pansa wrote:
>> 
>>> 
>>> I try clean and build many times with the same result , i try deleting all 
>>> files manually to , a clean tomcat install and manually deploy the 
>>> app.Thanks.
>>> 
>>> 
>>> 
 Date: Sun, 25 Apr 2010 13:34:28 +
 From: andre.prase...@gmail.com
 Subject: RE: Persistence.xml problem
 To: users@wicket.apache.org
 
 Try clean and build, you might break your application.
 
 Sent from my Nokia phone
 -Original Message-
 From: Igor Vaynberg
 Sent:  24/04/2010 23:10:15
 Subject:  Re: Persistence.xml problem
 
 wicket has nothing to do with it. maybe your IDE is not updating your
 persistence.xml in the target directory.
 
 -igor
 
 On Sat, Apr 24, 2010 at 7:02 AM, Matias Pansa  
 wrote:
> 
> 
> Hi , i'm developing an app under netbeans + wicket + tomcat + 
> wicket-contrib-javaee +eclipselink .
> The problem is that i run the app the first time and everything works 
> fine , but i change the data source in persistence.xml and the app stop 
> working , i change again to the original source and nothing ,  not 
> working , there is no error ,exception , nothing , the app runs on tomcat 
> like everything is ok , but there's no connection to the database , any 
> data is persisted .I just delete persistence.xml and app stil working! 
> ... clean tomcat install and still working without persistence.xml! , i 
> deployed the app war file within netbeans and manually on tomcat's web 
> manager without any persistence and the same result.So i want to know if 
> maybe wicket has something to do with this problem because i try almost 
> everything else , even running the app locally and in the server but 
> nothing happens , i apreciate any help on this.
> 
> _
> Organizá una reunión con Hotmail: podés enviar un email a tus amigos y 
> con el Calendario agendar la fecha. Descubrí más.
> http://www.microsoft.com/latam/windows/windowslive/products/calendar.aspx
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
>>>   
>>> _
>>> Con Hotmail y Calendario organizar reuniones es muy fácil: enviá 
>>> invitaciones y recibí confirmaciones de asistencia.
>>> http://www.microsoft.com/latam/windows/windowslive/products/calendar.aspx
>> 
>> -- 
>>  npg
>> 
>> 
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> _
> Con Hotmail y Calendario organizar reuniones es muy fácil: enviá invitaciones 
> y recibí confirmaciones de asistencia.
> http://www.microsoft.com/latam/windows/windowslive/products/calendar.aspx

-- 
npg





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



Re: Persistence.xml problem

2010-04-25 Thread Nico Guba
Is maven your build system?

On 25 Apr 2010, at 14:46, Matias Pansa wrote:

> 
> I try clean and build many times with the same result , i try deleting all 
> files manually to , a clean tomcat install and manually deploy the app.Thanks.
> 
> 
> 
>> Date: Sun, 25 Apr 2010 13:34:28 +
>> From: andre.prase...@gmail.com
>> Subject: RE: Persistence.xml problem
>> To: users@wicket.apache.org
>> 
>> Try clean and build, you might break your application.
>> 
>> Sent from my Nokia phone
>> -Original Message-
>> From: Igor Vaynberg
>> Sent:  24/04/2010 23:10:15
>> Subject:  Re: Persistence.xml problem
>> 
>> wicket has nothing to do with it. maybe your IDE is not updating your
>> persistence.xml in the target directory.
>> 
>> -igor
>> 
>> On Sat, Apr 24, 2010 at 7:02 AM, Matias Pansa  wrote:
>>> 
>>> 
>>> Hi , i'm developing an app under netbeans + wicket + tomcat + 
>>> wicket-contrib-javaee +eclipselink .
>>> The problem is that i run the app the first time and everything works fine 
>>> , but i change the data source in persistence.xml and the app stop working 
>>> , i change again to the original source and nothing ,  not working , there 
>>> is no error ,exception , nothing , the app runs on tomcat like everything 
>>> is ok , but there's no connection to the database , any data is persisted 
>>> .I just delete persistence.xml and app stil working! ... clean tomcat 
>>> install and still working without persistence.xml! , i deployed the app war 
>>> file within netbeans and manually on tomcat's web manager without any 
>>> persistence and the same result.So i want to know if maybe wicket has 
>>> something to do with this problem because i try almost everything else , 
>>> even running the app locally and in the server but nothing happens , i 
>>> apreciate any help on this.
>>> 
>>> _
>>> Organizá una reunión con Hotmail: podés enviar un email a tus amigos y con 
>>> el Calendario agendar la fecha. Descubrí más.
>>> http://www.microsoft.com/latam/windows/windowslive/products/calendar.aspx
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> _
> Con Hotmail y Calendario organizar reuniones es muy fácil: enviá invitaciones 
> y recibí confirmaciones de asistencia.
> http://www.microsoft.com/latam/windows/windowslive/products/calendar.aspx

-- 
npg





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



Re: Back button

2010-04-25 Thread Nico Guba
Hmmm, does that imply that one of the member variables may be Serializable? 

On 25 Apr 2010, at 05:18, Igor Vaynberg wrote:

> the exception might have caused your page to not be serialized
> properly into the pagestore
> 
> -igor
> 
> On Sat, Apr 24, 2010 at 6:06 PM, Douglas Ferguson
>  wrote:
>> I just saw the issue again, but this time it happened right after an 
>> exception. I got an except. Hit back and then it complained that the link 
>> didn't exist.
>> 
>> D?
>> 
>> On Apr 24, 2010, at 6:58 PM, Douglas Ferguson wrote:
>> 
>>> Ah yes..
>>> 
>>> I am definitely seeing the "component not found on page" error.
>>> 
>>> Any tips on how to get a quick start for this? Anybody got any example 
>>> quickstarts that deal with back button issues?
>>> 
>>> D/
>>> 
>>> On Apr 24, 2010, at 6:41 PM, Igor Vaynberg wrote:
>>> 
 then you would get a page-expired error
 
 -igor
 
 On Sat, Apr 24, 2010 at 3:34 PM, Douglas Ferguson
  wrote:
> Well something is happening, because I see it in the production logs and 
> from time to time on my dev machine.
> 
> What if the server is restarted?
> 
> D/
> 
> On Apr 24, 2010, at 11:09 AM, Igor Vaynberg wrote:
> 
>> that doesnt matter because the url of the link you click contains the
>> version number of the page
>> 
>> -igor
>> 
>> On Sat, Apr 24, 2010 at 2:35 AM, Pointbreak
>>  wrote:
>>> In firefox it doesn't. Firefox reads the page back from it's in memory
>>> cache, which is the state before you clicked the ajax link. The headers
>>> should be changed to force firefox to request the page from the server
>>> (wicket). There are other threads on this subject, and frankly I do not
>>> understand why the headers are not changed in wicket core.
>>> 
>>> On Fri, 23 Apr 2010 21:45 -0700, "Igor Vaynberg"
>>>  wrote:
 the back button should roll the page back to the state that contained 
 the
 item
 
 -igor
 
 On Fri, Apr 23, 2010 at 9:28 PM, Douglas Ferguson
  wrote:
> Could this possibly happen if the following occurred.
> 
> 1) Load a page with a repeater on it
> 2) Click on an ajax link that would remove an item from the repeater
> 3) Click the back button. Click on the link for the item you removed.
> 
> D/
> 
> 
> On Apr 23, 2010, at 10:32 AM, Martin Asenov wrote:
> 
>> Would someone assist me on this?
>> 
>> Thank you in advance!
>> 
>> -Original Message-
>> From: Martin Asenov [mailto:mase...@velti.com]
>> Sent: Friday, April 23, 2010 9:38 AM
>> To: users@wicket.apache.org
>> Subject: Back button
>> 
>> Hello, everyone!
>> 
>> I've got a page with a repeater with cells - every single cell has a 
>> link in it. However, when you go to another page and afterwards 
>> press the Back button and click one of the links, the following exc 
>> is thrown:
>> 
>> WicketMessage: org.apache.wicket.WicketRuntimeException: component 
>> view_holder:view:25:cols:30:trigger_ref not found on page 
>> com.company.project.ui.calendar.Calendar[id = 46], listener 
>> interface = [RequestListenerInterface name=IBehaviorListener, 
>> method=public abstract void 
>> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
>> 
>> Wicket was supposed to support the Back button, wasn't it? Or maybe 
>> I'm missing something.
>> 
>> Please advice...
>> 
>> Thank you,
>> Martin
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>

Re: Scalability

2010-04-11 Thread Nico Guba
I've had excellent results with Glassfish.  The login server for the MMO I 
worked on (swtor.com) has been benchmarked at 32,000 logins per second on a 8 
CPU machine.  The maximum throughput on a simple servlet (nothing dynamic 
though, just static data), was benchmarked at around 70k.

Obviously, obtaining these rates depends on a lot of things,  and we noticed 
that (unsurprisingly) the number of cores has a big impact on maximum 
scalability (32 / 8 = 4k per core). 

If you use an antiquated server that still processes requests on a thread per 
connection model, then your throughput will suffer dramatically.   Any modern 
app server or webserver that has a good non-blocking I/O implementation of the 
reqest/response handler will do.  Servers that come to my mind are tomcat 6, 
glassfish, grizzly...

Hope this helps && happy hacking!

On 11 Apr 2010, at 16:48, François Meillet wrote:

> Hi Wicketers,
> 
> 1) I need to build a system which can perform
> -6000 different users per day
> and
> -200 concurent users
> 
> 
> The software used:
> 
> wicket
> postgresql (mainly read operations)
> hibernate
> jms
> 
> At the beginning there will be 2 computers  (I prefer horizontal scalability).
> What would be your advice for the hardware (hard drive will be 10.000 RPM).
> -processor ?
> -ram
> 
> 
> 2) Also I would appreciate your advice for the server:
> I have the choice for the server: Tomcat + a JMS implementation like HornetQ, 
> or Jboss Application Server. 
> I hesitate between the 2 solutions, as I don't need EJBs, but we never know 
> !!! . 
> 
> Have you any advice ?
> 
> Thanks 
> François
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
npg





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



Re: i18n feedbackmessages

2007-10-27 Thread nico

Johan Compagner schrieb:

why aren't you subclassing button and have a button that has that
modifier and use that one on all your forms?
  

doh! thanks, i haven't seen that obvious possibility
..is it right, to check wether the button is enabled in the 
onComponentTag event before putting the attribute?
to use the class simply add it by calling this.add(new 
I18nButton("button.id", new Model("buttontxt.key")); from

within your component.

import org.apache.wicket.Component;
import org.apache.wicket.behavior.AbstractBehavior;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.model.IModel;

/**
* Internationalized button class
*/
public class I18nButton extends Button {

   /**
* The attribute modifier for i18n
*/
   private class I18nAttributeModifier extends AbstractBehavior {
  
   private String attribute;

   private String value;
  
   public I18nAttributeModifier(String attribute, String value) {

   this.attribute = attribute;
   this.value = value;
   }
  
   /**
* @see 
org.apache.wicket.behavior.AbstractBehavior#onComponentTag(org.apache.wicket.Component,

*  org.apache.wicket.markup.ComponentTag)
*/
   public void onComponentTag(final Component component, final 
ComponentTag tag)

   {
   if (isEnabled(component))
   {
   tag.getAttributes().put(attribute, getString(value));
   }
   }
   }   
  
   public I18nButton(final String id, final IModel model) {

   super(id, model);
   if (model.getObject() instanceof String) {
   String key = (String)model.getObject();
   add(this.new I18nAttributeModifier("value", key));
   } else
   new OperationNotSupportedException("Model needs to contain 
an object of type String.");

   }
}



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



Re: i18n feedbackmessages

2007-10-26 Thread nico

Thanks, Johan

With that code you are adding an attribute modifier ever time the button renders
And you did get an exception i guess because you call getString() out of the 
blue inside a construtor of a not fully constructed class.
  

thats why i moved the code to the propably wrong place..

To do that you have to lazy get the string through a model.getObject().
Then also a language change will result that the button will be translated on 
the fly
  
i have implemented the class I18NAttributeModifier which does what you 
proposed, by peeking

at the SimpleAttributeModifier code;

   private class I18NAttributeModifier extends AbstractBehavior {

   private String attribute;
   private String value;
   
   public I18NAttributeModifier(String attribute, String value) {

   this.attribute = attribute;
   this.value = value;
   }
   
   /**
* @see 
org.apache.wicket.behavior.AbstractBehavior#onComponentTag(org.apache.wicket.Component,

*  org.apache.wicket.markup.ComponentTag)
*/
   public void onComponentTag(final Component component, final 
ComponentTag tag)

   {
   if (isEnabled(component))
   {
   tag.getAttributes().put(attribute, getString(value));
   }
   }
   }

this modifier is added in the constructor and is a private class to the 
Form i extended from "WebPage"

which is why the getString() method is available.

however i find this a little bit like a quick fix. how should i modify the
class to be reusable from other forms with a button?

if i also try to keep the localizer in the internal class by calling
getLocalizer() in the constructor of the Form class, and replace
the getString() by localizer.getString() in the onComponentTag event
to be able to externalize I18NAttributeModifier for more common usage,
the resource string is not found - probably because the localizer was 
overwritten after my code getting it in the ctor.


it's a pity that the button needs to be handled in a special way,
is there maybe a way to improve this, or am i doing something wrong?

thanks, regards
nico




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



Re: i18n feedbackmessages

2007-10-26 Thread nico

Thanks, that worked for me,
however i needed to add the modifier in onBeforeRender, within the 
constructor an exception

was thrown
   @Override
   public void onBeforeRender() {
  
   submitButton.add(

   new SimpleAttributeModifier("value",
   getString("buttontxt.send")));
   super.onBeforeRender();
   }


Not at a computer, but have you tried:

button.add(new SimpleAttributeModifier("value", getString("your.key"));

Or

button.add(new SimpleAttributeModifier("value", new ResourceModel("your.key"));

It may not be called ResourceModel - the name is escaping me right now.

Jeremy Thomerson
-- sent from a wireless device
  



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



Re: i18n feedbackmessages

2007-10-24 Thread nico

another issue,
Button.onComponentTag states in its documentation tag:
* NOTE. For a <button> the value
* attribute is not rendered, markup needs to be added within the button
* to display the button's label.
* 
however if i add markup the i18n is gone.
i currently use
   key="buttontxt.send" />:

   
however the internationalized string is added as a label.
is there a way to use i18n in the value attribute of the button tag?

all three don't work, i tried to dig the code, but haven't found a way 
to accomplish:
   submitButton = new Button("button.send",new 
Model(getString("buttontxt.send")));

   submitButton.setLabel(new Model(getString("buttontxt.send")));
   add(submitButton);

regards, nico


info(getString("your.key"));

Jeremy Thomerson
  



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