Re: Wicket as a RESTful Client

2012-01-26 Thread Rahman USTA
Can't i do this bu using ;

public class RestfulPage extends WebPage{
@Override
protected void configureResponse(WebResponse response) {
   super.configureResponse(response);//To change body of overridden
methods use File | Settings | File Templates.
   response.sendRedirect(
http://localhost:8080/KodcuComRESTful/kodcuRS/yazilar;);
   response.addHeader(accept,application/json);
}
}

Maybe it is not probable make it in Wicket's own library. I think wicket
can do this. For example i couldnt find change the medhod state to POST
or  anything.

2012/1/26 Martin Grigorov mgrigo...@apache.org

 This is a strange architecture but ...
 You can use Apache HttpClient, or URL(http://...;).openConnection()
 or Ning's AsyncHttpClient to request the REST service.
 With these you can get/update/delete the resources (XML, JSON, ...),
 after that you have to decide how to show it.

 On Thu, Jan 26, 2012 at 1:29 PM, Rahman USTA rahman.usta...@gmail.com
 wrote:
  Hi, i' ve built a RESTful application with JAX-RS, then i normally access
  the web service via CURL in Command Line.
 
  Example codes are such as ;
  ---
 
  @rem XML representation of all the books
  @rem curl -X GET -H Accept: application/xml
  http://localhost:8080/Rest/rs/items/books
 
  @rem JSon representation of all the books
  @rem curl -X GET -H Accept: application/json
  http://localhost:8080/Rest/rs/items/books
 
  @rem Create a book
  @rem curl -X POST --data-binary { \title\:\H3G3\,
 \price\:\24.0\,
  \description\:\3rd Scifi IT book\, \illustrations\:\false\,
  \isbn\:\134-234\, \nbOfPage\:\241\ } -H Content-Type:
  application/json -H Accept: application/json
  http://localhost:8080/Rest/rs/items/book
  
 
  How can i request to web services like above in Wicket with its own
 library.
 
 
 
 
  --
  Rahman USTA
  0-(531)-922-28-05
  www.kodcu.com



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




-- 
Rahman USTA
0-(531)-922-28-05
www.kodcu.com


response.renderJavaScriptReference immediately after head tag

2012-01-16 Thread Rahman USTA
Hi, im using on a page that contains ;

@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);


response.renderCSSReference(css/ui-lightness/jquery-ui-1.8.17.custom.css);
response.renderJavaScriptReference(js/jquery-1.7.1.min.js);

response.renderJavaScriptReference(js/jquery-ui-1.8.17.custom.min.js);
}

The html file's head/head block has some of javascript function, above
function adds references to html after this javascript function, i want to
be added references immediately after head tag.

-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


Re: Wicket on Google App Engine

2012-01-07 Thread Rahman USTA
Hi Daniel, if you run mvn war:inplace command in projects' directory, you
can copy pom.xml dependencies to web-inf/lib automaticly.

