Re: DatePicker and DateTextField

2013-06-13 Thread Francois Meillet
Set the model object (the date) behind the DateTextField to 00:00:00 JJ.MM..

François Meillet
Formation Wicket - Développement Wicket





Le 14 juin 2013 à 07:37,  a écrit :

> Hello,
> 
> how is the DatePicker binded tot he DateTextfield? How is the picked date 
> written in the Textfield? Is there a possiblilty to change this?
> 
> When the DatePicker have the pattern dd.MM. there is no problem. But I 
> want the full timestamp with this pattern HH:mm:ss dd.MM. because the 
> User should be able to change the time. I need one DateTextField because the 
> Client and the server are in different timezones. This works fine. The only 
> problem is when I pick a day the DatePicker writes HH:mm:ss 14.06.2013. But 
> it should be 00:00:00 14.06.2013 for default.
> 
> Is there anyone who could help?
> 
> 
> Mit freundlichen Grüßen
> Christoph Manig
> Systems Engineer
> 
> T-Systems International GmbH
> Systems Integration - SC Travel, Transport & Logistics
> Hoyerswerdaer Str. 18
> 01099 Dresden
> tel.:   +49 (0) 351 / 8152 - 188
> fax:+49 (0) 351 / 8152 - 209
> email:  christoph.ma...@t-systems.com
> 
> 
> 



Re: Wicket mail and pdf

2013-06-13 Thread Piratenvisier

Am 13.06.2013 12:53, schrieb Martin Grigorov:

Hi,


On Thu, Jun 13, 2013 at 1:48 PM, Piratenvisier
wrote:


Martin thank you for your instantanious answers,

I tried the mailtemplate example changed resource.text to resource.pdf and
after some research concerning the error I got included
   IPackageResourceGuard packageResourceGuard =
getResourceSettings().**getPackageResourceGuard();
 if (packageResourceGuard instanceof
SecurePackageResourceGuard)
 {
 SecurePackageResourceGuard guard =
(SecurePackageResourceGuard)
packageResourceGuard;
 guard.addPattern("+*.pdf");
 }
in the init method of the Application.
I get the Document :




A template based on a page




Hello,Braun

You receive this email because you are subscribed for our products.
We just released a new version of product X.


