Re: Quick Start Error with 8.7.0 - The desired archetype does not exist

2020-04-10 Thread Bruce Lombardi
This worked after upgrade to latest version on Maven (3.6.30). 

Bruce

Sent from my iPad

> On Apr 10, 2020, at 8:36 AM, Martin Grigorov  wrote:
> 
> Hi,
> 
> It works fine for me:
> 
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket
> -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=8.7.0
> -DgroupId=4MyTestCompany -DartifactId=testWicket8 -DarchetypeRepository=
> https://repository.apache.org/ -DinteractiveMode=false
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --< org.apache.maven:standalone-pom
>> ---
> [INFO] Building Maven Stub Project (No POM) 1
> [INFO] [ pom
> ]-
> [INFO]
> [INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) >
> generate-sources @ standalone-pom >>>
> [INFO]
> [INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) <
> generate-sources @ standalone-pom <<<
> [INFO]
> [INFO]
> [INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @
> standalone-pom ---
> [INFO] Generating project in Batch mode
> [INFO] Archetype repository not defined. Using the one from
> [org.apache.wicket:wicket-archetype-quickstart:9.0.0-M4] found in catalog
> remote
> [INFO] Downloading from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.pom
> [INFO] Downloaded from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.pom
> (2.7 kB at 21 kB/s)
> [INFO] Downloading from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-parent/8.7.0/wicket-parent-8.7.0.pom
> [INFO] Downloaded from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-parent/8.7.0/wicket-parent-8.7.0.pom
> (42 kB at 629 kB/s)
> [INFO] Downloading from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.jar
> [INFO] Downloaded from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.jar
> (30 kB at 475 kB/s)
> [INFO]
> 
> [INFO] Using following parameters for creating project from Archetype:
> wicket-archetype-quickstart:8.7.0
> [INFO]
> 
> [INFO] Parameter: groupId, Value: 4MyTestCompany
> [INFO] Parameter: artifactId, Value: testWicket8
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO] Parameter: package, Value: 4MyTestCompany
> [INFO] Parameter: packageInPathFormat, Value: 4MyTestCompany
> [INFO] Parameter: package, Value: 4MyTestCompany
> [INFO] Parameter: groupId, Value: 4MyTestCompany
> [INFO] Parameter: artifactId, Value: testWicket8
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO] Project created from Archetype in dir: /tmp/testWicket8
> [INFO]
> 
> [INFO] BUILD SUCCESS
> [INFO]
> ----
> [INFO] Total time:  2.944 s
> [INFO] Finished at: 2020-04-10T15:35:22+03:00
> [INFO]
> 
> 
>> On Fri, Apr 10, 2020 at 3:28 PM Bruce Lombardi  wrote:
>> 
>> Hi,
>> 
>> 
>> 
>> I tried to use the Quick Start to get wicket 8.7.0 .
>> 
>> 
>> 
>> The command line generated on the Wicked site is as follows (except I added
>> the -X switch and ran it again after getting the error to get more
>> information).
>> 
>> 
>> 
>> mvn -X archetype:generate -DarchetypeGroupId=org.apache.wicket
>> -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=8.7.0
>> -DgroupId=4MyTestCompany -DartifactId=testWicket8
>> -DarchetypeRepository=https://repository.apache.org/
>> -DinteractiveMode=false
>> 
>> 
>> 
>> 
>> 
>> The full trace is below, but the error seems to be:
>> 
>> 
>> 
>> "The desired archetype does not exist
>> (org.apache.wicket:wicket-archetype-quickstart:8.7.0)"
>> 
>> 
>> 
>> Is this really missing or is there something wrong with my Maven set up?
>> 
>> 
>> 
>> Bruce
>> 
>> 
>> 
>> 
>> 
>> [DEBUG]   Included: org.codehaus.groovy:groovy:jar:1.8.3
>> 
>> [DEBUG]   Included: antlr:antlr:jar

Re: Quick Start Error with 8.7.0 - The desired archetype does not exist

2020-04-10 Thread Bruce Lombardi



Bruce

Sent from my iPad

> On Apr 10, 2020, at 8:36 AM, Martin Grigorov  wrote:
> 
> Hi,
> 
> It works fine for me:
> 
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket
> -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=8.7.0
> -DgroupId=4MyTestCompany -DartifactId=testWicket8 -DarchetypeRepository=
> https://repository.apache.org/ -DinteractiveMode=false
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --< org.apache.maven:standalone-pom
>> ---
> [INFO] Building Maven Stub Project (No POM) 1
> [INFO] [ pom
> ]-
> [INFO]
> [INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) >
> generate-sources @ standalone-pom >>>
> [INFO]
> [INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) <
> generate-sources @ standalone-pom <<<
> [INFO]
> [INFO]
> [INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @
> standalone-pom ---
> [INFO] Generating project in Batch mode
> [INFO] Archetype repository not defined. Using the one from
> [org.apache.wicket:wicket-archetype-quickstart:9.0.0-M4] found in catalog
> remote
> [INFO] Downloading from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.pom
> [INFO] Downloaded from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.pom
> (2.7 kB at 21 kB/s)
> [INFO] Downloading from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-parent/8.7.0/wicket-parent-8.7.0.pom
> [INFO] Downloaded from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-parent/8.7.0/wicket-parent-8.7.0.pom
> (42 kB at 629 kB/s)
> [INFO] Downloading from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.jar
> [INFO] Downloaded from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.jar
> (30 kB at 475 kB/s)
> [INFO]
> 
> [INFO] Using following parameters for creating project from Archetype:
> wicket-archetype-quickstart:8.7.0
> [INFO]
> 
> [INFO] Parameter: groupId, Value: 4MyTestCompany
> [INFO] Parameter: artifactId, Value: testWicket8
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO] Parameter: package, Value: 4MyTestCompany
> [INFO] Parameter: packageInPathFormat, Value: 4MyTestCompany
> [INFO] Parameter: package, Value: 4MyTestCompany
> [INFO] Parameter: groupId, Value: 4MyTestCompany
> [INFO] Parameter: artifactId, Value: testWicket8
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO] Project created from Archetype in dir: /tmp/testWicket8
> [INFO]
> 
> [INFO] BUILD SUCCESS
> [INFO]
> ----
> [INFO] Total time:  2.944 s
> [INFO] Finished at: 2020-04-10T15:35:22+03:00
> [INFO]
> 
> 
>> On Fri, Apr 10, 2020 at 3:28 PM Bruce Lombardi  wrote:
>> 
>> Hi,
>> 
>> 
>> 
>> I tried to use the Quick Start to get wicket 8.7.0 .
>> 
>> 
>> 
>> The command line generated on the Wicked site is as follows (except I added
>> the -X switch and ran it again after getting the error to get more
>> information).
>> 
>> 
>> 
>> mvn -X archetype:generate -DarchetypeGroupId=org.apache.wicket
>> -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=8.7.0
>> -DgroupId=4MyTestCompany -DartifactId=testWicket8
>> -DarchetypeRepository=https://repository.apache.org/
>> -DinteractiveMode=false
>> 
>> 
>> 
>> 
>> 
>> The full trace is below, but the error seems to be:
>> 
>> 
>> 
>> "The desired archetype does not exist
>> (org.apache.wicket:wicket-archetype-quickstart:8.7.0)"
>> 
>> 
>> 
>> Is this really missing or is there something wrong with my Maven set up?
>> 
>> 
>> 
>> Bruce
>> 
>> 
>> 
>> 
>> 
>> [DEBUG]   Included: org.codehaus.groovy:groovy:jar:1.8.3
>> 
>> [DEBUG]   Included: antlr:antlr:jar:2.7.7
>> 
>> [DEBUG]   Included

Re: Quick Start Error with 8.7.0 - The desired archetype does not exist

2020-04-10 Thread Bruce Lombardi
Thanks Martin,

I tried again and still no luck. I’ll have to look deeper into my maven 
configuration I guess.

Any other ideas would be appreciated.

Bruce

Sent from my iPad

> On Apr 10, 2020, at 8:36 AM, Martin Grigorov  wrote:
> 
> Hi,
> 
> It works fine for me:
> 
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket
> -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=8.7.0
> -DgroupId=4MyTestCompany -DartifactId=testWicket8 -DarchetypeRepository=
> https://repository.apache.org/ -DinteractiveMode=false
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --< org.apache.maven:standalone-pom
>> ---
> [INFO] Building Maven Stub Project (No POM) 1
> [INFO] [ pom
> ]-
> [INFO]
> [INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) >
> generate-sources @ standalone-pom >>>
> [INFO]
> [INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) <
> generate-sources @ standalone-pom <<<
> [INFO]
> [INFO]
> [INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @
> standalone-pom ---
> [INFO] Generating project in Batch mode
> [INFO] Archetype repository not defined. Using the one from
> [org.apache.wicket:wicket-archetype-quickstart:9.0.0-M4] found in catalog
> remote
> [INFO] Downloading from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.pom
> [INFO] Downloaded from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.pom
> (2.7 kB at 21 kB/s)
> [INFO] Downloading from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-parent/8.7.0/wicket-parent-8.7.0.pom
> [INFO] Downloaded from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-parent/8.7.0/wicket-parent-8.7.0.pom
> (42 kB at 629 kB/s)
> [INFO] Downloading from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.jar
> [INFO] Downloaded from central:
> https://repo.maven.apache.org/maven2/org/apache/wicket/wicket-archetype-quickstart/8.7.0/wicket-archetype-quickstart-8.7.0.jar
> (30 kB at 475 kB/s)
> [INFO]
> 
> [INFO] Using following parameters for creating project from Archetype:
> wicket-archetype-quickstart:8.7.0
> [INFO]
> 
> [INFO] Parameter: groupId, Value: 4MyTestCompany
> [INFO] Parameter: artifactId, Value: testWicket8
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO] Parameter: package, Value: 4MyTestCompany
> [INFO] Parameter: packageInPathFormat, Value: 4MyTestCompany
> [INFO] Parameter: package, Value: 4MyTestCompany
> [INFO] Parameter: groupId, Value: 4MyTestCompany
> [INFO] Parameter: artifactId, Value: testWicket8
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO] Project created from Archetype in dir: /tmp/testWicket8
> [INFO]
> 
> [INFO] BUILD SUCCESS
> [INFO]
> ----
> [INFO] Total time:  2.944 s
> [INFO] Finished at: 2020-04-10T15:35:22+03:00
> [INFO]
> 
> 
>> On Fri, Apr 10, 2020 at 3:28 PM Bruce Lombardi  wrote:
>> 
>> Hi,
>> 
>> 
>> 
>> I tried to use the Quick Start to get wicket 8.7.0 .
>> 
>> 
>> 
>> The command line generated on the Wicked site is as follows (except I added
>> the -X switch and ran it again after getting the error to get more
>> information).
>> 
>> 
>> 
>> mvn -X archetype:generate -DarchetypeGroupId=org.apache.wicket
>> -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=8.7.0
>> -DgroupId=4MyTestCompany -DartifactId=testWicket8
>> -DarchetypeRepository=https://repository.apache.org/
>> -DinteractiveMode=false
>> 
>> 
>> 
>> 
>> 
>> The full trace is below, but the error seems to be:
>> 
>> 
>> 
>> "The desired archetype does not exist
>> (org.apache.wicket:wicket-archetype-quickstart:8.7.0)"
>> 
>> 
>> 
>> Is this really missing or is there something wrong with my Maven set up?
>> 
>> 
>> 
>> Bruce
>> 
>> 
>> 
>> 
>> 
>> [DEBUG]   Included: o

Quick Start Error with 8.7.0 - The desired archetype does not exist

2020-04-10 Thread Bruce Lombardi
Hi,

 

I tried to use the Quick Start to get wicket 8.7.0 .

 

The command line generated on the Wicked site is as follows (except I added
the -X switch and ran it again after getting the error to get more
information).

 

mvn -X archetype:generate -DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=8.7.0
-DgroupId=4MyTestCompany -DartifactId=testWicket8
-DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false

 

 

The full trace is below, but the error seems to be:

 

"The desired archetype does not exist
(org.apache.wicket:wicket-archetype-quickstart:8.7.0)"

 

Is this really missing or is there something wrong with my Maven set up?

 

Bruce

 

 

[DEBUG]   Included: org.codehaus.groovy:groovy:jar:1.8.3

[DEBUG]   Included: antlr:antlr:jar:2.7.7

[DEBUG]   Included: asm:asm:jar:3.2

[DEBUG]   Included: asm:asm-commons:jar:3.2

[DEBUG]   Included: asm:asm-util:jar:3.2

[DEBUG]   Included: asm:asm-analysis:jar:3.2

[DEBUG]   Included: asm:asm-tree:jar:3.2

[DEBUG]   Included: org.beanshell:bsh:jar:2.0b4

[DEBUG]   Included: org.apache.maven.shared:maven-script-interpreter:jar:1.0

[DEBUG]   Included: org.apache.ant:ant:jar:1.8.1

[DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.8

[DEBUG]   Excluded:
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1

[DEBUG]   Excluded: junit:junit:jar:4.8.2

[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-core:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.8

[DEBUG]   Excluded:
org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.8

[DEBUG]   Excluded: org.apache.maven:maven-monitor:jar:2.0.8

[DEBUG]   Excluded: classworlds:classworlds:jar:1.1

[DEBUG] Configuring mojo
org.apache.maven.plugins:maven-archetype-plugin:2.2:generate from plugin
realm ClassRealm[plugin>org.apache.maven.plugins:maven-archetype-plugin:2.2,
parent: sun.misc.Launcher$AppClassLoader@4e25154f]

[DEBUG] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.

[DEBUG] Setting property: site.resource.loader.class =>
'org.codehaus.plexus.velocity.SiteResourceLoader'.

[DEBUG] Setting property: velocimacro.messages.on => 'false'.

[DEBUG] Setting property: resource.loader => 'classpath,site'.

[DEBUG] Setting property: runtime.log.invalid.references => 'false'.

[DEBUG] Setting property: resource.manager.logwhenfound => 'false'.

[DEBUG] ***

[DEBUG] Starting Apache Velocity v1.5 (compiled: 2007-02-22 08:52:29)

[DEBUG] RuntimeInstance initializing.

[DEBUG] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties

[DEBUG] LogSystem has been deprecated. Please use a LogChute implementation.

[DEBUG] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)

[DEBUG] ResourceLoader instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader

[DEBUG] ResourceLoader instantiated:
org.codehaus.plexus.velocity.SiteResourceLoader

[DEBUG] ResourceCache: initialized (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)

[DEBUG] Default ResourceManager initialization complete.

[DEBUG] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal

[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Macro

[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Parse

[DEBUG] Loaded System Directive:
org.apache.velocity.runtime.directive.Include

[DEBUG] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach

[DEBUG] Created '20' parsers.

[DEBUG] Velocimacro : initialization starting.

[DEBUG] Velocimacro : allowInline = true : VMs can be defined inline in
templates

[DEBUG] Velocimacro : allowInlineToOverride = false : VMs defined inline may
NOT replace previous VM definitions

[DEBUG] Velocimacro : allowInlineLocal = false : VMs defined inline will be
global in scope if allowed.

[DEBUG] Velocimacro : autoload off : VM system will not automatically reload
global library macros

[DEBUG] Velocimacro : Velocimacro : initialization complete.

[DEBUG] RuntimeInstance successfully initialized.

[DEBUG] Co

Help with java.net.SocketException: Connection reset by peer: socket write error

2015-06-25 Thread Bruce Lombardi
Wehave deployed a Wicket  application that runs fine, but every once in a
while I see a stacktrace in my Tomcat logs that says

ERROR - DefaultExceptionMapper:mapExpectedExceptions.144 - Connection
lost, give up responding.

Which appears to be caused by:

java.net.SocketException: Connection reset by peer: socket write error

 

This often occurs when no users are logged into the application. I've
searched for an answer to this, but haven't been able to find anything
useful. A lot of information about this error if you are trying to do a file
transfer, but nothing related to my current situation.

 

I'd appreciate it if anyone could suggest a way of tracking this down. The
stacktrace isn't too helpful and none of the classes listed in it are
classes that we developed, they are all framework classes (Tomcat, Wicket.
Spring,etc.)  I've included the whole stacktrace below.

Could this be someone attempting to hack in, or something that happens when
a browser is closed?

 

Bruce

 

2015-06-24 11:23:34,922  ERROR - DefaultExceptionMapper
:mapExpectedExceptions.144 - Connection lost, give up responding. 

org.apache.wicket.protocol.http.servlet.ResponseIOException:
ClientAbortException:  java.net.SocketException: Connection reset by peer:
socket write error

at
org.apache.wicket.protocol.http.servlet.ServletWebResponse.write(ServletWebR
esponse.java:126)

at
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.write(HeaderBuffe
ringWebResponse.java:182)

at
org.apache.wicket.request.resource.PackageResource$1.writeData(PackageResour
ce.java:328)

at
org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource
.java:528)

at
org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(Re
sourceRequestHandler.java:75)

at
org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.r
espond(ResourceReferenceRequestHandler.java:108)

at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(Request
Cycle.java:890)

at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.ja
va:64)

at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)

at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.jav
a:218)

at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(Request
Cycle.java:289)

at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilte
r.java:259)

at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.jav
a:201)

at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:241)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:208)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:330)

at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.
invoke(FilterSecurityInterceptor.java:118)

at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.
doFilter(FilterSecurityInterceptor.java:84)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:342)

at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(
ExceptionTranslationFilter.java:113)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:342)

at
org.springframework.security.web.session.SessionManagementFilter.doFilter(Se
ssionManagementFilter.java:103)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:342)

at
org.springframework.security.web.authentication.AnonymousAuthenticationFilte
r.doFilter(AnonymousAuthenticationFilter.java:113)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:342)

at
org.springframework.security.web.servletapi.SecurityContextHolderAwareReques
tFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:342)

at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilt
er(RequestCacheAwareFilter.java:45)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java

Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-15 Thread Bruce Lombardi
For the moment, this issue has put me behind schedule so I need to move on, but 
I will try to get back to it and open an issue later.
Thanks again.

Bruce

Sent from my iPad