2012/1/6 Rahman USTA rahman.usta...@gmail.com

 Thanks a lot Daniel, it's ok now.


 2012/1/6 Rahman USTA rahman.usta...@gmail.com

 Now, http://chopapp.com/#7pmdaqmd


 2012/1/6 Rahman USTA rahman.usta...@gmail.com

 i did it in pom.xml, why must i add jars to lib manually? cant i do it
 with maven?


 2012/1/6 Daniel Watrous daniel.watr...@gmail.com

 This time I think you didn't include the gae-initializer jar in your
 WEB-INF/lib directory.

 On Fri, Jan 6, 2012 at 8:50 AM, Rahman USTA rahman.usta...@gmail.com
 wrote:
  i handled them, but now server is giving me internal error,
  http://chopapp.com/#8lc105ni
 
  2012/1/6 Daniel Watrous daniel.watr...@gmail.com
 
  Rahman,
 
  From the error that you show in your link it appears that your
  application can't find the WicketFilter class.
 
  Are you sure that you copied the three wicket jar files (core, util,
  request) to your WEB-INF/lib folder?
 
  Daniel
 
  On Fri, Jan 6, 2012 at 7:28 AM, Rahman USTA 
 rahman.usta...@gmail.com
  wrote:
   i did Daniel's way, but when run the application,
   http://chopapp.com/#1gyxqdm6
  
   2012/1/6 Hielke Hoeve hielke.ho...@topicus.nl
  
   Hey Daniel,
  
   Glad to hear you got it working as well. I have some apps on
 google app
   engine  as well. Tried all the tutorials and 'useful' maven
 plugins but
  all
   just didn't do the trick for me.  I now use maven's resources
 plugin to
   copy the resources from the maven repository to the war/lib
 folder.
  Which
   allows me to update/add dependencies in the pom.xml, run maven
 and add
  the
   dependencies in eclipse manually.
  
   I have not found a maven plugin which just adds the google sdk as
   dependency for me so I don't have to mess around in eclipse
 everytime I
  run
   maven. Did you solve that?
  
   Hielke
  
   -Original Message-
   From: Daniel Watrous [mailto:daniel.watr...@gmail.com]
   Sent: donderdag 5 januari 2012 19:35
   To: users@wicket.apache.org
   Subject: Re: Wicket on Google App Engine
  
   Thanks for all your help. I've just posted the steps required to
 get
   current versions of wicket and gae to work together.
  
  
  
 
 http://software.danielwatrous.com/software-engineering/wordpress-plugin-licensing-wicket-on-google-app-engine
  
   Daniel
  
   On Thu, Jan 5, 2012 at 12:46 AM, Ernesto Reinaldo Barreiro 
   ernesto.reina...@jweekend.com wrote:
I think the class to use is
   
   
 
 http://code.google.com/p/kickat26/source/browse/trunk/src/de/kickat26/
ui/wicket/GAEModificationWatcher.java
   
   
   
On Thu, Jan 5, 2012 at 8:31 AM, Ernesto Reinaldo Barreiro 
ernesto.reina...@jweekend.com wrote:
   
You could use a modified version of resource watcher that does
 not
use threads and modify request cycle so that watcher is
 executed
before each request cycle. I remember there was some blog
 somewhere
explaining this technique... Maybe it was this...
   
   
   
 
 http://stronglytypedblog.blogspot.com/2009/07/wicket-spring-jdo-on-go
ogle-app-engine.html
   
   
   
On Wed, Jan 4, 2012 at 11:18 PM, Daniel Watrous 
   daniel.watr...@gmail.comwrote:
   
I tried putting in this:
   
 getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
   
But the resource still doesn't update without restarting the
 google
app engine environment. I just tried it by running Start and
 that no
longer updates automatically either.
   
In the process of trying to make it work with GAE, I changed
 the
pom.xml to have these lines in the build section
   directorysrc/main/webapp/WEB-INF/directory
   
   
  outputDirectorysrc/main/webapp/WEB-INF/classes/outputDirectory
   
That means files are no longer placed in the target
 directory, but
in the WEB-INF folder. Could this affect it? Have I missed
 another
setting somewhere that relates to changing where the compiled
classes are placed?
   
Daniel
   
On Wed, Jan 4, 2012 at 3:01 PM, Sven Meier s...@meiers.net
 wrote:
 Read here:


 https://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment

 The relevant setting is:
getResourceSettings().setResourcePollFrequency(duration);

 Sven


 On 01/04/2012 10:31 PM, Daniel Watrous wrote:

 Great. I now have it working with either the jar download
 or the
 dependency in the pom.xml file. In the dependency xml
 snippet I
 didn't realize that I needed to manually provide the
 version, but
 after I did then it worked fine.

 Whenever I update a class and save it in Eclipse, that
 class is
 updated in the running server and I don't have to restart
 to see
 the changes. This is great.

 However, when I change an HTML page, it's not updated in
 the
 running server, so I have to restart everything. I know
 that when
 I run

Re: Wicket on Google App Engine

2012-01-06 Thread Rahman USTA
  
  
 -
   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
 
 
 
 
  --
  Regards - Ernesto Reinaldo Barreiro
 
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.com/
 
 
 
 
  --
  Regards - Ernesto Reinaldo Barreiro
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.com/

 -
 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




-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


Re: Wicket on Google App Engine