Please download ithttp://localhost:8080/**
mailtemplate/wicket/resource/**org.apache.wicket.examples.**
asemail.MailTemplate/resource.**pdf
">here!


Sincerely,
The Marketing team



and when I use the link I get the error:

Problem accessing /mailtemplate/wicket/resource/**
org.apache.wicket.examples.**asemail.MailTemplate/resource.**pdf. Reason:

 Unable to find resource


What is still wrong ?


I guess resource.pdf is not copied in target/classes/ folder by Maven.
Check that resource.pdf is next to MailTemplate.class

Thanks Martin it was excluded by pom.






Am 11.06.2013 08:45, schrieb Martin Grigorov:


Hi,

At http://www.wicket-library.com/**wicket-examples-6.0.x/**
mailtemplate/?0you
can see an example of rendering the markup for a page, a panel and a
resource.
At 
http://markmail.org/message/**em4wqtsxhetu4skjyou
 can see how to create
PDF out of the produced HTML.


On Tue, Jun 11, 2013 at 9:39 AM, Piratenvisier
**wrote:

  Does anybody know some example example code to start with

concerning email and pdf

Thanks in advance
Heiner Braun
Am 10.06.2013 10:34, schrieb Martin Grigorov:

  Hi,

If you use Wicket 6.7.0+ then you can use ComponentRenderer class to get
the markup of any Wicket Page/Panel/Component.
Then you can use the generated markup for mails and PDF creation.
For PDF creation you can check
https://github.com/flyingsaucerproject/flyingsaucer


.

There is a mail in the
users@ mail archives from the last few days by another user showing how
to
use FlyingSaucer's ITextRenderer.


On Sat, Jun 8, 2013 at 8:39 PM, Piratenvisier<**hansheinrichbrau**
n...@yahoo.de

wrote:


   I wanted to integrate mail and pdf creation in my wicket application.


Till now I manage this by sending a request to a cocoon-2.2.0
application.
This is a good solution but because I see no upgrade way using my
cocoon
application
and integrating newer versions of spring I am looking for an
alternative.

Heiner

--**--**--**
--**-
To unsubscribe, e-mail: users-unsubscribe@wicket.apa**che.org<
http://apache.org**>
http://wicket.apache.org><
users-unsubscribe@**wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



  --**

--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.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



DatePicker and DateTextField

2013-06-13 Thread Christoph.Manig
Hello,

how is the DatePicker binded tot he DateTextfield? How is the picked date 
written in the Textfield? Is there a possiblilty to change this?

When the DatePicker have the pattern dd.MM. there is no problem. But I want 
the full timestamp with this pattern HH:mm:ss dd.MM. because the User 
should be able to change the time. I need one DateTextField because the Client 
and the server are in different timezones. This works fine. The only problem is 
when I pick a day the DatePicker writes HH:mm:ss 14.06.2013. But it should be 
00:00:00 14.06.2013 for default.

Is there anyone who could help?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport & Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com





Re: wicket and JPA

2013-06-13 Thread Andrey V. Panov
Check if entityManager.merge(entity) is present?!


Re: Wicket Security examples

2013-06-13 Thread N. Metzger
We have Wicket running with Shiro since version 1.4, and it's still doing
fine under 6.7. Due to time restrictions I haven't looked into wicket-shiro
for a long time, but no problems have surfaced.

Natalie 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Security-examples-tp4659398p4659474.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: wicket and JPA

2013-06-13 Thread Boris Brinza

Hello,
ok, i understand what my problem was,
I've update my code to use detachable model, quite easy refactorting.

But it only postponed my problem to model onDetach, if i understand it 
right.
In pdf, "If we don't want to loose these changes we must explicitly 
persist the entity before the detaching phase occurs."
So same problem with update of JPA enbtity. Insert is ok, just call 
persist(), but update?




On 06/13/2013 02:52 PM, Sven Meier wrote:
Please read "9.6 Detachable models" of the Wicket Free Guide and come 
back with your questions.


Sven

On 06/13/2013 01:20 PM, Boris Brinza wrote:

Hello to all,
I have some fundamental issues with integration of jpa into wicket.
I develop web application using wicket 6 and JPA (eclipselink). Maybe 
next question is more JPA oriented, but nevertheless:


Lets say i have
class BaseDetailPage extends WebPage {
protected  dbEntity;

}

where dbEntity is instance of jpa persisted object.
BaseDetail page contains form for editing db entity using 
CompoundPropertyModel.


After i open detail page, entity is read from DB and page is 
displayed (if edit button is pressed) or i create new instance of 
object (if add button is pressed).


After submit, if i want to add new record, everything is clear, i 
call beginTX(), entityManager.persist(dbEntity), commitTX().


But what about updating existing record?

Every example for JPA shows some basic code like this:
beginTX()
dbObject.setXXX();
dbObject.setYYY();
commitTX()


But how to integrate this into wicket form using compound property 
model?
There is no such code for setting properties of db object, and jpa 
does not have anything like entityManager.update().


Now i use hack (by my opinion it';s a hack)

beginTX()
entityManaget.detach(dbObject);
entityManager.merge(dbObject)
commitTX()

but i am not sure, if it's right solution (or i'm almost sure it's 
not right attitude)


Is there any tutorial how to integrate these frameworks, or some 
simple opensource project to check how it's solved?


Thanks for any advice,
Boris




-
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




--

S pozdravom

Boris Brinza

---
HT Solution s.r.o.
Digital Park II
Einsteinova 25
851 01 Bratislava
Slovakia

Phone: +421 2 3500 2512,  Mobile: +421 903 602 126
E-mail: boris.bri...@htsolution.sk,  Internet: www.htsolution.sk


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



Re: Wicket Security examples

2013-06-13 Thread tom.hombergs
> Also, I'm interested in hearing anyone's insight into using Apache Shiro
with Wicket.  Our senior management is pretty keen on seeing us implement a
security framework that has a more powerful set of features.  I've found
Shiro to be "mostly" easy to implement, with the exception of managing
multiple authentication realms.  I was also curious to know, considering the
age of Wicket Shiro, whether or not that plug-in will work with Wicket 6.8
or if it's restricted to 1.5 or earlier.  Are there any problems with Wicket
Auth/Roles that might be better handled with a security framework like
Apache Shiro? 

You might want to have a look at Spring Security, when you are comparing
different Security Frameworks. For most use cases, Wicket Auth/Roles will
probably suffice, though. If you want to have look, I made a little example
project integrating Spring Security and Wicket at
https://github.com/thombergs/wicket-spring-security-example.

Regards,
Tom



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Security-examples-tp4659398p4659470.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: Unit testing a repeater or data table by mocking its data

2013-06-13 Thread Paul Bors
Okay, so what's the easiest way to replace a single bean with a mock?
I tried Springockito's @ReplaceWithMock w/o any luck.

My webapp in testing is configured as follows:
public class BaseConsoleTest extends SpringTest {
...
  ConsoleApplication testConsoleApplication = new
ConsoleApplication() {
@Override
public ServletContext getServletContext() {
ServletContext servletContext =
super.getServletContext();
XmlWebApplicationContext wctx = new
XmlWebApplicationContext();
wctx.setParent(getSpringApplicationContext());
wctx.setConfigLocation("");
wctx.setServletContext(servletContext);
wctx.refresh();
 
servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTE
XT_ATTRIBUTE, wctx);
return servletContext;
}
@Override
protected void onDestroy() {
super.onDestroy();
if(tester != null) {
tester.destroy();
tester = null;
}
}
@Override
public Class getHomePage() {
Class testHomePage =
super.getHomePage();
return (testHomePage == null) ? MyDummyPage.class :
testHomePage;
}
};
...
}

This class extended:
@ContextConfiguration(loader = SpringockitoContextLoader.class, locations =
{"classpath:applicationContext.xml"})
@TransactionConfiguration(defaultRollback = true)
@Transactional
public abstract class SpringTest extends
AbstractTransactionalTestNGSpringContextTests {
  // Setup data sources
}

Simply enough I just want to mock and inject the new mock by replacing a
single DAO defined in my applicationContext.xml.

The test I've tried:
@Test
public class GroupingBaseTestPage extends BaseConsoleTest {
...
@ReplaceWithMock
@Autowired
private DictionaryGroupingDao dictionaryGroupingDao;
...
}

Now each time I tried to define a mock for dictionaryGroupingDao the real
bean is called instead:
 
when(dictionaryGroupingDao.countAvaialbleItems(Mockito.any())
).thenReturn(
getCount()
);

The above dictionaryGroupingDao.countAvaialbleItems() executes on the real
bean as if @ReplaceWithMock never did its work.

I've tried with regular Mockito via the @Mock and that mocks my bean but it
doesn't inject it into my Wicket's app :(

Right now I gave up on Springockito and resorted to simply using Mockito for
the mocks I need with a ApplicationContextMock which is killing me as I have
quite a lot of mocks to implement just to get the user logged in to the
application and start a single page :(

I don't yet want to use Spring's ProxyFactoryBean in conjunction with
HotSwappableTargetSource as it would make a mess of my
applicationContext.xml.

~ Thank you,
  Paul Bors

-Original Message-
From: Andreas Kuhtz [mailto:andreas.ku...@gmail.com] 
Sent: Wednesday, June 12, 2013 11:26 AM
To: users@wicket.apache.org
Subject: Re: Unit testing a repeater or data table by mocking its data

Hi Paul,

Not sure if I got you right but you might check out:
https://bitbucket.org/kubek2k/springockito/wiki/Home

Best regards
Andi

2013/6/12 Paul Bors :
> I like the simplicity of Mockito and got it working in my unit tests, but
now I find myself mocking more services than I wanted.
>
> Wicket Page Teste allows you to inject your mocks on top of the
SpringBeans, is that possible with Mockito?
> http://WicketPageTest.sourceforge.net/
>
> In other words I want to have my normal XML mapped beans context have some
beans be overridden only for some tests (talk about being lazy).
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: heikki [mailto:tropic...@gmail.com]
> Sent: Tuesday, June 11, 2013 11:14 AM
> To: users@wicket.apache.org
> Subject: Re: Unit testing a repeater or data table by mocking its data
>
> dear Paul,
>
> I've recently used Mockito and am quite happy with it. You can easily mock
any class and make it behave as you need.
>
> Best regards
> Heikki Doeleman
>
>
> On Tue, Jun 11, 2013 at 5:08 PM, Paul Bors  wrote:
>
>> Up to recently we got away with running our unit tests fully 
>> integrated with the back end db by performing live queries via our 
>> DAOs.
>>
>> Due to recent changes to our product schema we run into the 
>> inevitable high cost of having to spend too much time on maintain our 
>> mocked unit test data straight into the db. To cut down on that cost 
>> I would like to start mocking most of our DAOs that back-up the data 
>> tables in our product (gradually over time).
>>
>>
>>
>> Which brings me to my question, what's the recommended approach from 
>> Wicket's team (or users) on mocking the DAOs that are used by the 
>> data providers of your data tables?
>>
>>
>>
>> Our advantage is that we are usin

Validator Can't Find Form Submitting Component

2013-06-13 Thread Richard W. Adams
[Re-sending, as I noticed my previous send was an accidental forward, so 
probably ended up in the wrong thread. Also adding some more info]

I have a form inside a panel. The form is nested inside another form that 
includes the panel. The panel form has a validator which is supposed to 
validate only conditionally, depending on how the form was submitted.


When I submit the panel form via an AjaxSubmitLink, the call to 
findSubmittingButton() inside the validator returns null, even though I 
called panelForm.add(theLiink). Is this expected behavior? I know the 
findSubmittingButton() method says "button," but it returns an 
IFormSubmittingComponent, so I would expect it could return either a 
button or a submitting link.

I need to distinguish between the various links/buttons that can submit 
the form. Is this not possible with an AjaxSubmitLink? I'm using Wicket 
1.4.17.

**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: Introduction and some questions about Wicket

2013-06-13 Thread Mike Pence
Thanks for all of the useful information and for your kindness. Having a
supportive community -- something that the Ruby people are great at -- is a
huge plus.

Object-oriented Scala (being as functional in m approach as I can) and
wicket look like the sweet spot for me. Here is hoping that big contract
gets signed, now...

FYI, here is me trying to explain the advantages of component-oriented
development at the Ruby conference in '08:
http://www.confreaks.com/videos/1162-rubyconf2008-components-are-not-a-dirty-word

Best,
Mike Pence


On Thu, Jun 13, 2013 at 8:18 AM, Nick Pratt  wrote:

> For 3.) here are some of our experiences:
>
> 1.) If you are building from scratch and utilizing a separate
> design/styling team, we found its far easier/quicker to let the CSS folks
> do their thing and provide static pages, which the dev team then interprets
> and builds towards.  Most devs can read HTML and understand its structure,
> so converting that in to Wicket components is straight forward.  The
> inverse, in our experience, is far from true.  While this approach gets you
> up and running the quickest (since you can find CSS styling consultants
> everywhere - at least you can here) it can leave you in a little bit of a
> hole unless you intend to hire someone on to the team full time with this
> knowledge.
>
> 2.) Having an employee with lots of current CSS knowledge on the dev team
> is a huge help. If they also have JS knowledge, thats an even bigger bonus.
>
> 3.) If you are trying to retrofit styling to an already built application
> (or where significant portions have been built), having a separate/isolated
> styling team is a major drag on app development.
>
> In our experience (and I don't intend this to be a blanket statement), most
> folks with good CSS knowledge are highly resistant to understanding Java
> and/or Wicket, and thus a significant impedance mismatch exists between the
> two efforts. If you find a Java dev with solid CSS knowledge, hang on to
> them!
>
> Nick
>
> On Wed, Jun 12, 2013 at 3:47 PM, Michael Pence 
> wrote:
>
> > Hi guys,
> >
> > My name is Mike Pence. I think that I have dipped into this list a time
> or
> > two in the past, but I am here, this time, with serious intent to use
> > Wicket for a very big project -- big both in terms of how many users it
> > will have, and big in its impact.
> >
> > I have been doing Rails for the last 7 or 8 years (spoke at Ruby and
> Rails
> > conferences about rich web apps), after coming from a Delphi and Java
> > background (and Microsoft stuff, but I leave that out).
> >
> > So, Rails is great but does not give me the modularity and component
> > re-use in the UI that I loved in Delphi. I am making some assumptions
> about
> > Wicket, and would appreciate your feedback on these assumptions:
> >
> > 1. That wicket lets you model rich and highly interactive web apps that
> > can feel like desktop apps, but in the browser. (Examples?)
> > 2. That building complex UI widgets -- grids, trees, custom components
> > like timelines or graphs or calendars -- is comparatively painless.
> > 3. That you can largely leave the markup and styling to the people who
> > like doing that kind of thing (why they would, I don't get…)
> >
> > I would love to do Scala with Wicket but I can't raise the bar that high,
> > right now. If there was a JRuby version of wicket…that would be awesome.
> > JVM runtime is a big win for this, because the project definitely will
> have
> > many, many users.
> >
> > Has anyone done any work with wicket focused on mobile devices?
> >
> > Appreciate your thoughts.
> >
> > Mike Pence
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Form Submitting Component

2013-06-13 Thread Richard W. Adams
When I submit a form via an AjaxSubmitLink, form.findSubmittingButton() 
returns null, even though I called form.add(theLlink). Is this expected 
behavior? I know the findSubmittingButton() method says "button," but it 
returns an IFormSubmittingComponent, so I would expect it could return 
either a button or a submitting link.

I need to distinguish between the various links/buttons that can submit 
the form. Is this not possible with an AjaxSubmitLink? I'm using Wicket 
1.4.17.




From:   Sven Meier 
To: users@wicket.apache.org
Date:   06/13/2013 07:53 AM
Subject:Re: wicket and JPA



Please read "9.6 Detachable models" of the Wicket Free Guide and come 
back with your questions.

Sven

On 06/13/2013 01:20 PM, Boris Brinza wrote:
> Hello to all,
> I have some fundamental issues with integration of jpa into wicket.
> I develop web application using wicket 6 and JPA (eclipselink). Maybe 
> next question is more JPA oriented, but nevertheless:
>
> Lets say i have
> class BaseDetailPage extends WebPage {
> protected  dbEntity;
>
> }
>
> where dbEntity is instance of jpa persisted object.
> BaseDetail page contains form for editing db entity using 
> CompoundPropertyModel.
>
> After i open detail page, entity is read from DB and page is displayed 
> (if edit button is pressed) or i create new instance of object (if add 
> button is pressed).
>
> After submit, if i want to add new record, everything is clear, i call 
> beginTX(), entityManager.persist(dbEntity), commitTX().
>
> But what about updating existing record?
>
> Every example for JPA shows some basic code like this:
> beginTX()
> dbObject.setXXX();
> dbObject.setYYY();
> commitTX()
>
>
> But how to integrate this into wicket form using compound property 
model?
> There is no such code for setting properties of db object, and jpa 
> does not have anything like entityManager.update().
>
> Now i use hack (by my opinion it';s a hack)
>
> beginTX()
> entityManaget.detach(dbObject);
> entityManager.merge(dbObject)
> commitTX()
>
> but i am not sure, if it's right solution (or i'm almost sure it's not 
> right attitude)
>
> Is there any tutorial how to integrate these frameworks, or some 
> simple opensource project to check how it's solved?
>
> Thanks for any advice,
> Boris
>
>
>
>
> -
> 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




**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: wicket and JPA

2013-06-13 Thread Sven Meier
Please read "9.6 Detachable models" of the Wicket Free Guide and come 
back with your questions.


Sven

On 06/13/2013 01:20 PM, Boris Brinza wrote:

Hello to all,
I have some fundamental issues with integration of jpa into wicket.
I develop web application using wicket 6 and JPA (eclipselink). Maybe 
next question is more JPA oriented, but nevertheless:


Lets say i have
class BaseDetailPage extends WebPage {
protected  dbEntity;

}

where dbEntity is instance of jpa persisted object.
BaseDetail page contains form for editing db entity using 
CompoundPropertyModel.


After i open detail page, entity is read from DB and page is displayed 
(if edit button is pressed) or i create new instance of object (if add 
button is pressed).


After submit, if i want to add new record, everything is clear, i call 
beginTX(), entityManager.persist(dbEntity), commitTX().


But what about updating existing record?

Every example for JPA shows some basic code like this:
beginTX()
dbObject.setXXX();
dbObject.setYYY();
commitTX()


But how to integrate this into wicket form using compound property model?
There is no such code for setting properties of db object, and jpa 
does not have anything like entityManager.update().


Now i use hack (by my opinion it';s a hack)

beginTX()
entityManaget.detach(dbObject);
entityManager.merge(dbObject)
commitTX()

but i am not sure, if it's right solution (or i'm almost sure it's not 
right attitude)


Is there any tutorial how to integrate these frameworks, or some 
simple opensource project to check how it's solved?


Thanks for any advice,
Boris




-
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



AW: DateTextfield with DatePicker

2013-06-13 Thread Christoph.Manig
No I need this datepattern because the user should be able to change the time 
of a day. I also need true because the server and the client are in different 
timezones.

Is there another way to change the default?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport & Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: francois meillet [mailto:francois.meil...@gmail.com] 
Gesendet: Donnerstag, 13. Juni 2013 14:15
An: users@wicket.apache.org
Betreff: Re: DateTextfield with DatePicker

DateTextField txtDatumVon = new DateTextField("txtDatumVon", new 
PatternDateConverter("dd/MM/", false));

François



On Thu, Jun 13, 2013 at 1:03 PM,  wrote:

> Hello,
>
> in my application I have a DateTextField with a DatePicker. I declared 
> it like this:
> DateTextField txtDatumVon = new DateTextField("txtDatumVon", new 
> PatternDateConverter("HH:mm:ss dd.MM.",true));
>
> When I choose a day I can see in the Textfield something like this:
> HH:mm:ss 11.06.2013. How can I change this? I want this for Default 
> time 00:00:00 11.06.2013(the day which was picked in the DatePicker)
>
> Can you help me please?
>
> Thank you.
>
>
> Mit freundlichen Grüßen
> Christoph Manig
> Systems Engineer
>
> T-Systems International GmbH
> Systems Integration - SC Travel, Transport & Logistics Hoyerswerdaer 
> Str. 18
> 01099 Dresden
> tel.:   +49 (0) 351 / 8152 - 188
> fax:+49 (0) 351 / 8152 - 209
> email:  christoph.ma...@t-systems.com
>
>
>
>

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



Re: Dynamic Context Menu using wicket-jquery-ui

2013-06-13 Thread Sebastien
Hi Colin,

Nice try :) It's not perfect for now but its interesting!
(actually bronius is also using wicket-jquery-ui, but not the Menu; he's
trying to integrate a context-menu plugin...)

So, for the short time I had today, here is my current feedback:

First, I am not yet convinced about the CloseMenusBahavior, so I did
public class OpenMenuBehaviour extends AjaxEventBehavior (instead of
CloseMenusBehavior)

Closing on-click somewhere (on the document) and on-escape can be easily
done using a jquery statement, so in ContextMenu I did:

@Override
protected void onInitialize() {

super.onInitialize();

this.setVisible( false );
// this.setOutputMarkupId( true ); //not needed, already handled by
setOutputMarkupPlaceholderTag
this.setOutputMarkupPlaceholderTag( true );

this.add(new JQueryAbstractBehavior("contextmenu-commands") {

private static final long serialVersionUID = 1L;

@Override
protected String $() {

String selector =
JQueryWidget.getSelector(ContextMenu.this);

StringBuilder builder = new
StringBuilder("jQuery(function() {");
builder.append("$(document).click(function(e) {
$('").append(selector).append("').hide(); });"); // hide on click
builder.append("$(document).keyup(function(e) { if (e.which
== 27) { $('").append(selector).append("').hide(); } });");  // hide on
escape
builder.append(" });");

return builder.toString();
}
});
}

The 'only' issue I have is with the link (the standard one, not the ajax)
because if I open the context menu, its visible flag is set to true (for
the menu to be displayed) but is not set to false on click or/and on
escape., so refreshing the page cause the menu to be displayed inline...
There is probably a nice way to fix this but I do not have yet in mind... ;)

Hope this helps (a little),

Best regards,
Sebastien.



On Thu, Jun 13, 2013 at 4:15 AM, Colin Rogers <
colin.rog...@objectconsulting.com.au> wrote:

> Wicketeers,
>
> I'm attempting to develop a reusable context menu component. I'm nearly
> there, but having a few issues, and thought I might share in the hope I
> might get some help. I realise that another person (bronius) is also having
> a go at this, but his implementation isn't using wicket-jquery-ui, which I
> am using and want to utilise.
>
> http://www.otbcs.co.uk/wicketmenu.zip
>
> The link above includes a zip to a quick start that contains the code.
> There isn't a lot to it, that isn't already done by wicket-jquery-ui.
>
> Requirements;
>
> * Open Menu on right click - menus to appear near or in relation
> to what was clicked. (done)
>
> * Menus are dynamically defined - they are not created or rendered
> initially, on page creation, but are defined dynamically on button event
> and returned via Ajax for rendering. (done)
>
> * Must allow multiple, different, menus on same page. (done)
>
> * Must clear down intelligently - when another click elsewhere or
> escape etc., is pressed.
>
> The issue I have at the moment is;
>
> * Closing the menu only happens on another context-menu,
> successfully. I can have it close on an 'onclick' event, which is added to
> the page, but this in turn disables/ breaks standard links. In the example
> above, this is the case - the menu behaves nicely, but breaks the standard
> link.
>
> * How would I close the menu on an 'escape' key press?
>
> * While not that important; you can't reuse a menu and have it
> appear where it's clicked. At the moment, they just appear where they are
> placed. As 'items' can be re-used, this isn't so much of an issue.
>
> Any help, advice or suggestions welcome!
>
> Cheers,
> Col.
>
>
> EMAIL DISCLAIMER This email message and its attachments are confidential
> and may also contain copyright or privileged material. If you are not the
> intended recipient, you may not forward the email or disclose or use the
> information contained in it. If you have received this email message in
> error, please advise the sender immediately by replying to this email and
> delete the message and any associated attachments. Any views, opinions,
> conclusions, advice or statements expressed in this email message are those
> of the individual sender and should not be relied upon as the considered
> view, opinion, conclusions, advice or statement of this company except
> where the sender expressly, and with authority, states them to be the
> considered view, opinion, conclusions, advice or statement of this company.
> Every care is taken but we recommend that you scan any attachments for
> viruses.
>


Re: Wicket mail and pdf

2013-06-13 Thread Nick Pratt
Did you modify your pom.xml to include the PDF?

In  you should have something similar to:


false
src/main/java

**


**/*.java