> On Mar 15, 2015, at 3:59 PM, Andrea Del Bene  wrote:
> 
> Good! It would be nice to understand what caused this change from 6.12.0 to 
> 6.13.0 but this requires a quickstart to reproduce the specific problem. If 
> you have the time and the chance to create such quickstart you can open an 
> issue on JIRA.
>> Thanks Andrea,
>> 
>> Your small observation was important. After moving the code into the 
>> onInitialize method everything started working. The url produced is 
>> ./resource/org.apache.wicket.Application/pdfProducer and not  . 
>> ./resource/org.apache.wicket.Application/pdfProducer.
>> 
>> I also test the wicket-bootstrap theory, but that does not seem to be 
>> involved.
>> 
>> I will use this fix.  Since this works should I still open a JIRA issue?
>> 
>> Thanks again,
>> 
>> Bruce
>> 
>> -Original Message-
>> From: Andrea Del Bene [mailto:an.delb...@gmail.com]
>> Sent: Sunday, March 15, 2015 10:00 AM
>> To: users@wicket.apache.org
>> Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not 
>> in 6.13
>> 
>> Just a small observation that might help. Move code from PdfViewer 
>> contructor to onInitialize. This makes URL generation safer although it 
>> doesn't explain why your code worked until 6.12.0.
>>> I guess it depends on the mount path of your page.
>>> Most probably it is /wicket/bookmarkable/...
>>>> On Mar 14, 2015 7:37 PM, "Bruce Lombardi"  wrote:
>>>> 
>>>> Interesting,
>>>> 
>>>> When I run your code I see that the url is as you say:
>>>> 
>>>> ./wicket/resource/org.apache.wicket.Application/pdfProducer
>>>> 
>>>> Whereas in my working code (wicket version 6.12) it is:
>>>> 
>>>> ./resource/org.apache.wicket.Application/pdfProducer
>>>> 
>>>> And  in my non-working code (wicket versions 6.13 - 6.19) it is:
>>>> 
>>>> ../resource/org.apache.wicket.Application/pdfProducer
>>>> 
>>>> If I remove the first dot from the url with the debuggerthen run from
>>>> there the pdf appears as it should.
>>>> 
>>>> I wonder why they are different in the two projects and why I'm getting ..
>>>> with later versions.
>>>> 
>>>> I'm also wondering if there is another library that is somehow
>>>> incompatible with later versions of Wicket.
>>>> 
>>>> I think the only library we use that interacts with Wicket is wicket
>>>> bootstrap  - currently as below (but I've tried other version):
>>>>  
>>>>  de.agilecoders.wicket
>>>>  wicket-bootstrap-core
>>>>  0.9.8
>>>>  
>>>> 
>>>>  
>>>>  de.agilecoders.wicket
>>>> 
>>>> wicket-bootstrap-extensions
>>>>  0.9.8
>>>>  
>>>> 
>>>> I will add these dependencies to your quickstart and see if it makes
>>>> a difference.
>>>> 
>>>> Bruce
>> 
>> 
>> -
>> 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: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-15 Thread Bruce Lombardi
Thanks Andrea, 

Your small observation was important. After moving the code into the 
onInitialize method everything started working. The url produced is 
./resource/org.apache.wicket.Application/pdfProducer and not  . 
./resource/org.apache.wicket.Application/pdfProducer. 

I also test the wicket-bootstrap theory, but that does not seem to be involved.

I will use this fix.  Since this works should I still open a JIRA issue?

Thanks again,

Bruce

-Original Message-
From: Andrea Del Bene [mailto:an.delb...@gmail.com] 
Sent: Sunday, March 15, 2015 10:00 AM
To: users@wicket.apache.org
Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Just a small observation that might help. Move code from PdfViewer contructor 
to onInitialize. This makes URL generation safer although it doesn't explain 
why your code worked until 6.12.0.
> I guess it depends on the mount path of your page.
> Most probably it is /wicket/bookmarkable/...
> On Mar 14, 2015 7:37 PM, "Bruce Lombardi"  wrote:
>
>> Interesting,
>>
>> When I run your code I see that the url is as you say:
>>
>> ./wicket/resource/org.apache.wicket.Application/pdfProducer
>>
>> Whereas in my working code (wicket version 6.12) it is:
>>
>> ./resource/org.apache.wicket.Application/pdfProducer
>>
>> And  in my non-working code (wicket versions 6.13 - 6.19) it is:
>>
>> ../resource/org.apache.wicket.Application/pdfProducer
>>
>> If I remove the first dot from the url with the debuggerthen run from 
>> there the pdf appears as it should.
>>
>> I wonder why they are different in the two projects and why I'm getting ..
>> with later versions.
>>
>> I'm also wondering if there is another library that is somehow 
>> incompatible with later versions of Wicket.
>>
>> I think the only library we use that interacts with Wicket is wicket 
>> bootstrap  - currently as below (but I've tried other version):
>>  
>>  de.agilecoders.wicket
>>  wicket-bootstrap-core
>>  0.9.8
>>  
>>
>>  
>>  de.agilecoders.wicket
>>
>> wicket-bootstrap-extensions
>>  0.9.8
>>  
>>
>> I will add these dependencies to your quickstart and see if it makes 
>> a difference.
>>
>> Bruce
>>
>>



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



RE: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-14 Thread Bruce Lombardi
Interesting,

When I run your code I see that the url is as you say:

./wicket/resource/org.apache.wicket.Application/pdfProducer

Whereas in my working code (wicket version 6.12) it is:

./resource/org.apache.wicket.Application/pdfProducer 

And  in my non-working code (wicket versions 6.13 - 6.19) it is:

../resource/org.apache.wicket.Application/pdfProducer

If I remove the first dot from the url with the debuggerthen run from there the 
pdf appears as it should.

I wonder why they are different in the two projects and why I'm getting .. with 
later versions.

I'm also wondering if there is another library that is somehow incompatible 
with later versions of Wicket.

I think the only library we use that interacts with Wicket is wicket bootstrap  
- currently as below (but I've tried other version):

de.agilecoders.wicket
wicket-bootstrap-core
0.9.8



de.agilecoders.wicket
wicket-bootstrap-extensions
0.9.8


I will add these dependencies to your quickstart and see if it makes a 
difference.

Bruce

-Original Message-
From: Andrea Del Bene [mailto:an.delb...@gmail.com] 
Sent: Saturday, March 14, 2015 11:58 AM
To: users@wicket.apache.org
Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Hi,

I've created a quickstart based on your code  but I can't reproduce the issue. 
I've shared it on Dropbox: 
https://www.dropbox.com/s/qmolvzvp9a0xplf/ResourceIssue.tar.gz?dl=0
The only thing I've noted is that your resource url doesn't have starting 
segment 'wicket', i.e my resource url is:

./wicket/resource/org.apache.wicket.Application/pdfProducer

Maybe you have some custom setting for wicket segments ('wicket', 'bookmark', 
etc...)?
> The problem (which I think is a bug) is in the way the url is produced.
>
> The line
>   String url = (String)RequestCycle.get().urlFor(resourceReference, 
> null);
>
> Produces the url to use for the resource ref.
>
> In the non-working version it returns:
>
> ../resource/org.apache.wicket.Application/pdfProducer
>
> If I set a breakpoint just after this line and I manually remove the first 
> dot in the string  using the debugger to get:
>
> ./resource/org.apache.wicket.Application/pdfProducer
>
> and then let the code continue to run, my pdf appears correctly.
>
> The debug trace also shows the correct uri.
>
> 2015-03-13 17:59:30,292  DEBUG - ServletWebRequest  - Calculating 
> context relative path from: context path '', filterPrefix '', uri 
> '/wicket/resource/org.apache.wicket.Application/pdfProducer'
> 2015-03-13 17:59:30,298  DEBUG - ServletWebRequest  - Calculating 
> context relative path from: context path '', filterPrefix '', uri 
> '/wicket/resource/org.apache.wicket.Application/pdfProducer'
> 2015-03-13 17:59:30,301  DEBUG - ServletWebRequest  - Calculating 
> context relative path from: context path '', filterPrefix '', uri 
> '/wicket/resource/org.apache.wicket.Application/pdfProducer'
> 2015-03-13 17:59:30,305  DEBUG - CompoundRequestMapper  - One compatible 
> mapper found for URL 
> 'wicket/resource/org.apache.wicket.Application/pdfProducer' -> 'Mapper: 
> org.apache.wicket.core.request.mapper.ResourceReferenceMapper; Score: 1'
>
> Maybe someone knows how to fix this? I could strip the first dot as a 
> workaround in the mean time.
>
> Bruce
>


-
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: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-14 Thread Bruce Lombardi
Thanks Andrea. I'll work with your quickstart and see what I can find.

Bruce

-Original Message-
From: Andrea Del Bene [mailto:an.delb...@gmail.com] 
Sent: Saturday, March 14, 2015 11:58 AM
To: users@wicket.apache.org
Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Hi,

I've created a quickstart based on your code  but I can't reproduce the issue. 
I've shared it on Dropbox: 
https://www.dropbox.com/s/qmolvzvp9a0xplf/ResourceIssue.tar.gz?dl=0
The only thing I've noted is that your resource url doesn't have starting 
segment 'wicket', i.e my resource url is:

./wicket/resource/org.apache.wicket.Application/pdfProducer

Maybe you have some custom setting for wicket segments ('wicket', 'bookmark', 
etc...)?
> The problem (which I think is a bug) is in the way the url is produced.
>
> The line
>   String url = (String)RequestCycle.get().urlFor(resourceReference, 
> null);
>
> Produces the url to use for the resource ref.
>
> In the non-working version it returns:
>
> ../resource/org.apache.wicket.Application/pdfProducer
>
> If I set a breakpoint just after this line and I manually remove the first 
> dot in the string  using the debugger to get:
>
> ./resource/org.apache.wicket.Application/pdfProducer
>
> and then let the code continue to run, my pdf appears correctly.
>
> The debug trace also shows the correct uri.
>
> 2015-03-13 17:59:30,292  DEBUG - ServletWebRequest  - Calculating 
> context relative path from: context path '', filterPrefix '', uri 
> '/wicket/resource/org.apache.wicket.Application/pdfProducer'
> 2015-03-13 17:59:30,298  DEBUG - ServletWebRequest  - Calculating 
> context relative path from: context path '', filterPrefix '', uri 
> '/wicket/resource/org.apache.wicket.Application/pdfProducer'
> 2015-03-13 17:59:30,301  DEBUG - ServletWebRequest  - Calculating 
> context relative path from: context path '', filterPrefix '', uri 
> '/wicket/resource/org.apache.wicket.Application/pdfProducer'
> 2015-03-13 17:59:30,305  DEBUG - CompoundRequestMapper  - One compatible 
> mapper found for URL 
> 'wicket/resource/org.apache.wicket.Application/pdfProducer' -> 'Mapper: 
> org.apache.wicket.core.request.mapper.ResourceReferenceMapper; Score: 1'
>
> Maybe someone knows how to fix this? I could strip the first dot as a 
> workaround in the mean time.
>
> Bruce
>


-
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: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-13 Thread Bruce Lombardi
The problem (which I think is a bug) is in the way the url is produced.

The line 
String url = (String)RequestCycle.get().urlFor(resourceReference, null);

Produces the url to use for the resource ref.

In the non-working version it returns:

../resource/org.apache.wicket.Application/pdfProducer

If I set a breakpoint just after this line and I manually remove the first dot 
in the string  using the debugger to get:

./resource/org.apache.wicket.Application/pdfProducer

and then let the code continue to run, my pdf appears correctly.

The debug trace also shows the correct uri.

2015-03-13 17:59:30,292  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/wicket/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 17:59:30,298  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/wicket/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 17:59:30,301  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/wicket/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 17:59:30,305  DEBUG - CompoundRequestMapper  - One compatible 
mapper found for URL 
'wicket/resource/org.apache.wicket.Application/pdfProducer' -> 'Mapper: 
org.apache.wicket.core.request.mapper.ResourceReferenceMapper; Score: 1'

Maybe someone knows how to fix this? I could strip the first dot as a 
workaround in the mean time.

Bruce

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, March 13, 2015 4:17 PM
To: users@wicket.apache.org
Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Hi,

This is your code:

 WebDocsSession session = (WebDocsSession)getSession();  final byte[] pdf = 
session.getPdf();  if(pdf == null) System.out.println("PdfPanel session.getPdf 
returned null");  PdfResourceProducer pdfResourceProducer = new 
PdfResourceProducer(pdf);  return pdfResourceProducer;


There is nothing Component specific here. Except #getSession(), but you can use 
Session.get() and cast it. It is the same.

If you need the component to be able to generate the PDF bytes then you need to 
implement IResourceListener interface. In #onResourceRequested() you can 
generate the bytes and write them to the Response:
getResponse().write(byte[]).
The change you need to do is in #urlFor():
urlFor(ResourceListener.INTERFACE, parameters))


Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Mar 13, 2015 at 8:15 PM, Bruce Lombardi  wrote:

> Martin,
>
> I'm looking into mounting the resource but there is something that I 
> don't understand.
> Currently I am creating the resource in my panel and passing the pdf I 
> want to display into the constructor of the resource. If I mount the 
> resource, how do I provide it with the dynamically generated pdf? I 
> don't even see a way of getting a hold of the resourceReference object 
> created and mounted in the  WebApplication init() method. Perhaps I 
> need to also register it as an application-shared resource, then 
> access it in my panel constructor and add the pdf there?
>
> Bruce
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Friday, March 13, 2015 12:53 PM
> To: users@wicket.apache.org
> Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 
> but not in 6.13
>
> Hi,
>
> I think I see what happens.
> The ResRef is created as a local variable to create the url and then 
> discarded.
> Wicket has something called ResourceReferenceRegistry. When a ResRef 
> is used to create an url to it it is automatically registered in the registry.
> It seems after 6.13 there is no such auto-registration for your ResRef 
> for some reason.
> You should have some WARNs in the logs.
>
> I see nothing component specific in your ResRef so I'd #mountResource() it.
> This way it will be always available.
>
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Mar 13, 2015 at 6:40 PM, Bruce Lombardi 
> wrote:
>
> > I have a PdfViewer page that contains a panel that displays a 
> > dynamically generated PDF using a resource reference. This works 
> > fine in Wicket 6.12.0, but when I upgrade to 6.13.0 it stops working 
> > (just changed Maven dependency
> > - no code changes). No errors are displayed and the html is 
> > generated exactly as it is with 6.12, but the pdf does not show up in the 
> &

RE: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-13 Thread Bruce Lombardi
Thanks Martin an others. I am always impressed with the helpfulness of the 
people on this list.

I will look into what you suggest. In the meantime I'm trying to find out more 
information about the differences between versions and  I set the logger level 
to DEBUG and  obtained the traces below from working and non-working versions. 
Maybe this will help shed some light on what is happening. I see some 
differences like uri for working version starts with /wicket/resource but 
non-working version starts with /resource/ but I don't know what the 
differences mean.  Maybe someone know about this change?

If the difference in the way resource reference registration works between 6.12 
and 6.13  is an unintended  change in behavior between versions, it seems like 
it should be fixed. If it is an intended change, then it should be documented.

Working Version 6.12 Debug trace
2015-03-13 16:12:35,585  DEBUG - CompoundRequestMapper  - One compatible 
mapper found for URL 
'wicket/resource/de.agilecoders.wicket.webjars.request.resource.WebjarsCssResourceReference/webjars/bootstrap/2.3.2/css/bootstrap-ver-1378733671227.css'
 -> 'Mapper: org.apache.wicket.core.request.mapper.ResourceReferenceMapper; 
Score: 1'
2015-03-13 16:12:35,648  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/wicket/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 16:12:35,648  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/wicket/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 16:12:35,648  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/wicket/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 16:12:35,648  DEBUG - CompoundRequestMapper  - One compatible 
mapper found for URL 
'wicket/resource/org.apache.wicket.Application/pdfProducer' -> 'Mapper: 
org.apache.wicket.core.request.mapper.ResourceReferenceMapper; Score: 1'

Non-Working Version 6.13 Debug trace
2015-03-13 16:01:47,826  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 16:01:47,826  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 16:01:47,826  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 16:01:47,826  DEBUG - CompoundRequestMapper  - No compatible 
mapper found for URL 'resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 16:01:47,826  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 16:01:47,826  DEBUG - ServletWebRequest  - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 16:01:47,826  DEBUG - RequestCycle   - No suitable 
handler found for URL resource/org.apache.wicket.Application/pdfProducer, 
falling back to container to process this request

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, March 13, 2015 4:17 PM
To: users@wicket.apache.org
Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Hi,

This is your code:

 WebDocsSession session = (WebDocsSession)getSession();  final byte[] pdf = 
session.getPdf();  if(pdf == null) System.out.println("PdfPanel session.getPdf 
returned null");  PdfResourceProducer pdfResourceProducer = new 
PdfResourceProducer(pdf);  return pdfResourceProducer;


There is nothing Component specific here. Except #getSession(), but you can use 
Session.get() and cast it. It is the same.

If you need the component to be able to generate the PDF bytes then you need to 
implement IResourceListener interface. In #onResourceRequested() you can 
generate the bytes and write them to the Response:
getResponse().write(byte[]).
The change you need to do is in #urlFor():
urlFor(ResourceListener.INTERFACE, parameters))


Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Mar 13, 2015 at 8:15 PM, Bruce Lombardi  wrote:

> Martin,
>
> I'm looking into mounting the resource but

RE: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-13 Thread Bruce Lombardi
That's not really possible. The pdf is produced by itext from a template with 
lots of parameter. It would require too large a change in the code and would 
couple the pdfViewer panel too closely to the domain code.

If, as Martin suggests, the automatic registering of the resource is not being 
done in the ResourceReferenceRegistry maybe there is something I could do to 
register and then unregister the resource similar to the way it must have been 
done in 6.12..

Bruce


-Original Message-
From: reiern70 [mailto:reier...@gmail.com] 
Sent: Friday, March 13, 2015 3:40 PM
To: users@wicket.apache.org
Subject: RE: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Passing something that allows you to produce the byte []?


Sent from Samsung Mobile

 Original message 
From: Bruce Lombardi 
Date:13/03/2015  20:20  (GMT+01:00)
To: users@wicket.apache.org
Subject: RE: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13 

Thanks Ernesto,

I don't know how to pass a byte[] as a parameter.

Bruce

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
Sent: Friday, March 13, 2015 2:20 PM
To: users@wicket.apache.org
Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Pass the info as parameters on the request to the mounted resource?

On Fri, Mar 13, 2015 at 7:15 PM, Bruce Lombardi  wrote:

> Martin,
>
> I'm looking into mounting the resource but there is something that I 
> don't understand.
> Currently I am creating the resource in my panel and passing the pdf I 
> want to display into the constructor of the resource. If I mount the 
> resource, how do I provide it with the dynamically generated pdf? I 
> don't even see a way of getting a hold of the resourceReference object 
> created and mounted in the  WebApplication init() method. Perhaps I 
> need to also register it as an application-shared resource, then 
> access it in my panel constructor and add the pdf there?
>
> Bruce
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Friday, March 13, 2015 12:53 PM
> To: users@wicket.apache.org
> Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 
> but not in 6.13
>
> Hi,
>
> I think I see what happens.
> The ResRef is created as a local variable to create the url and then 
> discarded.
> Wicket has something called ResourceReferenceRegistry. When a ResRef 
> is used to create an url to it it is automatically registered in the registry.
> It seems after 6.13 there is no such auto-registration for your ResRef 
> for some reason.
> You should have some WARNs in the logs.
>
> I see nothing component specific in your ResRef so I'd #mountResource() it.
> This way it will be always available.
>
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Mar 13, 2015 at 6:40 PM, Bruce Lombardi 
> wrote:
>
> > I have a PdfViewer page that contains a panel that displays a 
> > dynamically generated PDF using a resource reference. This works 
> > fine in Wicket 6.12.0, but when I upgrade to 6.13.0 it stops working 
> > (just changed Maven dependency
> > - no code changes). No errors are displayed and the html is 
> > generated exactly as it is with 6.12, but the pdf does not show up in the 
> > page.
> >
> > By setting a breakpoint in Eclipse I have determined that code in 
> > the resource that produces the response (newResourceResponse) is 
> > never called in 6.13. After migrating to the latest version (6.19) I 
> > still get the problem.
> > I've looked at the release notes for version 6.13 and see some 
> > changes related to IResource but nothing that looks related to this problem.
> >
> > I'm hoping someone has seen something similar. Here is some of the 
> > relevant
> > code:
> >
> > PdfViewer .html - just has reference to panel
> >
> >
> >
> >
> >
> > PdfPane.html - just has object reference
> >
> > Raw HTML
> >
> > > height="80%">
> >
> >
> >
> > Generated HTML - seen with view source in browser
> >
> >  data="./resource/org.apache.wicket.Application/pdfProducer"
> >
> >border="1" width="80%" height="80%">
> >
> >
> >
> > PdfPanel.java - has setup for resource reference
> >
> > public class PdfPanel extends Panel {
> >
> >
> >
> >private static final long serialVersionUID = 1

RE: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-13 Thread Bruce Lombardi
Thanks Ernesto,

I don't know how to pass a byte[] as a parameter.

Bruce

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Friday, March 13, 2015 2:20 PM
To: users@wicket.apache.org
Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Pass the info as parameters on the request to the mounted resource?

On Fri, Mar 13, 2015 at 7:15 PM, Bruce Lombardi  wrote:

> Martin,
>
> I'm looking into mounting the resource but there is something that I 
> don't understand.
> Currently I am creating the resource in my panel and passing the pdf I 
> want to display into the constructor of the resource. If I mount the 
> resource, how do I provide it with the dynamically generated pdf? I 
> don't even see a way of getting a hold of the resourceReference object 
> created and mounted in the  WebApplication init() method. Perhaps I 
> need to also register it as an application-shared resource, then 
> access it in my panel constructor and add the pdf there?
>
> Bruce
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Friday, March 13, 2015 12:53 PM
> To: users@wicket.apache.org
> Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 
> but not in 6.13
>
> Hi,
>
> I think I see what happens.
> The ResRef is created as a local variable to create the url and then 
> discarded.
> Wicket has something called ResourceReferenceRegistry. When a ResRef 
> is used to create an url to it it is automatically registered in the registry.
> It seems after 6.13 there is no such auto-registration for your ResRef 
> for some reason.
> You should have some WARNs in the logs.
>
> I see nothing component specific in your ResRef so I'd #mountResource() it.
> This way it will be always available.
>
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Mar 13, 2015 at 6:40 PM, Bruce Lombardi 
> wrote:
>
> > I have a PdfViewer page that contains a panel that displays a 
> > dynamically generated PDF using a resource reference. This works 
> > fine in Wicket 6.12.0, but when I upgrade to 6.13.0 it stops working 
> > (just changed Maven dependency
> > - no code changes). No errors are displayed and the html is 
> > generated exactly as it is with 6.12, but the pdf does not show up in the 
> > page.
> >
> > By setting a breakpoint in Eclipse I have determined that code in 
> > the resource that produces the response (newResourceResponse) is 
> > never called in 6.13. After migrating to the latest version (6.19) I 
> > still get the problem.
> > I've looked at the release notes for version 6.13 and see some 
> > changes related to IResource but nothing that looks related to this problem.
> >
> > I'm hoping someone has seen something similar. Here is some of the 
> > relevant
> > code:
> >
> > PdfViewer .html - just has reference to panel
> >
> >
> >
> >
> >
> > PdfPane.html - just has object reference
> >
> > Raw HTML
> >
> > > height="80%">
> >
> >
> >
> > Generated HTML - seen with view source in browser
> >
> >  data="./resource/org.apache.wicket.Application/pdfProducer"
> >
> >border="1" width="80%" height="80%">
> >
> >
> >
> > PdfPanel.java - has setup for resource reference
> >
> > public class PdfPanel extends Panel {
> >
> >
> >
> >private static final long serialVersionUID = 1L;
> >
> >
> >
> >public PdfPanel(String id) {
> >
> >   super(id);
> >
> >
> >
> >   ResourceReference resourceReference = new 
> > ResourceReference(
> >
> >"pdfProducer") {
> >
> >  private static final long serialVersionUID = 
> > 1L;
> >
> >
> >
> >  @Override
> >
> >  public IResource getResource() {
> >
> >WebDocsSession session = 
> > (WebDocsSession)getSession();
> >
> >
> >
> >final byte[] pdf = session.getPdf();
> >
> >
> >
> >if(pdf == null)
> >
> > System.out.println("PdfPanel session.getPdf returned null");
> >
> >
> >
> > PdfResour

RE: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-13 Thread Bruce Lombardi
Martin,

I'm looking into mounting the resource but there is something that I don't 
understand. 
Currently I am creating the resource in my panel and passing the pdf I want to 
display into the constructor of the resource. If I mount the resource, how do I 
provide it with the dynamically generated pdf? I don't even see a way of 
getting a hold of the resourceReference object created and mounted in the  
WebApplication init() method. Perhaps I need to also register it as an 
application-shared resource, then access it in my panel constructor and add the 
pdf there?

Bruce

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, March 13, 2015 12:53 PM
To: users@wicket.apache.org
Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Hi,

I think I see what happens.
The ResRef is created as a local variable to create the url and then discarded.
Wicket has something called ResourceReferenceRegistry. When a ResRef is used to 
create an url to it it is automatically registered in the registry.
It seems after 6.13 there is no such auto-registration for your ResRef for some 
reason.
You should have some WARNs in the logs.

I see nothing component specific in your ResRef so I'd #mountResource() it.
This way it will be always available.


Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Mar 13, 2015 at 6:40 PM, Bruce Lombardi  wrote:

> I have a PdfViewer page that contains a panel that displays a 
> dynamically generated PDF using a resource reference. This works fine 
> in Wicket 6.12.0, but when I upgrade to 6.13.0 it stops working (just 
> changed Maven dependency
> - no code changes). No errors are displayed and the html is generated 
> exactly as it is with 6.12, but the pdf does not show up in the page.
>
> By setting a breakpoint in Eclipse I have determined that code in the 
> resource that produces the response (newResourceResponse) is never 
> called in 6.13. After migrating to the latest version (6.19) I still 
> get the problem.
> I've looked at the release notes for version 6.13 and see some changes 
> related to IResource but nothing that looks related to this problem.
>
> I'm hoping someone has seen something similar. Here is some of the 
> relevant
> code:
>
> PdfViewer .html - just has reference to panel
>
>
>
>
>
> PdfPane.html - just has object reference
>
> Raw HTML
>
> height="80%">
>
>
>
> Generated HTML - seen with view source in browser
>
> 
>border="1" width="80%" height="80%">
>
>
>
> PdfPanel.java - has setup for resource reference
>
> public class PdfPanel extends Panel {
>
>
>
>private static final long serialVersionUID = 1L;
>
>
>
>public PdfPanel(String id) {
>
>   super(id);
>
>
>
>   ResourceReference resourceReference = new 
> ResourceReference(
>
>"pdfProducer") {
>
>  private static final long serialVersionUID = 1L;
>
>
>
>  @Override
>
>  public IResource getResource() {
>
>WebDocsSession session = 
> (WebDocsSession)getSession();
>
>
>
>final byte[] pdf = session.getPdf();
>
>
>
>if(pdf == null)
>
> System.out.println("PdfPanel session.getPdf returned null");
>
>
>
> PdfResourceProducer pdfResourceProducer =
>
> new PdfResourceProducer(pdf);
>
>
>
>return pdfResourceProducer;
>
>  }
>
>   };
>
>
>
> String url = 
> (String)RequestCycle.get().urlFor(resourceReference,
> null);
>
>
>
> MarkupContainer wmc = new WebMarkupContainer("pdf");
>
> wmc.add(new AttributeModifier("data", url));
>
> add(wmc);
>
>}
>
>
>
> PdfProducer.java - implements the Resource
>
> public class PdfResourceProducer extends 
> AbstractResource {
>
>
>
>private static final long serialVersionUID = 
> -2245331056747467763L;
>
>final byte[] pdfByteArray;
>
>
>
>
>
>public PdfResourceProducer(byte[] pdfByteArray) {
>
>   super();
>
>   this.pdfByteArray = pdfByteArray;
>
>   if(pdfByteArray == null) {
>
>  System.out.println("PdfResourceProducer 
> constructor called with
>
> null byte array.&q

RE: PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-13 Thread Bruce Lombardi
Thanks Martin. 

I'm not getting any WARN messages in the logs. 
I'll take a look at mounting the resource.

Bruce

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, March 13, 2015 12:53 PM
To: users@wicket.apache.org
Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but not in 
6.13

Hi,

I think I see what happens.
The ResRef is created as a local variable to create the url and then discarded.
Wicket has something called ResourceReferenceRegistry. When a ResRef is used to 
create an url to it it is automatically registered in the registry.
It seems after 6.13 there is no such auto-registration for your ResRef for some 
reason.
You should have some WARNs in the logs.

I see nothing component specific in your ResRef so I'd #mountResource() it.
This way it will be always available.


Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Mar 13, 2015 at 6:40 PM, Bruce Lombardi  wrote:

> I have a PdfViewer page that contains a panel that displays a 
> dynamically generated PDF using a resource reference. This works fine 
> in Wicket 6.12.0, but when I upgrade to 6.13.0 it stops working (just 
> changed Maven dependency
> - no code changes). No errors are displayed and the html is generated 
> exactly as it is with 6.12, but the pdf does not show up in the page.
>
> By setting a breakpoint in Eclipse I have determined that code in the 
> resource that produces the response (newResourceResponse) is never 
> called in 6.13. After migrating to the latest version (6.19) I still 
> get the problem.
> I've looked at the release notes for version 6.13 and see some changes 
> related to IResource but nothing that looks related to this problem.
>
> I'm hoping someone has seen something similar. Here is some of the 
> relevant
> code:
>
> PdfViewer .html - just has reference to panel
>
>
>
>
>
> PdfPane.html - just has object reference
>
> Raw HTML
>
> height="80%">
>
>
>
> Generated HTML - seen with view source in browser
>
> 
>border="1" width="80%" height="80%">
>
>
>
> PdfPanel.java - has setup for resource reference
>
> public class PdfPanel extends Panel {
>
>
>
>private static final long serialVersionUID = 1L;
>
>
>
>public PdfPanel(String id) {
>
>   super(id);
>
>
>
>   ResourceReference resourceReference = new 
> ResourceReference(
>
>"pdfProducer") {
>
>  private static final long serialVersionUID = 1L;
>
>
>
>  @Override
>
>  public IResource getResource() {
>
>WebDocsSession session = 
> (WebDocsSession)getSession();
>
>
>
>final byte[] pdf = session.getPdf();
>
>
>
>if(pdf == null)
>
> System.out.println("PdfPanel session.getPdf returned null");
>
>
>
> PdfResourceProducer pdfResourceProducer =
>
> new PdfResourceProducer(pdf);
>
>
>
>return pdfResourceProducer;
>
>  }
>
>   };
>
>
>
> String url = 
> (String)RequestCycle.get().urlFor(resourceReference,
> null);
>
>
>
> MarkupContainer wmc = new WebMarkupContainer("pdf");
>
> wmc.add(new AttributeModifier("data", url));
>
> add(wmc);
>
>}
>
>
>
> PdfProducer.java - implements the Resource
>
> public class PdfResourceProducer extends 
> AbstractResource {
>
>
>
>private static final long serialVersionUID = 
> -2245331056747467763L;
>
>final byte[] pdfByteArray;
>
>
>
>
>
>public PdfResourceProducer(byte[] pdfByteArray) {
>
>   super();
>
>   this.pdfByteArray = pdfByteArray;
>
>   if(pdfByteArray == null) {
>
>  System.out.println("PdfResourceProducer 
> constructor called with
>
> null byte array.");
>
>   }
>
>}
>
>
>
>@Override
>
>protected ResourceResponse newResourceResponse(Attributes
> attributes)
> {
>
>   ResourceResponse resourceResponse = new 
> ResourceResponse();
>
>   resourceResponse.setContentType("application/pdf");
>
>   // resourceResponse.setT

PDF viewed in panel via ResourceReference works in 6.12 but not in 6.13

2015-03-13 Thread Bruce Lombardi
I have a PdfViewer page that contains a panel that displays a dynamically
generated PDF using a resource reference. This works fine in Wicket 6.12.0,
but when I upgrade to 6.13.0 it stops working (just changed Maven dependency
- no code changes). No errors are displayed and the html is generated
exactly as it is with 6.12, but the pdf does not show up in the page.

By setting a breakpoint in Eclipse I have determined that code in the
resource that produces the response (newResourceResponse) is never called in
6.13. After migrating to the latest version (6.19) I still get the problem.
I've looked at the release notes for version 6.13 and see some changes
related to IResource but nothing that looks related to this problem.

I'm hoping someone has seen something similar. Here is some of the relevant
code:

PdfViewer .html - just has reference to panel

   

 

PdfPane.html - just has object reference

Raw HTML

   

 

Generated HTML - seen with view source in browser



 

PdfPanel.java - has setup for resource reference

public class PdfPanel extends Panel {

   

   private static final long serialVersionUID = 1L;

 

   public PdfPanel(String id) {

  super(id);

  

  ResourceReference resourceReference = new ResourceReference(

   "pdfProducer") {

 private static final long serialVersionUID = 1L;

 

 @Override

 public IResource getResource() {

   WebDocsSession session =
(WebDocsSession)getSession();

 

   final byte[] pdf = session.getPdf();

   

   if(pdf == null)

System.out.println("PdfPanel session.getPdf returned null");

 

PdfResourceProducer pdfResourceProducer = 

new PdfResourceProducer(pdf);

 

   return pdfResourceProducer;

 }

  };



String url = (String)RequestCycle.get().urlFor(resourceReference,
null);

  

MarkupContainer wmc = new WebMarkupContainer("pdf");

wmc.add(new AttributeModifier("data", url));

add(wmc);

   }

 

PdfProducer.java - implements the Resource

public class PdfResourceProducer extends AbstractResource {

 

   private static final long serialVersionUID = -2245331056747467763L;

   final byte[] pdfByteArray;

 

 

   public PdfResourceProducer(byte[] pdfByteArray) {

  super();

  this.pdfByteArray = pdfByteArray;

  if(pdfByteArray == null) {

 System.out.println("PdfResourceProducer constructor
called with

null byte array.");

  }

   }

 

   @Override

   protected ResourceResponse newResourceResponse(Attributes attributes)
{

  ResourceResponse resourceResponse = new ResourceResponse();

  resourceResponse.setContentType("application/pdf");

  // resourceResponse.setTextEncoding("utf-8");

 

  resourceResponse.setContentLength((int)pdfByteArray.length);

  

  resourceResponse.disableCaching(); //do not allow resource to
be cached.

 

  resourceResponse.setWriteCallback(new WriteCallback() {

 @Override

 public void writeData(Attributes attributes) throws
IOException {

   try {

  OutputStream outputStream =
attributes.getResponse()

.getOutputStream();

  outputStream.write(pdfByteArray);

  outputStream.flush();

   } catch (IOException e) {

  throw new WicketRuntimeException(

"Problems writing pdf to
response...");

   }

     }

  });

 

  return resourceResponse;

   }

 

Bruce

 



RE: Can I process a POST with simple non-Json parameters using wicket-restannotations

2014-08-06 Thread Bruce Lombardi
Thanks for pointing me in the right direction, I will look at the links you
sent.
I don't care if I get a post of a get, but it I know it will be a post with
an order confirmation.

- Bruce

-Original Message-
From: Paul Bors [mailto:p...@bors.ws] 
Sent: Wednesday, August 06, 2014 12:38 AM
To: users@wicket.apache.org
Subject: Re: Can I process a POST with simple non-Json parameters using
wicket-restannotations

I think you might be looking for the query parameters of the
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/request
/Request.html class.

See Chapter 9 of the Wicket Guide:
http://wicket.apache.org/guide/guide/single.html#requestProcessing

You can get to the Request from any of the Components on your page. Thus you
can have a bookmarkable URL and in the constructor of that page you can grab
the request and extract the parameters from it.

Do you care if the request is POST or GET?
Wicket abstracts that out for you via the query parameters.

~ Thank you,
   Paul Bors

On Aug 5, 2014, at 5:07 PM, Bruce Lombardi  wrote:

> Hi,
> 
> 
> 
> I have successfully setup a restful service using Wicketstuff 
> wicket-restannotation that accepts Json parameters. But I need to 
> write something in Wicket that will accepts a post of an order 
> confirmation from another source that does not use Json. Is there a 
> simple way of doing that with wicket-restannotations? I only see how 
> to process Json. I know that Json standard for a restful service, so I 
> may have to do something else, like using @MountPath and pulling the
parameters out of the request.
> 
> 
> 
> Bruce
> 



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



Can I process a POST with simple non-Json parameters using wicket-restannotations

2014-08-05 Thread Bruce Lombardi
Hi,

 

I have successfully setup a restful service using Wicketstuff
wicket-restannotation that accepts Json parameters. But I need to write
something in Wicket that will accepts a post of an order confirmation from
another source that does not use Json. Is there a simple way of doing that
with wicket-restannotations? I only see how to process Json. I know that
Json standard for a restful service, so I may have to do something else,
like using @MountPath and pulling the parameters out of the request.

 

Bruce



Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https

2014-08-02 Thread Bruce Lombardi
Thanks again!

Bruce

Sent from my iPad

> On Aug 2, 2014, at 6:26 AM, Andrea Del Bene  wrote:
> 
> You can use method AbstractRestResource.setResponseStatusCode
>> Thanks Andrea. I'm working this out.  Now I have one more question:
>> 
>> How can I return an Http 401 Status Code of Unauthorized if the password is
>> incorrect? I know I can return values, such as the PersonPojo in the
>> example, and I can return error messages
>> from the from a registered validator, but I think it is standard to return
>> 401 on authentication failure. Can I return a Status Code?
>> 
>> Bruce
>> 
>> -Original Message-
>> From: Andrea Del Bene [mailto:an.delb...@gmail.com]
>> Sent: Friday, August 01, 2014 12:26 PM
>> To: users@wicket.apache.org
>> Subject: Re: Wicketstuff restannotations example throws
>> IllegalStateException: STREAMED with https
>> 
>> I would pass them as request parameters...
>>> Andrea,
>>> 
>>> I have the SSL working fine when I call it from a Java program using
>>> HttpsURLConnection. So it was something with "curl."
>>> 
>>> I wonder if you could suggest how I could pass a username and password
>>> along with the json string and authenticate the request.
>>> 
>>> Thanks,
>>> 
>>> Bruce
>> 
>> -
>> 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: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https

2014-08-01 Thread Bruce Lombardi
Thanks Andrea. I'm working this out.  Now I have one more question:

How can I return an Http 401 Status Code of Unauthorized if the password is
incorrect? I know I can return values, such as the PersonPojo in the
example, and I can return error messages 
from the from a registered validator, but I think it is standard to return
401 on authentication failure. Can I return a Status Code?

Bruce

-Original Message-
From: Andrea Del Bene [mailto:an.delb...@gmail.com] 
Sent: Friday, August 01, 2014 12:26 PM
To: users@wicket.apache.org
Subject: Re: Wicketstuff restannotations example throws
IllegalStateException: STREAMED with https

I would pass them as request parameters...
> Andrea,
>
> I have the SSL working fine when I call it from a Java program using 
> HttpsURLConnection. So it was something with "curl."
>
> I wonder if you could suggest how I could pass a username and password 
> along with the json string and authenticate the request.
>
> Thanks,
>
> Bruce
>


-
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: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https

2014-07-31 Thread Bruce Lombardi
Andrea,

I have the SSL working fine when I call it from a Java program using
HttpsURLConnection. So it was something with "curl."  

I wonder if you could suggest how I could pass a username and password along
with the json string and authenticate the request.

Thanks,

Bruce

-Original Message-
From: Andrea Del Bene [mailto:an.delb...@gmail.com] 
Sent: Thursday, July 31, 2014 8:06 AM
To: users@wicket.apache.org
Subject: Re: Wicketstuff restannotations example throws
IllegalStateException: STREAMED with https

I started the example app with Maven and enabling the SSL port. I've tested
it with Firefox, although I had to disable the flag
security.mixed_content.block_active_content to load the JS libraries. I had
no problem with the REST operations (GET, POST, DELETE...), everything
worked fine usin SSL. Maybe the problem is with curl and SSL handling?
> I just stated it by running Start.java as a java application  to start
Jetty from Eclipse.
>
> Bruce
>
> Sent from my iPad
>
>> On Jul 31, 2014, at 6:09 AM, Andrea Del Bene 
wrote:
>>
>> Hi,
>>
>> how did you started the example application?
>>> I want to use the wicketstuff-restannotations library to implement a 
>>> restful web service. It seem very handy and I was able to get the 
>>> example code working fine.
>>>
>>> To make sure I understood how everything was working and how to 
>>> access from another server I used curl from the command line to send an
HTTP request.
>>>
>>> It worked fine using http with jetty, but when I tried 
>>> http://localhost:8443 I get  IllegalStateException: STREAMED.
>>>
>>> See the details below:
>>>
>>>   
>>> The following works using curl to post:
>>>
>>>   
>>> C:\Software\Curl>curl
>>>
>>> -H "Content-Type: application/json"
>>>
>>> -d {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
>>>
>>> http://localhost:8080/personsmanager/createPerson
>>>
>>>   
>>> It returns this:
>>>
>>>   
>>> {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
>>>
>>>   
>>> With the following HTTPS curl command I get IllegalStateException: 
>>> STREAMED
>>> (note: the " -k/ --insecure" switch tells curl not to validate the 
>>> certificate since it is not in their list)
>>>
>>>   
>>> C:\Software\Curl>curl
>>>
>>> -H -k/ --insecure "Content-Type: application/json"
>>>
>>> -d {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
>>> https://localhost:8443
>>>
>>> /personsmanager/persons
>>>
>>>   
>>> Stacktrace shows:
>>>
>>>   
>>> java.lang.IllegalStateException: STREAMED
>>>
>>>  at
>>> org.eclipse.jetty.server.Request.getReader(Request.java:787)
>>>
>>>  at
>>> org.wicketstuff.rest.utils.http.HttpUtils.readStringFromRequest(Http
>>> Utils.ja
>>> va:46)
>>>
>>>  at
>>> org.wicketstuff.rest.contenthandling.serialdeserial.TextualWebSerial
>>> Deserial
>>> .requestToObject(TextualWebSerialDeserial.java:83)
>>>
>>>  at
>>> org.wicketstuff.rest.utils.reflection.MethodParameter.deserializeObj
>>> ectFromR
>>> equest(MethodParameter.java:278)
>>>
>>>  at
>>> org.wicketstuff.rest.utils.reflection.MethodParameter.extractParamet
>>> erFromAn
>>> notation(MethodParameter.java:168)
>>>
>>>  at
>>> org.wicketstuff.rest.utils.reflection.MethodParameter.extractParamet
>>> erValue(
>>> MethodParameter.java:117)
>>>
>>>   
>>> Does this mean that it the restful annotation will not work over 
>>> https, or am I doing something wrong?
>>>
>>>   
>>> Bruce
>>
>> -
>> 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: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https

2014-07-31 Thread Bruce Lombardi
Thanks, I'll try it with another approach. I'll let you know.

Bruce

Sent from my iPad

> On Jul 31, 2014, at 8:05 AM, Andrea Del Bene  wrote:
> 
> I started the example app with Maven and enabling the SSL port. I've tested 
> it with Firefox, although I had to disable the flag 
> security.mixed_content.block_active_content to load the JS libraries. I had 
> no problem with the REST operations (GET, POST, DELETE...), everything  
> worked fine usin SSL. Maybe the problem is with curl and SSL handling?
>> I just stated it by running Start.java as a java application  to start Jetty 
>> from Eclipse.
>> 
>> Bruce
>> 
>> Sent from my iPad
>> 
>>> On Jul 31, 2014, at 6:09 AM, Andrea Del Bene  wrote:
>>> 
>>> Hi,
>>> 
>>> how did you started the example application?
>>>> I want to use the wicketstuff-restannotations library to implement a 
>>>> restful
>>>> web service. It seem very handy and I was able to get the example code
>>>> working fine.
>>>> 
>>>> To make sure I understood how everything was working and how to access from
>>>> another server I used curl from the command line to send an HTTP request.
>>>> 
>>>> It worked fine using http with jetty, but when I tried 
>>>> http://localhost:8443
>>>> I get  IllegalStateException: STREAMED.
>>>> 
>>>> See the details below:
>>>> 
>>>>  The following works using curl to post:
>>>> 
>>>>  C:\Software\Curl>curl
>>>> 
>>>> -H "Content-Type: application/json"
>>>> 
>>>> -d {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
>>>> 
>>>> http://localhost:8080/personsmanager/createPerson
>>>> 
>>>>  It returns this:
>>>> 
>>>>  {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
>>>> 
>>>>  With the following HTTPS curl command I get IllegalStateException: 
>>>> STREAMED
>>>> (note: the " -k/ --insecure" switch tells curl not to validate the
>>>> certificate since it is not in their list)
>>>> 
>>>>  C:\Software\Curl>curl
>>>> 
>>>> -H -k/ --insecure "Content-Type: application/json"
>>>> 
>>>> -d {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
>>>> https://localhost:8443
>>>> 
>>>> /personsmanager/persons
>>>> 
>>>>  Stacktrace shows:
>>>> 
>>>>  java.lang.IllegalStateException: STREAMED
>>>> 
>>>> at
>>>> org.eclipse.jetty.server.Request.getReader(Request.java:787)
>>>> 
>>>> at
>>>> org.wicketstuff.rest.utils.http.HttpUtils.readStringFromRequest(HttpUtils.ja
>>>> va:46)
>>>> 
>>>> at
>>>> org.wicketstuff.rest.contenthandling.serialdeserial.TextualWebSerialDeserial
>>>> .requestToObject(TextualWebSerialDeserial.java:83)
>>>> 
>>>> at
>>>> org.wicketstuff.rest.utils.reflection.MethodParameter.deserializeObjectFromR
>>>> equest(MethodParameter.java:278)
>>>> 
>>>> at
>>>> org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterFromAn
>>>> notation(MethodParameter.java:168)
>>>> 
>>>> at
>>>> org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterValue(
>>>> MethodParameter.java:117)
>>>> 
>>>>  Does this mean that it the restful annotation will not work over https, or
>>>> am I doing something wrong?
>>>> 
>>>>  Bruce
>>> 
>>> -
>>> 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: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https

2014-07-31 Thread Bruce Lombardi
I just stated it by running Start.java as a java application  to start Jetty 
from Eclipse. 

Bruce

Sent from my iPad

> On Jul 31, 2014, at 6:09 AM, Andrea Del Bene  wrote:
> 
> Hi,
> 
> how did you started the example application?
>> I want to use the wicketstuff-restannotations library to implement a restful
>> web service. It seem very handy and I was able to get the example code
>> working fine.
>> 
>> To make sure I understood how everything was working and how to access from
>> another server I used curl from the command line to send an HTTP request.
>> 
>> It worked fine using http with jetty, but when I tried http://localhost:8443
>> I get  IllegalStateException: STREAMED.
>> 
>> See the details below:
>> 
>>  
>> The following works using curl to post:
>> 
>>  
>> C:\Software\Curl>curl
>> 
>> -H "Content-Type: application/json"
>> 
>> -d {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
>> 
>> http://localhost:8080/personsmanager/createPerson
>> 
>>  
>> It returns this:
>> 
>>  
>> {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
>> 
>>  
>> With the following HTTPS curl command I get IllegalStateException: STREAMED
>> (note: the " -k/ --insecure" switch tells curl not to validate the
>> certificate since it is not in their list)
>> 
>>  
>> C:\Software\Curl>curl
>> 
>> -H -k/ --insecure "Content-Type: application/json"
>> 
>> -d {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
>> https://localhost:8443
>> 
>> /personsmanager/persons
>> 
>>  
>> Stacktrace shows:
>> 
>>  
>> java.lang.IllegalStateException: STREAMED
>> 
>> at
>> org.eclipse.jetty.server.Request.getReader(Request.java:787)
>> 
>> at
>> org.wicketstuff.rest.utils.http.HttpUtils.readStringFromRequest(HttpUtils.ja
>> va:46)
>> 
>> at
>> org.wicketstuff.rest.contenthandling.serialdeserial.TextualWebSerialDeserial
>> .requestToObject(TextualWebSerialDeserial.java:83)
>> 
>> at
>> org.wicketstuff.rest.utils.reflection.MethodParameter.deserializeObjectFromR
>> equest(MethodParameter.java:278)
>> 
>> at
>> org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterFromAn
>> notation(MethodParameter.java:168)
>> 
>> at
>> org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterValue(
>> MethodParameter.java:117)
>> 
>>  
>> Does this mean that it the restful annotation will not work over https, or
>> am I doing something wrong?
>> 
>>  
>> Bruce
> 
> 
> -
> 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



Wicketstuff restannotations example throws IllegalStateException: STREAMED with https

2014-07-30 Thread Bruce Lombardi
I want to use the wicketstuff-restannotations library to implement a restful
web service. It seem very handy and I was able to get the example code
working fine.

To make sure I understood how everything was working and how to access from
another server I used curl from the command line to send an HTTP request.

It worked fine using http with jetty, but when I tried http://localhost:8443
I get  IllegalStateException: STREAMED.

See the details below:

 

The following works using curl to post:

 

C:\Software\Curl>curl 

-H "Content-Type: application/json" 

-d {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"} 

http://localhost:8080/personsmanager/createPerson

 

It returns this:

 

{"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}

 

With the following HTTPS curl command I get IllegalStateException: STREAMED
(note: the " -k/ --insecure" switch tells curl not to validate the
certificate since it is not in their list)

 

C:\Software\Curl>curl 

-H -k/ --insecure "Content-Type: application/json" 

-d {"name":"Bruce","email":"myacco...@gmail.com","password":"piano"}
https://localhost:8443

/personsmanager/persons

 

Stacktrace shows:

 

java.lang.IllegalStateException: STREAMED

at
org.eclipse.jetty.server.Request.getReader(Request.java:787)

at
org.wicketstuff.rest.utils.http.HttpUtils.readStringFromRequest(HttpUtils.ja
va:46)

at
org.wicketstuff.rest.contenthandling.serialdeserial.TextualWebSerialDeserial
.requestToObject(TextualWebSerialDeserial.java:83)

at
org.wicketstuff.rest.utils.reflection.MethodParameter.deserializeObjectFromR
equest(MethodParameter.java:278)

at
org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterFromAn
notation(MethodParameter.java:168)

at
org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterValue(
MethodParameter.java:117)

 

Does this mean that it the restful annotation will not work over https, or
am I doing something wrong?

 

Bruce



RE: Ajax timer not counting when tab doesn't have focus?

2014-05-27 Thread Bruce Lombardi
For anyone interested, and particularly for Ernesto, I have successfully 
created  a version of the InactivityTimeOutPanel that works even if the user 
changes to another browser tab. The key, which I became aware of from the 
jsfiddle links (see previous posts below is to use an absolute time for when a 
period of inactivity would result in a timeout (timeoutTime,set to now plus an 
interval,, say 5 minutes), and then when the timer fires, to compare the 
current time against the timeoutTime. This seems to avoid the problem of the 
timer slowing down when the user changes to another page. Reset just resets the 
timeoutTime to a now plus the interval. I have set the timer to go off in one 
quarter of the interval, thinking if there are some delays this will keep it 
closer to the mark.

I have tested this and it seems to work fine. 

I only had to change the JavaScript in Ernesto's example to get everything  to 
work, and I have posted the code here:  http://pastebin.com/TWwS5hhE
for people to see.

Ernesto, It would be great if you could put this code into the JavaScript in 
your example and try it out. Then we would have a complete example to point 
people to if it works OK.

Regards,

Bruce


-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Friday, May 16, 2014 2:42 PM
To: users@wicket.apache.org
Subject: Re: Ajax timer not counting when tab doesn't have focus?

Bruce.

Let me see if I can find some time during weekend to play a bit with the links 
your provided and come up with a more robust solution.


On Fri, May 16, 2014 at 3:57 PM, Bruce Lombardi  wrote:

> First, thank you  for your continuing interest. This is the best 
> support group experience  I've ever had. I hope the message come in 
> the right sequence. Lke Ernesto and other A saw the sequencing problem 
> cause by the apache server problem.
>
> I ran the test that Martin suggestion with  6.16.0-SNAPSHOTand got the 
> same behavior, which is what Ernesto and I suspected would happen.
>
> I'm sorry, but I don't know a lot about JavaScript so I'm having with 
> certain things.  I read this article in stackoverflow:
>
>
> https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-s
> uspended-in-background-tabs
>
> Which lead to this:
>
>
> http://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-
> also-work-when-a-tab-is-inactive-in-chrome
>
>
> Which contained an example of a script that doesn’t work correctly (if 
> you go to it, you will see that  it walks the word "test"  across the screen.
> If you go to another  tab and come back "test" hasn’t moved)
>
> http://jsfiddle.net/7f6DX/3/
>
>
> and this example that works (does the same thing but you can see that 
> "test"  moves even when you go to another  tab - but don't go away too 
> long it will reach the end and disappear).
>
> http://jsfiddle.net/7f6DX/31/
>
> Do you think the last (working) script  could be adapted  for our timeout?
>
> Regards,
> Bruce
>
>
>
> -Original Message-
> From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
> Sent: Tuesday, May 13, 2014 1:59 AM
> To: users@wicket.apache.org
> Subject: Re: Ajax timer not counting when tab doesn't have focus?
>
> Martin,
>
> Thanks for pointing out this. The exact JavaScript enabling this 
> feature can be found here
>
>
> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-p
> arent/client-sign-out/src/main/java/com/antilia/signout/InactivitySign
> OutPanel.js
>
> Maybe there is a memory leak in here as well... but I do not see the 
> relation with WICKET-5570 as I do not use any of the AJAX timer 
> behavior, see
>
>
> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-p
> arent/client-sign-out/src/main/java/com/antilia/signout/InactivitySign
> OutPanel.java
>
> As Bruce describes the problem it sounds like if by switching to other 
> tab browser give less "priority" to the execution of JavaScript in 
> inactive tabs.
>
>
>
> On Mon, May 12, 2014 at 9:28 PM, Martin Grigorov  >wrote:
>
> > It could be that https://issues.apache.org/jira/browse/WICKET-5570 
> > is the issue.
> > Please try with 6.16.0-SNAPSHOT if you can.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> >
> >
> > On Mon, May 12, 2014 at 8:02 PM, Bruce Lombardi 
> > wrote:
> >
> > > Thanks Ernesto.
> > >
> > > Yes, I do mean another browser tab. I have some new information. 
> > > The
> > timer
> > > seems to slow way down, but not stop counting down when the user 
> > > switches focus to another tab, e

Re: How can I display modal dialog only if validation is sucessful?

2014-05-23 Thread Bruce Lombardi
Thanks Francois, 

I've been busy on another task. I'll look at the code soon.

Bruce

Sent from my iPad

> On May 22, 2014, at 5:48 AM, Francois Meillet  
> wrote:
> 
> Hi Bruce,
> 
> This is just one solution :
> Have a look at http://pastebin.com/03DF5pcw
> 
> 
> François Meillet
> Formation Wicket - Développement Wicket
> 
> 
> 
> 
> 
>> Le 21 mai 2014 à 16:15, Bruce Lombardi  a écrit :
>> 
>> Hi,
>> 
>> 
>> 
>> I have a form with several question that a user must answer. If the answers
>> are correct, an email is sent to the user and the user is returned to the
>> login page. That's a bit abrupt for the user and I  would like to provide a
>> simple modal dialog that confirms that the email is sent before sending them
>> to the home page. However, if the answers to the questions are not correct,
>> then a feedback panel must be displayed.
>> 
>> 
>> 
>> I've looked at the approaches to providing a confirmation panel in this link
>> https://cwiki.apache.org/confluence/display/WICKET/Getting+user+confirmation
>> and other places, but I am having a problem with the approach. The
>> JavaScript seems to run as soon as the button is clicked - before onSubmit
>> or onValidate runs on the server. So I can't stop the pop-up from showing
>> if the questions were not answered correctly.
>> 
>> 
>> 
>> Does anyone know a way I can display the modal dialog only after validation
>> has run?
>> 
>> 
>> 
>> Thanks,
>> 
>> 
>> 
>> Bruce
> 

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



How can I display modal dialog only if validation is sucessful?

2014-05-21 Thread Bruce Lombardi
Hi,

 

I have a form with several question that a user must answer. If the answers
are correct, an email is sent to the user and the user is returned to the
login page. That's a bit abrupt for the user and I  would like to provide a
simple modal dialog that confirms that the email is sent before sending them
to the home page. However, if the answers to the questions are not correct,
then a feedback panel must be displayed.

 

I've looked at the approaches to providing a confirmation panel in this link
https://cwiki.apache.org/confluence/display/WICKET/Getting+user+confirmation
and other places, but I am having a problem with the approach. The
JavaScript seems to run as soon as the button is clicked - before onSubmit
or onValidate runs on the server. So I can't stop the pop-up from showing
if the questions were not answered correctly.

 

Does anyone know a way I can display the modal dialog only after validation
has run?

 

Thanks,

 

Bruce

 



Re: problem with message order delivered to wicket users list

2014-05-16 Thread Bruce Lombardi
Yes, I have been seeing the same thing. I also saw a reply that didn't include 
someone else's previous response.

Bruce

Sent from my iPad

> On May 14, 2014, at 12:21 AM, Ernesto Reinaldo Barreiro  
> wrote:
> 
> Hi,
> 
> I the last couple of days I have been experiencing problems with the order
> of messages delivered to wicket users list: sometimes I receive an answer
> and then a few minutes after the original message. Is someone else
> experiencing this behavior?
> 
> -- 
> Regards - Ernesto Reinaldo Barreiro

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



RE: Ajax timer not counting when tab doesn't have focus?

2014-05-16 Thread Bruce Lombardi
First, thank you  for your continuing interest. This is the best support group 
experience  I've ever had. I hope the message come in the right sequence. Lke 
Ernesto and other A saw the sequencing problem cause by the apache server 
problem.

I ran the test that Martin suggestion with  6.16.0-SNAPSHOTand got the same 
behavior, which is what Ernesto and I suspected would happen.

I'm sorry, but I don't know a lot about JavaScript so I'm having with certain 
things.  I read this article in stackoverflow:

https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-suspended-in-background-tabs

Which lead to this:

http://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-also-work-when-a-tab-is-inactive-in-chrome


Which contained an example of a script that doesn’t work correctly (if you go 
to it, you will see that  it walks the word "test"  across the screen. If you 
go to another  tab and come back "test" hasn’t moved)

http://jsfiddle.net/7f6DX/3/


and this example that works (does the same thing but you can see that "test"  
moves even when you go to another  tab - but don't go away too long it will 
reach the end and disappear).

http://jsfiddle.net/7f6DX/31/

Do you think the last (working) script  could be adapted  for our timeout?

Regards,
Bruce



-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Tuesday, May 13, 2014 1:59 AM
To: users@wicket.apache.org
Subject: Re: Ajax timer not counting when tab doesn't have focus?

Martin,

Thanks for pointing out this. The exact JavaScript enabling this feature can be 
found here

https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySignOutPanel.js

Maybe there is a memory leak in here as well... but I do not see the relation 
with WICKET-5570 as I do not use any of the AJAX timer behavior, see

https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySignOutPanel.java

As Bruce describes the problem it sounds like if by switching to other tab 
browser give less "priority" to the execution of JavaScript in inactive tabs.



On Mon, May 12, 2014 at 9:28 PM, Martin Grigorov wrote:

> It could be that https://issues.apache.org/jira/browse/WICKET-5570 is 
> the issue.
> Please try with 6.16.0-SNAPSHOT if you can.
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Mon, May 12, 2014 at 8:02 PM, Bruce Lombardi 
> wrote:
>
> > Thanks Ernesto.
> >
> > Yes, I do mean another browser tab. I have some new information. The
> timer
> > seems to slow way down, but not stop counting down when the user 
> > switches focus to another tab, either opening a new tab, or just 
> > clicking on
> another
> > tab. This is happening in both Chrome and Firefox.
> >
> > I thought that my code was never timing out, but further 
> > experimentation with a shorter timeout period shows that it is doing 
> > the same thing as
> the
> > demo. That is, timing out in about 10 second when you stay on the 
> > tab,
> but
> > taking 3 minutes or longer to timeout when if you change focus to a 
> > different tab.
> >
> > I would appreciate it if you could look at your demo and see the 
> > behavior and then see if you have any ideas.
> >
> > As for my code, I really feel they difference with your code are 
> > insignificant especially now that I know the behavior is the same.
> >
> > See below for the differences.
> >
> > Thanks again,
> >
> > Bruce
> >
> >
> > Code.
> >
> > I have your InactivitySignOutPanel.java, InactivitySignOutPanel.html 
> > and InactivitySignOutPanel.js from the GitHub site with one slight
> modification
> > in InactivitySignOutPanel.java (see below).
> >
> >  I setup my panel in  a base class that serves as a superclass for 
> > all
> the
> > Web pages in the application (extends WebPage)  I have a method that 
> > is called to setup the timeout. Here is the method.
> >
> > public void setupTimeout() {
> >
> > // Change the following value to change the session 
> > timeout.
> > int numberOfMinutesUntilTimeout = 15;
> >
> > int secondsPerMinute = 60;
> > int secondsToTimeout =numberOfMinutesUntilTimeout * 
> > secondsPerMinute;
> >
> > add(new InactivitySignOutPanel("timeout",
> > Duration.seconds(secondsToTimeout)) {
> >
> > private static final long serialVersionUID = 1

RE: Ajax timer not counting when tab doesn't have focus?

2014-05-16 Thread Bruce Lombardi
Thanks Ernesto  that would be great!

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Friday, May 16, 2014 2:42 PM
To: users@wicket.apache.org
Subject: Re: Ajax timer not counting when tab doesn't have focus?

Bruce.

Let me see if I can find some time during weekend to play a bit with the links 
your provided and come up with a more robust solution.


On Fri, May 16, 2014 at 3:57 PM, Bruce Lombardi  wrote:

> First, thank you  for your continuing interest. This is the best 
> support group experience  I've ever had. I hope the message come in 
> the right sequence. Lke Ernesto and other A saw the sequencing problem 
> cause by the apache server problem.
>
> I ran the test that Martin suggestion with  6.16.0-SNAPSHOTand got the 
> same behavior, which is what Ernesto and I suspected would happen.
>
> I'm sorry, but I don't know a lot about JavaScript so I'm having with 
> certain things.  I read this article in stackoverflow:
>
>
> https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-s
> uspended-in-background-tabs
>
> Which lead to this:
>
>
> http://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-
> also-work-when-a-tab-is-inactive-in-chrome
>
>
> Which contained an example of a script that doesn’t work correctly (if 
> you go to it, you will see that  it walks the word "test"  across the screen.
> If you go to another  tab and come back "test" hasn’t moved)
>
> http://jsfiddle.net/7f6DX/3/
>
>
> and this example that works (does the same thing but you can see that 
> "test"  moves even when you go to another  tab - but don't go away too 
> long it will reach the end and disappear).
>
> http://jsfiddle.net/7f6DX/31/
>
> Do you think the last (working) script  could be adapted  for our timeout?
>
> Regards,
> Bruce
>
>
>
> -Original Message-
> From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
> Sent: Tuesday, May 13, 2014 1:59 AM
> To: users@wicket.apache.org
> Subject: Re: Ajax timer not counting when tab doesn't have focus?
>
> Martin,
>
> Thanks for pointing out this. The exact JavaScript enabling this 
> feature can be found here
>
>
> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-p
> arent/client-sign-out/src/main/java/com/antilia/signout/InactivitySign
> OutPanel.js
>
> Maybe there is a memory leak in here as well... but I do not see the 
> relation with WICKET-5570 as I do not use any of the AJAX timer 
> behavior, see
>
>
> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-p
> arent/client-sign-out/src/main/java/com/antilia/signout/InactivitySign
> OutPanel.java
>
> As Bruce describes the problem it sounds like if by switching to other 
> tab browser give less "priority" to the execution of JavaScript in 
> inactive tabs.
>
>
>
> On Mon, May 12, 2014 at 9:28 PM, Martin Grigorov  >wrote:
>
> > It could be that https://issues.apache.org/jira/browse/WICKET-5570 
> > is the issue.
> > Please try with 6.16.0-SNAPSHOT if you can.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> >
> >
> > On Mon, May 12, 2014 at 8:02 PM, Bruce Lombardi 
> > wrote:
> >
> > > Thanks Ernesto.
> > >
> > > Yes, I do mean another browser tab. I have some new information. 
> > > The
> > timer
> > > seems to slow way down, but not stop counting down when the user 
> > > switches focus to another tab, either opening a new tab, or just 
> > > clicking on
> > another
> > > tab. This is happening in both Chrome and Firefox.
> > >
> > > I thought that my code was never timing out, but further 
> > > experimentation with a shorter timeout period shows that it is 
> > > doing the same thing as
> > the
> > > demo. That is, timing out in about 10 second when you stay on the 
> > > tab,
> > but
> > > taking 3 minutes or longer to timeout when if you change focus to 
> > > a different tab.
> > >
> > > I would appreciate it if you could look at your demo and see the 
> > > behavior and then see if you have any ideas.
> > >
> > > As for my code, I really feel they difference with your code are 
> > > insignificant especially now that I know the behavior is the same.
> > >
> > > See below for the differences.
> > >
> > > Thanks again,
> > >
> > > Bruce
> > >
> > >
> > > Code.
> > >
> > > I have your Inact

Ajax timer not counting when tab doesn't have focus?

2014-05-15 Thread Bruce Lombardi
This message  is related to an original thread "Link to Wicket page from
Javascript" but the focus is changed so much  that I though a new title
would be better.  In the earlier thread I asked about linking to a Wicket
page, but the real need was for help in implementing a session timeout that
would send the user to a timeout page after a period of inactivity and would
reset whenever a user clicked any button on the page. 

Ernesto Reinaldo Barreiro sent me links(see below) to a working demo that
did exactly what I required. I used  that code and everything seemed to work
perfectly. However, I have since discovered that my timer does not seem to
function correctly if the user goes to another tab. It seems like the timer
stops timing down or slows way down until the user comes back to the
original tab.

I checked Ernesto's demo. If I go to the demo  page and stay there it times
out after roughly the defined 10 second timeout period,  but if I go to the
demo page, then click on another tab, it eventually times out, but after
more than 3 minutes. My code, however,  never seems to seem to timeout  the
page if I go to another tab.

I really need this to work to  fulfill a requirement and it is preventing
the launch of our software.  It all works fine except if the user goes to a
different tab.

Ernesto, or anyone, do you know why this is happening. Is the ajax timer
stopping when the tab is not selected? Why is the demo eventually timing out
while application is not (can't see any real difference in the code)? Is
there any way to get a better handle on this (e.g., firebug)? If the ajax
timer is stopping, could something be done, perhaps using absolute elapsed
time, to expire the session immediately if the user goes back to the tab?
The latter is not ideal but might be acceptable.

 (Note: My session timeout in web.xml is 30 minutes, client timeout is 15
minutes, but for testing I set it to 10 seconds).


// Links

Demo of Example 

http://107.170.4.97:9080/client-sign-out-demo/?0


Code that sets up example 

https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/
client-sign-out-demo/src/main/java/com/antilia/HomePage.java


Code that provides the implementation (We have this code in  package
com.xyzco.web.docs.presentation.helpers.timeout)


https://github.com/reiern70/antilia-bits/tree/master/client-sign-out-parent/
client-sign-out-demo/src/main/java/com/antilia

Thanks,
Bruce



-Original Message-
From: Bruce Lombardi [mailto:brlom...@gmail.com]
Sent: Monday, March 17, 2014 8:24 AM
To: users@wicket.apache.org
Subject: Re: Link to Wicket page from Javascript

Thanks, this is very helpful.

Bruce

Sent from my iPad

> On Mar 17, 2014, at 4:52 AM, Ernesto Reinaldo Barreiro
 wrote:
> 
> You can see it at work here
> 
> http://107.170.4.97:9080/client-sign-out-demo/
> 
> 
> On Mon, Mar 17, 2014 at 9:18 AM, Ernesto Reinaldo Barreiro < 
> reier...@gmail.com> wrote:
> 
>> Martin,
>> 
>> What I mean is something that triggers the sign out before serve side 
>> session expires... and trigger this expire event.
>> 
>> 
>> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-
>> parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySi
>> gnOutPanel.java
>> 
>> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-
>> parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySi
>> gnOutPanel.js
>> 
>> The above seem to work. You use it as in
>> 
>> 
>> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-
>> parent/client-sign-out-demo/src/main/java/com/antilia/HomePage.java
>> 
>> 
>> 
>> 
>> On Mon, Mar 17, 2014 at 9:11 AM, Martin Grigorov
wrote:
>> 
>>> Hi,
>>> 
>>> On Fri, Mar 14, 2014 at 9:25 PM, Ernesto Reinaldo Barreiro < 
>>> reier...@gmail.com> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I would implement this as..
>>>> 
>>>> 1- A JS function that counts how much time has passed since last 
>>>> AJAX request. Once a certain threshold is passed an AJAX request is 
>>>> sent to
>>> the
>>>> page.
>>>> 2- An AbstractAjaxBehavior that is added to the page. I would use 
>>>> it as context for AJAX request on 1).
>>> 
>>> at that time the session should be already expired.
>>> 
>>> But this can be used to do what is needed here - Wicket will 
>>> redirect to the configured PageExpiredErrorPage.
>>> 
>>> 
>>>> 3- On the respond of AJAXBehavior you redirect to 
>>>> SessionTimeoutPage
>>> and
>>>> invalidate the session.
>>>> 
>&

RE: Ajax timer not counting when tab doesn't have focus?

2014-05-13 Thread Bruce Lombardi
Thanks Martin,

This is important to know about, and I will try with 6.16, but I don't think it 
is related, since it works find if focus isn't changed to a different tab. It 
may be more related to something mentioned by  Serban Balamaci in response to 
Ernesto's questions and the sample code. Serban provided a link to the 
following on stackoverflow: 

https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-suspended-in-background-tabs

The stackoverflow information is about chrome only, but I am seeing this 
behavior in Firefox as well, so I'n not sure it is the whole story.

(By the way, I'm not sure why Serban's message and Ernesto's reply are not 
shown in this message. Maybe you mailed this earlier?)

Regards,

Bruce


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Monday, May 12, 2014 3:28 PM
To: users@wicket.apache.org
Subject: Re: Ajax timer not counting when tab doesn't have focus?

It could be that https://issues.apache.org/jira/browse/WICKET-5570 is the issue.
Please try with 6.16.0-SNAPSHOT if you can.

Martin Grigorov
Wicket Training and Consulting


On Mon, May 12, 2014 at 8:02 PM, Bruce Lombardi  wrote:

> Thanks Ernesto.
>
> Yes, I do mean another browser tab. I have some new information. The 
> timer seems to slow way down, but not stop counting down when the user 
> switches focus to another tab, either opening a new tab, or just 
> clicking on another tab. This is happening in both Chrome and Firefox.
>
> I thought that my code was never timing out, but further 
> experimentation with a shorter timeout period shows that it is doing 
> the same thing as the demo. That is, timing out in about 10 second 
> when you stay on the tab, but taking 3 minutes or longer to timeout 
> when if you change focus to a different tab.
>
> I would appreciate it if you could look at your demo and see the 
> behavior and then see if you have any ideas.
>
> As for my code, I really feel they difference with your code are 
> insignificant especially now that I know the behavior is the same.
>
> See below for the differences.
>
> Thanks again,
>
> Bruce
>
>
> Code.
>
> I have your InactivitySignOutPanel.java, InactivitySignOutPanel.html 
> and InactivitySignOutPanel.js from the GitHub site with one slight 
> modification in InactivitySignOutPanel.java (see below).
>
>  I setup my panel in  a base class that serves as a superclass for all 
> the Web pages in the application (extends WebPage)  I have a method 
> that is called to setup the timeout. Here is the method.
>
> public void setupTimeout() {
>
> // Change the following value to change the session 
> timeout.
> int numberOfMinutesUntilTimeout = 15;
>
> int secondsPerMinute = 60;
> int secondsToTimeout =numberOfMinutesUntilTimeout * 
> secondsPerMinute;
>
> add(new InactivitySignOutPanel("timeout",
> Duration.seconds(secondsToTimeout)) {
>
> private static final long serialVersionUID = 1L;
>
> protected String getOnTimeChangedFunction() {
> return "function(timeRemaining){if(!window.countDown) 
> { window.countDown = $('#countDown'); }  
> $(window.countDown).html(timeRemaining);}";
> }
> });
>
> add( new AjaxLink("link") {
>
> private static final long serialVersionUID = 
> 1L;
>
> @Override
> public void onClick(AjaxRequestTarget target) {
> // do nothing
> }
> });
> }
>
> Here is the core code in InactivitySignOutPanel I have just modified 
> the respond method to call
>
>  
> ((WebDocsSession)WebSession.get()).processLogoutorSessionExpiration();
>
> setResponsePage(WebApplication.get().getApplicationSettings().getPageE
> xpiredErrorPage());
>
> so that the application does the right thing. Note: a break point 
> shows that this method is never call when the user is on another tab.
>
>
>   public InactivitySignOutPanel(String id, Duration duration) {
> this(id, Model.of(duration));
> }
>
> public InactivitySignOutPanel(String id, IModel model) {
> super(id, model);
> setRenderBodyOnly(true);
> add(ajaxBehavior = new AbstractDefaultAjaxBehavior() {
>
> private static final long serialVersionUID = 
> 1L;
>
> @Override
> protected void respond(AjaxRequestTarget target) {
> beforeSignOut(target);
>
> ((WebDocsSession)WebSession.get()).pr

RE: Ajax timer not counting when tab doesn't have focus?

2014-05-12 Thread Bruce Lombardi
Thanks Ernesto. 

Yes, I do mean another browser tab. I have some new information. The timer 
seems to slow way down, but not stop counting down when the user switches focus 
to another tab, either opening a new tab, or just clicking on another tab. This 
is happening in both Chrome and Firefox.

I thought that my code was never timing out, but further experimentation with a 
shorter timeout period shows that it is doing the same thing as the demo. That 
is, timing out in about 10 second when you stay on the tab, but taking 3 
minutes or longer to timeout when if you change focus to a different tab.

I would appreciate it if you could look at your demo and see the behavior and 
then see if you have any ideas.

As for my code, I really feel they difference with your code are insignificant 
especially now that I know the behavior is the same.

See below for the differences.

Thanks again,

Bruce


Code.

I have your InactivitySignOutPanel.java, InactivitySignOutPanel.html and 
InactivitySignOutPanel.js from the GitHub site with one slight modification in 
InactivitySignOutPanel.java (see below).

 I setup my panel in  a base class that serves as a superclass for all the Web 
pages in the application (extends WebPage)  I have a method that is called to 
setup the timeout. Here is the method.

public void setupTimeout() {

// Change the following value to change the session timeout.
int numberOfMinutesUntilTimeout = 15;

int secondsPerMinute = 60;
int secondsToTimeout =numberOfMinutesUntilTimeout * 
secondsPerMinute;
   
add(new InactivitySignOutPanel("timeout", 
Duration.seconds(secondsToTimeout)) {

private static final long serialVersionUID = 1L;

protected String getOnTimeChangedFunction() {
return "function(timeRemaining){if(!window.countDown) { 
window.countDown = $('#countDown'); }  
$(window.countDown).html(timeRemaining);}";
}
});

add( new AjaxLink("link") {

private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
// do nothing
}
});
}

Here is the core code in InactivitySignOutPanel I have just modified the 
respond method to call
 ((WebDocsSession)WebSession.get()).processLogoutorSessionExpiration();

setResponsePage(WebApplication.get().getApplicationSettings().getPageExpiredErrorPage());

so that the application does the right thing. Note: a break point shows that 
this method is never call when the user is on another tab.
  

  public InactivitySignOutPanel(String id, Duration duration) {
this(id, Model.of(duration));
}

public InactivitySignOutPanel(String id, IModel model) {
super(id, model);
setRenderBodyOnly(true);
add(ajaxBehavior = new AbstractDefaultAjaxBehavior() {

private static final long serialVersionUID = 1L;

@Override
protected void respond(AjaxRequestTarget target) {
beforeSignOut(target);

((WebDocsSession)WebSession.get()).processLogoutOrSessionExpiration();

setResponsePage(WebApplication.get().getApplicationSettings().getPageExpiredErrorPage());
}

@Override
protected void onBind() {
// panel will not be repainted, no need to markup markup id.
}

@Override
public void renderHead(Component component, IHeaderResponse 
response) {
super.renderHead(component, response);
response.render(JavaScriptHeaderItem.forReference(JS));
}
});
}

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Monday, May 12, 2014 11:39 AM
To: users@wicket.apache.org
Subject: Re: Ajax timer not counting when tab doesn't have focus?

Hi Bruce,


On Mon, May 12, 2014 at 4:52 PM, Bruce Lombardi  wrote:

> This message  is related to an original thread "Link to Wicket page 
> from Javascript" but the focus is changed so much  that I though a new 
> title would be better.  In the earlier thread I asked about linking to 
> a Wicket page, but the real need was for help in implementing a 
> session timeout that would send the user to a timeout page after a 
> period of inactivity and would reset whenever a user clicked any 
> button on the page.
>
>
>
> Ernesto Reinaldo Barreiro sent me links(see below) to a working demo 
> that did exactly what I required. I used  that code and everything 
> seemed to work perfectly. However, I have since discovered that my 
> timer does not seem to function correctl

Ajax timer not counting when tab doesn't have focus?

2014-05-12 Thread Bruce Lombardi
This message  is related to an original thread "Link to Wicket page from
Javascript" but the focus is changed so much  that I though a new title
would be better.  In the earlier thread I asked about linking to a Wicket
page, but the real need was for help in implementing a session timeout that
would send the user to a timeout page after a period of inactivity and would
reset whenever a user clicked any button on the page. 

 

Ernesto Reinaldo Barreiro sent me links(see below) to a working demo that
did exactly what I required. I used  that code and everything seemed to work
perfectly. However, I have since discovered that my timer does not seem to
function correctly if the user goes to another tab. It seems like the timer
stops timing down or slows way down until the user comes back to the
original tab.

 

I checked Ernesto's demo. If I go to the demo  page and stay there it times
out after roughly the defined 10 second timeout period,  but if I go to the
demo page, then click on another tab, it eventually times out, but after
more than 3 minutes. My code, however,  never seems to seem to timeout the
page if I go to another tab.

 

I really need this to work to  fulfill a requirement and it is preventing
the launch of our software.  It all works fine except if the user goes to a
different tab.

 

Ernesto, or anyone, do you know why this is happening. Is the ajax timer
stopping when the tab is not selected? Why is the demo eventually timing out
while application is not (can't see any real difference in the code)?

Is there any way to get a better handle on this (e.g., firebug)? If the ajax
timer is stopping, could something be done, perhaps using absolute elapsed
time, to expire the session immediately if the user goes back to the tab?
The latter is not ideal but might be acceptable.

 

(Note: My session timeout in web.xml is 30 minutes, client timeout is 15
minutes, but for testing I set it to 10 seconds).

 

 

// Links

 

Demo of Example 

 

http://107.170.4.97:9080/client-sign-out-demo/?0

 

 

Code that sets up example 

 

https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-paren

t/client-sign-out-demo/src/main/java/com/antilia/HomePage.java

 

 

Code that provides the implementation (We have this code in  package

com.xyzco.web.docs.presentation.helpers.timeout)

 

 

https://github.com/reiern70/antilia-bits/tree/master/client-sign-out-paren

t/client-sign-out-demo/src/main/java/com/antilia

 

Thanks,

Bruce

 

 

 

-Original Message-

From: Bruce Lombardi [mailto:brlom...@gmail.com]

Sent: Monday, March 17, 2014 8:24 AM

To: users@wicket.apache.org

Subject: Re: Link to Wicket page from Javascript

 

Thanks, this is very helpful.

 

Bruce

 

Sent from my iPad

 

> On Mar 17, 2014, at 4:52 AM, Ernesto Reinaldo Barreiro

 wrote:

> 

> You can see it at work here

> 

> http://107.170.4.97:9080/client-sign-out-demo/

> 

> 

> On Mon, Mar 17, 2014 at 9:18 AM, Ernesto Reinaldo Barreiro < 

> reier...@gmail.com> wrote:

> 

>> Martin,

>> 

>> What I mean is something that triggers the sign out before serve side 

>> session expires... and trigger this expire event.

>> 

>> 

>> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-

>> parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySi

>> gnOutPanel.java

>> 

>> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-

>> parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySi

>> gnOutPanel.js

>> 

>> The above seem to work. You use it as in

>> 

>> 

>> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-

>> parent/client-sign-out-demo/src/main/java/com/antilia/HomePage.java

>> 

>> 

>> 

>> 

>> On Mon, Mar 17, 2014 at 9:11 AM, Martin Grigorov

< <mailto:mgrigo...@apache.org> mgrigo...@apache.org>wrote:

>> 

>>> Hi,

>>> 

>>> On Fri, Mar 14, 2014 at 9:25 PM, Ernesto Reinaldo Barreiro < 

>>> reier...@gmail.com> wrote:

>>> 

>>>> Hi,

>>>> 

>>>> I would implement this as..

>>>> 

>>>> 1- A JS function that counts how much time has passed since last 

>>>> AJAX request. Once a certain threshold is passed an AJAX request is 

>>>> sent to

>>> the

>>>> page.

>>>> 2- An AbstractAjaxBehavior that is added to the page. I would use 

>>>> it as context for AJAX request on 1).

>>> 

>>> at that time the session should be already expired.

>>> 

>>> But this can be used to do what is needed here - Wicket will 

>>> redirect to the configured PageExpiredErrorPage.

>>> 

>

RE: Spring bean not injected into class extending WebApplication

2014-04-02 Thread Bruce Lombardi
Thanks Martin. 
I tried the first approach and it worked fine!
Bruce

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, April 02, 2014 12:56 PM
To: users@wicket.apache.org
Subject: Re: Spring bean not injected into class extending WebApplication

Hi,

One way is to use SpringWebApplicationFactory, i.e. init-param 
"applicationFactoryClassName". See its javadoc. It will allow you to use 
@SpringBean/Inject in YourApplication.java.
Another way is something like:
https://github.com/nextreports/nextreports-server/blob/master/src/ro/nextreports/server/web/NextServerApplication.java#L224

Martin Grigorov
Wicket Training and Consulting


On Wed, Apr 2, 2014 at 6:43 PM, Bruce Lombardi  wrote:

> I have an application that is integrated with Spring and a new 
> requirement is forcing me to update user login status for all users on  
> application restart.
>
> I want  to do this using  Springs JdbcOperations to do a simple 
> execute of a sql statement since Spring and Spring JPA are used 
> throughout the application.
>
> The Application's init() method seems like a good place to do it since 
> that method runs whenever the application is started.
>
> The problem I ran into is that my JdbcOperations instance is not 
> injected into the Application class instance so the init method throws 
> a null pointer exception.
>
> I am able to inject JdbcOperations and lots of other things in my web 
> pages, but apparently, Spring has not yet been initialized when the 
> Application's init method is called. I suppose I could do something 
> outside of Spring, but that would make it inconsistent with the rest 
> of the application.
>
> Does anybody have any idea how to work around this? Is there any other 
> place later in the lifecycle of starting the application where I could 
> do this?
>
>
>
> Thanks,
>
> Bruce
>
>


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



Spring bean not injected into class extending WebApplication

2014-04-02 Thread Bruce Lombardi
I have an application that is integrated with Spring and a new requirement
is forcing me to update user login status for all users on  application
restart.

I want  to do this using  Springs JdbcOperations to do a simple execute of a
sql statement since Spring and Spring JPA are used throughout the
application.

The Application's init() method seems like a good place to do it since that
method runs whenever the application is started.

The problem I ran into is that my JdbcOperations instance is not injected
into the Application class instance so the init method throws a null pointer
exception.

I am able to inject JdbcOperations and lots of other things in my web pages,
but apparently, Spring has not yet been initialized when the Application's
init method is called. I suppose I could do something outside of Spring, but
that would make it inconsistent with the rest of the application.

Does anybody have any idea how to work around this? Is there any other place
later in the lifecycle of starting the application where I could do this?

 

Thanks,

Bruce



Re: Link to Wicket page from Javascript

2014-03-17 Thread Bruce Lombardi
Thanks, tis is very helpful.

Bruce

Sent from my iPad

> On Mar 17, 2014, at 4:52 AM, Ernesto Reinaldo Barreiro  
> wrote:
> 
> You can see it at work here
> 
> http://107.170.4.97:9080/client-sign-out-demo/
> 
> 
> On Mon, Mar 17, 2014 at 9:18 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
> 
>> Martin,
>> 
>> What I mean is something that triggers the sign out before serve side
>> session expires... and trigger this expire event.
>> 
>> 
>> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySignOutPanel.java
>> 
>> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySignOutPanel.js
>> 
>> The above seem to work. You use it as in
>> 
>> 
>> https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/client-sign-out-demo/src/main/java/com/antilia/HomePage.java
>> 
>> 
>> 
>> 
>> On Mon, Mar 17, 2014 at 9:11 AM, Martin Grigorov wrote:
>> 
>>> Hi,
>>> 
>>> On Fri, Mar 14, 2014 at 9:25 PM, Ernesto Reinaldo Barreiro <
>>> reier...@gmail.com> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I would implement this as..
>>>> 
>>>> 1- A JS function that counts how much time has passed since last AJAX
>>>> request. Once a certain threshold is passed an AJAX request is sent to
>>> the
>>>> page.
>>>> 2- An AbstractAjaxBehavior that is added to the page. I would use it as
>>>> context for AJAX request on 1).
>>> 
>>> at that time the session should be already expired.
>>> 
>>> But this can be used to do what is needed here - Wicket will redirect to
>>> the configured PageExpiredErrorPage.
>>> 
>>> 
>>>> 3- On the respond of AJAXBehavior you redirect to  SessionTimeoutPage
>>> and
>>>> invalidate the session.
>>>> 
>>>> 
>>>> 
>>>> On Fri, Mar 14, 2014 at 8:07 PM, Bruce Lombardi 
>>>> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> 
>>>>> 
>>>>> An earlier question I asked about session timeouts was answered by
>>> Martin
>>>>> Grigorov. I am implementing his suggestion and have a JQuery script
>>> what
>>>>> sets a timer that times out after a certain period of inactivity. The
>>>>> timeout triggers a function call.  Currently,  for a quick test,  I
>>> have
>>>>> that function use location.href to go to an arbitrary static web page
>>>> like
>>>>> this:
>>>>> 
>>>>> 
>>>>> 
>>>>> function whenUserIdle(){
>>>>> 
>>>>>location.href = 'http://www.natural-environment.com';
>>>>> 
>>>>> }
>>>>> 
>>>>> 
>>>>> 
>>>>> That works fine, but now I need to make it go to a Wicket page in my
>>>>> application, similar to what would happen if I had an anchor tag like:
>>>>> 
>>>>> 
>>>>> 
>>>>> SessionTimeoutPage
>>>>> 
>>>>> 
>>>>> 
>>>>> But I can't figure out how to do this in the javascript function. Can
>>>>> anyone
>>>>> tell me how to call the Wicket page from the javascript function?
>>> 
>>> You can use  and a
>>> Label("expirationUrl", "window.expirePageUrl ='" +
>>> urlFor(SessionTimeoutPage.class) + "';");
>>> Then use it with: location.href = window.expirePageUrl';
>>> 
>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> 
>>>>> 
>>>>> Bruce
>>>> 
>>>> 
>>>> --
>>>> Regards - Ernesto Reinaldo Barreiro
>> 
>> 
>> 
>> --
>> Regards - Ernesto Reinaldo Barreiro
> 
> 
> 
> -- 
> Regards - Ernesto Reinaldo Barreiro

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



RE: Link to Wicket page from Javascript

2014-03-14 Thread Bruce Lombardi
Thanks Ernesto,  I was hoping for something simpler since what I have now
with a simple Jquery timer does everything I need except go the the
SessionTimeoutPage, where I would, as you suggest, invalidate the session.
I'm sure your solution would work, but I'm not familiar enough with
AbstractAjaxBehavior to implement it easily and the examples I've seen look
complicated.

Bruce

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Friday, March 14, 2014 3:26 PM
To: users@wicket.apache.org
Subject: Re: Link to Wicket page from Javascript

Hi,

I would implement this as..

1- A JS function that counts how much time has passed since last AJAX
request. Once a certain threshold is passed an AJAX request is sent to the
page.
2- An AbstractAjaxBehavior that is added to the page. I would use it as
context for AJAX request on 1).
3- On the respond of AJAXBehavior you redirect to  SessionTimeoutPage and
invalidate the session.



On Fri, Mar 14, 2014 at 8:07 PM, Bruce Lombardi  wrote:

> Hi,
>
>
>
> An earlier question I asked about session timeouts was answered by 
> Martin Grigorov. I am implementing his suggestion and have a JQuery 
> script  what sets a timer that times out after a certain period of 
> inactivity. The timeout triggers a function call.  Currently,  for a 
> quick test,  I have that function use location.href to go to an 
> arbitrary static web page like
> this:
>
>
>
> function whenUserIdle(){
>
> location.href = 'http://www.natural-environment.com';
>
> }
>
>
>
> That works fine, but now I need to make it go to a Wicket page in my 
> application, similar to what would happen if I had an anchor tag like:
>
>
>
> SessionTimeoutPage
>
>
>
> But I can't figure out how to do this in the javascript function. Can 
> anyone tell me how to call the Wicket page from the javascript 
> function?
>
>
>
> Thanks,
>
>
>
> Bruce
>
>


--
Regards - Ernesto Reinaldo Barreiro


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



Link to Wicket page from Javascript

2014-03-14 Thread Bruce Lombardi
Hi,

 

An earlier question I asked about session timeouts was answered by Martin
Grigorov. I am implementing his suggestion and have a JQuery script  what
sets a timer that times out after a certain period of inactivity. The
timeout triggers a function call.  Currently,  for a quick test,  I have
that function use location.href to go to an arbitrary static web page like
this:

 

function whenUserIdle(){

location.href = 'http://www.natural-environment.com';

}  

 

That works fine, but now I need to make it go to a Wicket page in my
application, similar to what would happen if I had an anchor tag like:

 

SessionTimeoutPage

 

But I can't figure out how to do this in the javascript function. Can anyone
tell me how to call the Wicket page from the javascript function?

 

Thanks,

 

Bruce



RE: How di I display a new page on session timeout without requiring the user to do anything?

2014-03-12 Thread Bruce Lombardi
Thanks Martin,  for the rapid response. Has anyone done anything like this  
this?

Bruce

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, March 12, 2014 11:26 AM
To: users@wicket.apache.org
Subject: Re: How di I display a new page on session timeout without requiring 
the user to do anything?

Hi,


On Wed, Mar 12, 2014 at 5:09 PM, Bruce Lombardi  wrote:

> Hi,
>
>
>
> I have a requirement that says that, for security purposes, when a 
> session times out, the application must go to a different page so that 
> any data displayed is hidden and that the user must  be informed that 
> the session has timed out.  In the init method of my Application 
> class, which subclasses AuthenticatedApplication, I  have the 
> following line.
>
>
>
> getApplicationSettings().setPageExpiredErrorPage(SessionTimeoutPage.cl
> ass);
>
>
>
> So now, after the session expires, if the user clicks on anything it 
> goes to the SessionTimeoutPage. This is not the behavior I need, so 
> I've done some searching and found some suggestions on using 
> AjaxTimerBehavior to warn a user that a session is about to expire, 
> but nothing that says exactly how to detect an expired session. Also, 
> some people have hinted that Ajax could actually keep the session 
> alive so I'm a little confused about that.
>

This is correct.
Any request to the server will touch the session and thus will keep it alive.


>
>
>
> Can someone please clarify this and at least point me in the right 
> direction for fulfilling my requirements?
>

Your best bet is to use JavaScript counter that will count down do
document.location.href="anotherUrl"; when the counter reaches 0.
You will have to reinit the counter with every ajax request - this is easy.


>
>
>
> Thanks,
>
> Bruce
>
>


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



How di I display a new page on session timeout without requiring the user to do anything?

2014-03-12 Thread Bruce Lombardi
Hi,

 

I have a requirement that says that, for security purposes, when a session
times out, the application must go to a different page so that any data
displayed is hidden and that the user must  be informed that the session has
timed out.  In the init method of my Application class, which subclasses
AuthenticatedApplication, I  have the following line.

 

getApplicationSettings().setPageExpiredErrorPage(SessionTimeoutPage.class);

 

So now, after the session expires, if the user clicks on anything it goes to
the SessionTimeoutPage. This is not the behavior I need, so I've done some
searching and found some suggestions on using AjaxTimerBehavior to warn a
user that a session is about to expire, but nothing that says exactly how to
detect an expired session. Also, some people have hinted that Ajax could
actually keep the session alive so I'm a little confused about that. 

 

Can someone please clarify this and at least point me in the right direction
for fulfilling my requirements?

 

Thanks,

Bruce



RE: How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-12 Thread Bruce Lombardi
Thanks Andrea,

I was trying what you sent in your previous  message and I was having
trouble figuring out how to get the value set on the target property model.

Your code here, especially this line:

targetModel.setObject(getChoiceRenderer().getIdValue(newSelection,
choiceIndex));

was really helpful and I was able to get everything working.

Thanks again. 
Have you ever consider making this available to the Wicket community? I see
a lot of questions related to DropDownChoice, but not many answers.

- Bruce


-Original Message-
From: Andrea Del Bene [mailto:an.delb...@gmail.com] 
Sent: Wednesday, February 12, 2014 4:31 AM
To: users@wicket.apache.org
Subject: Re: How to make a Wiket DropDownChoice with complex a model return
a simple String

Here is some code of a possible solution:


public class DropDownChoiceForString extends DropDownChoice {

private IModel targetModel;

public DropDownChoiceForString(String id, IModel model,
IModel targetModel, List choices,
IChoiceRenderer renderer) {
super(id, model, choices, renderer);
this.targetModel = targetModel;
}

protected DropDownChoiceForString(String id, IModel model,
IModel targetModel) {
this(id, model, targetModel, Collections. emptyList(), null);
}

@Override
protected void onInitialize() {
super.onInitialize();
// load the initial choice.
setModelObject(convertChoiceIdToChoice(targetModel.getObject()));
}

@Override
protected void onDetach() {
super.onDetach();

targetModel.detach();
}

@Override
protected void onModelChanged() {
super.onModelChanged();

T newSelection = getModelObject();

int choiceIndex = getChoices().indexOf(newSelection);
// update the string source with the selected value.
targetModel.setObject(getChoiceRenderer().getIdValue(newSelection,
choiceIndex));
}
}



> Hi,
>
> I needed something similar in a couple of projects. One solution is to 
> create a custom DropDownChoice which takes also the string model to 
> update. Then you can override onModelChanged to update the string 
> model with the new value that can be extracted with the ChoiceRenderer.
>> To make this easier to understand, let's say that I have a list of 
>> state abbreviations for example AL, AK, AZ, AR etcetera (the actual 
>> example has two letter abbreviations also, but much longer names). I 
>> need a DropDownChoice that shows the abbreviations for selection 
>> (e.g., AK) but will show the full name as a tooltip whenever the 
>> mouse hovers over one of the choice (e.g., AK shows Alaska).
>>
>>  
>> I have developed a solution that is based on the example presented here:
>> http://stackoverflow.com/questions/12234738/wicket-dropdownchoice-tit
>> les-too
>>
>> ltips-for-options
>>
>> that develops a subclass of DropDownChoice and overrides 
>> appendOptionHtml to append a "title" to the buffer. My class takes a 
>> StateDisplay object as its model, and the model has two fields, an 
>> "id" that is displayed in the list, and a "fullName" which is added 
>> as the title by the appendOptionHtml method.
>>
>>  
>> This works fine for displaying thedropdown with the  tooltip, but the 
>> problem is that the model is a complex object( StateDisplay) with two 
>> fields, but the underlying domain object needs a simple String with 
>> the state ID.
>>
>>  
>> Prior to implementing the tooltip, the DrowdownChoice was formed using:
>>
>>  
>> Item.add(new DropDownChoice("state", new
>> PropertyModel((CompanyDTO) item.getDefaultModelObject(), 
>> "state"), stateList)));
>>
>>  
>> Note: "item "is there because this is used in the populateItem method 
>> of a ListView.
>>
>>  
>> Now the code is:
>>
>>  
>> Model< StateDisplay > selectedState = new Model<>();
>>
>>  
>> ChoiceRenderer choiceRenderer = new 
>> ChoiceRenderer("id", "id");
>>
>>
>> Item.add(new StateDropDownChoice< StateDisplay >("state", 
>> selectedState, stateList, choiceRenderer));
>>
>>  
>> After the selection is made the model (selectedState) is set to the 
>> chosen StateDisplay, but there is no easy way to the simple String 
>> value set on the CompanyDTO.
>>
>>  
>> How can I make the dropdown selection update the domain model's 
>> simple String.
>>
>>  
>> Thanks
>>
>> Bruce
>>
>>
>


-
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



How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-11 Thread Bruce Lombardi
To make this easier to understand, let's say that I have a list of state
abbreviations for example AL, AK, AZ, AR etcetera (the actual example has
two letter abbreviations also, but much longer names). I need a
DropDownChoice that shows the abbreviations for selection (e.g., AK) but
will show the full name as a tooltip whenever the mouse hovers over one of
the choice (e.g., AK shows Alaska). 

 

I have developed a solution that is based on the example presented here:
http://stackoverflow.com/questions/12234738/wicket-dropdownchoice-titles-too
ltips-for-options

that develops a subclass of DropDownChoice and overrides  appendOptionHtml
to append a "title" to the buffer. My class takes a StateDisplay object as
its model, and the model has two fields, an "id" that is displayed in the
list, and a "fullName" which is added as the title by the appendOptionHtml
method.

 

This works fine for displaying thedropdown with the  tooltip, but the
problem is that the model is a complex object( StateDisplay) with two
fields, but the underlying domain object needs a simple String with the
state ID.

 

Prior to implementing the tooltip, the DrowdownChoice was formed using:

 

Item.add(new DropDownChoice("state", new
PropertyModel((CompanyDTO) item.getDefaultModelObject(), "state"),
stateList)));

 

Note: "item "is there because this is used in the populateItem method of a
ListView.

 

Now the code is:

 

Model< StateDisplay > selectedState = new Model<>();

 

ChoiceRenderer choiceRenderer = new
ChoiceRenderer("id", "id");

   

Item.add(new StateDropDownChoice< StateDisplay >("state", selectedState,
stateList, choiceRenderer));

 

After the selection is made the model (selectedState) is set to the chosen
StateDisplay, but there is no easy way to the simple String value set on
the CompanyDTO.

 

How can I make the dropdown selection update the domain model's simple
String.

 

Thanks

Bruce



RE: Velocity Log

2013-03-28 Thread Bruce Pease
Since we are not using velocity we were able to remove the velocity
libraries, and this issue was resolved.  

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, March 27, 2013 10:33 AM
To: users@wicket.apache.org
Subject: Re: Velocity Log

Hi,

I see that you cross posted to Tomcat's mailing lists.
Please make sure that you update the thread there with the solution.

Wicket doesn't require Apache Velocity.
Only if you use VelocityPanel from wicket-velocity module in your application
then you need velocity.jar in your classpath.
I guess you don't need it so just remove it from your.war#WEB-INF/lib/
folder.


On Wed, Mar 27, 2013 at 4:14 PM, Bruce Pease  wrote:

> We are running a web application under tomcat using the wicket framework.
>  A
> requirement for Wicket is the velocity libraries.  The velocity 
> framework is auto loading and writing to a log in the conf directory.  
> Since it is in use I am unable to undeploy the web application.  So, I 
> am looking for a way to turn off the velocity logging.  Previous 
> version of tomcat does not have this issue (7.0.26).
>
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Wednesday, March 27, 2013 3:13 AM
> To: users@wicket.apache.org
> Subject: Re: Velocity Log
>
> Hi,
>
> Can you give more details ?
>
>
>
> On Tue, Mar 26, 2013 at 9:24 PM, Bruce Pease  wrote:
>
> > Good Afternoon:
> >
> >
> >
> > I am using Wicket 1.4.22 with Tomcat 7.0.37 and JDK 1.6.0_33.  The
> > recent upgrade to Tomcat created an issue where the application cannot
> > be undeployed unless the app is shut down due to the Wicket dependency
> > velocity logging in use (1.4).  Is there a way to turn it off or shut
> > it down?
> >
> >
> >
> > Thanks in advance for your help.
> >
> >
> >
> > Bruce D. Pease
> > Technical Team Lead - Web Applications
> > CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
> > <http://www.cruisesinc.com/>
> > 1201 W. Cypress Creek Road, Suite 100
> > Fort Lauderdale, FL 33309-1955
> > 954-958-3654 (direct) | 954-958-3665 (fax) bpe...@wth.com
> > <mailto:ssza...@wth.com>
> >
> >
> >
> >
>
>
> --
> Martin Grigorov
> 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
>
>


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


RE: Velocity Log

2013-03-27 Thread Bruce Pease
We are running a web application under tomcat using the wicket framework.  A
requirement for Wicket is the velocity libraries.  The velocity framework is
auto loading and writing to a log in the conf directory.  Since it is in use
I am unable to undeploy the web application.  So, I am looking for a way to
turn off the velocity logging.  Previous version of tomcat does not have this
issue (7.0.26).


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, March 27, 2013 3:13 AM
To: users@wicket.apache.org
Subject: Re: Velocity Log

Hi,

Can you give more details ?



On Tue, Mar 26, 2013 at 9:24 PM, Bruce Pease  wrote:

> Good Afternoon:
>
>
>
> I am using Wicket 1.4.22 with Tomcat 7.0.37 and JDK 1.6.0_33.  The 
> recent upgrade to Tomcat created an issue where the application cannot 
> be undeployed unless the app is shut down due to the Wicket dependency 
> velocity logging in use (1.4).  Is there a way to turn it off or shut 
> it down?
>
>
>
> Thanks in advance for your help.
>
>
>
> Bruce D. Pease
> Technical Team Lead - Web Applications
> CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm) 
> <http://www.cruisesinc.com/>
> 1201 W. Cypress Creek Road, Suite 100
> Fort Lauderdale, FL 33309-1955
> 954-958-3654 (direct) | 954-958-3665 (fax) bpe...@wth.com 
> <mailto:ssza...@wth.com>
>
>
>
>


--
Martin Grigorov
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



Velocity Log

2013-03-26 Thread Bruce Pease
Good Afternoon:

 

I am using Wicket 1.4.22 with Tomcat 7.0.37 and JDK 1.6.0_33.  The recent
upgrade to Tomcat created an issue where the application cannot be undeployed
unless the app is shut down due to the Wicket dependency velocity logging in
use (1.4).  Is there a way to turn it off or shut it down?

 

Thanks in advance for your help.

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
<http://www.cruisesinc.com/> 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com <mailto:ssza...@wth.com> 

 



Re: maven archetype

2012-08-25 Thread Bruce McGuire
PS: I forgot to mention that I would like to use testNG.

Thanks again.

Bruce.

On Fri, Aug 24, 2012 at 10:31 AM, Bruce McGuire wrote:

> Hi There.
>
> It has been a while and a new company since I did a project with Wicket,
> and I would like to start out with a properly set up project.
>
> I am looking for an archetype that uses new versions of
>   Wicket
>   Spring
>   Hibernate
>
> Any ideas would be greatly appreciated.
>
> Thanks,
>
> Bruce.
>


maven archetype

2012-08-25 Thread Bruce McGuire
Hi There.

It has been a while and a new company since I did a project with Wicket,
and I would like to start out with a properly set up project.

I am looking for an archetype that uses new versions of
  Wicket
  Spring
  Hibernate

Any ideas would be greatly appreciated.

Thanks,

Bruce.


RE: Include Component

2012-05-02 Thread Bruce Pease
Sorry, that's Wicket version 4.1.15.

 

From: Bruce Pease 
Sent: Wednesday, May 02, 2012 11:06 AM
To: 'users@wicket.apache.org'
Subject: Include Component

 

Good Morning:

 

I am using the Wicket 1.4.14 release in a Tomcat 7 windows server.  I am
using the Include class to render a navigation panel.  I would like to
protect this call on the off chance that the file/url does not exist.  Right
now, the framework throws a file io exception, and the page fails.  Is there
a way to tell the framework to default to an empty panel is the file does not
exist?

 

Thanks,

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
<http://www.cruisesinc.com/> 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com <mailto:ssza...@wth.com> 

 



Include Component

2012-05-02 Thread Bruce Pease
Good Morning:

 

I am using the Wicket 1.4.14 release in a Tomcat 7 windows server.  I am
using the Include class to render a navigation panel.  I would like to
protect this call on the off chance that the file/url does not exist.  Right
now, the framework throws a file io exception, and the page fails.  Is there
a way to tell the framework to default to an empty panel is the file does not
exist?

 

Thanks,

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
<http://www.cruisesinc.com/> 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com <mailto:ssza...@wth.com> 

 



Re: Re: Re: Re: Re: DAO not getting injected, using springbean

2009-06-17 Thread Bruce McGuire

Hi James.

It turns out that I had 'userDAO' in one spot, and 'UserDAO' in another. 
Problem solved.


Thanks,

Bruce.

James Carman wrote:

Did you mark UserDAOHibernate with the @Repository annotation?

2009/6/16 Bruce McGuire :
  

Hi Vasu.

Thanks for the info. Now I get it, and have successfully wired my demo app
so that it does the job.

Although I did notice that along with the context:component-scan I did need
to define the beans that I was going to autowire. How did you get around
this?

  
  

Other than that, this is a very much reduced context file.

Now I need to duplicate this in my real application.

Thanks for everyone's help.

Bruce McGuire.

Vasu Srinivasan wrote:


Using annotations, I have only one line in the spring's
applicationContext.xml --



Services are tagged with @Service, Daos are tagged with
@Component("xxxDaoImpl"), Wicket web pages have @SpringBean
(name=serviceName>")

Within the ServiceImpl, the Daos are tagged with @Autowired.

No other xml config, setter, getter for daos etc.

Works like a charm.

2009/6/16 James Carman 


  

You are correct.  You should only use @SpringBean in your wicket-related
code (components/pages).  Let Spring wire the rest together, however you
want to configure it to do that (with annotations or xml).  You can use
@Autowired to inject your DAOs into your Services.  You just have to make
sure you set up your Spring context so that it takes care of that.

On Tue, Jun 16, 2009 at 4:36 PM, Bruce McGuire 
wrote:




Hello James.

So I have completely missed the point of the Repository, Service and
SpringBean annotations?  I was under the impression that the idea was to
avoid using a lot of xml in my context files.

If I am understanding correctly, what you and Martijn are saying is the
following:
Tag the dao and service classes with Repository and Service, and in

  

wicket



code, tag any use of them with SpringBean. However, in the service

  

classes,



use the normal xml injection method and get/set to get the dao into the
service class.

Is this a correct interpretation?

Thanks,

Bruce.

James Carman wrote:


  

You shouldn't use @SpringBean in your spring-managed beans, only in
your Wicket code.  You don't want view-specific code in your "domain"
code.

On Tue, Jun 16, 2009 at 4:17 PM, Bruce McGuire 
wrote:





Hi Martijn.

Thanks for the quick response.

Are you saying that the dao and the service should have the
InjectorHolder code, rather than the @Repository and @Service tags?

Bruce.

Martijn Dashorst wrote:



  

@SpringBean only works with Components. For all other uses you should
either call InjectorHolder.getInjector().inject(this) in your
constructor or use Salve.

Martijn

On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire
wrote:






Hello.

I have created a new small project to try to figure out how to use

  

the



SpringBean, Service, and Repository annotations with Wicket, Spring,
Hibernate, Maven and Eclipse.

However, I am getting an error with a user DAO that I have created.

I have a service that is using the dao tagged as @Service, I have
the
DAO in
the service tagged with @SpringBean, and the DAO code itself is

  

tagged



with
@Repository.  The service that is using the DAO is getting found
correctly.

When I have the InjectorHolder code in the dao constructor, I get an
error
that says 'InjectorHolder has not been assigned an injector'

When I comment out the InjectorHolder line in the dao constructor,

  

the



DAO
is null, and getUserDAO throws an exception.

Since I am not certain that I can attach files, I will insert the
relevant
code and exceptions into this email.

Any pointers you can give would be greatly appreciated.

Thanks very very much,

Bruce.

UserServiceImpl
==> @Service("UserService")
public class UserServiceImpl implements UserService
{
 @SpringBean
 UserDAO userDAO ;

 private UserDAO getUserDAO()
 {
   if (null =DAO)
   {
   throw new RuntimeException("userDAO is null") ;
   }

   return(userDAO) ;
 }

 @Override
 public List getUsers()
 {
   return (getUserDAO().findAll());
 }
==>
UserDAOHibernate
==> @Repository("UserDAO")
public class UserDAOHibernate extends GenericDAOHibernate  

String>



implements UserDAO
{
 private static Log log úctory.getLog("UserDAOHibernate");

 public UserDAOHibernate()
 {
   InjectorHolder.getInjector().inject(this);
 }

...
==>
HomePage
==> public class HomePage extends WebPage
{
 @SpringBean
 private UserService userService ;

 public HomePage(final PageParameters parameters)
 {
   super (parameters) ;

   List userList =ervice.getUsers() ;

Re: Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire

Hi Vasu.

Thanks for the info. Now I get it, and have successfully wired my demo 
app so that it does the job.


Although I did notice that along with the context:component-scan I did 
need to define the beans that I was going to autowire. How did you get 
around this?


   
   class="com.coastware.vProbe.model.dao.hibernate.UserDAOHibernate" />


Other than that, this is a very much reduced context file.

Now I need to duplicate this in my real application.

Thanks for everyone's help.

Bruce McGuire.

Vasu Srinivasan wrote:

Using annotations, I have only one line in the spring's
applicationContext.xml --



Services are tagged with @Service, Daos are tagged with
@Component("xxxDaoImpl"), Wicket web pages have @SpringBean
(name="")

Within the ServiceImpl, the Daos are tagged with @Autowired.

No other xml config, setter, getter for daos etc.

Works like a charm.

2009/6/16 James Carman 

  

You are correct.  You should only use @SpringBean in your wicket-related
code (components/pages).  Let Spring wire the rest together, however you
want to configure it to do that (with annotations or xml).  You can use
@Autowired to inject your DAOs into your Services.  You just have to make
sure you set up your Spring context so that it takes care of that.

On Tue, Jun 16, 2009 at 4:36 PM, Bruce McGuire 
wrote:



Hello James.

So I have completely missed the point of the Repository, Service and
SpringBean annotations?  I was under the impression that the idea was to
avoid using a lot of xml in my context files.

If I am understanding correctly, what you and Martijn are saying is the
following:
Tag the dao and service classes with Repository and Service, and in
  

wicket


code, tag any use of them with SpringBean. However, in the service
  

classes,


use the normal xml injection method and get/set to get the dao into the
service class.

Is this a correct interpretation?

Thanks,

Bruce.

James Carman wrote:

  

You shouldn't use @SpringBean in your spring-managed beans, only in
your Wicket code.  You don't want view-specific code in your "domain"
code.

On Tue, Jun 16, 2009 at 4:17 PM, Bruce McGuire 
wrote:




Hi Martijn.

Thanks for the quick response.

Are you saying that the dao and the service should have the
InjectorHolder code, rather than the @Repository and @Service tags?

Bruce.

Martijn Dashorst wrote:


  

@SpringBean only works with Components. For all other uses you should
either call InjectorHolder.getInjector().inject(this) in your
constructor or use Salve.

Martijn

On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire
wrote:





Hello.

I have created a new small project to try to figure out how to use
  

the


SpringBean, Service, and Repository annotations with Wicket, Spring,
Hibernate, Maven and Eclipse.

However, I am getting an error with a user DAO that I have created.

I have a service that is using the dao tagged as @Service, I have the
DAO in
the service tagged with @SpringBean, and the DAO code itself is
  

tagged


with
@Repository.  The service that is using the DAO is getting found
correctly.

When I have the InjectorHolder code in the dao constructor, I get an
error
that says 'InjectorHolder has not been assigned an injector'

When I comment out the InjectorHolder line in the dao constructor,
  

the


DAO
is null, and getUserDAO throws an exception.

Since I am not certain that I can attach files, I will insert the
relevant
code and exceptions into this email.

Any pointers you can give would be greatly appreciated.

Thanks very very much,

Bruce.

UserServiceImpl
> @Service("UserService")
public class UserServiceImpl implements UserService
{
 @SpringBean
 UserDAO userDAO ;

 private UserDAO getUserDAO()
 {
if (null =erDAO)
{
throw new RuntimeException("userDAO is null") ;
}

return(userDAO) ;
 }

 @Override
 public List getUsers()
 {
return (getUserDAO().findAll());
 }
>
UserDAOHibernate
> @Repository("UserDAO")
public class UserDAOHibernate extends GenericDAOHibernate  

String>


implements UserDAO
{
 private static Log log =Factory.getLog("UserDAOHibernate");

 public UserDAOHibernate()
 {
InjectorHolder.getInjector().inject(this);
 }

...
>
HomePage
> public class HomePage extends WebPage
{
 @SpringBean
 private UserService userService ;

 public HomePage(final PageParameters parameters)
 {
super (parameters) ;

List userList =rService.getUsers() ;

RepeatingView rv = RepeatingView("Users") ;
for(User user: userList)
{
Label userName = Label("username", user.getUsername()) ;
rv.add(userName) ;
}

this.add(rv) ;
 }
}
===

Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire

Hello James.

So I have completely missed the point of the Repository, Service and 
SpringBean annotations?  I was under the impression that the idea was to 
avoid using a lot of xml in my context files.


If I am understanding correctly, what you and Martijn are saying is the 
following:
Tag the dao and service classes with Repository and Service, and in 
wicket code, tag any use of them with SpringBean. However, in the 
service classes, use the normal xml injection method and get/set to get 
the dao into the service class.


Is this a correct interpretation?

Thanks,

Bruce.

James Carman wrote:

You shouldn't use @SpringBean in your spring-managed beans, only in
your Wicket code.  You don't want view-specific code in your "domain"
code.

On Tue, Jun 16, 2009 at 4:17 PM, Bruce McGuire  wrote:
  

Hi Martijn.

Thanks for the quick response.

Are you saying that the dao and the service should have the InjectorHolder 
code, rather than the @Repository and @Service tags?

Bruce.

Martijn Dashorst wrote:


@SpringBean only works with Components. For all other uses you should
either call InjectorHolder.getInjector().inject(this) in your
constructor or use Salve.

Martijn

On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire wrote:

  

Hello.

I have created a new small project to try to figure out how to use the
SpringBean, Service, and Repository annotations with Wicket, Spring,
Hibernate, Maven and Eclipse.

However, I am getting an error with a user DAO that I have created.

I have a service that is using the dao tagged as @Service, I have the DAO in
the service tagged with @SpringBean, and the DAO code itself is tagged with
@Repository.  The service that is using the DAO is getting found correctly.

When I have the InjectorHolder code in the dao constructor, I get an error
that says 'InjectorHolder has not been assigned an injector'

When I comment out the InjectorHolder line in the dao constructor, the DAO
is null, and getUserDAO throws an exception.

Since I am not certain that I can attach files, I will insert the relevant
code and exceptions into this email.

Any pointers you can give would be greatly appreciated.

Thanks very very much,

Bruce.

UserServiceImpl
> @Service("UserService")
public class UserServiceImpl implements UserService
{
 @SpringBean
 UserDAO userDAO ;

 private UserDAO getUserDAO()
 {
 if (null =erDAO)
 {
 throw new RuntimeException("userDAO is null") ;
 }

 return(userDAO) ;
 }

 @Override
 public List getUsers()
 {
 return (getUserDAO().findAll());
 }
>
UserDAOHibernate
> @Repository("UserDAO")
public class UserDAOHibernate extends GenericDAOHibernate
implements UserDAO
{
 private static Log log =Factory.getLog("UserDAOHibernate");

 public UserDAOHibernate()
 {
 InjectorHolder.getInjector().inject(this);
 }

...
>
HomePage
> public class HomePage extends WebPage
{
 @SpringBean
 private UserService userService ;

 public HomePage(final PageParameters parameters)
 {
 super (parameters) ;

 List userList =rService.getUsers() ;

 RepeatingView rv = RepeatingView("Users") ;
 for(User user: userList)
 {
 Label userName = Label("username", user.getUsername()) ;
 rv.add(userName) ;
 }

 this.add(rv) ;
 }
}
>
CoastwareApplication
> public class CoastwareApplication extends WebApplication
{
 private ApplicationContext ctx;

 @SpringBean
 private UserService userService ;

 protected static Log log =Factory.getLog(CoastwareApplication.class) ;

 private static ISpringContextLocator CTX_LOCATOR =
ISpringContextLocator()
 {
 public ApplicationContext getSpringContext()
 {
 return(CoastwareApplication.get().ctx) ;
 }
 } ;

 public CoastwareApplication()
 {
 }

 public void init()
 {
 ctx = ClassPathXmlApplicationContext("appContext.xml") ;

 addComponentInstantiationListener(new SpringComponentInjector(this));

 super.init() ;
 }

 @Override
 public Session newSession(Request request, Response response)
 {
 return (new WebSession(request)) ;
 }

 public static CoastwareApplication get()
 {
 return ((CoastwareApplication) Application.get()) ;
 }

 private  T createProxy(Class clazz)
 {
 return ((T) LazyInitProxyFactory.createProxy(clazz, new
SpringBeanLocator(clazz, CTX_LOCATOR))) ;
 }

 public Class getHomePage()
 {
 return HomePage.class;
 }

 public UserService getUserService()
 {
 if (null =erService)
 {
 userService =ateProxy(UserService.class) ;
 }
 return userService;
 }
}
>

Web.xml
>   vProbe

 
 contextConfigLocation
 classpath:appContext.xml
 

 
 configuration
 development
 

 
 
 or

Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire

Hi Martijn.

Thanks for the quick response.

Are you saying that the dao and the service should have the 
InjectorHolder code, rather than the @Repository and @Service tags?


Bruce.

Martijn Dashorst wrote:

@SpringBean only works with Components. For all other uses you should
either call InjectorHolder.getInjector().inject(this) in your
constructor or use Salve.

Martijn

On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire wrote:
  

Hello.

I have created a new small project to try to figure out how to use the
SpringBean, Service, and Repository annotations with Wicket, Spring,
Hibernate, Maven and Eclipse.

However, I am getting an error with a user DAO that I have created.

I have a service that is using the dao tagged as @Service, I have the DAO in
the service tagged with @SpringBean, and the DAO code itself is tagged with
@Repository.  The service that is using the DAO is getting found correctly.

When I have the InjectorHolder code in the dao constructor, I get an error
that says 'InjectorHolder has not been assigned an injector'

When I comment out the InjectorHolder line in the dao constructor, the DAO
is null, and getUserDAO throws an exception.

Since I am not certain that I can attach files, I will insert the relevant
code and exceptions into this email.

Any pointers you can give would be greatly appreciated.

Thanks very very much,

Bruce.

UserServiceImpl
==> @Service("UserService")
public class UserServiceImpl implements UserService
{
  @SpringBean
  UserDAO userDAO ;

  private UserDAO getUserDAO()
  {
  if (null =userDAO)
  {
  throw new RuntimeException("userDAO is null") ;
  }

  return(userDAO) ;
  }

  @Override
  public List getUsers()
  {
  return (getUserDAO().findAll());
  }
==>
UserDAOHibernate
==> @Repository("UserDAO")
public class UserDAOHibernate extends GenericDAOHibernate
implements UserDAO
{
  private static Log log =ogFactory.getLog("UserDAOHibernate");

  public UserDAOHibernate()
  {
  InjectorHolder.getInjector().inject(this);
  }

...
==>
HomePage
==> public class HomePage extends WebPage
{
  @SpringBean
  private UserService userService ;

  public HomePage(final PageParameters parameters)
  {
  super (parameters) ;

  List userList =serService.getUsers() ;

  RepeatingView rv =ew RepeatingView("Users") ;
  for(User user: userList)
  {
  Label userName =ew Label("username", user.getUsername()) ;
  rv.add(userName) ;
  }

  this.add(rv) ;
  }
}
==>
CoastwareApplication
==> public class CoastwareApplication extends WebApplication
{
  private ApplicationContext ctx;

  @SpringBean
  private UserService userService ;

  protected static Log log =ogFactory.getLog(CoastwareApplication.class) ;

  private static ISpringContextLocator CTX_LOCATOR =ew
ISpringContextLocator()
  {
  public ApplicationContext getSpringContext()
  {
  return(CoastwareApplication.get().ctx) ;
  }
  } ;

  public CoastwareApplication()
  {
  }

  public void init()
  {
  ctx =ew ClassPathXmlApplicationContext("appContext.xml") ;

  addComponentInstantiationListener(new SpringComponentInjector(this));

  super.init() ;
  }

  @Override
  public Session newSession(Request request, Response response)
  {
  return (new WebSession(request)) ;
  }

  public static CoastwareApplication get()
  {
  return ((CoastwareApplication) Application.get()) ;
  }

  private  T createProxy(Class clazz)
  {
  return ((T) LazyInitProxyFactory.createProxy(clazz, new
SpringBeanLocator(clazz, CTX_LOCATOR))) ;
  }

  public Class getHomePage()
  {
  return HomePage.class;
  }

  public UserService getUserService()
  {
  if (null =userService)
  {
  userService =reateProxy(UserService.class) ;
  }
  return userService;
  }
}
==>

Web.xml
==>   vProbe

  
  contextConfigLocation
  classpath:appContext.xml
  

  
  configuration
  development
  

  
  
  org.springframework.web.context.ContextLoaderListener
  
  

  
  wicketFilter

 org.apache.wicket.protocol.http.WicketFilter
  
  applicationClassName

com.coastware.vProbe.CoastwareApplication
   
  

  
  opensessioninview

org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
  

  
  wicketFilter
  /*
  

  
  opensessioninview
  /*
  
==>
appContext.xml
==> 
http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  http://www.springframework.org/schema/aop
  http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
  htt

DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire

Hello.

I have created a new small project to try to figure out how to use the 
SpringBean, Service, and Repository annotations with Wicket, Spring, 
Hibernate, Maven and Eclipse.


However, I am getting an error with a user DAO that I have created.

I have a service that is using the dao tagged as @Service, I have the 
DAO in the service tagged with @SpringBean, and the DAO code itself is 
tagged with @Repository.  The service that is using the DAO is getting 
found correctly.


When I have the InjectorHolder code in the dao constructor, I get an 
error that says 'InjectorHolder has not been assigned an injector'


When I comment out the InjectorHolder line in the dao constructor, the 
DAO is null, and getUserDAO throws an exception.


Since I am not certain that I can attach files, I will insert the 
relevant code and exceptions into this email.


Any pointers you can give would be greatly appreciated.

Thanks very very much,

Bruce.

UserServiceImpl
=
@Service("UserService")
public class UserServiceImpl implements UserService
{
   @SpringBean
   UserDAO userDAO ;

   private UserDAO getUserDAO()
   {
   if (null == userDAO)
   {
   throw new RuntimeException("userDAO is null") ;
   }

   return(userDAO) ;
   }

   @Override
   public List getUsers()
   {
   return (getUserDAO().findAll());
   }
=

UserDAOHibernate
=
@Repository("UserDAO")
public class UserDAOHibernate extends GenericDAOHibernate 
implements UserDAO

{
   private static Log log = LogFactory.getLog("UserDAOHibernate");

   public UserDAOHibernate()
   {
   InjectorHolder.getInjector().inject(this);
   }

...
=

HomePage
=
public class HomePage extends WebPage
{
   @SpringBean
   private UserService userService ;

   public HomePage(final PageParameters parameters)
   {
   super (parameters) ;

   List userList = userService.getUsers() ;

   RepeatingView rv = new RepeatingView("Users") ;
   for(User user: userList)
   {
   Label userName = new Label("username", user.getUsername()) ;
   rv.add(userName) ;
   }

   this.add(rv) ;
   }
}
=

CoastwareApplication
=
public class CoastwareApplication extends WebApplication
{
   private ApplicationContext ctx;

   @SpringBean
   private UserService userService ;

   protected static Log log = 
LogFactory.getLog(CoastwareApplication.class) ;


   private static ISpringContextLocator CTX_LOCATOR = new 
ISpringContextLocator()

   {
   public ApplicationContext getSpringContext()
   {
   return(CoastwareApplication.get().ctx) ;
   }
   } ;

   public CoastwareApplication()
   {
   }

   public void init()
   {
   ctx = new ClassPathXmlApplicationContext("appContext.xml") ;

   addComponentInstantiationListener(new 
SpringComponentInjector(this));


   super.init() ;
   }

   @Override
   public Session newSession(Request request, Response response)
   {
   return (new WebSession(request)) ;
   }

   public static CoastwareApplication get()
   {
   return ((CoastwareApplication) Application.get()) ;
   }

   private  T createProxy(Class clazz)
   {
   return ((T) LazyInitProxyFactory.createProxy(clazz, new 
SpringBeanLocator(clazz, CTX_LOCATOR))) ;

   }

   public Class getHomePage()
   {
   return HomePage.class;
   }

   public UserService getUserService()
   {
   if (null == userService)
   {
   userService = createProxy(UserService.class) ;
   }
   return userService;
   }
}
=


Web.xml
=
   vProbe

   
   contextConfigLocation
   classpath:appContext.xml
   

   
   configuration
   development
   

   
   
   org.springframework.web.context.ContextLoaderListener
   
   

   
   wicketFilter

org.apache.wicket.protocol.http.WicketFilter

   
   applicationClassName
   
com.coastware.vProbe.CoastwareApplication


   

   
   opensessioninview
   
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter

   

   
   wicketFilter
   /*
   

   
   opensessioninview
   /*
   
=

appContext.xml
=

http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:aop="http://www.springframework.org/schema/aop";
   xmlns:tx="http://www.springframework.org/schema/tx";
   xmlns:context="http://www.springframework.org/schema/context";
   xsi:schemaLocation="
   http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
   http://www.springframework.

RE: Spring?

2008-05-21 Thread Bruce McGuire
Thanks to all who responded. The consensus seems to support the idea of
adding Spring to the app.  Here we go!

 

I really appreciate the information.

 

Bruce.



Spring?

2008-05-20 Thread Bruce McGuire
Hello All.

 

We are just starting a new version of an existing app, moving toward open
source technologies. We have decided on using Wicket based on some
prototypes we have done, and are using Hibernate for the models.

 

Our question is this: do you recommend also adding Spring into the mix?

 

There are aspects (no pun intended) of Spring that we like, but are unsure
if the benefits (AOP, IOC) are worth the added effort.

 

I appreciate your thoughts on this.

 

Thanks,

 

Bruce.



RE: No get method defined for class

2008-04-17 Thread Bruce
Hello Ritesh.

You were correct, it was in a method called that returned a model
incorrectly. 

Thanks very much for your input.

Bruce McGuire


-Original Message-
From: Ritz123 [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 16 April, 2008 03:46 PM
To: users@wicket.apache.org
Subject: Re: No get method defined for class


It seems like its related to the choice list box, the values of the options
are getting rendered using that class.

Do you not have a  choice list on the page? 

if mwh.entity.PoolRole is your class, check if it has name property - if not
you probably will have to change the choicerenderer model to use different
property


Bruce McGuire-2 wrote:
> 
> Hello.
> 
>  
> 
> I am getting an error that I can't figure out how to track down.  The
> entity
> in the exception doesn't have, nor has it ever had, a piece of data called
> 'name'. Nor does there seem to be a place where this is getting
> instantiated, at least as far as I can tell from the exception trace.
> 
>  
> 
> Would anyone have a thought on how to figure out where the error
> originates?
> 
>  
> 
> org.apache.wicket.WicketRuntimeException: No get method defined for class:
> class mwh.entity.PoolRole expression: name
> 
> 
>  at
>
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolve
> r.java:419)
> 
> 
>  at
>
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyR
> esolver.java:283)
> 
> 
>  at
>
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:
> 89)
> 
> 
>  at
>
org.apache.wicket.markup.html.form.ChoiceRenderer.getDisplayValue(ChoiceRend
> erer.java:119)
> 
> 
>  at
>
org.apache.wicket.markup.html.form.AbstractChoice.appendOptionHtml(AbstractC
> hoice.java:373)
> 
> 
>  at
>
org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(Abstrac
> tChoice.java:350)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
>
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
> a:1370)
> 
> 
>  at
>
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:13
> 05)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
>
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
> a:1370)
> 
> 
>  at
>
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.jav
> a:642)
> 
> 
>  at
>
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1332)
> 
> 
>  at org.apache.wicket.Page.onRender(Page.java:1433)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at org.apache.wicket.Page.renderPage(Page.java:922)
> 
> 
>  at
>
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.res
> pond(BookmarkablePageRequestTarget.java:225)
> 
> 
>  at
>
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequ
> estCycleProcessor.java:103)
> 
> 
>  at
>
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:103
> 8)
> 
> 
>  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
> 
> 
>  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
> 
> 
>  at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> 
> 
>  at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
> 
> 
>  at
>
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
> 
> 
>  at
>
o

No get method defined for class

2008-04-16 Thread Bruce McGuire
Hello.

 

I am getting an error that I can't figure out how to track down.  The entity
in the exception doesn't have, nor has it ever had, a piece of data called
'name'. Nor does there seem to be a place where this is getting
instantiated, at least as far as I can tell from the exception trace.

 

Would anyone have a thought on how to figure out where the error originates?

 

org.apache.wicket.WicketRuntimeException: No get method defined for class:
class mwh.entity.PoolRole expression: name


 at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolve
r.java:419)


 at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyR
esolver.java:283)


 at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:
89)


 at
org.apache.wicket.markup.html.form.ChoiceRenderer.getDisplayValue(ChoiceRend
erer.java:119)


 at
org.apache.wicket.markup.html.form.AbstractChoice.appendOptionHtml(AbstractC
hoice.java:373)


 at
org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(Abstrac
tChoice.java:350)


 at org.apache.wicket.Component.renderComponent(Component.java:2189)


 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)


 at org.apache.wicket.Component.render(Component.java:2013)


 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)


 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
a:1370)


 at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:13
05)


 at org.apache.wicket.Component.renderComponent(Component.java:2189)


 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)


 at org.apache.wicket.Component.render(Component.java:2013)


 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)


 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
a:1370)


 at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.jav
a:642)


 at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)


 at org.apache.wicket.Component.renderComponent(Component.java:2189)


 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)


 at org.apache.wicket.Component.render(Component.java:2013)


 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)


 at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1332)


 at org.apache.wicket.Page.onRender(Page.java:1433)


 at org.apache.wicket.Component.render(Component.java:2013)


 at org.apache.wicket.Page.renderPage(Page.java:922)


 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.res
pond(BookmarkablePageRequestTarget.java:225)


 at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequ
estCycleProcessor.java:103)


 at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:103
8)


 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)


 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)


 at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)


 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)


 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)


 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)


 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)


 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)


 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)


 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)


 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)


 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)


 at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)


 at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)


 at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)


 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)


 at java.lang.Thread.run(Unknown Source)

 

Thanks,

 

Bruce.



RE: Question on page inheritance...

2008-04-01 Thread Bruce Petro
Thanks to the replies I received... yeah I didn't say it well, but I
assumed the user would be kept in the session and that seems to fit
everyone's reply. On top of that, I think I'm hearing I can use
inheritance and have every page utilize ISecurityStrategy to then
control access to the page.

I'll check into it and see if I've got that all correct.  Thanks again.


-Original Message-
From: Nino Saturnino Martinez Vazquez Wael
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2008 1:49 PM
To: users@wicket.apache.org
Subject: Re: Question on page inheritance...

True, as Igor wrote this is meant to be in conjuction with at 
ISecurityStrategy.

Nino Saturnino Martinez Vazquez Wael wrote:
> You could actually also do this another way... Im using markup 
> inheritance alot, but I stuff user object into the session like this:
>
> See a nice view here:
> http://papernapkin.org/pastebin/view/281/
>
> package zeuzgroup.application;
>
> import javax.servlet.http.HttpSession;
>
> import org.apache.wicket.Application;
> import org.apache.wicket.Request;
> import org.apache.wicket.protocol.http.WebRequest;
> import org.apache.wicket.protocol.http.WebSession;
>
> import zeuzgroup.core.Person;
> import zeuzgroup.core.user.UserType;
>
> public class ZeuzSession extends WebSession {
>
>private boolean authorized = false;
>
>private Person person;
>
>private HttpSession httpSession;
>
>protected ZeuzSession(Application application, Request request) {
>super(application, request);
>httpSession = ((WebRequest) request).getHttpServletRequest()
>.getSession();
>
>}
>
>public boolean isAuthorized() {
>return authorized;
>}
>
>public void setAuthorized(boolean authorized) {
>
>this.authorized = authorized;
>if (authorized) {
>
>httpSession.setAttribute("sso.password.attribute", person
>.getPassword());
>httpSession.setAttribute("sso.email.attribute", 
> person.getEmail());
>httpSession.setAttribute("password", person.getPassword());
>httpSession.setAttribute("email", person.getEmail());
>
>} else {
>httpSession.setAttribute("sso.password.attribute", null);
>httpSession.setAttribute("sso.email.attribute", null);
>}
>}
>
>public Person getPerson() {
>if (person != null) {
>return person;
>} else {
>Person person = new Person();
>person.setUserType(UserType.Guest);
>return person;
>}
>}
>
>public void setPerson(Person person) {
>this.person = person;
>}
>
> }
>
>
> Bruce Petro wrote:
>> I'm just getting started in wicket, so forgive me if this is a
too-dumb
>> question...
>>
>>  
>>
>> I know wicket can check the session for a user to ask a "user" object
if
>> it is logged in.
>>
>> However, you don't really want to paste code on every page.
>>
>> What is the best way, to have each page inherit the base "security
>> check" routine?
>>
>>  
>>
>> Would you create a BasePage extends WebPage and put the logic there
and
>> have all other pages extend BasePage?
>>
>> Or would you attach some sort of a command object to each page and
put
>> the logic in that?
>>
>>  
>>
>> Anyone have a reference to an example of code to do this?
>>
>>  
>>
>> THANKS!
>>
>>  
>>
>>  
>>
>>  
>>
>>
>>   
>

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


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



Question on page inheritance...

2008-04-01 Thread Bruce Petro
I'm just getting started in wicket, so forgive me if this is a too-dumb
question...

 

I know wicket can check the session for a user to ask a "user" object if
it is logged in.

However, you don't really want to paste code on every page.

What is the best way, to have each page inherit the base "security
check" routine?

 

Would you create a BasePage extends WebPage and put the logic there and
have all other pages extend BasePage?

Or would you attach some sort of a command object to each page and put
the logic in that?

 

Anyone have a reference to an example of code to do this?

 

THANKS!

 

 

 



Listview hierarchy problem

2008-03-20 Thread Bruce McGuire
Hello.

 

I have a panel that contains a form, which contains a list view with two
items, a label and a button. I have tried a gajillion different
combinations, but I keep getting the "unable to find component" error.

 

Any hints that you can provide would be HUGELY appreciated.

 

The panel markup is:



  



  

  



  

  





  



 

The code for the panel and so on is:

  public PageManagePanel(String id)

  {

super(id) ;

add(new PageRemoveForm("prf"));

add(new PageAddForm("paf")) ;

  }

 

PageRemoveForm:

  public PageRemoveForm(String id)

  {

super(id, Page.class);

 

uPages = Utility.getUnassignedPages() ;

unassignedPages = new ListView("uPages", uPages)

{

  private static final long serialVersionUID = 200803188L;

 

  protected void populateItem(ListItem listItem)

  {

final Page curPage = (Page)listItem.getModelObject()
;

Label pn = new Label("pn", curPage.getName()) ;

Button rp = new Button("rmvPage")

{

  private static final long serialVersionUID =
20080319L;

  public void onSubmit()

  {

Utility.removePage(curPage);

  }

};

 

add(pn) ;

add(rp) ;

  }

 

  public boolean isVisible()

  {

if (uPages.isEmpty())

{

  return (false) ;

}

return (true);

  }

};

 

add(unassignedPages) ;

  }

 

PageAddForm:

  public PageAddForm(String id)

  {

super(id, Page.class);

 

newPage = new TextField("name") ;

addPage = new Button("addPage") ;

 

add(newPage) ;

add(addPage) ;

  }

 

  @Override

  protected void onSubmit()

  {

super.onSubmit() ;

clearPersistentObject() ;

  }

 



RE: How to NOT use wicket's Role class

2008-02-15 Thread Bruce McGuire
Hi Jonathan.

Thanks for the information, no need for the apology. I am loving developing
in Wicket. I just wish I had started earlier.

Bruce.

-Original Message-
From: Jonathan Locke [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 14 February, 2008 03:25 PM
To: users@wicket.apache.org
Subject: Re: How to NOT use wicket's Role class



sorry, i really just ran out of time writing the auth-roles package and so
it's closer to an example than something fully reusable.  in my own projects
i don't use auth-roles exactly as is.  instead, i use a Role enum and keep a
Set of those role objects in my User object stored via hibernate.  you do
lose type safety in your hasAnyRole() implementation comparing with the
string role annotations (would be great if you could specify a list of Role
values!) but it's not a big deal for my projects so i just compare with each
enum's toString() value.


Bruce McGuire-2 wrote:
> 
> Hello.
> 
>  
> 
> My application has a need for more roles than user and admin.
> 
>  
> 
> Can someone point me to links etc. on the simplest method of using more
> than
> these roles please?  This class seems to be final, so extending it won't
> do
> the trick. Something of a similar complexity is desired, though.
> 
>  
> 
> Thanks,
> 
>  
> 
> Bruce.
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/How-to-NOT-use-wicket%27s-Role-class-tp15487694p154918
31.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


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



Linking two DropDownChoices

2008-02-15 Thread Bruce McGuire
Hello.

 

I have two DropDownChoices, both with Models (Databinder's
HibernateObjectModel). One is subordinate to the other, in that when the
first one's value changes, I would like to clear the second one, forcing the
user to select from the second one, or perhaps setting the second one to a
default value.

 

However, I am stumped as to how to accomplish this.

 

Any hints you have would be greatly appreciated.

 

Thanks,

 

Bruce.



How to NOT use wicket's Role class

2008-02-14 Thread Bruce McGuire
Hello.

 

My application has a need for more roles than user and admin.

 

Can someone point me to links etc. on the simplest method of using more than
these roles please?  This class seems to be final, so extending it won't do
the trick. Something of a similar complexity is desired, though.

 

Thanks,

 

Bruce.



RE: Extending DropDownChoice

2008-02-13 Thread Bruce
Thanks for the information Igor.  Reading now.

Bruce.
-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 13 February, 2008 12:22 AM
To: users@wicket.apache.org
Subject: Re: Extending DropDownChoice

give dropdownchoice a model, and in this model's setobject(object)
save the value into session. also check out the models page on the
wiki, it is important to understand/use models correctly.

-igor


On Feb 12, 2008 11:07 PM, Bruce McGuire <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I would like to save the result of a DropDownChoice in my custom session.
> But, I am stumped about how to extend it. I had thought that I would
> @Override the getChoices and onSelectionChanged methods, but Eclipse tells
> me that "The method onSelectionChanged(Pool) of type PoolSelect must
> override or implement a supertype method".
>
> I am stumped on how to extend this, or even if I should. Any pointers to
> tips or best practices would be greatly appreciated.
>
> In case it is not obvious from the question, I am new to Wicket (but
loving
> it so far).
>
> Thanks,
>
> Bruce.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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


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



Extending DropDownChoice

2008-02-12 Thread Bruce McGuire
Hi.

I would like to save the result of a DropDownChoice in my custom session.
But, I am stumped about how to extend it. I had thought that I would
@Override the getChoices and onSelectionChanged methods, but Eclipse tells
me that "The method onSelectionChanged(Pool) of type PoolSelect must
override or implement a supertype method".

I am stumped on how to extend this, or even if I should. Any pointers to
tips or best practices would be greatly appreciated.

In case it is not obvious from the question, I am new to Wicket (but loving
it so far).

Thanks,

Bruce.


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



RE: Component failed to render

2008-02-05 Thread Bruce McGuire
Hi Martijn.

I don't have the source for the page, I was going by the docs for
AccessDeniedPage at
http://people.apache.org/~tobrien/wicket/apidocs/index.html.

Bruce.

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 05 February, 2008 04:32 PM
To: users@wicket.apache.org
Subject: Re: Component failed to render

Did it add components by itself in the super constructor?

Martijn

On 2/6/08, Bruce McGuire <[EMAIL PROTECTED]> wrote:
> Hello.
>
> FYI, my problem was not that the ids didn't match. Not exactly sure what
the
> problem was, but as soon as I stopped extending AccessDeniedPage, and
> instead extended WebPage, the page rendered properly.
>
> Not sure why extending AccessDeniedPage was a bad thing, but it was.
>
> Bruce.
>
> -Original Message-
> From: Bruce McGuire [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 05 February, 2008 12:58 PM
> To: users@wicket.apache.org
> Subject: RE: Component failed to render
>
> Great. Thanks Martijn.
>
> Bruce.
>
> -Original Message-
> From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 05 February, 2008 12:52 PM
> To: users@wicket.apache.org
> Subject: Re: Component failed to render
>
> Wicket doesn't care about the alpha and the gamma, but the beta and delta
> need to be in alignment, or more specifically: ==
>
> On 2/5/08, Bruce McGuire <[EMAIL PROTECTED]> wrote:
> >
> > Hi Martijn.
> >
> > Thanks for the response.
> >
> > Do you mean that
> > Link alpha = new Link("beta")
> > gamma
> >
> > where these two lines have to match is in the declaration of the Link?
Ie
> > the alpha == delta?  Not beta == delta?
> >
> > Thanks,
> >
> > Bruce.
> > -Original Message-
> > From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, 05 February, 2008 12:43 PM
> > To: users@wicket.apache.org
> > Subject: Re: Component failed to render
> >
> > s/home/homePageLink/
> > Your link id in java doesn't match link id in markup
> >
> > Martijn
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.0 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

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


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



RE: Component failed to render

2008-02-05 Thread Bruce McGuire
Hello.

FYI, my problem was not that the ids didn't match. Not exactly sure what the
problem was, but as soon as I stopped extending AccessDeniedPage, and
instead extended WebPage, the page rendered properly.

Not sure why extending AccessDeniedPage was a bad thing, but it was.

Bruce.

-Original Message-
From: Bruce McGuire [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 05 February, 2008 12:58 PM
To: users@wicket.apache.org
Subject: RE: Component failed to render

Great. Thanks Martijn.

Bruce.

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 05 February, 2008 12:52 PM
To: users@wicket.apache.org
Subject: Re: Component failed to render

Wicket doesn't care about the alpha and the gamma, but the beta and delta
need to be in alignment, or more specifically: ==

On 2/5/08, Bruce McGuire <[EMAIL PROTECTED]> wrote:
>
> Hi Martijn.
>
> Thanks for the response.
>
> Do you mean that
> Link alpha = new Link("beta")
> gamma
>
> where these two lines have to match is in the declaration of the Link? Ie
> the alpha == delta?  Not beta == delta?
>
> Thanks,
>
> Bruce.
> -Original Message-
> From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 05 February, 2008 12:43 PM
> To: users@wicket.apache.org
> Subject: Re: Component failed to render
>
> s/home/homePageLink/
> Your link id in java doesn't match link id in markup
>
> Martijn
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0


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


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



RE: Component failed to render

2008-02-05 Thread Bruce McGuire
Great. Thanks Martijn.

Bruce.

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 05 February, 2008 12:52 PM
To: users@wicket.apache.org
Subject: Re: Component failed to render

Wicket doesn't care about the alpha and the gamma, but the beta and delta
need to be in alignment, or more specifically: ==

On 2/5/08, Bruce McGuire <[EMAIL PROTECTED]> wrote:
>
> Hi Martijn.
>
> Thanks for the response.
>
> Do you mean that
> Link alpha = new Link("beta")
> gamma
>
> where these two lines have to match is in the declaration of the Link? Ie
> the alpha == delta?  Not beta == delta?
>
> Thanks,
>
> Bruce.
> -Original Message-
> From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 05 February, 2008 12:43 PM
> To: users@wicket.apache.org
> Subject: Re: Component failed to render
>
> s/home/homePageLink/
> Your link id in java doesn't match link id in markup
>
> Martijn
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0


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



RE: Component failed to render

2008-02-05 Thread Bruce McGuire
Hi Martijn.

Thanks for the response.

Do you mean that 
Link alpha = new Link("beta")
gamma

where these two lines have to match is in the declaration of the Link? Ie
the alpha == delta?  Not beta == delta?

Thanks,

Bruce.
-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 05 February, 2008 12:43 PM
To: users@wicket.apache.org
Subject: Re: Component failed to render

s/home/homePageLink/
Your link id in java doesn't match link id in markup

Martijn


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



RE: Component failed to render

2008-02-05 Thread Bruce McGuire
Woops. Should have thought that the list server would strip attachments.

Here is the Java (without imports)

public class AccessDenied extends AccessDeniedPage implements Serializable
{
private static final long serialVersionUID = 200802012L;

public AccessDenied()
{
WebMarkupContainer wrapper = new
WebMarkupContainer("signedInWrapper")
{
private static final long serialVersionUID =
200802013L;

public boolean isVisible()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
return (currSess.isSignedIn());
}
};
add(wrapper);

Link signout = new Link("signOut")
{
private static final long serialVersionUID =
200802014L;

@Override
public void onClick()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
mwh.WicketApplication wa =
(mwh.WicketApplication)currSess.getApplication() ;
currSess.signOut();
setResponsePage(wa.getSignInPageClass());
}
};

wrapper.add(signout) ;

Link pageHome = new Link("home")
{
private static final long serialVersionUID =
20080205L;

@Override
public void onClick()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
mwh.WicketApplication wa =
(mwh.WicketApplication)currSess.getApplication() ;
setResponsePage(wa.getHomePage());
}
};

wrapper.add(pageHome) ;

Link signin = new Link("signIn")
{
private static final long serialVersionUID =
200802015L;

@Override
public void onClick()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
mwh.WicketApplication wa =
(mwh.WicketApplication)currSess.getApplication() ;
currSess.signOut();
setResponsePage(wa.getSignInPageClass());
}

@Override
public boolean isVisible()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
return (!currSess.isSignedIn());
}
};

add(signin) ;
}

@Override
public boolean isErrorPage()
{
return (true) ;
}
}


And the html:




Sign Out


Home



Sign In





Again, thanks for any pointers.

Bruce McGuire.

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 05 February, 2008 12:24 PM
To: users@wicket.apache.org
Subject: Re: Component failed to render

The attachments have gone AWOL, but I managed to take a look at them while
they were in the moderation queue.
s/home/homePageLink/

Martijn


On 2/5/08, Bruce McGuire <[EMAIL PROTECTED]> wrote:
>
>  Hi there.
>
>
>
> I am new to Wicket, and have been trying to create a new small application
> to test it out before we switch completely to using Wicket and Hibernate
> (through Databinder).
>
>
>
> I am getting an error with my AccessDenied page, saying that a component
> failed to render.
>
>
>
> ERROR - RequestCycle   - The component(s) below failed to
> render. A common problem is that you have added a component in code but
> forgot to reference it in the markup (thus the component will never be
> rendered).
>
> 1. [MarkupContainer [Component id = homePageLink, page =
> mwh.page.error.AccessDenied, path = 3:homePageLink.BookmarkablePageLink,
> isVisible = true, isVersioned = false]]
>
> org.apache.wicket.WicketRuntimeException: The component(s) below failed to
> render. A common problem is that you have added a component in code but
> forgot to re

Component failed to render

2008-02-05 Thread Bruce McGuire
Hi there.

 

I am new to Wicket, and have been trying to create a new small application
to test it out before we switch completely to using Wicket and Hibernate
(through Databinder).

 

I am getting an error with my AccessDenied page, saying that a component
failed to render.

 

ERROR - RequestCycle   - The component(s) below failed to
render. A common problem is that you have added a component in code but
forgot to reference it in the markup (thus the component will never be
rendered).

1. [MarkupContainer [Component id = homePageLink, page =
mwh.page.error.AccessDenied, path = 3:homePageLink.BookmarkablePageLink,
isVisible = true, isVersioned = false]]

org.apache.wicket.WicketRuntimeException: The component(s) below failed to
render. A common problem is that you have added a component in code but
forgot to reference it in the markup (thus the component will never be
rendered).

1. [MarkupContainer [Component id = homePageLink, page =
mwh.page.error.AccessDenied, path = 3:homePageLink.BookmarkablePageLink,
isVisible = true, isVersioned = false]]

 

 

I have the component in the page, and have tried it within a div, span, etc,
in different places, and so on, but I cant get past this error.

 

If anyone has a pointer, I would greatly appreciate it.

 

Thanks,

 

Bruce.

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