2012-01-06 Thread Rahman USTA
i handled them, but now server is giving me internal error,
http://chopapp.com/#8lc105ni

2012/1/6 Daniel Watrous daniel.watr...@gmail.com

 Rahman,

 From the error that you show in your link it appears that your
 application can't find the WicketFilter class.

 Are you sure that you copied the three wicket jar files (core, util,
 request) to your WEB-INF/lib folder?

 Daniel

 On Fri, Jan 6, 2012 at 7:28 AM, Rahman USTA rahman.usta...@gmail.com
 wrote:
  i did Daniel's way, but when run the application,
  http://chopapp.com/#1gyxqdm6
 
  2012/1/6 Hielke Hoeve hielke.ho...@topicus.nl
 
  Hey Daniel,
 
  Glad to hear you got it working as well. I have some apps on google app
  engine  as well. Tried all the tutorials and 'useful' maven plugins but
 all
  just didn't do the trick for me.  I now use maven's resources plugin to
  copy the resources from the maven repository to the war/lib folder.
 Which
  allows me to update/add dependencies in the pom.xml, run maven and add
 the
  dependencies in eclipse manually.
 
  I have not found a maven plugin which just adds the google sdk as
  dependency for me so I don't have to mess around in eclipse everytime I
 run
  maven. Did you solve that?
 
  Hielke
 
  -Original Message-
  From: Daniel Watrous [mailto:daniel.watr...@gmail.com]
  Sent: donderdag 5 januari 2012 19:35
  To: users@wicket.apache.org
  Subject: Re: Wicket on Google App Engine
 
  Thanks for all your help. I've just posted the steps required to get
  current versions of wicket and gae to work together.
 
 
 
 http://software.danielwatrous.com/software-engineering/wordpress-plugin-licensing-wicket-on-google-app-engine
 
  Daniel
 
  On Thu, Jan 5, 2012 at 12:46 AM, Ernesto Reinaldo Barreiro 
  ernesto.reina...@jweekend.com wrote:
   I think the class to use is
  
  
 http://code.google.com/p/kickat26/source/browse/trunk/src/de/kickat26/
   ui/wicket/GAEModificationWatcher.java
  
  
  
   On Thu, Jan 5, 2012 at 8:31 AM, Ernesto Reinaldo Barreiro 
   ernesto.reina...@jweekend.com wrote:
  
   You could use a modified version of resource watcher that does not
   use threads and modify request cycle so that watcher is executed
   before each request cycle. I remember there was some blog somewhere
   explaining this technique... Maybe it was this...
  
  
  
 http://stronglytypedblog.blogspot.com/2009/07/wicket-spring-jdo-on-go
   ogle-app-engine.html
  
  
  
   On Wed, Jan 4, 2012 at 11:18 PM, Daniel Watrous 
  daniel.watr...@gmail.comwrote:
  
   I tried putting in this:
   getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
  
   But the resource still doesn't update without restarting the google
   app engine environment. I just tried it by running Start and that no
   longer updates automatically either.
  
   In the process of trying to make it work with GAE, I changed the
   pom.xml to have these lines in the build section
  directorysrc/main/webapp/WEB-INF/directory
  
outputDirectorysrc/main/webapp/WEB-INF/classes/outputDirectory
  
   That means files are no longer placed in the target directory, but
   in the WEB-INF folder. Could this affect it? Have I missed another
   setting somewhere that relates to changing where the compiled
   classes are placed?
  
   Daniel
  
   On Wed, Jan 4, 2012 at 3:01 PM, Sven Meier s...@meiers.net wrote:
Read here:
   
   https://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment
   
The relevant setting is:
   getResourceSettings().setResourcePollFrequency(duration);
   
Sven
   
   
On 01/04/2012 10:31 PM, Daniel Watrous wrote:
   
Great. I now have it working with either the jar download or the
dependency in the pom.xml file. In the dependency xml snippet I
didn't realize that I needed to manually provide the version, but
after I did then it worked fine.
   
Whenever I update a class and save it in Eclipse, that class is
updated in the running server and I don't have to restart to see
the changes. This is great.
   