Is the PDF checked in to your version control system?

N

On Thu, Jun 13, 2013 at 6:48 AM, Piratenvisier
wrote:

> Martin thank you for your instantanious answers,
>
> I tried the mailtemplate example changed resource.text to resource.pdf and
> after some research concerning the error I got included
>   IPackageResourceGuard packageResourceGuard =
> getResourceSettings().**getPackageResourceGuard();
> if (packageResourceGuard instanceof
> SecurePackageResourceGuard)
> {
> SecurePackageResourceGuard guard =
> (SecurePackageResourceGuard)
> packageResourceGuard;
> guard.addPattern("+*.pdf");
> }
> in the init method of the Application.
> I get the Document :
> 
> 
>
> 
> A template based on a page
> 
>
> 
> 
> Hello, Braun
>
> You receive this email because you are subscribed for our products.
> We just released a new version of product X.
>
> 
> Please download it http://localhost:8080/**
> mailtemplate/wicket/resource/**org.apache.wicket.examples.**
> asemail.MailTemplate/resource.**pdf
> ">here!
>
> 
> Sincerely,
> The Marketing team
> 
>
> 
> and when I use the link I get the error:
>
> Problem accessing /mailtemplate/wicket/resource/**
> org.apache.wicket.examples.**asemail.MailTemplate/resource.**pdf. Reason:
>
> Unable to find resource
>
>
> What is still wrong ?
>
>
>
> Am 11.06.2013 08:45, schrieb Martin Grigorov:
>
>> Hi,
>>
>> At http://www.wicket-library.com/**wicket-examples-6.0.x/**
>> mailtemplate/?0you
>> can see an example of rendering the markup for a page, a panel and a
>> resource.
>> At 
>> http://markmail.org/message/**em4wqtsxhetu4skjyou
>>  can see how to create
>> PDF out of the produced HTML.
>>
>>
>> On Tue, Jun 11, 2013 at 9:39 AM, Piratenvisier
>> **wrote:
>>
>>  Does anybody know some example example code to start with
>>> concerning email and pdf
>>>
>>> Thanks in advance
>>> Heiner Braun
>>> Am 10.06.2013 10:34, schrieb Martin Grigorov:
>>>
>>>  Hi,

 If you use Wicket 6.7.0+ then you can use ComponentRenderer class to get
 the markup of any Wicket Page/Panel/Component.
 Then you can use the generated markup for mails and PDF creation.
 For PDF creation you can check
 https://github.com/flyingsaucerproject/flyingsaucer
 
 >.
 There is a mail in the
 users@ mail archives from the last few days by another user showing how
 to
 use FlyingSaucer's ITextRenderer.


 On Sat, Jun 8, 2013 at 8:39 PM, Piratenvisier<**hansheinrichbrau**
 n...@yahoo.de
 >>wrote:

   I wanted to integrate mail and pdf creation in my wicket application.

> Till now I manage this by sending a request to a cocoon-2.2.0
> application.
> This is a good solution but because I see no upgrade way using my
> cocoon
> application
> and integrating newer versions of spring I am looking for an
> alternative.
>
> Heiner
>
> --**--**--**
> --**-
> To unsubscribe, e-mail: users-unsubscribe@wicket.apa**che.org<
> http://apache.org**>
> http://wicket.apache.org><
> users-unsubscribe@**wicket.apache.org
> >
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>  --**
>>> --**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apa**che.org
>>> 
>>> >
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>


Re: Introduction and some questions about Wicket

2013-06-13 Thread Nick Pratt
For 3.) here are some of our experiences:

1.) If you are building from scratch and utilizing a separate
design/styling team, we found its far easier/quicker to let the CSS folks
do their thing and provide static pages, which the dev team then interprets
and builds towards.  Most devs can read HTML and understand its structure,
so converting that in to Wicket components is straight forward.  The
inverse, in our experience, is far from true.  While this approach gets you
up and running the quickest (since you can find CSS styling consultants
everywhere - at least you can here) it can leave you in a little bit of a
hole unless you intend to hire someone on to the team full time with this
knowledge.

2.) Having an employee with lots of current CSS knowledge on the dev team
is a huge help. If they also have JS knowledge, thats an even bigger bonus.

3.) If you are trying to retrofit styling to an already built application
(or where significant portions have been built), having a separate/isolated
styling team is a major drag on app development.

In our experience (and I don't intend this to be a blanket statement), most
folks with good CSS knowledge are highly resistant to understanding Java
and/or Wicket, and thus a significant impedance mismatch exists between the
two efforts. If you find a Java dev with solid CSS knowledge, hang on to
them!

Nick

On Wed, Jun 12, 2013 at 3:47 PM, Michael Pence  wrote:

> Hi guys,
>
> My name is Mike Pence. I think that I have dipped into this list a time or
> two in the past, but I am here, this time, with serious intent to use
> Wicket for a very big project -- big both in terms of how many users it
> will have, and big in its impact.
>
> I have been doing Rails for the last 7 or 8 years (spoke at Ruby and Rails
> conferences about rich web apps), after coming from a Delphi and Java
> background (and Microsoft stuff, but I leave that out).
>
> So, Rails is great but does not give me the modularity and component
> re-use in the UI that I loved in Delphi. I am making some assumptions about
> Wicket, and would appreciate your feedback on these assumptions:
>
> 1. That wicket lets you model rich and highly interactive web apps that
> can feel like desktop apps, but in the browser. (Examples?)
> 2. That building complex UI widgets -- grids, trees, custom components
> like timelines or graphs or calendars -- is comparatively painless.
> 3. That you can largely leave the markup and styling to the people who
> like doing that kind of thing (why they would, I don't get…)
>
> I would love to do Scala with Wicket but I can't raise the bar that high,
> right now. If there was a JRuby version of wicket…that would be awesome.
> JVM runtime is a big win for this, because the project definitely will have
> many, many users.
>
> Has anyone done any work with wicket focused on mobile devices?
>
> Appreciate your thoughts.
>
> Mike Pence
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: DateTextfield with DatePicker

2013-06-13 Thread francois meillet
DateTextField txtDatumVon = new DateTextField("txtDatumVon", new
PatternDateConverter("dd/MM/", false));

François



On Thu, Jun 13, 2013 at 1:03 PM,  wrote:

> Hello,
>
> in my application I have a DateTextField with a DatePicker. I declared it
> like this:
> DateTextField txtDatumVon = new DateTextField("txtDatumVon", new
> PatternDateConverter("HH:mm:ss dd.MM.",true));
>
> When I choose a day I can see in the Textfield something like this:
> HH:mm:ss 11.06.2013. How can I change this? I want this for Default time
> 00:00:00 11.06.2013(the day which was picked in the DatePicker)
>
> Can you help me please?
>
> Thank you.
>
>
> Mit freundlichen Grüßen
> Christoph Manig
> Systems Engineer
>
> T-Systems International GmbH
> Systems Integration - SC Travel, Transport & Logistics
> Hoyerswerdaer Str. 18
> 01099 Dresden
> tel.:   +49 (0) 351 / 8152 - 188
> fax:+49 (0) 351 / 8152 - 209
> email:  christoph.ma...@t-systems.com
>
>
>
>


wicket and JPA

2013-06-13 Thread Boris Brinza

Hello to all,
I have some fundamental issues with integration of jpa into wicket.
I develop web application using wicket 6 and JPA (eclipselink). Maybe 
next question is more JPA oriented, but nevertheless:


Lets say i have
class BaseDetailPage extends WebPage {
protected  dbEntity;

}

where dbEntity is instance of jpa persisted object.
BaseDetail page contains form for editing db entity using 
CompoundPropertyModel.


After i open detail page, entity is read from DB and page is displayed 
(if edit button is pressed) or i create new instance of object (if add 
button is pressed).


After submit, if i want to add new record, everything is clear, i call 
beginTX(), entityManager.persist(dbEntity), commitTX().


But what about updating existing record?

Every example for JPA shows some basic code like this:
beginTX()
dbObject.setXXX();
dbObject.setYYY();
commitTX()


But how to integrate this into wicket form using compound property model?
There is no such code for setting properties of db object, and jpa does 
not have anything like entityManager.update().


Now i use hack (by my opinion it';s a hack)

beginTX()
entityManaget.detach(dbObject);
entityManager.merge(dbObject)
commitTX()

but i am not sure, if it's right solution (or i'm almost sure it's not 
right attitude)


Is there any tutorial how to integrate these frameworks, or some simple 
opensource project to check how it's solved?


Thanks for any advice,
Boris




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



DateTextfield with DatePicker

2013-06-13 Thread Christoph.Manig
Hello,

in my application I have a DateTextField with a DatePicker. I declared it like 
this:
DateTextField txtDatumVon = new DateTextField("txtDatumVon", new 
PatternDateConverter("HH:mm:ss dd.MM.",true));

When I choose a day I can see in the Textfield something like this: HH:mm:ss 
11.06.2013. How can I change this? I want this for Default time 00:00:00 
11.06.2013(the day which was picked in the DatePicker)

Can you help me please?

Thank you.


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport & Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com





Re: Wicket mail and pdf

2013-06-13 Thread Martin Grigorov
Hi,


On Thu, Jun 13, 2013 at 1:48 PM, Piratenvisier
wrote:

> Martin thank you for your instantanious answers,
>
> I tried the mailtemplate example changed resource.text to resource.pdf and
> after some research concerning the error I got included
>   IPackageResourceGuard packageResourceGuard =
> getResourceSettings().**getPackageResourceGuard();
> if (packageResourceGuard instanceof
> SecurePackageResourceGuard)
> {
> SecurePackageResourceGuard guard =
> (SecurePackageResourceGuard)
> packageResourceGuard;
> guard.addPattern("+*.pdf");
> }
> in the init method of the Application.
> I get the Document :
> 
> 
>
> 
> A template based on a page
> 
>
> 
> 
> Hello, Braun
>
> You receive this email because you are subscribed for our products.
> We just released a new version of product X.
>
> 
> Please download it http://localhost:8080/**
> mailtemplate/wicket/resource/**org.apache.wicket.examples.**
> asemail.MailTemplate/resource.**pdf
> ">here!
>
> 
> Sincerely,
> The Marketing team
> 
>
> 
> and when I use the link I get the error:
>
> Problem accessing /mailtemplate/wicket/resource/**
> org.apache.wicket.examples.**asemail.MailTemplate/resource.**pdf. Reason:
>
> Unable to find resource
>
>
> What is still wrong ?
>

I guess resource.pdf is not copied in target/classes/ folder by Maven.
Check that resource.pdf is next to MailTemplate.class


>
>
>
> Am 11.06.2013 08:45, schrieb Martin Grigorov:
>
>> Hi,
>>
>> At http://www.wicket-library.com/**wicket-examples-6.0.x/**
>> mailtemplate/?0you
>> can see an example of rendering the markup for a page, a panel and a
>> resource.
>> At 
>> http://markmail.org/message/**em4wqtsxhetu4skjyou
>>  can see how to create
>> PDF out of the produced HTML.
>>
>>
>> On Tue, Jun 11, 2013 at 9:39 AM, Piratenvisier
>> **wrote:
>>
>>  Does anybody know some example example code to start with
>>> concerning email and pdf
>>>
>>> Thanks in advance
>>> Heiner Braun
>>> Am 10.06.2013 10:34, schrieb Martin Grigorov:
>>>
>>>  Hi,

 If you use Wicket 6.7.0+ then you can use ComponentRenderer class to get
 the markup of any Wicket Page/Panel/Component.
 Then you can use the generated markup for mails and PDF creation.
 For PDF creation you can check
 https://github.com/flyingsaucerproject/flyingsaucer
 
 >.

 There is a mail in the
 users@ mail archives from the last few days by another user showing how
 to
 use FlyingSaucer's ITextRenderer.


 On Sat, Jun 8, 2013 at 8:39 PM, Piratenvisier<**hansheinrichbrau**
 n...@yahoo.de
 >>wrote:


   I wanted to integrate mail and pdf creation in my wicket application.

> Till now I manage this by sending a request to a cocoon-2.2.0
> application.
> This is a good solution but because I see no upgrade way using my
> cocoon
> application
> and integrating newer versions of spring I am looking for an
> alternative.
>
> Heiner
>
> --**--**--**
> --**-
> To unsubscribe, e-mail: users-unsubscribe@wicket.apa**che.org<
> http://apache.org**>
> http://wicket.apache.org><
> users-unsubscribe@**wicket.apache.org
> >
>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>  --**
>>> --**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apa**che.org
>>> 
>>> >
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>


Re: Wicket mail and pdf

2013-06-13 Thread Piratenvisier

Martin thank you for your instantanious answers,

I tried the mailtemplate example changed resource.text to resource.pdf and
after some research concerning the error I got included
  IPackageResourceGuard packageResourceGuard =
getResourceSettings().getPackageResourceGuard();
if (packageResourceGuard instanceof 
SecurePackageResourceGuard)

{
SecurePackageResourceGuard guard = 
(SecurePackageResourceGuard)

packageResourceGuard;
guard.addPattern("+*.pdf");
}
in the init method of the Application.
I get the Document :




A template based on a page




Hello, Braun

You receive this email because you are subscribed for our products.
We just released a new version of product X.


Please download it href="http://localhost:8080/mailtemplate/wicket/resource/org.apache.wicket.examples.asemail.MailTemplate/resource.pdf";>here!



Sincerely,
The Marketing team



and when I use the link I get the error:

Problem accessing 
/mailtemplate/wicket/resource/org.apache.wicket.examples.asemail.MailTemplate/resource.pdf. 
Reason:


Unable to find resource


What is still wrong ?



Am 11.06.2013 08:45, schrieb Martin Grigorov:

Hi,

At http://www.wicket-library.com/wicket-examples-6.0.x/mailtemplate/?0 you
can see an example of rendering the markup for a page, a panel and a
resource.
At http://markmail.org/message/em4wqtsxhetu4skj you can see how to create
PDF out of the produced HTML.


On Tue, Jun 11, 2013 at 9:39 AM, Piratenvisier
wrote:


Does anybody know some example example code to start with
concerning email and pdf

Thanks in advance
Heiner Braun
Am 10.06.2013 10:34, schrieb Martin Grigorov:


Hi,

If you use Wicket 6.7.0+ then you can use ComponentRenderer class to get
the markup of any Wicket Page/Panel/Component.
Then you can use the generated markup for mails and PDF creation.
For PDF creation you can check
https://github.com/**flyingsaucerproject/**flyingsaucer.
There is a mail in the
users@ mail archives from the last few days by another user showing how
to
use FlyingSaucer's ITextRenderer.


On Sat, Jun 8, 2013 at 8:39 PM, Piratenvisier>wrote:

  I wanted to integrate mail and pdf creation in my wicket application.

Till now I manage this by sending a request to a cocoon-2.2.0
application.
This is a good solution but because I see no upgrade way using my cocoon
application
and integrating newer versions of spring I am looking for an alternative.

Heiner

--**
--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.org

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




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






Re: DateConverter getFormat

2013-06-13 Thread Martin Grigorov
DateLabel has various static #forXyz() factory methods.
Use any of them.


On Thu, Jun 13, 2013 at 12:58 PM,  wrote:

> Hello,
>
> thank you for your help. But this wouldn#t work because the return type of
> getFormat in my example is DateTimeFormatter from joda. Is there another
> example? Why I have to override this method?
>
>
> Mit freundlichen Grüßen
> Christoph Manig
> Systems Engineer
>
> T-Systems International GmbH
> Systems Integration - SC Travel, Transport & Logistics
> Hoyerswerdaer Str. 18
> 01099 Dresden
> tel.:   +49 (0) 351 / 8152 - 188
> fax:+49 (0) 351 / 8152 – 209
> email:  christoph.ma...@t-systems.com
>
> -Ursprüngliche Nachricht-
> Von: Martin Grigorov [mailto:mgrigo...@apache.org]
> Gesendet: Donnerstag, 13. Juni 2013 11:41
> An: users@wicket.apache.org
> Betreff: Re: DateConverter getFormat
>
> Hi,
>
> Here is one example:
>
> https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java?source=cc#L128
>
>
> On Thu, Jun 13, 2013 at 12:28 PM,  wrote:
>
> > Hello,
> >
> > In my application the server's timezone could be different to the
> > client's timezone. So in my BasicPage I get the client's timezone with
> this call:
> > ((WebClientInfo)getSession().getClientInfo()).getProperties().getTimeZ
> > one();
> >
> > So every DateTextField and DateLabel should convert the date between
> > client and server right? Now I want to add a DateLabel. The
> > constructor wants a Converter so I add this:
> >
> > DateLabel datelabel = new DateLabel("date",new
> > PropertyModel(model,"eventTimestamp"),new DateConverter(true) {
> > @Override
> > public String getDatePattern(Locale locale) {
> > return "dd.MM. HH:mm:ss";
> > }
> >
> > @Override
> > protected DateTimeFormatter getFormat(Locale locale) {
> > return null;  //To change body of implemented
> > methods use File | Settings | File Templates.
> > }
> >
> > });
> > I don't now how to override the getFormat-method. Can you help me please?
> >
> > Thanks
> >
> > Mit freundlichen Grüßen
> > Christoph Manig
> >
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


AW: DateConverter getFormat

2013-06-13 Thread Christoph.Manig
Hello,

thank you for your help. But this wouldn#t work because the return type of 
getFormat in my example is DateTimeFormatter from joda. Is there another 
example? Why I have to override this method?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport & Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org] 
Gesendet: Donnerstag, 13. Juni 2013 11:41
An: users@wicket.apache.org
Betreff: Re: DateConverter getFormat

Hi,

Here is one example:
https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java?source=cc#L128


On Thu, Jun 13, 2013 at 12:28 PM,  wrote:

> Hello,
>
> In my application the server's timezone could be different to the 
> client's timezone. So in my BasicPage I get the client's timezone with this 
> call:
> ((WebClientInfo)getSession().getClientInfo()).getProperties().getTimeZ
> one();
>
> So every DateTextField and DateLabel should convert the date between 
> client and server right? Now I want to add a DateLabel. The 
> constructor wants a Converter so I add this:
>
> DateLabel datelabel = new DateLabel("date",new 
> PropertyModel(model,"eventTimestamp"),new DateConverter(true) {
> @Override
> public String getDatePattern(Locale locale) {
> return "dd.MM. HH:mm:ss";
> }
>
> @Override
> protected DateTimeFormatter getFormat(Locale locale) {
> return null;  //To change body of implemented 
> methods use File | Settings | File Templates.
> }
>
> });
> I don't now how to override the getFormat-method. Can you help me please?
>
> Thanks
>
> Mit freundlichen Grüßen
> Christoph Manig
>
>
>

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



Re: DateConverter getFormat

2013-06-13 Thread Martin Grigorov
Hi,

Here is one example:
https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java?source=cc#L128


On Thu, Jun 13, 2013 at 12:28 PM,  wrote:

> Hello,
>
> In my application the server's timezone could be different to the client's
> timezone. So in my BasicPage I get the client's timezone with this call:
> ((WebClientInfo)getSession().getClientInfo()).getProperties().getTimeZone();
>
> So every DateTextField and DateLabel should convert the date between
> client and server right? Now I want to add a DateLabel. The constructor
> wants a Converter so I add this:
>
> DateLabel datelabel = new DateLabel("date",new
> PropertyModel(model,"eventTimestamp"),new DateConverter(true) {
> @Override
> public String getDatePattern(Locale locale) {
> return "dd.MM. HH:mm:ss";
> }
>
> @Override
> protected DateTimeFormatter getFormat(Locale locale) {
> return null;  //To change body of implemented methods
> use File | Settings | File Templates.
> }
>
> });
> I don't now how to override the getFormat-method. Can you help me please?
>
> Thanks
>
> Mit freundlichen Grüßen
> Christoph Manig
>
>
>


DateConverter getFormat

2013-06-13 Thread Christoph.Manig
Hello,

In my application the server's timezone could be different to the client's 
timezone. So in my BasicPage I get the client's timezone with this call: 
((WebClientInfo)getSession().getClientInfo()).getProperties().getTimeZone();

So every DateTextField and DateLabel should convert the date between client and 
server right? Now I want to add a DateLabel. The constructor wants a Converter 
so I add this:

DateLabel datelabel = new DateLabel("date",new 
PropertyModel(model,"eventTimestamp"),new DateConverter(true) {
@Override
public String getDatePattern(Locale locale) {
return "dd.MM. HH:mm:ss";
}

@Override
protected DateTimeFormatter getFormat(Locale locale) {
return null;  //To change body of implemented methods use 
File | Settings | File Templates.
}

});
I don't now how to override the getFormat-method. Can you help me please?

Thanks

Mit freundlichen Grüßen
Christoph Manig




Re: Introduction and some questions about Wicket

2013-06-13 Thread Martin Grigorov
Hi Mike,

Welcome to Wicket community!


On Wed, Jun 12, 2013 at 10:47 PM, Michael Pence wrote:

> Hi guys,
>
> My name is Mike Pence. I think that I have dipped into this list a time or
> two in the past, but I am here, this time, with serious intent to use
> Wicket for a very big project -- big both in terms of how many users it
> will have, and big in its impact.
>
> I have been doing Rails for the last 7 or 8 years (spoke at Ruby and Rails
> conferences about rich web apps), after coming from a Delphi and Java
> background (and Microsoft stuff, but I leave that out).
>
> So, Rails is great but does not give me the modularity and component
> re-use in the UI that I loved in Delphi. I am making some assumptions about
> Wicket, and would appreciate your feedback on these assumptions:
>
> 1. That wicket lets you model rich and highly interactive web apps that
> can feel like desktop apps, but in the browser. (Examples?)
>

At http://builtwithwicket.tumblr.com you can see applications built with
Wicket.


> 2. That building complex UI widgets -- grids, trees, custom components
> like timelines or graphs or calendars -- is comparatively painless.
>

http://wb.agilecoders.de/demo/ - integration with many Twitter Bootstrap
widgets
http://www.7thweb.net/wicket-jquery-ui/ - demo page for Wicket components
integrating with many JQuery UI widgets

You can create integration for any UI widget out there.


> 3. That you can largely leave the markup and styling to the people who
> like doing that kind of thing (why they would, I don't get…)
>

Largely - yes. But still you have to help each other.


>
> I would love to do Scala with Wicket but I can't raise the bar that high,
> right now. If there was a JRuby version of wicket…that would be awesome.
> JVM runtime is a big win for this, because the project definitely will have
> many, many users.
>

Switching to Scala is not that hard if you try to write object oriented
code. It is almost like Java. Then little by little you can start using the
more advanced stuff from the language.


>
> Has anyone done any work with wicket focused on mobile devices?
>
> Appreciate your thoughts.
>
> Mike Pence
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>