However, when I change an HTML page, it's not updated in the
running server, so I have to restart everything. I know that when
I run a quickstart app directly (using the Start class) that
updates to the HTML are updated without requiring a restart.
   
Do you know how to make it so the HTML files are updated in the
live server?
   
Thanks so much.
   
Daniel
   
On Wed, Jan 4, 2012 at 1:38 PM, Sven Meiers...@meiers.net
  wrote:
   
With maven it's very easy, just add the dependency to your pom
as suggested and forget about it.
   
Alternatively you can download the jar form maven central
manually and add it to your project:
   
   
   
   
  
 http://repo2.maven.org/maven2/org/wicketstuff/wicketstuff-gae-initia
   lizer/
   
Hope this helps
Sven
   
   
On 01/04/2012 09:28 PM, Daniel Watrous wrote:
   
I'm still not sure how to create the jar file. No one is
commenting

Re: Wicket on Google App Engine

2012-01-06 Thread Rahman USTA
Now, http://chopapp.com/#7pmdaqmd

2012/1/6 Rahman USTA rahman.usta...@gmail.com

 i did it in pom.xml, why must i add jars to lib manually? cant i do it
 with maven?


 2012/1/6 Daniel Watrous daniel.watr...@gmail.com

 This time I think you didn't include the gae-initializer jar in your
 WEB-INF/lib directory.

 On Fri, Jan 6, 2012 at 8:50 AM, Rahman USTA rahman.usta...@gmail.com
 wrote:
  i handled them, but now server is giving me internal error,
  http://chopapp.com/#8lc105ni
 
  2012/1/6 Daniel Watrous daniel.watr...@gmail.com
 
  Rahman,
 
  From the error that you show in your link it appears that your
  application can't find the WicketFilter class.
 
  Are you sure that you copied the three wicket jar files (core, util,
  request) to your WEB-INF/lib folder?
 
  Daniel
 
  On Fri, Jan 6, 2012 at 7:28 AM, Rahman USTA rahman.usta...@gmail.com
  wrote:
   i did Daniel's way, but when run the application,
   http://chopapp.com/#1gyxqdm6
  
   2012/1/6 Hielke Hoeve hielke.ho...@topicus.nl
  
   Hey Daniel,
  
   Glad to hear you got it working as well. I have some apps on google
 app
   engine  as well. Tried all the tutorials and 'useful' maven plugins
 but
  all
   just didn't do the trick for me.  I now use maven's resources
 plugin to
   copy the resources from the maven repository to the war/lib folder.
  Which
   allows me to update/add dependencies in the pom.xml, run maven and
 add
  the
   dependencies in eclipse manually.
  
   I have not found a maven plugin which just adds the google sdk as
   dependency for me so I don't have to mess around in eclipse
 everytime I
  run
   maven. Did you solve that?
  
   Hielke
  
   -Original Message-
   From: Daniel Watrous [mailto:daniel.watr...@gmail.com]
   Sent: donderdag 5 januari 2012 19:35
   To: users@wicket.apache.org
   Subject: Re: Wicket on Google App Engine
  
   Thanks for all your help. I've just posted the steps required to get
   current versions of wicket and gae to work together.
  
  
  
 
 http://software.danielwatrous.com/software-engineering/wordpress-plugin-licensing-wicket-on-google-app-engine
  
   Daniel
  
   On Thu, Jan 5, 2012 at 12:46 AM, Ernesto Reinaldo Barreiro 
   ernesto.reina...@jweekend.com wrote:
I think the class to use is
   
   
  http://code.google.com/p/kickat26/source/browse/trunk/src/de/kickat26/
ui/wicket/GAEModificationWatcher.java
   
   
   
On Thu, Jan 5, 2012 at 8:31 AM, Ernesto Reinaldo Barreiro 
ernesto.reina...@jweekend.com wrote:
   
You could use a modified version of resource watcher that does
 not
use threads and modify request cycle so that watcher is executed
before each request cycle. I remember there was some blog
 somewhere
explaining this technique... Maybe it was this...
   
   
   
  http://stronglytypedblog.blogspot.com/2009/07/wicket-spring-jdo-on-go
ogle-app-engine.html
   
   
   
On Wed, Jan 4, 2012 at 11:18 PM, Daniel Watrous 
   daniel.watr...@gmail.comwrote:
   
I tried putting in this:
   
 getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
   
But the resource still doesn't update without restarting the
 google
app engine environment. I just tried it by running Start and
 that no
longer updates automatically either.
   
In the process of trying to make it work with GAE, I changed the
pom.xml to have these lines in the build section
   directorysrc/main/webapp/WEB-INF/directory
   
   
  outputDirectorysrc/main/webapp/WEB-INF/classes/outputDirectory
   
That means files are no longer placed in the target directory,
 but
in the WEB-INF folder. Could this affect it? Have I missed
 another
setting somewhere that relates to changing where the compiled
classes are placed?
   
Daniel
   
On Wed, Jan 4, 2012 at 3:01 PM, Sven Meier s...@meiers.net
 wrote:
 Read here:

https://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment

 The relevant setting is:
getResourceSettings().setResourcePollFrequency(duration);

 Sven


 On 01/04/2012 10:31 PM, Daniel Watrous wrote:

 Great. I now have it working with either the jar download or
 the
 dependency in the pom.xml file. In the dependency xml
 snippet I
 didn't realize that I needed to manually provide the
 version, but
 after I did then it worked fine.

 Whenever I update a class and save it in Eclipse, that class
 is
 updated in the running server and I don't have to restart to
 see
 the changes. This is great.

 However, when I change an HTML page, it's not updated in the
 running server, so I have to restart everything. I know that
 when
 I run a quickstart app directly (using the Start class) that
 updates to the HTML are updated without requiring a restart.

 Do you know how to make it so the HTML files are updated in
 the
 live server?

 Thanks so much.

 Daniel

 On Wed

Re: Wicket on Google App Engine

2012-01-06 Thread Rahman USTA
Thanks a lot Daniel, it's ok now.

2012/1/6 Rahman USTA rahman.usta...@gmail.com

 Now, http://chopapp.com/#7pmdaqmd


 2012/1/6 Rahman USTA rahman.usta...@gmail.com

 i did it in pom.xml, why must i add jars to lib manually? cant i do it
 with maven?


 2012/1/6 Daniel Watrous daniel.watr...@gmail.com

 This time I think you didn't include the gae-initializer jar in your
 WEB-INF/lib directory.

 On Fri, Jan 6, 2012 at 8:50 AM, Rahman USTA rahman.usta...@gmail.com
 wrote:
  i handled them, but now server is giving me internal error,
  http://chopapp.com/#8lc105ni
 
  2012/1/6 Daniel Watrous daniel.watr...@gmail.com
 
  Rahman,
 
  From the error that you show in your link it appears that your
  application can't find the WicketFilter class.
 
  Are you sure that you copied the three wicket jar files (core, util,
  request) to your WEB-INF/lib folder?
 
  Daniel
 
  On Fri, Jan 6, 2012 at 7:28 AM, Rahman USTA rahman.usta...@gmail.com
 
  wrote:
   i did Daniel's way, but when run the application,
   http://chopapp.com/#1gyxqdm6
  
   2012/1/6 Hielke Hoeve hielke.ho...@topicus.nl
  
   Hey Daniel,
  
   Glad to hear you got it working as well. I have some apps on
 google app
   engine  as well. Tried all the tutorials and 'useful' maven
 plugins but
  all
   just didn't do the trick for me.  I now use maven's resources
 plugin to
   copy the resources from the maven repository to the war/lib folder.
  Which
   allows me to update/add dependencies in the pom.xml, run maven and
 add
  the
   dependencies in eclipse manually.
  
   I have not found a maven plugin which just adds the google sdk as
   dependency for me so I don't have to mess around in eclipse
 everytime I
  run
   maven. Did you solve that?
  
   Hielke
  
   -Original Message-
   From: Daniel Watrous [mailto:daniel.watr...@gmail.com]
   Sent: donderdag 5 januari 2012 19:35
   To: users@wicket.apache.org
   Subject: Re: Wicket on Google App Engine
  
   Thanks for all your help. I've just posted the steps required to
 get
   current versions of wicket and gae to work together.
  
  
  
 
 http://software.danielwatrous.com/software-engineering/wordpress-plugin-licensing-wicket-on-google-app-engine
  
   Daniel
  
   On Thu, Jan 5, 2012 at 12:46 AM, Ernesto Reinaldo Barreiro 
   ernesto.reina...@jweekend.com wrote:
I think the class to use is
   
   
 
 http://code.google.com/p/kickat26/source/browse/trunk/src/de/kickat26/
ui/wicket/GAEModificationWatcher.java
   
   
   
On Thu, Jan 5, 2012 at 8:31 AM, Ernesto Reinaldo Barreiro 
ernesto.reina...@jweekend.com wrote:
   
You could use a modified version of resource watcher that does
 not
use threads and modify request cycle so that watcher is executed
before each request cycle. I remember there was some blog
 somewhere
explaining this technique... Maybe it was this...
   
   
   
  http://stronglytypedblog.blogspot.com/2009/07/wicket-spring-jdo-on-go
ogle-app-engine.html
   
   
   
On Wed, Jan 4, 2012 at 11:18 PM, Daniel Watrous 
   daniel.watr...@gmail.comwrote:
   
I tried putting in this:
   
 getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
   
But the resource still doesn't update without restarting the
 google
app engine environment. I just tried it by running Start and
 that no
longer updates automatically either.
   
In the process of trying to make it work with GAE, I changed
 the
pom.xml to have these lines in the build section
   directorysrc/main/webapp/WEB-INF/directory
   
   
  outputDirectorysrc/main/webapp/WEB-INF/classes/outputDirectory
   
That means files are no longer placed in the target directory,
 but
in the WEB-INF folder. Could this affect it? Have I missed
 another
setting somewhere that relates to changing where the compiled
classes are placed?
   
Daniel
   
On Wed, Jan 4, 2012 at 3:01 PM, Sven Meier s...@meiers.net
 wrote:
 Read here:

https://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment

 The relevant setting is:
getResourceSettings().setResourcePollFrequency(duration);

 Sven


 On 01/04/2012 10:31 PM, Daniel Watrous wrote:

 Great. I now have it working with either the jar download
 or the
 dependency in the pom.xml file. In the dependency xml
 snippet I
 didn't realize that I needed to manually provide the
 version, but
 after I did then it worked fine.

 Whenever I update a class and save it in Eclipse, that
 class is
 updated in the running server and I don't have to restart
 to see
 the changes. This is great.

 However, when I change an HTML page, it's not updated in the
 running server, so I have to restart everything. I know
 that when
 I run a quickstart app directly (using the Start class) that
 updates to the HTML are updated without requiring a restart.

 Do you know how to make it so the HTML files

It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems.

2012-01-04 Thread Rahman USTA
Hi, i have a MySession.

form.add(new TextField(name,new PropertyModel(((MySession)getSession()),
user.name)));

I have a User user; in MySession, then initialized in constructor.

my Goal is to save name and surname user's own session. i did it above, but
warning ide me so that ;

*WARN  - AbstractPropertyModel  - It is not a good idea to reference
the Session instance in models directly as it may lead to serialization
problems. If you need to access a property of the session via the model use
the page instance as the model object and 'session.attribute' as the path.*

How can i handle this normally.




-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


Re: It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems.

2012-01-04 Thread Rahman USTA
Second answer is ok, very thanks.

2012/1/4 Wilhelmsen Tor Iver toriv...@arrive.no

 // Indirection for PropertyModel object
 public class MySessionModel extends AbstractReadOnlyModelMySession {

public MySession getObject() {
return (MySession) Session.get();
}
 }

 - Tor Iver

 -Original Message-
 From: Rahman USTA [mailto:rahman.usta...@gmail.com]
 Sent: 4. januar 2012 10:45
 To: users@wicket.apache.org
 Subject: It is not a good idea to reference the Session instance in models
 directly as it may lead to serialization problems.

 Hi, i have a MySession.

 form.add(new TextField(name,new PropertyModel(((MySession)getSession()),
 user.name)));

 I have a User user; in MySession, then initialized in constructor.

 my Goal is to save name and surname user's own session. i did it above, but
 warning ide me so that ;

 *WARN  - AbstractPropertyModel  - It is not a good idea to reference
 the Session instance in models directly as it may lead to serialization
 problems. If you need to access a property of the session via the model use
 the page instance as the model object and 'session.attribute' as the path.*

 How can i handle this normally.




 --
 Rahman USTA
 Computer  Control Education Technologist
 0-(531)-922-28-05
 www.kodcu.com

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




-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


Re: It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems.

2012-01-04 Thread Rahman USTA
Sorry not second, first.

2012/1/4 Rahman USTA rahman.usta...@gmail.com

 Second answer is ok, very thanks.


 2012/1/4 Wilhelmsen Tor Iver toriv...@arrive.no

 // Indirection for PropertyModel object
 public class MySessionModel extends AbstractReadOnlyModelMySession {

public MySession getObject() {
return (MySession) Session.get();
}
 }

 - Tor Iver

 -Original Message-
 From: Rahman USTA [mailto:rahman.usta...@gmail.com]
 Sent: 4. januar 2012 10:45
 To: users@wicket.apache.org
 Subject: It is not a good idea to reference the Session instance in
 models directly as it may lead to serialization problems.

 Hi, i have a MySession.

 form.add(new TextField(name,new
 PropertyModel(((MySession)getSession()),
 user.name)));

 I have a User user; in MySession, then initialized in constructor.

 my Goal is to save name and surname user's own session. i did it above,
 but
 warning ide me so that ;

 *WARN  - AbstractPropertyModel  - It is not a good idea to reference
 the Session instance in models directly as it may lead to serialization
 problems. If you need to access a property of the session via the model
 use
 the page instance as the model object and 'session.attribute' as the
 path.*

 How can i handle this normally.




 --
 Rahman USTA
 Computer  Control Education Technologist
 0-(531)-922-28-05
 www.kodcu.com

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




 --
 Rahman USTA
 Computer  Control Education Technologist
 0-(531)-922-28-05
 www.kodcu.com




-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


WicketMessage: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at [ [Component id = form]] on component [ [Component id = form]] threw an exception

2011-12-30 Thread Rahman USTA
)
 at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
 at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
 at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)

java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:260)
 at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
 at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
 at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)

 display page 
viewhttp://localhost:8080/wicket/page?2-1.ILinkListener-displayPageViewLink



-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


Could not locate error message for component: ..

2011-12-29 Thread Rahman USTA
Hi, im new in Wicket. im trying out an external validation , my validation
class is here http://chopapp.com/#htmnirs3 ,
 i get a message like this

Could not locate error message for component: TextField@form:ad and error:
[ValidationError message=[null], keys=[isim 3 karakterden büyük olmalı],
variables=[null]]. Tried keys: ad.isim 3 karakterden büyük olmalı, isim 3
karakterden büyük olmalı.

how can i handle this issue.

-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


Re: Could not locate error message for component: ..

2011-12-29 Thread Rahman USTA
I get it Christian, Thanks a lot

2011/12/29, Christian Huber hub...@butterbrot.org:
 Hi,

 i assume the string isim 3 karakterden büyük olmalı is the error
 message you want to display.

 You have two options here, first use ValidationError#setMessage instead
 of addMessageKey. The later considers it's argument being a message key
 to be looked up from a properties file.

 The alternative would be to put the message into a properties file and
 the pass the corresponding key to addMessageKey instead of the error
 message itself.

 I would also recommend having a look at the wicket javadoc api.

 The Sanity Resort http://sanityresort.blogspot.com/

 Am 29.12.2011 21:39, schrieb Rahman USTA:
 Hi, im new in Wicket. im trying out an external validation , my validation
 class is here http://chopapp.com/#htmnirs3 ,
   i get a message like this

 Could not locate error message for component: TextField@form:ad and
 error:
 [ValidationError message=[null], keys=[isim 3 karakterden büyük olmalı],
 variables=[null]]. Tried keys: ad.isim 3 karakterden büyük olmalı, isim 3
 karakterden büyük olmalı.

 how can i handle this issue.




-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com

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