[Wicket-user] Check the mime type of uploaded file and its binary content

2007-05-18 Thread Lec

How to check the binary contents of the uploaded file. For example, to
prevent the fake file being uploaded, because I really want to check if the
uploaded file is really the pdf file or image file. How can you do it? I
realise checking the mime type of the file is not enough as the file
extension can still be renamed. HOw can i do it? 
-- 
View this message in context: 
http://www.nabble.com/Check-the-mime-type-of-uploaded-file-and-its-binary-content-tf3776119.html#a10677590
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Updating formComponents on round trip

2007-05-18 Thread kubino

I made a functional code, so everyone can test it. What I want is that, when
I click on radio button to automatically update textfields according to
their model. I do NOT want to use method textField.setModelValue(String d)
in onSelectionChanged method...

Thanks for help.


///html














 
 















// Wicket page


import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

import wicket.markup.html.basic.Label;
import wicket.markup.html.form.Form;
import wicket.markup.html.form.Radio;
import wicket.markup.html.form.RadioGroup;
import wicket.markup.html.form.TextField;
import wicket.markup.html.list.ListItem;
import wicket.markup.html.list.ListView;
import wicket.model.PropertyModel;


public class TestPage extends WebPage {


  private List systems = Arrays.asList(new SystemM("aa","aa"),new
SystemM("bb","bb"),new SystemM("cc","cc"));


  private SystemM selectedSystem;


  public TestPage() {

Form myForm = new Form("myForm");

selectedSystem = systems.get(0);


RadioGroup radioGroup = new RadioGroup("radioGroup",new
PropertyModel(this,"selectedSystem")) {
   
 
  @Override
  protected boolean wantOnSelectionChangedNotifications() {
return true;
  }
 
  @Override
  protected void onModelChanging() {
   
  }
 
  @Override
  protected void onSelectionChanged(Object arg0) {
   
  }
};

  ListView table = new ListView("table", systems) {
   
 
  @Override
  protected void populateItem(final ListItem item) {
   
final SystemM model = (SystemM)item.getModelObject();

  item.add(new Radio("sys_radio",item.getModel()));
  item.add(new Label("sys_name",model.getName()));
  item.add(new Label("sys_desc",model.getDesc()));
 
}
};


TextField nameTextField = new TextField("textFieldName",new
PropertyModel(selectedSystem,"name"));
TextField descTextField = new TextField("textFieldDesc",new
PropertyModel(selectedSystem,"desc"));
   
radioGroup.add(table);

myForm.add(radioGroup);

myForm.add(nameTextField);
myForm.add(descTextField);

add(myForm);

}

  public class SystemM implements Serializable{

private String name;
private String desc;

/**
 * 
 */
public SystemM(String n, String d) {

  this.name = n;
  this.desc = d;
  
}

public String getName() {
  return name;
}
public void setName(String name) {
  this.name = name;
}
public String getDesc() {
  return desc;
}
public void setDesc(String desc) {
  this.desc = desc;
}



  }

  public SystemM getSelectedSystem() {
return selectedSystem;
  }

  public void setSelectedSystem(SystemM selectedSystem) {
this.selectedSystem = selectedSystem;
  }


}
-- 
View this message in context: 
http://www.nabble.com/Updating-formComponents-on-round-trip-tf3770603.html#a10677724
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ERROR org.apache.wicket.RequestCycle - the requested resource was not found

2007-05-18 Thread Johan Karlberg
Please use 
http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3.0-incubating-SNAPSHOT/

Note the extra .0 on the version.

Johan

Andrew Moore wrote:
> I've just upgraded from one of the older 1.3 versions to the one here:
> http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-incubating-SNAPSHOT/
> 
> The only real change I seemed to have to make to get the build to work was
> add the org.apache to the import statements.
> 
> My application runs fine, but on every page, I get an error on the console
> like the following:
> 
> in the home page start 5
> in the home page start 6
> in the home page start 8
> in the home page start 9
> build url parameters: website = 1
> in page link
> in the home page start 7
> 2007-05-18 07:37:10,656 INFO org.apache.wicket.resource.PropertiesFactory -
> Loading properties files from file:/c:/tomca
> t/webapps/thepencilroom/WEB-INF/classes/uk/co/rageconsulting/thepencilroom/web/page/Home.properties
> 2007-05-18 07:37:10,812 ERROR org.apache.wicket.RequestCycle - the requested
> resource was not found
> org.apache.wicket.WicketRuntimeException: the requested resource was not
> found
> at
> org.apache.wicket.util.resource.WebExternalResourceStream.getInputStream(WebExternalResourceStream.java:99)
> at
> org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.jav
> a:125)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
> at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1011)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1073)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1142)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:490)
> at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:248)
> at
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.j
> ava:174)
> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: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.processConnection(Http11BaseProtocol.java
> :664)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:595)
> 2007-05-18 07:37:11,078 ERROR org.apache.wicket.RequestCycle - the requested
> resource was not found
> org.apache.wicket.WicketRuntimeException: the requested resource was not
> found
> at
> org.apache.wicket.util.resource.WebExternalResourceStream.getInputStream(WebExternalResourceStream.java:99)
> at
> org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.jav
> a:125)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
> at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1011)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1073)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1142)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:490)
> at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:248)
> at
> o

[Wicket-user] continueToOriginalDestination / RestartResponseAtInterceptPageException with page parameters

2007-05-18 Thread Wouter de Vaal
Hi,

I'm using the login/authorization strategy taken from the wicket
examples, which is
throw new RestartResponseAtInterceptPageException(SignIn.class);

in the application class and calling

continueToOriginalDestination()

in the login page.

However when I'm using a bookmarkable page with PageParameters, the
parameters get lost in the process..

Am I missing something, or is this behaviour just not supported?

Regards,
Wouter

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Filter on non-displayed columns

2007-05-18 Thread Ravindra Wankar

I've seen a filter example where columns in a table were filterable. Can 
someone point me to an example or tell me how to have a filter (with 
columns not related to the table) and that uses a dataprovider  at the 
backend?

EXAMPLE: we have a filter that is a drop-down with options describing 
task statuses as "Started, Starting Today, Starting This Week...". There 
is no corresponding column for that in the html table.

Thanks
Ravi

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ERROR org.apache.wicket.RequestCycle - the requested resource was not found

2007-05-18 Thread Andrew Moore

Thanks for the suggestion, but I'm still getting the same error.



Johan Karlberg wrote:
> 
> Please use 
> http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3.0-incubating-SNAPSHOT/
> 
> Note the extra .0 on the version.
> 
> Johan
> 
> Andrew Moore wrote:
>> I've just upgraded from one of the older 1.3 versions to the one here:
>> http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-incubating-SNAPSHOT/
>> 
>> The only real change I seemed to have to make to get the build to work
>> was
>> add the org.apache to the import statements.
>> 
>> My application runs fine, but on every page, I get an error on the
>> console
>> like the following:
>> 
>> in the home page start 5
>> in the home page start 6
>> in the home page start 8
>> in the home page start 9
>> build url parameters: website = 1
>> in page link
>> in the home page start 7
>> 2007-05-18 07:37:10,656 INFO org.apache.wicket.resource.PropertiesFactory
>> -
>> Loading properties files from file:/c:/tomca
>> t/webapps/thepencilroom/WEB-INF/classes/uk/co/rageconsulting/thepencilroom/web/page/Home.properties
>> 2007-05-18 07:37:10,812 ERROR org.apache.wicket.RequestCycle - the
>> requested
>> resource was not found
>> org.apache.wicket.WicketRuntimeException: the requested resource was not
>> found
>> at
>> org.apache.wicket.util.resource.WebExternalResourceStream.getInputStream(WebExternalResourceStream.java:99)
>> at
>> org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.jav
>> a:125)
>> at
>> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
>> at
>> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1011)
>> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1073)
>> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1142)
>> at org.apache.wicket.RequestCycle.request(RequestCycle.java:490)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:248)
>> at
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>> at
>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.j
>> ava:174)
>> at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: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.processConnection(Http11BaseProtocol.java
>> :664)
>> at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>> at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>> at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>> at java.lang.Thread.run(Thread.java:595)
>> 2007-05-18 07:37:11,078 ERROR org.apache.wicket.RequestCycle - the
>> requested
>> resource was not found
>> org.apache.wicket.WicketRuntimeException: the requested resource was not
>> found
>> at
>> org.apache.wicket.util.resource.WebExternalResourceStream.getInputStream(WebExternalResourceStream.java:99)
>> at
>> org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.jav
>> a:125)
>> at
>> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
>> at
>> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1011)
>> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1073)
>> at org.apache.wicket.Reque

[Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread Chris Colman
> It is not possible in wicket...
> You can have at most one wicket:child tag per page...
> This is because Java does not support multiple inheritance...
> This question has been posted on the mailing list earlier. Give a
search
> to find out more about this subject.

I don't believe that this is an issue that requires a multiple
inheritance.

I see individual  sections as more like abstract/(virtual)
methods whose implementation is not provided in the base class but it is
provided in a derived class. Now Java supports multiple abstract methods
in a class without a problem. All that is needed is a way to name the
individual  sections so that wicket knows which bits in
the derived markup are providing the implementations via 
(which could refer to the child section they are 'overriding'. 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread Charlie Dobbie
As Alex says, wicket:child tags can't solve this because that's not
the way they're intended to be used.

There are various ways to solve the problem, though: you could place
the common content into a Panel, have a method on the base page return
this panel, and then include it as normal on your child pages; or
restructure your child pages so the "before" and "after" content
exists in panels, have two abstract methods on the base page that
return these panels, then the base page can obtain and add the content
itself.

I expect you could do something with fragments as well, but I haven't
looked into them!

Charlie.



On 5/18/07, Chris Colman <[EMAIL PROTECTED]> wrote:
> Let's say I have a page which can be almost completely marked up in a
> base class markup. There are only two sections of the page that change
> in the derived pages/classes. Is it possible to use the 
> tag twice in
> the one page and then have two  tags in the derived
> pages?
>
> Markup for base page:
>
> 
> 
>
> 
>
> 
>
> 
> 
>
> The stuff in here is common to all
> pages and so I only want to define it once in this base page markup
>
> 
> 
>
>   
>
> 
>
> 
> 
>
> Markup for the derived page:
>
> 
> 
> 
> 
> 
> 
>
> This text is ignored - only the extend parts will be
> used
>
> 
> Hi there!
> 
> 
>
> I've tried this and I get the following error message:
>
> WicketMessage: The component [MarkupContainer [Component id = _child,
> page = com.sas.av.ui.wicket.HomePage, path =
> 4:_:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer
> , isVisible = true, isVersioned = true]] has the same wicket:id as
> another component already added at the same level
>
> Root cause:
>
> wicket.markup.MarkupException: The component [MarkupContainer [Component
> id = _child, page = com.sas.av.ui.wicket.HomePage, path =
> 4:_:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer
> , isVisible = true, isVersioned = true]] has the same wicket:id as
> another component already added at the same level
> at wicket.Page.componentRendered(Page.java:936)
> at wicket.Component.rendered(Component.java:1755)
> at wicket.Component.render(Component.java:1534)
> at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
> at
> wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982)
> at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917)
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Borders Containing Embedded Components

2007-05-18 Thread severian

I'm having a problem with a Border containing an embedded ListView.  I've
looked at the previous posts re. borders & markup inheritance etc, but my
case is slightly different - setTransparentResolver() is not going to get me
out of trouble.

I want to define a border intended to render a table containing a standard
header & footer (I may have more than 1 table on a page, so markup
inheritance is not applicable).  The content of the table will be rendered
using a standard ListView component.

My border markup looks something like:
-


Header Content Here



Footer Content Here

  
-

Note that the body will be rendered inside another component tag
("listViewId") - this is the crucial point.  My page markup looks something
like:
-

Property 1 Here
Property 2 Here
 # Link Here 

-

When I try to render my page, Wicket throws the standard "Unable to find
component" MarkupException, complaining that it can't find component
"linkId" in component "borderId".  Which makes sense, as (in my java code)
component "linkId" is a child of "listViewId" which is itself a child of
"borderId".

I naively expected Wicket to substitute the border markup into the page
markup before trying to resolve the components.  That is, I expected Wicket
to consider the page markup as looking like:
-



Header Content Here



Property 1 Here
Property 2 Here
 # Link Here 



Footer Content Here



-
In which case the markup would match my java component hierarchy.  But the
standard Wicket exception page contains the page markup without the border
markup, and complains that it cannot find "linkId" within "borderId".

Should I simply avoid embedding component tags inside my border (i.e. avoid
putting the "listViewId" tag inside the border)?  I liked this approach
because it saved me repeating the tag in every page which wants to use the
border.  Is there some way to get wicket to handle this kind of component
hierarchy (maybe not involving borders)?
-- 
View this message in context: 
http://www.nabble.com/Borders-Containing-Embedded-Components-tf3776704.html#a10679274
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread graemer

Haha, sorry but it seems some of the Wicket community are still living in
Lala land with regards to believing everything deployed to production has to
be written in Java. It is 2007, the realisation that Java is not the best
language for web apps has hit home for years now. A good language for
writing a lot of your business logic yes, but your business logic and web
logic are two different things and if you're mixing them you're already
making mistakes right there.

Btw, About the WicketBuilder, this person already has the concept down:
http://bigheadco.blogspot.com/2007/03/wicket-and-groovy.html

A combination of the Grails plug-in, a WicketBuilder, automatic reloading at
dev time would make Wicket+Grails the first RAD and agile component
framework. It is probably worth time investing in for Wicket, if there are
some interested devs. It would be a big selling point over heavy weights
like JSF and Tapestry (although we could make a similar Grails + Tapestry 5
integration, not sure about JSF, it is heavyweight in multiple layers).

Cheers



Jonathan Locke wrote:
> 
> 
> Very interesting.  I'm not that interested for production code, but this
> could be really exceptional for prototyping and fast TTM when that
> matters.
> 
> 
> jklappenbach wrote:
>> 
>> http://graemerocher.blogspot.com/2007/05/grails-wicket-wonders-of-grails-plug-in.html
>> (SFW)
>> 
>> Graeme pinged me as soon as I got online this morning to tell me about
>> his
>> work on integrating Wicket and Groovy, a Rails implementation based on
>> the
>> Java scripting language, Groovy.
>> 
>> As you'll read, the integration took him *20 minutes*, and the result was
>> the following:
>> 
>>1. Wicket classes can be utilized as-is from wicket jars inside a
>>Groovy environment, meaning that there's no concern of keeping a
>>Groovy-based mirror of Wicket synchronized.
>>2. Wicket classes can take advantage of GORM, with dynamic methods
>>(This is very, very, cool)
>>3. Developers can take advantage of closures, and all other nice
>>features of Groovy
>> 
>> Graeme warned me that he hadn't tested much more than a "Hello World"
>> example.  But in getting even those two simple words out, a lot had to be
>> going on under the hood.  I'd be surprised if there were issues lurking
>> beyond.
>> 
>> If you haven't heard of Grails, or would like to know more, I have a
>> short
>> post here at:
>> 
>> http://tapestryofthoughts.blogspot.com/2007/05/grails-rails-gone-groovy.html
>> 
>> For more in-depth, there's the Grails site at:
>> 
>> http://grails.codehaus.org/
>> 
>> -jjk
>> 
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Gricket%3A-The-Love-Child-of-Grails-and-Wicket-tf3772804.html#a10679189
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DropDownChoice with IModel and ChoiceRenderer

2007-05-18 Thread Florian Hehlen

hi,
here is my code:

public class AttributeChoiceDto implements Serializable
{
   public AttributeChoiceDto(String aId, String aName)
   {
   theId = aId;
   theName = aName;
   }

   public String getId()
   {
   return theId;
   }

   public void setId(String aId)
   {
   theId = aId;
   }

   public String getName()
   {
   return theName;
   }

   public void setName(String aName)
   {
   theName = aName;
   }

   private String theId;
   private String theName;

}

public class ChoiceOptions extends AbstractModel
{
   public ChoiceOptions(List aOptions)
   {
   theOptions = aOptions;
   }
   public Object getObject(final Component component)
   {
   return theOptions;
   }
   public void setObject(final Component component, final Object object)
   {

   }
}

public class SymbolAddUpdate extends WebPage
{
   public SymbolAddUpdate(PageParameters aParams)
   {
   addFeedback();
   addPageTitle("Add/Update Symbol");

   CompoundPropertyModel mySymbol = checkNewOrUpdate(aParams, 
aParams.getString("theSymbolId"));


   final Form myForm = new AddUpdateForm("form.symbol", mySymbol);
   add(myForm);

   TextField myName = new TextField("name");

   final ChoiceOptions myOptions = new ChoiceOptions(
   theDao.findAllCategoriesAsDto());

   final ChoiceRenderer myRenderer = new ChoiceRenderer("name", "id");

   final CategoryChoices myCategories = new CategoryChoices();
   DropDownChoice myCat
   = new DropDownChoice("categories", myCategories, 
myCategories,myRenderer);

   [...]
  
  }


I hope this helps.

thanks,
florian

Igor Vaynberg wrote:
if you show me the exact code snippet that doesnt work that will give 
me the necessary context.


-igor


On 5/17/07, *Florian Hehlen* < [EMAIL PROTECTED] > 
wrote:

Hi,

Thanks for the help... It's starting to make more sense to me
although still not working. The issue is definitely with the form
model. because all my sandbox experiments show me that it all goes
to hell when i introduce the model in the form. My form is a a
bean wrapped in a CompoundPropertyModel.

Maybe you can clarify below your explanation in that context.

florian

Igor Vaynberg wrote:

if you type it it looks like this

DDC(String,IModel,IModel>,IChoiceRenderer)

the first model is the one that holds the selection, the second
is the one that holds a list of available choices.

the constructor with a single model:

DDC(String,IModel>,IChoiceRenderer)

is used when you use DDC in combination with a compound property
model on the form, in which case the ddc's id is used as a
property expression into form's model to determine the selection.
there is a great wiki page on models.

so try this

 myForm.add(new DropDownChoice("select",new Model(),new
MyChoices(),myRenderer));

this will create a ddc with a null selection. its not practical,
because to get the selection you have to call
ddc.getmodelobject(), but it will at least get you going before
you decide on what model to use.


-igor


On 5/16/07, *Florian Hehlen* < [EMAIL PROTECTED] >
wrote:

hi,

I am new to wicket so I am not sure how simple this issue is.

I am creating DropDownChoice components. I want to a)  build
the the
Options from a list of Objects (not primitives) and b) want
to render
the option id and value as an attribute of the object in the
list. this
definitly works in the following sample code:

public class WicketSandbox extends WebPage
{
public WicketSandbox()
{
addPageTitle("Development Sandbox");
final Form myForm = new Form("form");
add(myForm);

final ChoiceRenderer myRenderer = new
ChoiceRenderer("name", "id");
myForm.add(new DropDownChoice("select",new
MyChoices(),myRenderer));

}
}

But as soon as I add an IModel to the form it seems that the
DropDownChoice looks up the choices in the form's IModel.  I
have tried
to use the other constructors for the DropDownChoice which
require an
(String id, IModel model, IModel choices, IChoicerenderer
renderer) but
I can't figure out what is the difference between the 2
IModel objects
that have to be provided. If I provide twice a ref to the
same object I
get a different error:

The expression 'id' is neither an index nor is it a method
for the list class java.util.ArrayList

this is an improvement because it is accessing the right
object and
retrieving the list of choices but not extracting the the
objects from
the list as i

Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread graemer

Btw I found more stuff on the WicketBuilder that other chap was working on,
seems progress has been made already, just a matter of integrating this
project and the Grails integration code

Cheers
Graeme


jklappenbach wrote:
> 
> On 5/17/07, graemer <[EMAIL PROTECTED]> wrote:
>>
>>
>> No, I still believe it would be quite trivial to write a Wicket builder
>> that
>> would make creating Wicket component interfaces much simpler in Groovy.
>> Something like Groovy's current SwingBuilder system:
>>
>> http://www.oreillynet.com/onjava/blog/2004/10/gdgroovy_basic_swingbuilder.html
> 
> 
> I stand corrected.  I was under the assumption that a "builder" approach
> would require that the Wicket API be rewritten in Groovy, as I thought you
> were demonstrating during our initial discussions on a builder approach.
> 
> It is just about investing the time to build this. As to what you get by
>> using Grails and Wicket together, well you essentially get an ORM system
>> built right in that follows a convention-over-configuration approach and
>> supports dynamic finders and is built on Hibernate
>> (http://grails.org/GORM
>> )
>>
>> You also get support for Grails' entire plug-in eco-system including
>> things
>> like Quartz, Compass, XFire, Spring Remoting, Acegi etc. See
>> http://grails.org/Plugins
> 
> 
> Thinking alike, I just posted something on this.
> 
> My only concern with the current implementation is that it requires a
> server
>> restart when you make any changes to the Wicket Application class or
>> components. This goes against the "Grails Way" which promotes agile,
>> iterative development and really ideally we would need to find a way, at
>> least in development mode, to refresh the Wicket Application instance
>> when
>> the Groovy classes change so get automatic reloading
>>
>> PS One correction is that Grails is not part of the RoR family or in
>> anyway
>> related to Rails or a port of Rails. It is built from the ground up on
>> solid
>> Java technologies like Spring & Hibernate
> 
> 
> [Scratches head]...  OK, fine by me.
> 
> -jjk
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Gricket%3A-The-Love-Child-of-Grails-and-Wicket-tf3772804.html#a10679581
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Custom Message Resolver

2007-05-18 Thread Scott Sauyet
Juergen Donnerstag wrote:
> Wicket is very flexible and modular. You can write your own
> MyWicketMessageResolver and register it with the application. How to
> do it? Just see how WicketMessageResolver is registered. It is realy
> simple.

It looks straightforward enough.  I will look into it.

> I don't see how IComponentResolver can help you, but may I missed the point.

It may not be useful, but I will check it out too.

> Looking at Localizer and how it works to find a property value might
> help you as well.

Ok.  Thanks for your help,

   -- Scott


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread graemer

Oops forgot to post the link:

http://wicketstuff.org/confluence/display/STUFFWIKI/WicketBuilder

Cheers
Graeme


graemer wrote:
> 
> Btw I found more stuff on the WicketBuilder that other chap was working
> on, seems progress has been made already, just a matter of integrating
> this project and the Grails integration code
> 
> Cheers
> Graeme
> 
> 
> jklappenbach wrote:
>> 
>> On 5/17/07, graemer <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>> No, I still believe it would be quite trivial to write a Wicket builder
>>> that
>>> would make creating Wicket component interfaces much simpler in Groovy.
>>> Something like Groovy's current SwingBuilder system:
>>>
>>> http://www.oreillynet.com/onjava/blog/2004/10/gdgroovy_basic_swingbuilder.html
>> 
>> 
>> I stand corrected.  I was under the assumption that a "builder" approach
>> would require that the Wicket API be rewritten in Groovy, as I thought
>> you
>> were demonstrating during our initial discussions on a builder approach.
>> 
>> It is just about investing the time to build this. As to what you get by
>>> using Grails and Wicket together, well you essentially get an ORM system
>>> built right in that follows a convention-over-configuration approach and
>>> supports dynamic finders and is built on Hibernate
>>> (http://grails.org/GORM
>>> )
>>>
>>> You also get support for Grails' entire plug-in eco-system including
>>> things
>>> like Quartz, Compass, XFire, Spring Remoting, Acegi etc. See
>>> http://grails.org/Plugins
>> 
>> 
>> Thinking alike, I just posted something on this.
>> 
>> My only concern with the current implementation is that it requires a
>> server
>>> restart when you make any changes to the Wicket Application class or
>>> components. This goes against the "Grails Way" which promotes agile,
>>> iterative development and really ideally we would need to find a way, at
>>> least in development mode, to refresh the Wicket Application instance
>>> when
>>> the Groovy classes change so get automatic reloading
>>>
>>> PS One correction is that Grails is not part of the RoR family or in
>>> anyway
>>> related to Rails or a port of Rails. It is built from the ground up on
>>> solid
>>> Java technologies like Spring & Hibernate
>> 
>> 
>> [Scratches head]...  OK, fine by me.
>> 
>> -jjk
>> 
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Gricket%3A-The-Love-Child-of-Grails-and-Wicket-tf3772804.html#a10679582
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread Chris Colman
> As Alex says, wicket:child tags can't solve this because that's not
> the way they're intended to be used.

I can't see why wicket could not be easily enhanced to support multiple
overridden child sections. Just like the astract methods of a class -
there is no limit on the number of them: a class can have any number
abstract methods and they can be overridden by any derived class - not
just immediate descendents and they don't have to all be overridden in
the same class - just so long as an implementation is provided somewhere
in the inheritance hierarchy for any concrete class.

In wicket the  is just a placeholder for content that will
be implemented/provided in a derived class. It just seems strange that
the number of possible placeholders, n, was arbitrarily set to n = 1 in
the architecture.

Having only 1 alleviates the need to identify the placeholder in a
derived class but that is the only reason I can see why the maximum
number of placeholders should have been limited to just 1.

I can see many uses for providing implementations of different child
sections at different levels of the hierarchy. You could have navigation
column, main column and footer being child sections. With a deep
hierarchy you could provide 'extend' sections that provide the content
for the child sections at various points in the hierarchy. You might
provide footer markup via one common base class and then in classes that
extend that class provide different navigation and main column markup
but they all share a common footer. Another class might provide a
different footer and have other classes extending it that provide
different navigation and main column markup.

For backwards compatibility with the current system you could say that
if there is only one child section then no label is required but if you
choose to add more than one child section then you must label them (just
like providing an abstract method signature).

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ERROR org.apache.wicket.RequestCycle - the requested resource was not found

2007-05-18 Thread Johan Compagner

whats the url you exactly ask for when you get that error?

johan


On 5/18/07, Andrew Moore <[EMAIL PROTECTED]> wrote:



Thanks for the suggestion, but I'm still getting the same error.



Johan Karlberg wrote:
>
> Please use
>
http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3.0-incubating-SNAPSHOT/
>
> Note the extra .0 on the version.
>
> Johan
>
> Andrew Moore wrote:
>> I've just upgraded from one of the older 1.3 versions to the one here:
>>
http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-incubating-SNAPSHOT/
>>
>> The only real change I seemed to have to make to get the build to work
>> was
>> add the org.apache to the import statements.
>>
>> My application runs fine, but on every page, I get an error on the
>> console
>> like the following:
>>
>> in the home page start 5
>> in the home page start 6
>> in the home page start 8
>> in the home page start 9
>> build url parameters: website = 1
>> in page link
>> in the home page start 7
>> 2007-05-18 07:37:10,656 INFO
org.apache.wicket.resource.PropertiesFactory
>> -
>> Loading properties files from file:/c:/tomca
>>
t/webapps/thepencilroom/WEB-INF/classes/uk/co/rageconsulting/thepencilroom/web/page/Home.properties
>> 2007-05-18 07:37:10,812 ERROR org.apache.wicket.RequestCycle - the
>> requested
>> resource was not found
>> org.apache.wicket.WicketRuntimeException: the requested resource was
not
>> found
>> at
>>
org.apache.wicket.util.resource.WebExternalResourceStream.getInputStream(
WebExternalResourceStream.java:99)
>> at
>>
org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond
(ResourceStreamRequestTarget.jav
>> a:125)
>> at
>> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(
AbstractRequestCycleProcessor.java:103)
>> at
>> org.apache.wicket.RequestCycle.processEventsAndRespond(
RequestCycle.java:1011)
>> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1073)
>> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1142)
>> at org.apache.wicket.RequestCycle.request(RequestCycle.java
:490)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
:248)
>> at
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
:126)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
>> at
>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal
(OpenSessionInViewFilter.j
>> ava:174)
>> at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(
OncePerRequestFilter.java:76)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java: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.processConnection
(Http11BaseProtocol.java
>> :664)
>> at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
>> at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
>> at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
>> at java.lang.Thread.run(Thread.java:595)
>> 2007-05-18 07:37:11,078 ERROR org.apache.wicket.RequestCycle - the
>> requested
>> resource was not found
>> org.apache.wicket.WicketRuntimeException: the requested resource was
not
>> found
>> at
>>
org.apache.wicket.util.resource.WebExternalResourceStream.getInputStream(
WebExternalResourceStream.java:99)
>> at
>>
org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond
(ResourceStreamRequestTarget.jav
>> a:125)
>> at
>> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(
AbstractRequestCycleProcessor.java:103)
>> at
>> org.apache.wicket.RequestCycle.processEventsAndR

Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread Peter Thomas

On 5/18/07, graemer <[EMAIL PROTECTED]> wrote:


Haha, sorry but it seems some of the Wicket community are still living in
Lala land with regards to believing everything deployed to production has
to
be written in Java. It is 2007, the realisation that Java is not the best
language for web apps has hit home for years now. A good language for
writing a lot of your business logic yes, but your business logic and web
logic are two different things and if you're mixing them you're already
making mistakes right there.



Personally for me, Wicket has made using Java for web-applications exciting
and fun again.  Maybe its a case of "teaching an old dog new tricks" but I
get a headache when I look at the sample at your link and see the "closures"
for the onSubmit.  I guess I'm one of those retarded folks who avoids
learning new syntax :P

About the wiki page [
http://wicketstuff.org/confluence/display/STUFFWIKI/WicketBuilder ] I have
to complain that I think that the try / catch block is there just to make
the pure java code look bad in comparison - which is bogus, please remove
it.

BTW I'm also having great results with the ReloadingWicketFilter - so it is
possible to change your view code - refresh and it works.  So I don't really
miss a scripting language that much.  If I'm productive with Java why should
I change?  Just my 2c.

Regards,

Peter.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] continueToOriginalDestination / RestartResponseAtInterceptPageException with page parameters

2007-05-18 Thread Johan Compagner

hmm this could be bug i think, we dont support post params at all
but get should be but maybe we store only part of the url (only the path)

can you see what this code in PageMap:

interceptContinuationURL = cycle.getRequest().getURL();

does return? is getURL() onl returning the part withoug query params?

johan



On 5/18/07, Wouter de Vaal <[EMAIL PROTECTED]> wrote:


Hi,

I'm using the login/authorization strategy taken from the wicket
examples, which is
throw new RestartResponseAtInterceptPageException(SignIn.class);

in the application class and calling

continueToOriginalDestination()

in the login page.

However when I'm using a bookmarkable page with PageParameters, the
parameters get lost in the process..

Am I missing something, or is this behaviour just not supported?

Regards,
Wouter

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread graemer

That's great, glad to hear Wicket has improved the landscape of Java web
frameworks. What is great about Grails (and potentially Grails+Wicket) is
that it spans all tiers, Wicket seems to be helping improve the web layer
experience for Java web frameworks which is excellent. If only we didn't
need persistence ;-)

Cheers
Graeme


ptrthomas wrote:
> 
> On 5/18/07, graemer <[EMAIL PROTECTED]> wrote:
> 
>> Haha, sorry but it seems some of the Wicket community are still living in
>> Lala land with regards to believing everything deployed to production has
>> to
>> be written in Java. It is 2007, the realisation that Java is not the best
>> language for web apps has hit home for years now. A good language for
>> writing a lot of your business logic yes, but your business logic and web
>> logic are two different things and if you're mixing them you're already
>> making mistakes right there.
> 
> 
> Personally for me, Wicket has made using Java for web-applications
> exciting
> and fun again.  Maybe its a case of "teaching an old dog new tricks" but I
> get a headache when I look at the sample at your link and see the
> "closures"
> for the onSubmit.  I guess I'm one of those retarded folks who avoids
> learning new syntax :P
> 
> About the wiki page [
> http://wicketstuff.org/confluence/display/STUFFWIKI/WicketBuilder ] I have
> to complain that I think that the try / catch block is there just to make
> the pure java code look bad in comparison - which is bogus, please remove
> it.
> 
> BTW I'm also having great results with the ReloadingWicketFilter - so it
> is
> possible to change your view code - refresh and it works.  So I don't
> really
> miss a scripting language that much.  If I'm productive with Java why
> should
> I change?  Just my 2c.
> 
> Regards,
> 
> Peter.
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Gricket%3A-The-Love-Child-of-Grails-and-Wicket-tf3772804.html#a10681877
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to customize Modal Window`s appearance

2007-05-18 Thread Matej Knopp
It is customizable, but you need a rather complicated CSS magic to do
it. Or, you can just override the images. Look at the images in the
modal window package to see how it works.

-Matej

On 5/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> you can try applying your own css, but i doubt it. the window is not made to
> be too customizable atm.probably next major ver of wicket will include a
> rework of it. for now, you can integrate any of the zillion of javascript
> libs out there that produce a simple modal pane.
>
> -igor
>
>
>
> On 5/17/07, Nikhil Gahlot <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I am using ModalWindow for my login screen. In that I have used panel as
> its
> > content. Now I want to hide everything (including title bar, close link,
> > etc) on Modal Window except the rich panel I am using. In other words, is
> > there a way I can remove modal window`s title bar with close link and
> > borders(left, right and bottom) keeping only body active that houses my
> > login panel?
> >
> > Thanks
> > Nikhil
> > --
> > View this message in context:
> http://www.nabble.com/how-to-customize-Modal-Window%60s-appearance-tf3775853.html#a10676785
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket Examples 1.3 (latest) that give errors

2007-05-18 Thread ChuckDeal

This is also happening to me...

Wicket 1.3.0 (revision 539430 (built 18MAY2007 09:10:00 EST), but also
happened with a codebase from a few days ago)

09:14:01,917 ERROR RequestCycle:1205 - Cannot modify component hierarchy
during attach phase
org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
during attach phase
at org.apache.wicket.Component.checkHierarchyChange(Component.java:3593)
at org.apache.wicket.Component.addStateChange(Component.java:2602)
at
org.apache.wicket.markup.html.form.FormComponent.setRequired(FormComponent.java:723)
at
org.apache.wicket.markup.html.form.FormComponent.setType(FormComponent.java:740)
at
org.apache.wicket.markup.html.form.AbstractTextComponent.onAttach(AbstractTextComponent.java:106)
at
org.apache.wicket.MarkupContainer.internalAttach2(MarkupContainer.java:1368)
at org.apache.wicket.Component.attach(Component.java:2957)
at
org.apache.wicket.MarkupContainer.addedComponent(MarkupContainer.java:875)
at org.apache.wicket.MarkupContainer.add(MarkupContainer.java:151)
at
com.csc.aims.framework.wicket.DataEntryPanel.createTextField(DataEntryPanel.java:190)
at
com.csc.aims.framework.wicket.DataEntryPanel.createTextField(DataEntryPanel.java:176)
at
com.csc.aims.specchange.wicket.RomRatesPanel.createComponents(RomRatesPanel.java:111)
at
com.csc.aims.framework.wicket.InitializablePanel.onBeforeRender(InitializablePanel.java:65)
at
com.csc.aims.framework.wicket.DataEntryPanel.onBeforeRender(DataEntryPanel.java:364)
at org.apache.wicket.Component.beforeRender(Component.java:3037)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at org.apache.wicket.Page.renderPage(Page.java:872)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:223)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1011)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1073)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1142)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:490)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:248)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContext

Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread Alex Objelean

You should read  tag  as extends keyword... This way wicket
works. Why are you looking for different solution when there are many more
which works great?


Chris Colman wrote:
> 
>> As Alex says, wicket:child tags can't solve this because that's not
>> the way they're intended to be used.
> 
> I can't see why wicket could not be easily enhanced to support multiple
> overridden child sections. Just like the astract methods of a class -
> there is no limit on the number of them: a class can have any number
> abstract methods and they can be overridden by any derived class - not
> just immediate descendents and they don't have to all be overridden in
> the same class - just so long as an implementation is provided somewhere
> in the inheritance hierarchy for any concrete class.
> 
> In wicket the  is just a placeholder for content that will
> be implemented/provided in a derived class. It just seems strange that
> the number of possible placeholders, n, was arbitrarily set to n = 1 in
> the architecture.
> 
> Having only 1 alleviates the need to identify the placeholder in a
> derived class but that is the only reason I can see why the maximum
> number of placeholders should have been limited to just 1.
> 
> I can see many uses for providing implementations of different child
> sections at different levels of the hierarchy. You could have navigation
> column, main column and footer being child sections. With a deep
> hierarchy you could provide 'extend' sections that provide the content
> for the child sections at various points in the hierarchy. You might
> provide footer markup via one common base class and then in classes that
> extend that class provide different navigation and main column markup
> but they all share a common footer. Another class might provide a
> different footer and have other classes extending it that provide
> different navigation and main column markup.
> 
> For backwards compatibility with the current system you could say that
> if there is only one child section then no label is required but if you
> choose to add more than one child section then you must label them (just
> like providing an abstract method signature).
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf3775143.html#a10682394
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DropDownChoice with IModel and ChoiceRenderer

2007-05-18 Thread Igor Vaynberg

no, it doesnt really help since we cant see the bean that is inside
mySymbol.

as far as the example below:
see the use of loadabledetachablemodel below.
also you are specifying the same model for selection and list of choices,
that makes no sense. if whatever bean inside mySymbol model has a
"categories" property, then see my correction below.

-igor


On 5/18/07, Florian Hehlen <[EMAIL PROTECTED]> wrote:



public class SymbolAddUpdate extends WebPage
{
public SymbolAddUpdate(PageParameters aParams)
{
addFeedback();
addPageTitle("Add/Update Symbol");

CompoundPropertyModel mySymbol = checkNewOrUpdate(aParams,
aParams.getString("theSymbolId"));

final Form myForm = new AddUpdateForm("form.symbol", mySymbol);
add(myForm);

TextField myName = new TextField("name");

final ChoiceOptions myOptions = new LoadableDetachableModel() (
load(){ return theDao.findAllCategoriesAsDto()); }}

final ChoiceRenderer myRenderer = new ChoiceRenderer("name",
"id");

final CategoryChoices myCategories = new CategoryChoices();
DropDownChoice myCat
= new DropDownChoice("categories", myCategories,myRenderer);
[...]

   }

I hope this helps.

thanks,
florian

Igor Vaynberg wrote:

if you show me the exact code snippet that doesnt work that will give me
the necessary context.

-igor


On 5/17/07, Florian Hehlen < [EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Thanks for the help... It's starting to make more sense to me although
> still not working. The issue is definitely with the form model. because all
> my sandbox experiments show me that it all goes to hell when i introduce the
> model in the form. My form is a a bean wrapped in a CompoundPropertyModel.
>
> Maybe you can clarify below your explanation in that context.
>
> florian
>
> Igor Vaynberg wrote:
>
> if you type it it looks like this
>
> DDC(String,IModel,IModel>,IChoiceRenderer)
>
> the first model is the one that holds the selection, the second is the
> one that holds a list of available choices.
>
> the constructor with a single model:
>
> DDC(String,IModel>,IChoiceRenderer)
>
> is used when you use DDC in combination with a compound property model
> on the form, in which case the ddc's id is used as a property expression
> into form's model to determine the selection. there is a great wiki page on
> models.
>
> so try this
>
>  myForm.add(new DropDownChoice("select",new Model(),new
> MyChoices(),myRenderer));
>
> this will create a ddc with a null selection. its not practical, because
> to get the selection you have to call ddc.getmodelobject(), but it will
> at least get you going before you decide on what model to use.
>
>
> -igor
>
>
> On 5/16/07, Florian Hehlen < [EMAIL PROTECTED]> wrote:
> >
> > hi,
> >
> > I am new to wicket so I am not sure how simple this issue is.
> >
> > I am creating DropDownChoice components. I want to a)  build the the
> > Options from a list of Objects (not primitives) and b) want to render
> > the option id and value as an attribute of the object in the list.
> > this
> > definitly works in the following sample code:
> >
> > public class WicketSandbox extends WebPage
> > {
> > public WicketSandbox()
> > {
> > addPageTitle("Development Sandbox");
> > final Form myForm = new Form("form");
> > add(myForm);
> >
> > final ChoiceRenderer myRenderer = new ChoiceRenderer("name",
> > "id");
> > myForm.add(new DropDownChoice("select",new
> > MyChoices(),myRenderer));
> >
> > }
> > }
> >
> > But as soon as I add an IModel to the form it seems that the
> > DropDownChoice looks up the choices in the form's IModel.  I have
> > tried
> > to use the other constructors for the DropDownChoice which require an
> > (String id, IModel model, IModel choices, IChoicerenderer renderer)
> > but
> > I can't figure out what is the difference between the 2 IModel objects
> > that have to be provided. If I provide twice a ref to the same object
> > I
> > get a different error:
> >
> > The expression 'id' is neither an index nor is it a method for the
> > list class java.util.ArrayList
> >
> > this is an improvement because it is accessing the right object and
> > retrieving the list of choices but not extracting the the objects from
> >
> > the list as it does when I use (String id, IModel choices,
> > IChoicerenderer renderer).
> >
> > In all cases if I remove the ChoiceRenderer my web page builds and
> > displays but I see object.toString() values in my drop-downs.
> >
> > Any tips or pointers would be greatly appreciated.
> >
> > Florian Hehlen
> >
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > 

[Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread Chris Colman
> You should read  tag  as extends keyword... 
> This way wicket works.

I would like to read  as the 'abstract' keyword - then,
like abstract methods, I'm telling wicket that an implementation will be
provided for this 'placeholder' in a markup that extends this markup
and, like abstract methods, I can have more than one of them per markup.

The 'extends' part is already declared by the hierarchy of my Java
classes. I have inheritance (extends) in my page class hierarchy
regardless of whether or not I choose to use the  keyword
- which is much more akin to declaring deferred method implementation
(overloading) than class extension (although obviously it requires the
class to be extended for overloading to work).

> Why are you looking for different solution when there are many more
> which works great?

I use panels extensively but I wish to be able to use my extensive page
class hierarchy to cleverly dictate which panels get loaded by the
different classes in various places in the page class hierarchy.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DateField initializes value to current date

2007-05-18 Thread Dragos Bobes
After investigating a little I discovered that my problem is coming from 
org.apache.wicket.datetime.DateConverter class that converts an empty 
string to current date.
Is there a way to change the DateField's behaviour so I get a null date 
whenever there is not user input in that field?

Thanks,
Dragos


Dragos Bobes wrote:
> I have a form with a not required date field. The problem is that when 
> the form is submitted and no value was selected in the date field, the 
> date field is initialized to current date.
> Is this an intended behaviour and if yes how can I avoid it.
> I pasted an example code bellow.
>
> Thanks
> Dragos
>
> import java.util.Date;
>
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.form.Button;
> import org.apache.wicket.markup.html.form.Form;
> import org.apache.wicket.model.CompoundPropertyModel;
> import org.apache.wicket.extensions.yui.calendar.DateField;
>
> public class DateTest extends WebPage {
>
> private Date _date;
>
> public DateTest() {
> Form form = new Form("myForm", new CompoundPropertyModel(this));
> add(form);
> form.add(new DateField("date"));
> form.add(new Button("btn"));
> }
>
> public Date getDate() {
> System.out.println("get date " + _date);
> return _date;
> }
>
> public void setDate(Date date) {
> System.out.println("set date " + date);
> _date = date;
> }
> }
>
>
>   
>   
>   
>   
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>   


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Filter on non-displayed columns

2007-05-18 Thread Igor Vaynberg

the idea is the same

mypage extends webpage {
private int maxage; //getter+setter

mypage() {
form f=new form("f");
f.add(new textfield("maxage", new PropertyModel(this, "maxage")));

add(new dataview("list",new dp(),15) {...});
}

class dp extends sortabledataprovider {
int size() { return db.countwithmaxage(maxage); }
}

}

-igor


On 5/18/07, Ravindra Wankar <[EMAIL PROTECTED]> wrote:



I've seen a filter example where columns in a table were filterable. Can
someone point me to an example or tell me how to have a filter (with
columns not related to the table) and that uses a dataprovider  at the
backend?

EXAMPLE: we have a filter that is a drop-down with options describing
task statuses as "Started, Starting Today, Starting This Week...". There
is no corresponding column for that in the html table.

Thanks
Ravi

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Check the mime type of uploaded file and its binary content

2007-05-18 Thread Igor Vaynberg

you want to check the received bytes as the file is being uploaded?

-igor


On 5/18/07, Lec <[EMAIL PROTECTED]> wrote:



How to check the binary contents of the uploaded file. For example, to
prevent the fake file being uploaded, because I really want to check if
the
uploaded file is really the pdf file or image file. How can you do it? I
realise checking the mime type of the file is not enough as the file
extension can still be renamed. HOw can i do it?
--
View this message in context:
http://www.nabble.com/Check-the-mime-type-of-uploaded-file-and-its-binary-content-tf3776119.html#a10677590
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Accessing a static resource in my webapp dir

2007-05-18 Thread Matt Welch

It would appear that someone has already submitted an issue:

https://issues.apache.org/jira/browse/WICKET-567

Int he mean time, I'll use the technique suggested above to load the css
files from my java package. Thanks for all of the help, folks.

Matt

On 5/18/07, Matt Welch <[EMAIL PROTECTED]> wrote:


On 5/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> if you are using the latest snapshot then i would file this as a bug,
> this should work out of the box the way you have it.
>
> -igor
>
>
>

I'll be happy to do that. Are there any instructions or guidelines
available anywhere about the right way to submit a bug? Do I need to submit
a sample web application that duplicates the problem or is what I wrote
above in my original post sufficient?

Matt



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Need to reload app in tomcat aftering adding a variant markup

2007-05-18 Thread Johan Compagner

yes that should be fixed


On 5/16/07, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:


The modification watcher should only test the last modifed time. I
thought these issues have been fixed, haven't they?

Juergen

On 5/16/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> is the modification watcher what causes file handles to be left open?
how do
> you expect that to be enabled in production?
>
> -igor
>
>
>
> On 5/16/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:
> > * Juergen Donnerstag:
> >
> > > This is  true, but  I understand  Chris has  a general  need for
> > > markup  reloading  in  production  as  well  (though  I
>  haven't
> > > understood   yet  how   Chris  creates   the  markup   files  at
> > > runtime). Or did  I misunderstand  that? And though  disabled in
> > > deployment mode by default, he  could enable it for his specific
> > > application.
> >
> > Indeed, ModificationWatcher  acting on previously not  found files
> > should be done only in development mode by default, and Chris will
> > just have to enable it for his deployment.
> >
> > Cheers,
> > --
> >  Jean-Baptiste Quenot
> > aka  John Banana   Qwerty
> > http://caraldi.com/jbq/
> >
> >
>
-
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
-
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket Examples 1.3 (latest) that give errors

2007-05-18 Thread Johan Compagner

that shouldn't be onAttach but onBeforeRender

johan


On 5/18/07, ChuckDeal <[EMAIL PROTECTED]> wrote:



This is also happening to me...

Wicket 1.3.0 (revision 539430 (built 18MAY2007 09:10:00 EST), but also
happened with a codebase from a few days ago)

09:14:01,917 ERROR RequestCycle:1205 - Cannot modify component hierarchy
during attach phase
org.apache.wicket.WicketRuntimeException: Cannot modify component
hierarchy
during attach phase
at org.apache.wicket.Component.checkHierarchyChange(Component.java
:3593)
at org.apache.wicket.Component.addStateChange(Component.java:2602)
at
org.apache.wicket.markup.html.form.FormComponent.setRequired(
FormComponent.java:723)
at
org.apache.wicket.markup.html.form.FormComponent.setType(
FormComponent.java:740)
at
org.apache.wicket.markup.html.form.AbstractTextComponent.onAttach(
AbstractTextComponent.java:106)
at
org.apache.wicket.MarkupContainer.internalAttach2(MarkupContainer.java
:1368)
at org.apache.wicket.Component.attach(Component.java:2957)
at
org.apache.wicket.MarkupContainer.addedComponent(MarkupContainer.java:875)
at org.apache.wicket.MarkupContainer.add(MarkupContainer.java:151)
at
com.csc.aims.framework.wicket.DataEntryPanel.createTextField(
DataEntryPanel.java:190)
at
com.csc.aims.framework.wicket.DataEntryPanel.createTextField(
DataEntryPanel.java:176)
at
com.csc.aims.specchange.wicket.RomRatesPanel.createComponents(
RomRatesPanel.java:111)
at
com.csc.aims.framework.wicket.InitializablePanel.onBeforeRender(
InitializablePanel.java:65)
at
com.csc.aims.framework.wicket.DataEntryPanel.onBeforeRender(
DataEntryPanel.java:364)
at org.apache.wicket.Component.beforeRender(Component.java:3037)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
MarkupContainer.java:1433)
at org.apache.wicket.Component.beforeRender(Component.java:3046)
at org.apache.wicket.Page.renderPage(Page.java:872)
at

org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond
(BookmarkablePageRequestTarget.java:223)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(
AbstractRequestCycleProcessor.java:103)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1011)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1073)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1142)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:490)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:248)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java
:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
a

Re: [Wicket-user] Updating formComponents on round trip

2007-05-18 Thread Igor Vaynberg

have you tried:

onselectionchanged() { form.process(); } ?

-igor


On 5/18/07, kubino <[EMAIL PROTECTED]> wrote:



I made a functional code, so everyone can test it. What I want is that,
when
I click on radio button to automatically update textfields according to
their model. I do NOT want to use method textField.setModelValue(String d)
in onSelectionChanged method...

Thanks for help.


///html














 
 















// Wicket page


import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

import wicket.markup.html.basic.Label;
import wicket.markup.html.form.Form;
import wicket.markup.html.form.Radio;
import wicket.markup.html.form.RadioGroup;
import wicket.markup.html.form.TextField;
import wicket.markup.html.list.ListItem;
import wicket.markup.html.list.ListView;
import wicket.model.PropertyModel;


public class TestPage extends WebPage {


  private List systems = Arrays.asList(new SystemM("aa","aa"),new
SystemM("bb","bb"),new SystemM("cc","cc"));


  private SystemM selectedSystem;


  public TestPage() {

Form myForm = new Form("myForm");

selectedSystem = systems.get(0);


RadioGroup radioGroup = new RadioGroup("radioGroup",new
PropertyModel(this,"selectedSystem")) {


  @Override
  protected boolean wantOnSelectionChangedNotifications() {
return true;
  }

  @Override
  protected void onModelChanging() {

  }

  @Override
  protected void onSelectionChanged(Object arg0) {

  }
};

  ListView table = new ListView("table", systems) {


  @Override
  protected void populateItem(final ListItem item) {

final SystemM model = (SystemM)item.getModelObject();

  item.add(new Radio("sys_radio",item.getModel()));
  item.add(new Label("sys_name",model.getName()));
  item.add(new Label("sys_desc",model.getDesc()));

}
};


TextField nameTextField = new TextField("textFieldName",new
PropertyModel(selectedSystem,"name"));
TextField descTextField = new TextField("textFieldDesc",new
PropertyModel(selectedSystem,"desc"));

radioGroup.add(table);

myForm.add(radioGroup);

myForm.add(nameTextField);
myForm.add(descTextField);

add(myForm);

}

  public class SystemM implements Serializable{

private String name;
private String desc;

/**
 *
 */
public SystemM(String n, String d) {

  this.name = n;
  this.desc = d;

}

public String getName() {
  return name;
}
public void setName(String name) {
  this.name = name;
}
public String getDesc() {
  return desc;
}
public void setDesc(String desc) {
  this.desc = desc;
}



  }

  public SystemM getSelectedSystem() {
return selectedSystem;
  }

  public void setSelectedSystem(SystemM selectedSystem) {
this.selectedSystem = selectedSystem;
  }


}
--
View this message in context:
http://www.nabble.com/Updating-formComponents-on-round-trip-tf3770603.html#a10677724
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Accessing a static resource in my webapp dir

2007-05-18 Thread Matt Welch

On 5/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


if you are using the latest snapshot then i would file this as a bug, this
should work out of the box the way you have it.

-igor





I'll be happy to do that. Are there any instructions or guidelines available
anywhere about the right way to submit a bug? Do I need to submit a sample
web application that duplicates the problem or is what I wrote above in my
original post sufficient?

Matt
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket Examples 1.3 (latest) that give errors

2007-05-18 Thread ChuckDeal

Ok, I submitted an issue...

http://issues.apache.org/jira/browse/WICKET-578

Chuck


Johan Compagner wrote:
> 
> that shouldn't be onAttach but onBeforeRender
> 
> johan
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-Examples-1.3-%28latest%29-that-give-errors-tf3761594.html#a10682693
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Embedding a parameter into an IFRAME atribute

2007-05-18 Thread Chris Colman
I need to embed an IFRAME into some wicket markup but I need to control
the URL in the src attribute. What markup can I use to generate the
parameter if possible?

http://www.myserver.com/blah?id=<123>"
frameBorder="0" width="500" scrolling="no" height="500"/>

I need to be able to control the <123> part of the id attribute or if
easier I could generate the entire src attribute. I just don't know how
to do this. Normally wicket likes to replace a whole tag, not just an
attribute so I'm stumped (pardon the pun!)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread John Krasnay
This question does come up quite a bit on the list, though. I admit
thinking the same thing when I was coming to grips with Wicket not so
long ago. I think the problem is not that markup extension is hard to
understand, but rather that it's very intuitive, so much so that new
Wicket users want to use it to solve related problems.

jk

On Fri, May 18, 2007 at 06:37:11AM -0700, Alex Objelean wrote:
> 
> You should read  tag  as extends keyword... This way wicket
> works. Why are you looking for different solution when there are many more
> which works great?
> 
> 
> Chris Colman wrote:
> > 
> >> As Alex says, wicket:child tags can't solve this because that's not
> >> the way they're intended to be used.
> > 
> > I can't see why wicket could not be easily enhanced to support multiple
> > overridden child sections. Just like the astract methods of a class -
> > there is no limit on the number of them: a class can have any number
> > abstract methods and they can be overridden by any derived class - not
> > just immediate descendents and they don't have to all be overridden in
> > the same class - just so long as an implementation is provided somewhere
> > in the inheritance hierarchy for any concrete class.
> > 
> > In wicket the  is just a placeholder for content that will
> > be implemented/provided in a derived class. It just seems strange that
> > the number of possible placeholders, n, was arbitrarily set to n = 1 in
> > the architecture.
> > 
> > Having only 1 alleviates the need to identify the placeholder in a
> > derived class but that is the only reason I can see why the maximum
> > number of placeholders should have been limited to just 1.
> > 
> > I can see many uses for providing implementations of different child
> > sections at different levels of the hierarchy. You could have navigation
> > column, main column and footer being child sections. With a deep
> > hierarchy you could provide 'extend' sections that provide the content
> > for the child sections at various points in the hierarchy. You might
> > provide footer markup via one common base class and then in classes that
> > extend that class provide different navigation and main column markup
> > but they all share a common footer. Another class might provide a
> > different footer and have other classes extending it that provide
> > different navigation and main column markup.
> > 
> > For backwards compatibility with the current system you could say that
> > if there is only one child section then no label is required but if you
> > choose to add more than one child section then you must label them (just
> > like providing an abstract method signature).
> > 
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf3775143.html#a10682394
> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread graemer

Yes that is a shame, someone needs to write a iBatis Grails plugin ;-)

We do plan to support JPA one day so maybe that will introduce more
deployment options, unfortunately with any enterprisey stuff you can't
always satisfy everyone

Cheers
Graeme


Thomas R. Corbin-2 wrote:
> 
> On Friday 18 May 2007 8:09 am, graemer escreveu:
>> That's great, glad to hear Wicket has improved the landscape of Java web
>> frameworks. What is great about Grails (and potentially Grails+Wicket) is
>> that it spans all tiers, Wicket seems to be helping improve the web layer
>> experience for Java web frameworks which is excellent. If only we didn't
>> need persistence ;-)
> 
>   For me, one of the problems with grails is that my client has outlawed 
> hibernate so we are using ibatis instead.
> 
>   I'm currently using a mixture of wicket and groovy and will look at your
> cool 
> grails-wicket stuff this weekend or next week.   I'm certainly a huge fan
> of 
> both groovy and wicket.
> 
>>
>> Cheers
>> Graeme
>>
>> ptrthomas wrote:
>> > On 5/18/07, graemer <[EMAIL PROTECTED]> wrote:
>> >> Haha, sorry but it seems some of the Wicket community are still living
>> >> in Lala land with regards to believing everything deployed to
>> production
>> >> has to
>> >> be written in Java. It is 2007, the realisation that Java is not the
>> >> best language for web apps has hit home for years now. A good language
>> >> for writing a lot of your business logic yes, but your business logic
>> >> and web logic are two different things and if you're mixing them
>> you're
>> >> already making mistakes right there.
>> >
>> > Personally for me, Wicket has made using Java for web-applications
>> > exciting
>> > and fun again.  Maybe its a case of "teaching an old dog new tricks"
>> but
>> > I get a headache when I look at the sample at your link and see the
>> > "closures"
>> > for the onSubmit.  I guess I'm one of those retarded folks who avoids
>> > learning new syntax :P
>> >
>> > About the wiki page [
>> > http://wicketstuff.org/confluence/display/STUFFWIKI/WicketBuilder ] I
>> > have to complain that I think that the try / catch block is there just
>> to
>> > make the pure java code look bad in comparison - which is bogus, please
>> > remove it.
>> >
>> > BTW I'm also having great results with the ReloadingWicketFilter - so
>> it
>> > is
>> > possible to change your view code - refresh and it works.  So I don't
>> > really
>> > miss a scripting language that much.  If I'm productive with Java why
>> > should
>> > I change?  Just my 2c.
>> >
>> > Regards,
>> >
>> > Peter.
>> >
>> >
>> -
>> > This SF.net email is sponsored by DB2 Express
>> > Download DB2 Express C - the FREE version of DB2 express and take
>> > control of your XML. No limits. Just data. Click to get it now.
>> > http://sourceforge.net/powerbar/db2/
>> > ___
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Gricket%3A-The-Love-Child-of-Grails-and-Wicket-tf3772804.html#a10683723
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread Thomas R. Corbin
On Friday 18 May 2007 8:09 am, graemer escreveu:
> That's great, glad to hear Wicket has improved the landscape of Java web
> frameworks. What is great about Grails (and potentially Grails+Wicket) is
> that it spans all tiers, Wicket seems to be helping improve the web layer
> experience for Java web frameworks which is excellent. If only we didn't
> need persistence ;-)

For me, one of the problems with grails is that my client has outlawed 
hibernate so we are using ibatis instead.

I'm currently using a mixture of wicket and groovy and will look at 
your cool 
grails-wicket stuff this weekend or next week.   I'm certainly a huge fan of 
both groovy and wicket.

>
> Cheers
> Graeme
>
> ptrthomas wrote:
> > On 5/18/07, graemer <[EMAIL PROTECTED]> wrote:
> >> Haha, sorry but it seems some of the Wicket community are still living
> >> in Lala land with regards to believing everything deployed to production
> >> has to
> >> be written in Java. It is 2007, the realisation that Java is not the
> >> best language for web apps has hit home for years now. A good language
> >> for writing a lot of your business logic yes, but your business logic
> >> and web logic are two different things and if you're mixing them you're
> >> already making mistakes right there.
> >
> > Personally for me, Wicket has made using Java for web-applications
> > exciting
> > and fun again.  Maybe its a case of "teaching an old dog new tricks" but
> > I get a headache when I look at the sample at your link and see the
> > "closures"
> > for the onSubmit.  I guess I'm one of those retarded folks who avoids
> > learning new syntax :P
> >
> > About the wiki page [
> > http://wicketstuff.org/confluence/display/STUFFWIKI/WicketBuilder ] I
> > have to complain that I think that the try / catch block is there just to
> > make the pure java code look bad in comparison - which is bogus, please
> > remove it.
> >
> > BTW I'm also having great results with the ReloadingWicketFilter - so it
> > is
> > possible to change your view code - refresh and it works.  So I don't
> > really
> > miss a scripting language that much.  If I'm productive with Java why
> > should
> > I change?  Just my 2c.
> >
> > Regards,
> >
> > Peter.
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] continueToOriginalDestination / RestartResponseAtInterceptPageException with page parameters

2007-05-18 Thread Thomas R. Corbin
On Friday 18 May 2007 8:04 am, Johan Compagner escreveu:
> hmm this could be bug i think, we dont support post params at all
> but get should be but maybe we store only part of the url (only the path)

i'm not sure that I quite understand the issue, but if my user goes to 
a url 
such as

 http://myserver.com/myapp/app/queryDialog/variation/oru_edv/billGroup/23

and they go through my login page, they still end up at the right page 
with 
all the page parameters.

Is that what you meant Wouter?

In that case, I'm still on the pre-apache-package reorg, but will 
upgrade 
this weekend.

>
> can you see what this code in PageMap:
>
> interceptContinuationURL = cycle.getRequest().getURL();
>
> does return? is getURL() onl returning the part withoug query params?
>
> johan
>
> On 5/18/07, Wouter de Vaal <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm using the login/authorization strategy taken from the wicket
> > examples, which is
> > throw new RestartResponseAtInterceptPageException(SignIn.class);
> >
> > in the application class and calling
> >
> > continueToOriginalDestination()
> >
> > in the login page.
> >
> > However when I'm using a bookmarkable page with PageParameters, the
> > parameters get lost in the process..
> >
> > Am I missing something, or is this behaviour just not supported?
> >
> > Regards,
> > Wouter
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] I see a lot of questions and talk about DropDownChoice and IChoiceRenderer.

2007-05-18 Thread Thomas R. Corbin

I had started to use a ChoiceRenderer when I started with wicket, but quickly 
found that registering a converter was easier for me.

Is that an unusual way of dealing with DDC?

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How can I pass in the user's login and password to avoid the login page?

2007-05-18 Thread Thomas R. Corbin
On Friday 18 May 2007 1:14 am, Igor Vaynberg escreveu:
> oh, i thought you needed to have that username/hash in every url generated
> by wicket. yes requestcycle.onbeginrequest is as good a place as any to
> sign the user in.

Cool, thanks.

I had never thought I'd enjoy web programming until I started using 
wicket.

>
> -igor
>
> On 5/17/07, Thomas R. Corbin <[EMAIL PROTECTED]> wrote:
> > On Thursday 17 May 2007 2:08 pm, Igor Vaynberg escreveu:
> > > i would extend webrequestcodingstrategy, override encode() and append
> >
> > the
> >
> > > parameters you need to the url it normally returns.
> >
> > Sorry, but I didn't quite understand how to get the parameters I
> > need in the
> > encode method, nor how appending it would resolve the issue.   I think I
> > just
> > don't quite get the encode method/encoding strategy anyway.
> >
> > What I did instead was to provide my own RequestCycle class and
> > in onBeginRequest, look at the HttpServletRequest's uri and pull out the
> > info I
> > need and then call
> >
> > AuthenticatedWebSession.get().signIn( userName, hashedPassword )
> >
> > I am not sure it's entirely robust, but it does seem to work
> > pretty well.   I
> > think that in the encoding strategy code I could do pretty much the same
> > thing, but the onBeginRequest method seems like a good place for it. 
> > It's only that maybe in the encoding strategy code I might have a shot at
> > a RequestParameters object with the url info I need so I wouldn't need to
> > parse
> > the uri?
> >
> > Do you think I'm heading for trouble this way?
> > Thanks,
> > Tom
> >
> > > -igor
> > >
> > > On 5/17/07, Thomas R. Corbin <[EMAIL PROTECTED]> wrote:
> > > > Our client unfortunately wants to have urls be able to contain the
> >
> > user's
> >
> > > > login and a hashed/encrypted password so that the user can avoid
> >
> > having
> >
> > > > to waste time on the login page.   We can't really convince them that
> >
> > it
> >
> > > > may not
> > > > be a good idea.   Essentially they want single-signon, but they're
> > > > not prepared to work with the it department on that at this time (and
> > > > I'm
> >
> > not
> >
> > > > sure how to do that in wicket yet, either).   So what they really,
> >
> > really
> >
> > > > want is that when our swing app brings up a web page in a browser, we
> >
> > add
> >
> > > > the
> > > > user's login and hashed password to the url.
> > > >
> > > > But I'm having trouble figuring out how or where to grab that info
> > > > and bypass
> > > > the login page redirect, and the login page can't seem to grab that
> >
> > info
> >
> > > > from
> > > > the request.Which makes sense since the page parameters are
> >
> > normally
> >
> > > > really for the original page and not the login page.
> > > >
> > > > I've been looking at:
> > > > AuthenticatedWebApplicationonUnauthorizedInstantiation,
> > > > but it's final so I can't override it, and I'm not really sure if
> > > > it's the right place anyway.   I've added my own
> > > > IUnauthorizedComponentInstantiationListener, but I'm not sure how to
> >
> > get
> >
> > > > the
> > > > request parameters in the listener.
> > > >
> > > > Does anyone have any hints?
> > > >
> > > > Thanks,
> > > > Tom
> >
> > -
> >
> > > > This SF.net email is sponsored by DB2 Express
> > > > Download DB2 Express C - the FREE version of DB2 express and take
> > > > control of your XML. No limits. Just data. Click to get it now.
> > > > http://sourceforge.net/powerbar/db2/
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread Erik van Oosten

Thomas R. Corbin wrote:
> For me, one of the problems with grails is that my client has outlawed
> hibernate ..

Reminds me of a time where I was not allowed to write specifications as a
use case. Are you allowed to use a computer?

;)
Erik. 

-- 
View this message in context: 
http://www.nabble.com/Gricket%3A-The-Love-Child-of-Grails-and-Wicket-tf3772804.html#a10684241
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread Thomas R. Corbin
On Friday 18 May 2007 9:49 am, graemer escreveu:
> Yes that is a shame, someone needs to write a iBatis Grails plugin ;-)

:)   That would be lovely!I *should* volunteer if I ever start to 
use 
grails.

>
> We do plan to support JPA one day so maybe that will introduce more
> deployment options, unfortunately with any enterprisey stuff you can't
> always satisfy everyone

That's too true.  Still, I recognize that grails a great tool and love 
to 
keep track of it's progress.


>
> Cheers
> Graeme
>
> Thomas R. Corbin-2 wrote:
> > On Friday 18 May 2007 8:09 am, graemer escreveu:
> >> That's great, glad to hear Wicket has improved the landscape of Java web
> >> frameworks. What is great about Grails (and potentially Grails+Wicket)
> >> is that it spans all tiers, Wicket seems to be helping improve the web
> >> layer experience for Java web frameworks which is excellent. If only we
> >> didn't need persistence ;-)
> >
> > For me, one of the problems with grails is that my client has outlawed
> > hibernate so we are using ibatis instead.
> >
> > I'm currently using a mixture of wicket and groovy and will look at your
> > cool
> > grails-wicket stuff this weekend or next week.   I'm certainly a huge fan
> > of
> > both groovy and wicket.
> >
> >> Cheers
> >> Graeme
> >>
> >> ptrthomas wrote:
> >> > On 5/18/07, graemer <[EMAIL PROTECTED]> wrote:
> >> >> Haha, sorry but it seems some of the Wicket community are still
> >> >> living in Lala land with regards to believing everything deployed to
> >>
> >> production
> >>
> >> >> has to
> >> >> be written in Java. It is 2007, the realisation that Java is not the
> >> >> best language for web apps has hit home for years now. A good
> >> >> language for writing a lot of your business logic yes, but your
> >> >> business logic and web logic are two different things and if you're
> >> >> mixing them
> >>
> >> you're
> >>
> >> >> already making mistakes right there.
> >> >
> >> > Personally for me, Wicket has made using Java for web-applications
> >> > exciting
> >> > and fun again.  Maybe its a case of "teaching an old dog new tricks"
> >>
> >> but
> >>
> >> > I get a headache when I look at the sample at your link and see the
> >> > "closures"
> >> > for the onSubmit.  I guess I'm one of those retarded folks who avoids
> >> > learning new syntax :P
> >> >
> >> > About the wiki page [
> >> > http://wicketstuff.org/confluence/display/STUFFWIKI/WicketBuilder ] I
> >> > have to complain that I think that the try / catch block is there just
> >>
> >> to
> >>
> >> > make the pure java code look bad in comparison - which is bogus,
> >> > please remove it.
> >> >
> >> > BTW I'm also having great results with the ReloadingWicketFilter - so
> >>
> >> it
> >>
> >> > is
> >> > possible to change your view code - refresh and it works.  So I don't
> >> > really
> >> > miss a scripting language that much.  If I'm productive with Java why
> >> > should
> >> > I change?  Just my 2c.
> >> >
> >> > Regards,
> >> >
> >> > Peter.
> >>
> >> 
> >>-
> >>
> >> > This SF.net email is sponsored by DB2 Express
> >> > Download DB2 Express C - the FREE version of DB2 express and take
> >> > control of your XML. No limits. Just data. Click to get it now.
> >> > http://sourceforge.net/powerbar/db2/
> >> > ___
> >> > Wicket-user mailing list
> >> > Wicket-user@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread Kevin Galligan
Hey, I'm the "other chap" mentioned with the wicket-groovy builder
implementation work.  Its been on the shelf recently due to personal
obligations (new job, new company, new apartment).  Those are clearing
up, so I was getting back to it soon.  Having Grails integration will
raise the interest level in the builder implementation by orders of
magnitude, so the "soon" mentioned above will be this weekend.  I hope
to have something usable in the very near future.

I think the grails-wicket integration is great.  I like a lot of the
concepts in Wicket, but having worked on the builder for a while,
Wicket's design is very Java-centric and needs something like the
builder to work well with Groovy.  Specifically, The builder does
"work", but its still fairly early stage.  Don't judge my coding
ability on how it was done ;)  There's a long list of things I plan on
changing.

As for the try-catch block in the example, its not about making Java
look bad.  Its just giving you an example of what some java code might
look like.  Its showing how Groovy coding makes life easier for a very
real situation.  I like Java.  I wouldn't be doing this stuff if I
didn't, right?  So, how would you handle that situation if your model
objects threw app-specific exceptions?  I think with good IDE support
(auto-imports, etc), having Java and Groovy sitting next to each other
will be a fantastic combo.

As for the onSubmit in a closure, I was just working with what's
available.  You could also subclass Form and use that directly, rather
than use a closure.  At a conceptual level, and anonymous inner class
is doing the same thing (yeah, I know, closures are different.  Search
for the wicket thing in the groovy mailing list).

Anyway, good work on the integration.  I'll be giving that a spin asap.

-Kevin

On 5/18/07, graemer <[EMAIL PROTECTED]> wrote:
>
> Yes that is a shame, someone needs to write a iBatis Grails plugin ;-)
>
> We do plan to support JPA one day so maybe that will introduce more
> deployment options, unfortunately with any enterprisey stuff you can't
> always satisfy everyone
>
> Cheers
> Graeme
>
>
> Thomas R. Corbin-2 wrote:
> >
> > On Friday 18 May 2007 8:09 am, graemer escreveu:
> >> That's great, glad to hear Wicket has improved the landscape of Java web
> >> frameworks. What is great about Grails (and potentially Grails+Wicket) is
> >> that it spans all tiers, Wicket seems to be helping improve the web layer
> >> experience for Java web frameworks which is excellent. If only we didn't
> >> need persistence ;-)
> >
> >   For me, one of the problems with grails is that my client has outlawed
> > hibernate so we are using ibatis instead.
> >
> >   I'm currently using a mixture of wicket and groovy and will look at 
> > your
> > cool
> > grails-wicket stuff this weekend or next week.   I'm certainly a huge fan
> > of
> > both groovy and wicket.
> >
> >>
> >> Cheers
> >> Graeme
> >>
> >> ptrthomas wrote:
> >> > On 5/18/07, graemer <[EMAIL PROTECTED]> wrote:
> >> >> Haha, sorry but it seems some of the Wicket community are still living
> >> >> in Lala land with regards to believing everything deployed to
> >> production
> >> >> has to
> >> >> be written in Java. It is 2007, the realisation that Java is not the
> >> >> best language for web apps has hit home for years now. A good language
> >> >> for writing a lot of your business logic yes, but your business logic
> >> >> and web logic are two different things and if you're mixing them
> >> you're
> >> >> already making mistakes right there.
> >> >
> >> > Personally for me, Wicket has made using Java for web-applications
> >> > exciting
> >> > and fun again.  Maybe its a case of "teaching an old dog new tricks"
> >> but
> >> > I get a headache when I look at the sample at your link and see the
> >> > "closures"
> >> > for the onSubmit.  I guess I'm one of those retarded folks who avoids
> >> > learning new syntax :P
> >> >
> >> > About the wiki page [
> >> > http://wicketstuff.org/confluence/display/STUFFWIKI/WicketBuilder ] I
> >> > have to complain that I think that the try / catch block is there just
> >> to
> >> > make the pure java code look bad in comparison - which is bogus, please
> >> > remove it.
> >> >
> >> > BTW I'm also having great results with the ReloadingWicketFilter - so
> >> it
> >> > is
> >> > possible to change your view code - refresh and it works.  So I don't
> >> > really
> >> > miss a scripting language that much.  If I'm productive with Java why
> >> > should
> >> > I change?  Just my 2c.
> >> >
> >> > Regards,
> >> >
> >> > Peter.
> >> >
> >> >
> >> -
> >> > This SF.net email is sponsored by DB2 Express
> >> > Download DB2 Express C - the FREE version of DB2 express and take
> >> > control of your XML. No limits. Just data. Click to get it now.
> >> > http://sourceforge.net/powerbar/db2/
> >> > ___
> >> > Wicket-user mai

Re: [Wicket-user] DropDownChoice with IModel and ChoiceRenderer

2007-05-18 Thread Florian Hehlen

Here is the bean... sorry I should have thought to include it:

package com.sag.ids.web.data.dto;

import com.sag.ids.api.datamodel.java.*;

import java.io.*;

public class SymbolDto implements Serializable
{
   public String
   getIdsDocoId()
   {
   return theIdsDocoId;
   }

   public void
   setIdsDocoId(String aIdsDocoId)
   {
   theIdsDocoId = aIdsDocoId;
   }

   public long
   getIdsSymbolId()
   {
   return theIdsSymbolId;
   }

   public void
   setIdsSymbolId(long aIdsSymbolId)
   {
   theIdsSymbolId = aIdsSymbolId;
   }

   public String
   getName()
   {
   return theName;
   }

   public void
   setName(String aName)
   {
   theName = aName;
   }

   public String
   getCategoryName()
   {
   return theCategoryName;
   }

   public void
   setCategoryName(String aCategoryName)
   {
   theCategoryName = aCategoryName;
   }

   public String
   getCategoryId()
   {
   return theCategoryId;
   }

   public void
   setCategoryId(String aCategoryId)
   {
   theCategoryId = aCategoryId;
   }

   public String
   getProductTypeName()
   {
   return theProductTypeName;
   }

   public void
   setProductTypeName(String aProductTypeName)
   {
   theProductTypeName = aProductTypeName;
   }

   public String
   getProductTypeId()
   {
   return theProductTypeId;
   }

   public void
   setProductTypeId(String aProductTypeId)
   {
   theProductTypeId = aProductTypeId;
   }

   public String
   getUnderlyingTypeName()
   {
   return theUnderlyingTypeName;
   }

   public void
   setUnderlyingTypeName(String aUnderlyingTypeName)
   {
   theUnderlyingTypeName = aUnderlyingTypeName;
   }

   public String
   getUnderlyingTypeId()
   {
   return theUnderlyingTypeId;
   }

   public void
   setUnderlyingTypeId(String aUnderlyingTypeId)
   {
   theUnderlyingTypeId = aUnderlyingTypeId;
   }

   public String
   getCurrencyName()
   {
   return theCurrencyName;
   }

   public void
   setCurrencyName(String aCurrencyName)
   {
   theCurrencyName = aCurrencyName;
   }

   public String
   getCurrencyId()
   {
   return theCurrencyId;
   }

   public void
   setCurrencyId(String aCurrencyId)
   {
   theCurrencyId = aCurrencyId;
   }

   public String
   getExchangeName()
   {
   return theExchangeName;
   }

   public void
   setExchangeName(String aExchangeName)
   {
   theExchangeName = aExchangeName;
   }

   public String
   getExchangeId()
   {
   return theExchangeId;
   }

   public void
   setExchangeId(String aExchangeId)
   {
   theExchangeId = aExchangeId;
   }

   public String
   getDescription()
   {
   return theDescription;
   }

   public void
   setDescription(String aDescription)
   {
   theDescription = aDescription;
   }

   public String
   getTradingHours()
   {
   return theTradingHours;
   }

   public void
   setTradingHours(String aTradingHours)
   {
   theTradingHours = aTradingHours;
   }

   public String
   getUrl()
   {
   return theUrl;
   }

   public void setUrl(String aUrl)
   {
   theUrl = aUrl;
   }

   public double
   getMultiplier()
   {
   return theMultiplier;
   }

   public void
   setMultiplier(double aMultiplier)
   {
   theMultiplier = aMultiplier;
   }

   public void setDaoActionError(String aResult) {
   theDaoActionErrorState = true;
   theDaoActionError = aResult;
   }

   public boolean isDaoActionErrorState()
   {
   return theDaoActionErrorState;
   }

   public String getDaoActionError()
   {
   return theDaoActionError;
   }

   private long theIdsSymbolId = -1;
   private String theIdsDocoId;
   private String theName = "NEW SYMBOL";
   private String theCategoryName = "";
   private String theCategoryId = "";
   private String theProductTypeName = "";
   private String theProductTypeId = "";
   private String theUnderlyingTypeName = "";
   private String theUnderlyingTypeId = "";
   private String theCurrencyName = "";
   private String theCurrencyId = "";
   private String theExchangeName = "";
   private String theExchangeId = "";
   private String theDescription = "";
   private String theTradingHours = "";
   private String theUrl = "";
   private double theMultiplier = -1;

   private String theDaoActionError ="";
   private boolean theDaoActionErrorState;
}


Igor Vaynberg wrote:
no, it doesnt really help since we cant see the bean that is inside 
mySymbol.


as far as the example below:
see the use of loadabledetachablemodel below.
also you are specifying the same model for selection and list of 
choices, that makes no sense. if whatever bean inside mySymbol model 
has a "categories" property, then see my correction below.


-igor


On 5/18/07, *Florian Hehlen* <[EMAIL PROTECTED] > 
wrote:


public class SymbolAddUpdate extends WebPage
{
public SymbolAddUpdate(PageParameters aParams)
{
addFeedback();
addPageTitle("Add/Update Sy

Re: [Wicket-user] I see a lot of questions and talk about DropDownChoice and IChoiceRenderer.

2007-05-18 Thread Florian Hehlen
Hi,

Do you have a snipet of code you could share on how you do this?

Florian

Thomas R. Corbin wrote:
> I had started to use a ChoiceRenderer when I started with wicket, but quickly 
> found that registering a converter was easier for me.
>
> Is that an unusual way of dealing with DDC?
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>   

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Embedding a parameter into an IFRAME atribute

2007-05-18 Thread Chris Colman
> I need to embed an IFRAME into some wicket markup but I need to
control
> the URL in the src attribute. What markup can I use to generate the
> parameter if possible?

I managed to get it work eventually: I just generated the entire IFRAME
tag in the value of a label and called
label.setEscapeModelStrings(false); on the label to prevent it escaping
the raw HTML.

I then simply placed a  tag in the
markup where I wanted the IFRAME to go. It works but I'm not sure if
it's the *correct* way to do such a thing.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Embedding a parameter into an IFRAME atribute

2007-05-18 Thread Igor Vaynberg

add(new webmarkupcontainer("iframe") {
  oncompoennttag(tag) {
tag.put("src", ...);
tag.put("id", ...);
  }}

http://www.myserver.com/blah


?id=<123>"
frameBorder="0" width="500" scrolling="no" height="500"/>



-igor


On 5/18/07, Chris Colman <[EMAIL PROTECTED]> wrote:


I need to embed an IFRAME into some wicket markup but I need to control
the URL in the src attribute. What markup can I use to generate the
parameter if possible?

http://www.myserver.com/blah?id=<123>"
frameBorder="0" width="500" scrolling="no" height="500"/>

I need to be able to control the <123> part of the id attribute or if
easier I could generate the entire src attribute. I just don't know how
to do this. Normally wicket likes to replace a whole tag, not just an
attribute so I'm stumped (pardon the pun!)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to customize Modal Window`s appearance

2007-05-18 Thread Scott Swank
Agreed.  We've gone the "complicated CSS magic" route and it is a bit
involved, but I can vouch for the fact that it's an option.  :)

On 5/18/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
> It is customizable, but you need a rather complicated CSS magic to do
> it. Or, you can just override the images. Look at the images in the
> modal window package to see how it works.
>
> -Matej
>
> On 5/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > you can try applying your own css, but i doubt it. the window is not made to
> > be too customizable atm.probably next major ver of wicket will include a
> > rework of it. for now, you can integrate any of the zillion of javascript
> > libs out there that produce a simple modal pane.
> >
> > -igor
> >
> >
> >
> > On 5/17/07, Nikhil Gahlot <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I am using ModalWindow for my login screen. In that I have used panel as
> > its
> > > content. Now I want to hide everything (including title bar, close link,
> > > etc) on Modal Window except the rich panel I am using. In other words, is
> > > there a way I can remove modal window`s title bar with close link and
> > > borders(left, right and bottom) keeping only body active that houses my
> > > login panel?
> > >
> > > Thanks
> > > Nikhil
> > > --
> > > View this message in context:
> > http://www.nabble.com/how-to-customize-Modal-Window%60s-appearance-tf3775853.html#a10676785
> > > Sent from the Wicket - User mailing list archive at Nabble.com.
> > >
> > >
> > >
> > -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Scott Swank
reformed mathematician

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Check the mime type of uploaded file and its binary content

2007-05-18 Thread Lec

How do I do that? Any pointer?


igor.vaynberg wrote:
> 
> you want to check the received bytes as the file is being uploaded?
> 
> -igor
> 
> 
> On 5/18/07, Lec <[EMAIL PROTECTED]> wrote:
>>
>>
>> How to check the binary contents of the uploaded file. For example, to
>> prevent the fake file being uploaded, because I really want to check if
>> the
>> uploaded file is really the pdf file or image file. How can you do it? I
>> realise checking the mime type of the file is not enough as the file
>> extension can still be renamed. HOw can i do it?
>> --
>> View this message in context:
>> http://www.nabble.com/Check-the-mime-type-of-uploaded-file-and-its-binary-content-tf3776119.html#a10677590
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Check-the-mime-type-of-uploaded-file-and-its-binary-content-tf3776119.html#a10685316
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DropDownChoice with IModel and ChoiceRenderer

2007-05-18 Thread Igor Vaynberg

since you are using a compound property model, and create your ddc with id
"categories" you are trying to access bean.getCategories() property, but i
see no such property defined. so why is your form model compound? once again
i urge you to read the models wiki page.

-igor


On 5/18/07, Florian Hehlen <[EMAIL PROTECTED]> wrote:


 Here is the bean... sorry I should have thought to include it:

package com.sag.ids.web.data.dto;

import com.sag.ids.api.datamodel.java.*;

import java.io.*;

public class SymbolDto implements Serializable
{
public String
getIdsDocoId()
{
return theIdsDocoId;
}

public void
setIdsDocoId(String aIdsDocoId)
{
theIdsDocoId = aIdsDocoId;
}

public long
getIdsSymbolId()
{
return theIdsSymbolId;
}

public void
setIdsSymbolId(long aIdsSymbolId)
{
theIdsSymbolId = aIdsSymbolId;
}

public String
getName()
{
return theName;
}

public void
setName(String aName)
{
theName = aName;
}

public String
getCategoryName()
{
return theCategoryName;
}

public void
setCategoryName(String aCategoryName)
{
theCategoryName = aCategoryName;
}

public String
getCategoryId()
{
return theCategoryId;
}

public void
setCategoryId(String aCategoryId)
{
theCategoryId = aCategoryId;
}

public String
getProductTypeName()
{
return theProductTypeName;
}

public void
setProductTypeName(String aProductTypeName)
{
theProductTypeName = aProductTypeName;
}

public String
getProductTypeId()
{
return theProductTypeId;
}

public void
setProductTypeId(String aProductTypeId)
{
theProductTypeId = aProductTypeId;
}

public String
getUnderlyingTypeName()
{
return theUnderlyingTypeName;
}

public void
setUnderlyingTypeName(String aUnderlyingTypeName)
{
theUnderlyingTypeName = aUnderlyingTypeName;
}

public String
getUnderlyingTypeId()
{
return theUnderlyingTypeId;
}

public void
setUnderlyingTypeId(String aUnderlyingTypeId)
{
theUnderlyingTypeId = aUnderlyingTypeId;
}

public String
getCurrencyName()
{
return theCurrencyName;
}

public void
setCurrencyName(String aCurrencyName)
{
theCurrencyName = aCurrencyName;
}

public String
getCurrencyId()
{
return theCurrencyId;
}

public void
setCurrencyId(String aCurrencyId)
{
theCurrencyId = aCurrencyId;
}

public String
getExchangeName()
{
return theExchangeName;
}

public void
setExchangeName(String aExchangeName)
{
theExchangeName = aExchangeName;
}

public String
getExchangeId()
{
return theExchangeId;
}

public void
setExchangeId(String aExchangeId)
{
theExchangeId = aExchangeId;
}

public String
getDescription()
{
return theDescription;
}

public void
setDescription(String aDescription)
{
theDescription = aDescription;
}

public String
getTradingHours()
{
return theTradingHours;
}

public void
setTradingHours(String aTradingHours)
{
theTradingHours = aTradingHours;
}

public String
getUrl()
{
return theUrl;
}

public void setUrl(String aUrl)
{
theUrl = aUrl;
}

public double
getMultiplier()
{
return theMultiplier;
}

public void
setMultiplier(double aMultiplier)
{
theMultiplier = aMultiplier;
}

public void setDaoActionError(String aResult) {
theDaoActionErrorState = true;
theDaoActionError = aResult;
}

public boolean isDaoActionErrorState()
{
return theDaoActionErrorState;
}

public String getDaoActionError()
{
return theDaoActionError;
}

private long theIdsSymbolId = -1;
private String theIdsDocoId;
private String theName = "NEW SYMBOL";
private String theCategoryName = "";
private String theCategoryId = "";
private String theProductTypeName = "";
private String theProductTypeId = "";
private String theUnderlyingTypeName = "";
private String theUnderlyingTypeId = "";
private String theCurrencyName = "";
private String theCurrencyId = "";
private String theExchangeName = "";
private String theExchangeId = "";
private String theDescription = "";
private String theTradingHours = "";
private String theUrl = "";
private double theMultiplier = -1;

private String theDaoActionError ="";
private boolean theDaoActionErrorState;
}


Igor Vaynberg wrote:

no, it doesnt really help since we cant see the bean that is inside
mySymbol.

as far as the examp

Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread Aaron Hiniker

Why not something like this?

public abstract class MyContainerPage extends WebPage
{
   public MyContainerPage()
   {
  add( getHeaderPanel( "header" ) );
  add( getLeftMenuPanel( "left-menu" ) );
   }

   public abstract WebMarkupContainer getLeftMenuPanel( String id );
   public abstract WebMarkupContainer getHeaderPanel( String id );
}



 
 



Aaron


Chris Colman wrote:
You should read  tag  as extends keyword... 
This way wicket works.



I would like to read  as the 'abstract' keyword - then,
like abstract methods, I'm telling wicket that an implementation will be
provided for this 'placeholder' in a markup that extends this markup
and, like abstract methods, I can have more than one of them per markup.

The 'extends' part is already declared by the hierarchy of my Java
classes. I have inheritance (extends) in my page class hierarchy
regardless of whether or not I choose to use the  keyword
- which is much more akin to declaring deferred method implementation
(overloading) than class extension (although obviously it requires the
class to be extended for overloading to work).

  

Why are you looking for different solution when there are many more
which works great?



I use panels extensively but I wish to be able to use my extensive page
class hierarchy to cleverly dictate which panels get loaded by the
different classes in various places in the page class hierarchy.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
  
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread Igor Vaynberg

as others have stated, wicket:extend and wicket:child are used to work in
conjunction with class heiararchies. so since you only have one superclass
you only have one wicket:child.

however, none of the stuff that implements this uses any private api. you
can create your own markup filters and class resolvers and tags that work
the way you want. if it works out great we can include it into core if you
want to donate.

-igor


On 5/17/07, Chris Colman <[EMAIL PROTECTED]> wrote:


Let's say I have a page which can be almost completely marked up in a
base class markup. There are only two sections of the page that change
in the derived pages/classes. Is it possible to use the 
tag twice in
the one page and then have two  tags in the derived
pages?

Markup for base page:











The stuff in here is common to all
pages and so I only want to define it once in this base page markup




  






Markup for the derived page:








This text is ignored - only the extend parts will be
used


Hi there!



I've tried this and I get the following error message:

WicketMessage: The component [MarkupContainer [Component id = _child,
page = com.sas.av.ui.wicket.HomePage, path =
4:_:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer
, isVisible = true, isVersioned = true]] has the same wicket:id as
another component already added at the same level

Root cause:

wicket.markup.MarkupException: The component [MarkupContainer [Component
id = _child, page = com.sas.av.ui.wicket.HomePage, path =
4:_:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer
, isVisible = true, isVersioned = true]] has the same wicket:id as
another component already added at the same level
at wicket.Page.componentRendered(Page.java:936)
at wicket.Component.rendered(Component.java:1755)
at wicket.Component.render(Component.java:1534)
at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
at
wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982)
at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] continueToOriginalDestination / RestartResponseAtInterceptPageException with page parameters

2007-05-18 Thread Johan Compagner

yes please make a case (with a patch is even better :) )

On 5/18/07, Wouter de Vaal <[EMAIL PROTECTED]> wrote:


You are correct about the interpretation of my problem. I've run the
debugger
and interceptContinuationURL = cycle.getRequest().getURL(); does not
store the ?x=y part.

Shall I file a bug report?

Wouter

On 5/18/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> ahh but that is an url that doesn't have query args like ?xx=yy
>
> you only have a path that should work yes
>
> johan
>
>
>
> On 5/18/07, Thomas R. Corbin <[EMAIL PROTECTED]> wrote:
> > On Friday 18 May 2007 8:04 am, Johan Compagner escreveu:
> > > hmm this could be bug i think, we dont support post params at all
> > > but get should be but maybe we store only part of the url (only the
> path)
> >
> > i'm not sure that I quite understand the issue, but if my user
> goes to a url
> > such as
> >
> >
> http://myserver.com/myapp/app/queryDialog/variation/oru_edv/billGroup/23
> >
> > and they go through my login page, they still end up at the
right
> page with
> > all the page parameters.
> >
> > Is that what you meant Wouter?
> >
> > In that case, I'm still on the pre-apache-package reorg, but
will
> upgrade
> > this weekend.
> >
> > >
> > > can you see what this code in PageMap:
> > >
> > > interceptContinuationURL = cycle.getRequest().getURL();
> > >
> > > does return? is getURL() onl returning the part withoug query
params?
> > >
> > > johan
> > >
> > > On 5/18/07, Wouter de Vaal < [EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > I'm using the login/authorization strategy taken from the wicket
> > > > examples, which is
> > > > throw new RestartResponseAtInterceptPageException(
> SignIn.class);
> > > >
> > > > in the application class and calling
> > > >
> > > > continueToOriginalDestination()
> > > >
> > > > in the login page.
> > > >
> > > > However when I'm using a bookmarkable page with PageParameters,
the
> > > > parameters get lost in the process..
> > > >
> > > > Am I missing something, or is this behaviour just not supported?
> > > >
> > > > Regards,
> > > > Wouter
> > > >
> > > >
>
-
> > > > This SF.net email is sponsored by DB2 Express
> > > > Download DB2 Express C - the FREE version of DB2 express and take
> > > > control of your XML. No limits. Just data. Click to get it now.
> > > > http://sourceforge.net/powerbar/db2/
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
-
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
-
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] continueToOriginalDestination / RestartResponseAtInterceptPageException with page parameters

2007-05-18 Thread Johan Compagner

ahh but that is an url that doesn't have query args like ?xx=yy

you only have a path that should work yes

johan


On 5/18/07, Thomas R. Corbin <[EMAIL PROTECTED]> wrote:


On Friday 18 May 2007 8:04 am, Johan Compagner escreveu:
> hmm this could be bug i think, we dont support post params at all
> but get should be but maybe we store only part of the url (only the
path)

i'm not sure that I quite understand the issue, but if my user
goes to a url
such as

http://myserver.com/myapp/app/queryDialog/variation/oru_edv/billGroup/23

and they go through my login page, they still end up at the right
page with
all the page parameters.

Is that what you meant Wouter?

In that case, I'm still on the pre-apache-package reorg, but will
upgrade
this weekend.

>
> can you see what this code in PageMap:
>
> interceptContinuationURL = cycle.getRequest().getURL();
>
> does return? is getURL() onl returning the part withoug query params?
>
> johan
>
> On 5/18/07, Wouter de Vaal <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm using the login/authorization strategy taken from the wicket
> > examples, which is
> > throw new RestartResponseAtInterceptPageException(SignIn.class);
> >
> > in the application class and calling
> >
> > continueToOriginalDestination()
> >
> > in the login page.
> >
> > However when I'm using a bookmarkable page with PageParameters, the
> > parameters get lost in the process..
> >
> > Am I missing something, or is this behaviour just not supported?
> >
> > Regards,
> > Wouter
> >
> >
-
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] I see a lot of questions and talk ab out DropDownChoice and IChoiceRenderer.

2007-05-18 Thread Thomas R. Corbin
On Friday 18 May 2007 10:51 am, Florian Hehlen escreveu:
> Hi,
>
> Do you have a snipet of code you could share on how you do this?

in my form I have this:

add( new DropDownChoice( "cause",
 _causeDao.getCauseCodes() ) );



In my application I have this:


//
//Register our custom converters.
//
getApplicationSettings().setConverterLocatorFactory( new 
IConverterLocatorFactory()
{
public IConverterLocator newConverterLocator()
{
return new OmsConverter();
}
} );


My OmsConverter looks a bit like this: (I actually register a bunch of 
converters)


/**
 *Registers all oms specific converters.
 */
public class OmsConverter
extends
ConverterLocator
{
@SpringBean( name = "causeDao" )
private CauseDao_causeDao;

public OmsConverter()
{
InjectorHolder.getInjector().inject( this );
Assert.notNull( _causeDao, "causeDao must not be null." );

CauseConverter  causeConverter  = new 
CauseConverter( _causeDao );

set( Cause.class,   causeConverter );
}

This way, if I use the same class in a bunch of places, I don't have to 
register the converter or choice renderer with each one.  It makes adding a 
DDC easy and I only have to do the mapping in the converter.

My converter extends AbstractConverter and is pretty easy to write.


>
> Florian
>
> Thomas R. Corbin wrote:
> > I had started to use a ChoiceRenderer when I started with wicket, but
> > quickly found that registering a converter was easier for me.
> >
> > Is that an unusual way of dealing with DDC?
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] autolink-problem with img and relative path

2007-05-18 Thread Eelco Hillenius
I think such relative paths for autolinks are just not supported.

You could open up a JIRA issue (no guarantee it will be honored, as
support may be lacking for a reason). In the mean while you can just
use normal image components. That'll always work.

Eelco


> Thomas Singer wrote:
> > Maybe the answer to the following question is the problem's solution:
> > How it is intented to add an own IAutolinkResolverDelegate to the
> > AutoLinkResolver?
> >
> > Tom
> >
> >
> > Thomas Singer wrote:
> >> I have a WebPage pages.Index (mapping to "/index.html") whose markup
> >> contains an img-tag with the relative path "../../../screenshots/foo.png"
> >> (the 1st "../" to get out of the "pages"-package, the 2nd "../" to get out
> >> of the "classes"-directory, the third "../" to get out of the
> >> "WEB-INF"-directory). This has the advantage, that the path is already
> >> valid
> >> in my undeployed project.
> >>
> >> Unfortunately, the autolink resolver seems not able to convert it to a
> >> valid
> >> path:
> >>
> >>> java.lang.IllegalArgumentException: Invalid path
> >>> ../../../screenshots/foo.png
> >>>  at wicket.util.lang.Packages.absolutePath(Packages.java:109)
> >>>  at wicket.util.lang.Packages.absolutePath(Packages.java:46)
> >>>  at
> >>> wicket.markup.html.PackageResource.exists(PackageResource.java:263)
> >>>  at
> >>> wicket.markup.resolver.AutoLinkResolver$ResourceReferenceAutolink.(AutoLinkResolver.java:547)
> >>>  at
> >>> wicket.markup.resolver.AutoLinkResolver$AbstractAutolinkResolverDelegate.newPackageResourceReferenceAutoComponent(AutoLinkResolver.java:118)
> >>>  at
> >>> wicket.markup.resolver.AutoLinkResolver$ResourceReferenceResolverDelegate.newAutoComponent(AutoLinkResolver.java:620)
> >>>  at
> >>> wicket.markup.resolver.AutoLinkResolver.resolveAutomaticLink(AutoLinkResolver.java:832)
> >>>  at
> >>> wicket.markup.resolver.AutoLinkResolver.resolve(AutoLinkResolver.java:763)
> >>>  at wicket.MarkupContainer.renderNext(MarkupContainer.java:1361)
> >>> ...
> >> I would have expected it to convert the path to "/screenshots/foo.png".
> >> How
> >> can I work around this issue? Is it possible to plug in an own resolver
> >> implementation? If so, where can I find some documentation (beside digging
> >> the source code)?
> >>
> >
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] continueToOriginalDestination / RestartResponseAtInterceptPageException with page parameters

2007-05-18 Thread Wouter de Vaal
You are correct about the interpretation of my problem. I've run the debugger
and interceptContinuationURL = cycle.getRequest().getURL(); does not
store the ?x=y part.

Shall I file a bug report?

Wouter

On 5/18/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> ahh but that is an url that doesn't have query args like ?xx=yy
>
> you only have a path that should work yes
>
> johan
>
>
>
> On 5/18/07, Thomas R. Corbin <[EMAIL PROTECTED]> wrote:
> > On Friday 18 May 2007 8:04 am, Johan Compagner escreveu:
> > > hmm this could be bug i think, we dont support post params at all
> > > but get should be but maybe we store only part of the url (only the
> path)
> >
> > i'm not sure that I quite understand the issue, but if my user
> goes to a url
> > such as
> >
> >
> http://myserver.com/myapp/app/queryDialog/variation/oru_edv/billGroup/23
> >
> > and they go through my login page, they still end up at the right
> page with
> > all the page parameters.
> >
> > Is that what you meant Wouter?
> >
> > In that case, I'm still on the pre-apache-package reorg, but will
> upgrade
> > this weekend.
> >
> > >
> > > can you see what this code in PageMap:
> > >
> > > interceptContinuationURL = cycle.getRequest().getURL();
> > >
> > > does return? is getURL() onl returning the part withoug query params?
> > >
> > > johan
> > >
> > > On 5/18/07, Wouter de Vaal < [EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > I'm using the login/authorization strategy taken from the wicket
> > > > examples, which is
> > > > throw new RestartResponseAtInterceptPageException(
> SignIn.class);
> > > >
> > > > in the application class and calling
> > > >
> > > > continueToOriginalDestination()
> > > >
> > > > in the login page.
> > > >
> > > > However when I'm using a bookmarkable page with PageParameters, the
> > > > parameters get lost in the process..
> > > >
> > > > Am I missing something, or is this behaviour just not supported?
> > > >
> > > > Regards,
> > > > Wouter
> > > >
> > > >
> -
> > > > This SF.net email is sponsored by DB2 Express
> > > > Download DB2 Express C - the FREE version of DB2 express and take
> > > > control of your XML. No limits. Just data. Click to get it now.
> > > > http://sourceforge.net/powerbar/db2/
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DateField initializes value to current date

2007-05-18 Thread Igor Vaynberg

you can register your own converter in the settings, or override
getconverter on the textfield.

-igor


On 5/18/07, Dragos Bobes <[EMAIL PROTECTED]> wrote:


After investigating a little I discovered that my problem is coming from
org.apache.wicket.datetime.DateConverter class that converts an empty
string to current date.
Is there a way to change the DateField's behaviour so I get a null date
whenever there is not user input in that field?

Thanks,
Dragos


Dragos Bobes wrote:
> I have a form with a not required date field. The problem is that when
> the form is submitted and no value was selected in the date field, the
> date field is initialized to current date.
> Is this an intended behaviour and if yes how can I avoid it.
> I pasted an example code bellow.
>
> Thanks
> Dragos
>
> import java.util.Date;
>
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.form.Button;
> import org.apache.wicket.markup.html.form.Form;
> import org.apache.wicket.model.CompoundPropertyModel;
> import org.apache.wicket.extensions.yui.calendar.DateField;
>
> public class DateTest extends WebPage {
>
> private Date _date;
>
> public DateTest() {
> Form form = new Form("myForm", new CompoundPropertyModel(this));
> add(form);
> form.add(new DateField("date"));
> form.add(new Button("btn"));
> }
>
> public Date getDate() {
> System.out.println("get date " + _date);
> return _date;
> }
>
> public void setDate(Date date) {
> System.out.println("set date " + date);
> _date = date;
> }
> }
>
>
>   
>   
>   
>   
>
>
-
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread C. Bergström
Igor Vaynberg wrote:
>
>
> On 5/17/07, Chris Colman <[EMAIL PROTECTED]> wrote:
>>
>> Let's say I have a page which can be almost completely marked up in a
>> base class markup. There are only two sections of the page that change
>> in the derived pages/classes. Is it possible to use the 
>> tag twice in
>> the one page and then have two  tags in the derived
>> pages?
>>
>> Markup for base page:
>>
>> 
>> 
>>
>> 
>>
>> 
>>
>> 
>> 
>>
>> The stuff in here is common to all
>> pages and so I only want to define it once in this base page markup
>>
>> 
>> 
>>
>>   
>>
>> 
>>
>> 
>> 
>>
>> Markup for the derived page:
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> This text is ignored - only the extend parts will be
>> used
>>
>> 
>> Hi there!
>> 
>> 
>>
>> I've tried this and I get the following error message:
>>
>> WicketMessage: The component [MarkupContainer [Component id = _child,
>> page = com.sas.av.ui.wicket.HomePage, path =
>> 4:_:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer
>> , isVisible = true, isVersioned = true]] has the same wicket:id as
>> another component already added at the same level
>>
>> Root cause:
>>
>> wicket.markup.MarkupException: The component [MarkupContainer [Component
>> id = _child, page = com.sas.av.ui.wicket.HomePage, path =
>> 4:_:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer
>> , isVisible = true, isVersioned = true]] has the same wicket:id as
>> another component already added at the same level
>> at wicket.Page.componentRendered(Page.java:936)
>> at wicket.Component.rendered(Component.java:1755)
>> at wicket.Component.render(Component.java:1534)
>> at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
>> at
>> wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982)
>> at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917)
>>
> as others have stated, wicket:extend and wicket:child are used to work in
> conjunction with class heiararchies. so since you only have one
> superclass
> you only have one wicket:child.
>
> however, none of the stuff that implements this uses any private api. you
> can create your own markup filters and class resolvers and tags that work
> the way you want. if it works out great we can include it into core if
> you
> want to donate.
>
> -igor

This extend > child thing really didn't seem to be intuitive at all. 
However, once I completely removed it things became more clear.

1) It has no id tag.. So w/o asking or rtfm you're not going to know
what's going on
2) Wouldn't naming the hierarchy parent > child be more logical? In
english.. extend + child have no relation...
3) Instead of relying on the idea of child tags.. Just add more panels
or other components that fit your need.  You have to break out of the OO
mindset a bit, but there's a lot of potential once you think outside the
bun.

I'm still learning and exploring.. So if I'm way off track just ignore me :)

Cheers,

./C

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Receive event when user navigates away from current page

2007-05-18 Thread Flavius

I would like to receive an event when the user tries to navigate
away from the current page.

So if the user is on the page and navigates to any other page, closes
the window, etc., I'll get an event.

I have a page that allows the user to upload files to a record.  I store
the physical file in a temp location until the record is saved.  If they
navigate away / close the window without saving, I want to be able
to delete the uploaded files on the fly.

Also, later, I may want to keep a dirty flag on the page.  So if the
user has not made any changes, it will just navigate away.  But if
they have dirty changes, it will prompt them with an alert box.

I was looking at the source for ModalWindow.  It seems that I can
probably attach a behavior to page.  I'd thought I'd ask to see
if that's the best approach.

Currently I am using wicket 1.2.6 on Tomcat 5.5
-- 
View this message in context: 
http://www.nabble.com/Receive-event-when-user-navigates-away-from-current-page-tf3779542.html#a10688196
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread Eelco Hillenius
> Haha, sorry but it seems some of the Wicket community are still living in
> Lala land with regards to believing everything deployed to production has to
> be written in Java. It is 2007, the realisation that Java is not the best
> language for web apps has hit home for years now.

Oh, I can't disagree more. Java 'proved' (note that that's a very
subjective to start with) to be not the best language for web apps
because most of the 'Java' frameworks around are more focussed on
inventing declarative programming models, usually based on XML or
annotations than on enabling users to simply program Java like Wicket
made it it's goal.

I'm sure Grails/ Groovy can give you an edge in cases, but at the same
time, I'm absolutely convinced it many cases such an edge would only
be short term (quick delivery of basic functionality). Take the
project I'm working on now. It's a complex beast, with hardly any real
straightforward CRUD functionality. The ability to refactor without
problems, navigate code quickly, reuse similar pieces of functionality
as custom components etc etc makes using Java very valuable.

I don't want to get into yet another framework battle, certainly not
on our own mailing list, but imo, there are good cases for both, and a
level of integration would be more than welcome, especially because
users get to choose what they want while still being able to switch
from one to the other/ or do parts of their project in one and parts
in the other, and have a better level of reuse.

> A good language for
> writing a lot of your business logic yes, but your business logic and web
> logic are two different things and if you're mixing them you're already
> making mistakes right there.

You can just write n layers in Java and keep em separated. I don't see
any problems with that.

Cheers,

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Gricket: The Love-Child of Grails and Wicket

2007-05-18 Thread Igor Vaynberg

you gotta keep'em separated <-- i love that song! didnt know you were an
offspring fan eelco!

-igor




On 5/18/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


> Haha, sorry but it seems some of the Wicket community are still living
in
> Lala land with regards to believing everything deployed to production
has to
> be written in Java. It is 2007, the realisation that Java is not the
best
> language for web apps has hit home for years now.

Oh, I can't disagree more. Java 'proved' (note that that's a very
subjective to start with) to be not the best language for web apps
because most of the 'Java' frameworks around are more focussed on
inventing declarative programming models, usually based on XML or
annotations than on enabling users to simply program Java like Wicket
made it it's goal.

I'm sure Grails/ Groovy can give you an edge in cases, but at the same
time, I'm absolutely convinced it many cases such an edge would only
be short term (quick delivery of basic functionality). Take the
project I'm working on now. It's a complex beast, with hardly any real
straightforward CRUD functionality. The ability to refactor without
problems, navigate code quickly, reuse similar pieces of functionality
as custom components etc etc makes using Java very valuable.

I don't want to get into yet another framework battle, certainly not
on our own mailing list, but imo, there are good cases for both, and a
level of integration would be more than welcome, especially because
users get to choose what they want while still being able to switch
from one to the other/ or do parts of their project in one and parts
in the other, and have a better level of reuse.

> A good language for
> writing a lot of your business logic yes, but your business logic and
web
> logic are two different things and if you're mixing them you're already
> making mistakes right there.

You can just write n layers in Java and keep em separated. I don't see
any problems with that.

Cheers,

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] autolink-problem with img and relative path

2007-05-18 Thread Thomas Singer
Thanks for answering (although I'm already dad now :)). So there is 
currently no (good) possibility to add an own IAutolinkResolverDelegate to 
the AutoLinkResolver?

Tom


Eelco Hillenius wrote:
> I think such relative paths for autolinks are just not supported.
> 
> You could open up a JIRA issue (no guarantee it will be honored, as
> support may be lacking for a reason). In the mean while you can just
> use normal image components. That'll always work.
> 
> Eelco
> 
> 
>> Thomas Singer wrote:
>>> Maybe the answer to the following question is the problem's solution:
>>> How it is intented to add an own IAutolinkResolverDelegate to the
>>> AutoLinkResolver?
>>>
>>> Tom
>>>
>>>
>>> Thomas Singer wrote:
 I have a WebPage pages.Index (mapping to "/index.html") whose markup
 contains an img-tag with the relative path "../../../screenshots/foo.png"
 (the 1st "../" to get out of the "pages"-package, the 2nd "../" to get out
 of the "classes"-directory, the third "../" to get out of the
 "WEB-INF"-directory). This has the advantage, that the path is already
 valid
 in my undeployed project.

 Unfortunately, the autolink resolver seems not able to convert it to a
 valid
 path:

> java.lang.IllegalArgumentException: Invalid path
> ../../../screenshots/foo.png
>  at wicket.util.lang.Packages.absolutePath(Packages.java:109)
>  at wicket.util.lang.Packages.absolutePath(Packages.java:46)
>  at
> wicket.markup.html.PackageResource.exists(PackageResource.java:263)
>  at
> wicket.markup.resolver.AutoLinkResolver$ResourceReferenceAutolink.(AutoLinkResolver.java:547)
>  at
> wicket.markup.resolver.AutoLinkResolver$AbstractAutolinkResolverDelegate.newPackageResourceReferenceAutoComponent(AutoLinkResolver.java:118)
>  at
> wicket.markup.resolver.AutoLinkResolver$ResourceReferenceResolverDelegate.newAutoComponent(AutoLinkResolver.java:620)
>  at
> wicket.markup.resolver.AutoLinkResolver.resolveAutomaticLink(AutoLinkResolver.java:832)
>  at
> wicket.markup.resolver.AutoLinkResolver.resolve(AutoLinkResolver.java:763)
>  at wicket.MarkupContainer.renderNext(MarkupContainer.java:1361)
> ...
 I would have expected it to convert the path to "/screenshots/foo.png".
 How
 can I work around this issue? Is it possible to plug in an own resolver
 implementation? If so, where can I find some documentation (beside digging
 the source code)?

>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Custom Message Resolver

2007-05-18 Thread Scott Sauyet
Juergen Donnerstag wrote:
> On 5/17/07, Scott Sauyet <[EMAIL PROTECTED]> wrote:
>> It looks like I will be using Wicket for my next project, but I ran into
>> an interesting little issue that I'm not sure how to solve.  How can I
>> allow templates that have something like 's included but
>> with my own custom resolver?
 > Wicket is very flexible and modular. You can write your own
 > MyWicketMessageResolver and register it with the application. How to
 > do it? Just see how WicketMessageResolver is registered. It is realy
 > simple.

You're right.  It was very simple.  I created my own class modeled on 
WicketMessageResolver, and registered it in the init() of my application 
with something like this:

 getPageSettings().addComponentResolver(new MyCustomResolver());


My next question -- and you *knew* there would be one, right? :-) -- has 
to do with needing to add "wicket:custom" markup to attributes as well 
as component text.  I'm imagining the template editor needing to do 
something like

 my special link


I see the experimental class WicketMessageTagHandler and note that it's 
disabled by default.  If I were to mimic this class for my own custom 
filter, is there any way I could go about registering it without hacking 
into MarkupParser?  Or is there some simpler way to do this?

Thanks for the help,

   -- Scott


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] I see a lot of questions and talk about DropDownChoice and IChoiceRenderer.

2007-05-18 Thread Johan Compagner

a converter and choice renderer is not really the same thing
But i guess if you give a list of strings to the DDC that it displays
then the converter can convert the selected object to that string and back
again
that should also work yes.

the choicerender is if you don't want to do that upfront but just have
a list of Objects/Pojos and the selected object is also that Object/Pojo
then you the toString is done for you

johan


On 5/18/07, Thomas R. Corbin <[EMAIL PROTECTED]> wrote:



I had started to use a ChoiceRenderer when I started with wicket, but
quickly
found that registering a converter was easier for me.

Is that an unusual way of dealing with DDC?

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Applying TextTempate on the component's markup

2007-05-18 Thread Alex Objelean

Is it possible to apply TextTempate inside the markup of the component?

More specifically, for the following markup:


  
#${componentId} .selected {
   background: blue;
}
  


   This is markup for my component


the generated markup would replace the ${componentId} with the component
markupId.. (same way - interpolate any other field dynamically using
TextTemplate).

I know that it is possible to interpolate variables on a file which is
contributed in a head (css or js), but I am interested in the interpolation
of the markup itself.

Thank you!

-- 
View this message in context: 
http://www.nabble.com/Applying-TextTempate-on-the-component%27s-markup-tf3780259.html#a10690722
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Check the mime type of uploaded file and its binary content

2007-05-18 Thread Johan Compagner

use magic bytes, i copied this from the java src code somewhere and i added
a few others:

public static String getContentType(byte[] imageData)
   {
   byte[] header = new byte[11];
   System.arraycopy(imageData, 0, header, 0, Math.min(imageData.length,
header.length));
   int c1 = (int)header[0] & 0xff;
   int c2 = (int)header[1] & 0xff;
   int c3 = (int)header[2] & 0xff;
   int c4 = (int)header[3] & 0xff;
   int c5 = (int)header[4] & 0xff;
   int c6 = (int)header[5] & 0xff;
   int c7 = (int)header[6] & 0xff;
   int c8 = (int)header[7] & 0xff;
   int c9 = (int)header[8] & 0xff;
   int c10 = (int)header[9] & 0xff;
   int c11 = (int)header[10] & 0xff;

   if (c1 == 0xCA && c2 == 0xFE && c3 == 0xBA && c4 == 0xBE) { return
"application/java-vm"; }

   if (c1 == 0xD0 && c2 == 0xCF && c3 == 0x11 && c4 == 0xE0 && c5 ==
0xA1 && c6 == 0xB1 && c7 == 0x1A && c8 == 0xE1)
   {
   return "application/msword";
   }
   if (c1 == 0x25 && c2 == 0x50 && c3 == 0x44 && c4 == 0x46 && c5 ==
0x2d && c6 == 0x31 && c7 == 0x2e)
   {
   return "application/pdf";
   }

   if (c1 == 0x38 && c2 == 0x42 && c3 == 0x50 && c4 == 0x53 && c5 ==
0x00 && c6 == 0x01)
   {
   return "image/photoshop";
   }

   if (c1 == 0x25 && c2 == 0x21 && c3 == 0x50 && c4 == 0x53)
   {
   return "application/postscript";
   }

   if (c1 == 0xff && c2 == 0xfb && c3 == 0x30)
   {
   return "audio/mp3";
   }

   if (c1 == 0x49 && c2 == 0x44 && c3 == 0x33)
   {
   return "audio/mp3";
   }

   if (c1 == 0xAC && c2 == 0xED)
   {
   // next two bytes are version number, currently 0x00 0x05
   return "application/x-java-serialized-object";
   }

   if (c1 == '<')
   {
   if (c2 == '!'
   || ((c2 == 'h' && (c3 == 't' && c4 == 'm' && c5 == 'l'
|| c3 == 'e' && c4 == 'a' && c5 == 'd') || (c2 == 'b'
   && c3 == 'o' && c4 == 'd' && c5 == 'y')))
   || ((c2 == 'H' && (c3 == 'T' && c4 == 'M' && c5 == 'L'
|| c3 == 'E' && c4 == 'A' && c5 == 'D') || (c2 == 'B'
   && c3 == 'O' && c4 == 'D' && c5 == 'Y' {
return "text/html"; }

   if (c2 == '?' && c3 == 'x' && c4 == 'm' && c5 == 'l' && c6 == '
') { return "application/xml"; }
   }

   // big and little endian UTF-16 encodings, with byte order mark
   if (c1 == 0xfe && c2 == 0xff)
   {
   if (c3 == 0 && c4 == '<' && c5 == 0 && c6 == '?' && c7 == 0 &&
c8 == 'x') { return "application/xml"; }
   }

   if (c1 == 0xff && c2 == 0xfe)
   {
   if (c3 == '<' && c4 == 0 && c5 == '?' && c6 == 0 && c7 == 'x' &&
c8 == 0) { return "application/xml"; }
   }

   if (c1 == 'B' && c2 == 'M') { return "image/bmp"; }

   if (c1 == 0x49 && c2 == 0x49 && c3 == 0x2a && c4 == 0x00) { return
"image/tiff"; }

   if (c1 == 0x4D && c2 == 0x4D && c3 == 0x00 && c4 == 0x2a) { return
"image/tiff"; }

   if (c1 == 'G' && c2 == 'I' && c3 == 'F' && c4 == '8') { return
"image/gif"; }

   if (c1 == '#' && c2 == 'd' && c3 == 'e' && c4 == 'f') { return
"image/x-bitmap"; }

   if (c1 == '!' && c2 == ' ' && c3 == 'X' && c4 == 'P' && c5 == 'M' &&
c6 == '2') { return "image/x-pixmap"; }

   if (c1 == 137 && c2 == 80 && c3 == 78 && c4 == 71 && c5 == 13 && c6
== 10 && c7 == 26 && c8 == 10) { return "image/png"; }

   if (c1 == 0xFF && c2 == 0xD8 && c3 == 0xFF)
   {
   if (c4 == 0xE0) { return "image/jpeg"; }

   /**
* File format used by digital cameras to store images. Exif
Format can
* be read by any application supporting JPEG. Exif Spec can be
found
* at: http://www.pima.net/standards/it10/PIMA15740/Exif_2-1.PDF
*/
   if ((c4 == 0xE1) && (c7 == 'E' && c8 == 'x' && c9 == 'i' && c10
== 'f' && c11 == 0)) { return "image/jpeg"; }

   if (c4 == 0xEE) { return "image/jpg"; }
   }

   if (c1 == 0x41 && c2 == 0x43)
   {
   return "application/acad";
   }

   if (c1 == 0x2E && c2 == 0x73 && c3 == 0x6E && c4 == 0x64) { return
"audio/basic"; // .au

   // format,

   // big

   // endian
   }

   if (c1 == 0x64 && c2 == 0x6E && c3 == 0x73 && c4 == 0x2E) { return
"audio/basic"; // .au

   // format,

   // little

   // endian
   }

   if (c1 == 'R' && c2 == 'I' && c3 == 'F' && c4 == 'F')
   {
   /*
* I don't know if this is official but evidence suggests that
.wav
* files start with "RIFF" - brown
*/
   return "audio/x-wav";
   }
   return null;
   }


On 5/18/07, Lec <[E

Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread Johan Compagner

if you want multiply sections use panels..







and one child can have its own body with different left righ below above
panels what ever you want.

what would that mean that you have multiply childs?
then we have to name them because you have to target them which one you want
but that we are pretty much back at panels

johan




On 5/18/07, Chris Colman <[EMAIL PROTECTED]> wrote:


> As Alex says, wicket:child tags can't solve this because that's not
> the way they're intended to be used.

I can't see why wicket could not be easily enhanced to support multiple
overridden child sections. Just like the astract methods of a class -
there is no limit on the number of them: a class can have any number
abstract methods and they can be overridden by any derived class - not
just immediate descendents and they don't have to all be overridden in
the same class - just so long as an implementation is provided somewhere
in the inheritance hierarchy for any concrete class.

In wicket the  is just a placeholder for content that will
be implemented/provided in a derived class. It just seems strange that
the number of possible placeholders, n, was arbitrarily set to n = 1 in
the architecture.

Having only 1 alleviates the need to identify the placeholder in a
derived class but that is the only reason I can see why the maximum
number of placeholders should have been limited to just 1.

I can see many uses for providing implementations of different child
sections at different levels of the hierarchy. You could have navigation
column, main column and footer being child sections. With a deep
hierarchy you could provide 'extend' sections that provide the content
for the child sections at various points in the hierarchy. You might
provide footer markup via one common base class and then in classes that
extend that class provide different navigation and main column markup
but they all share a common footer. Another class might provide a
different footer and have other classes extending it that provide
different navigation and main column markup.

For backwards compatibility with the current system you could say that
if there is only one child section then no label is required but if you
choose to add more than one child section then you must label them (just
like providing an abstract method signature).

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DateField initializes value to current date

2007-05-18 Thread Eelco Hillenius
That was a bug, but should have been fixed last week. Please update,
and if the problem still persist, please open a JIRA issue.

Eelco

On 5/18/07, Dragos Bobes <[EMAIL PROTECTED]> wrote:
> After investigating a little I discovered that my problem is coming from
> org.apache.wicket.datetime.DateConverter class that converts an empty
> string to current date.
> Is there a way to change the DateField's behaviour so I get a null date
> whenever there is not user input in that field?
>
> Thanks,
> Dragos
>
>
> Dragos Bobes wrote:
> > I have a form with a not required date field. The problem is that when
> > the form is submitted and no value was selected in the date field, the
> > date field is initialized to current date.
> > Is this an intended behaviour and if yes how can I avoid it.
> > I pasted an example code bellow.
> >
> > Thanks
> > Dragos
> >
> > import java.util.Date;
> >
> > import org.apache.wicket.markup.html.WebPage;
> > import org.apache.wicket.markup.html.form.Button;
> > import org.apache.wicket.markup.html.form.Form;
> > import org.apache.wicket.model.CompoundPropertyModel;
> > import org.apache.wicket.extensions.yui.calendar.DateField;
> >
> > public class DateTest extends WebPage {
> >
> > private Date _date;
> >
> > public DateTest() {
> > Form form = new Form("myForm", new CompoundPropertyModel(this));
> > add(form);
> > form.add(new DateField("date"));
> > form.add(new Button("btn"));
> > }
> >
> > public Date getDate() {
> > System.out.println("get date " + _date);
> > return _date;
> > }
> >
> > public void setDate(Date date) {
> > System.out.println("set date " + date);
> > _date = date;
> > }
> > }
> >
> >
> >   
> >   
> >   
> >   
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Add feedback message to internal error page.

2007-05-18 Thread Eelco Hillenius
I think using a flash message (add direcly to session, e.g.
Session.get().info("hello")) and then an error page with a
feedbackpanel should work.

Eelco


On 5/17/07, craigdd <[EMAIL PROTECTED]> wrote:
>
> In my application I'm overriding the default internal error page to my
> application's login page, however, I want to supply the user with a feedback
> panel message starting that something bad happened and include an error code
> from my internal runtime exception.
>
> What would be the proper way to go about this?  I was thinking about
> extending my login page but want to keep the same markup(.html), but I don't
> think that is possible.  I'm also looking into the various things you can do
> with overriding or implementing IExceptionResponseStrategy but in the end I
> don't really want to get rid of 90% of that default logic.
>
> Thanks
> Craig
> --
> View this message in context: 
> http://www.nabble.com/Add-feedback-message-to-internal-error-page.-tf3769482.html#a10657238
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Howto pass a argument to a BreadCrumbPanel?

2007-05-18 Thread Eelco Hillenius
You should look the IBreadCrumbPanelFactory argument.

Eelco


On 5/17/07, Ralf Eichinger <[EMAIL PROTECTED]> wrote:
> I converted my JobEditPage with constructor JobEditPage(Job pJob)
> to a JobEditPanel.
> I  now call it like this:
> BreadCrumbPanelLink aendern = new BreadCrumbPanelLink("aendern",
> ErecruitmentPanel.this, JobEditPanel.class);
>
> But how to pass the argument "pJob" to the then called JobEditPanel?
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Common table layout for all tables

2007-05-18 Thread Ravindra Wankar

Our html tables optionally have a title, a help link, a filter for the 
table, pick columns capability, multiple item action (each row has a 
checkbox and you can perform a bulk action on multiple rows) and a 
legend at the bottom of a table (that explains symbols/color codes in 
the table).

With JSP or a templating engine we are able to

1. write a common table layout page where we can write if/else blocks to 
conditionally include the filter, url etc depending on if it is available.

2. We can also change the layout using divs and css. eg we can decide 
what we want to border and what not.

With Wicket, I'm having a hard time understanding how to do this. I 
think I need a TablePanel but what next?

Thanks
Ravi.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Common table layout for all tables

2007-05-18 Thread Igor Vaynberg

see datatable, and its defaultdatatable subclass for inspiration.

-igor


On 5/18/07, Ravindra Wankar <[EMAIL PROTECTED]> wrote:



Our html tables optionally have a title, a help link, a filter for the
table, pick columns capability, multiple item action (each row has a
checkbox and you can perform a bulk action on multiple rows) and a
legend at the bottom of a table (that explains symbols/color codes in
the table).

With JSP or a templating engine we are able to

1. write a common table layout page where we can write if/else blocks to
conditionally include the filter, url etc depending on if it is available.

2. We can also change the layout using divs and css. eg we can decide
what we want to border and what not.

With Wicket, I'm having a hard time understanding how to do this. I
think I need a TablePanel but what next?

Thanks
Ravi.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Common table layout for all tables

2007-05-18 Thread Ravindra Wankar





Thanks Igor. I'll take a look. With JSP/Templating  one writes if/else
within the view to change layout. With Wicket, does one have to write
separate pages (Java classes) for each? eg.
TableWithFilter/TableWithoutFilter cause there is no if/else within the
Wicket html.

Basically I'm trying to understand how to "think" in Wicket.

-- R


Igor Vaynberg wrote:
see datatable, and its defaultdatatable subclass for
inspiration.
  
-igor
  
  
  On 5/18/07, Ravindra Wankar <
[EMAIL PROTECTED]> wrote:
  
Our html tables optionally have a title, a help link, a filter for the

table, pick columns capability, multiple item action (each row has a
checkbox and you can perform a bulk action on multiple rows) and a
legend at the bottom of a table (that explains symbols/color codes in
the table).


With JSP or a templating engine we are able to

1. write a common table layout page where we can write if/else blocks to
conditionally include the filter, url etc depending on if it is
available.

2. We can also change the layout using divs and css. eg we can decide

what we want to border and what not.

With Wicket, I'm having a hard time understanding how to do this. I
think I need a TablePanel but what next?

Thanks
Ravi.

-

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
  

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
  

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
  





-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Common table layout for all tables

2007-05-18 Thread Igor Vaynberg

no, you do not create many subclasses.

see defaultdatatable, how it adds toolbars you can also add arbitrary
toolbars. basically this is adding panels into a repeater which gives you
the ability to add 0-n panels.

alternatively you can add a panel but hide it by calling setvisible(false);
or overriding isvisible()

-igor


On 5/18/07, Ravindra Wankar <[EMAIL PROTECTED]> wrote:



Thanks Igor. I'll take a look. With JSP/Templating  one writes if/else
within the view to change layout. With Wicket, does one have to write
separate pages (Java classes) for each? eg.
TableWithFilter/TableWithoutFilter cause there is no if/else within the
Wicket html.

Basically I'm trying to understand how to "think" in Wicket.

-- R


Igor Vaynberg wrote:

see datatable, and its defaultdatatable subclass for inspiration.

-igor


On 5/18/07, Ravindra Wankar < [EMAIL PROTECTED]> wrote:
>
>
> Our html tables optionally have a title, a help link, a filter for the
> table, pick columns capability, multiple item action (each row has a
> checkbox and you can perform a bulk action on multiple rows) and a
> legend at the bottom of a table (that explains symbols/color codes in
> the table).
>
> With JSP or a templating engine we are able to
>
> 1. write a common table layout page where we can write if/else blocks to
> conditionally include the filter, url etc depending on if it is
> available.
>
> 2. We can also change the layout using divs and css. eg we can decide
> what we want to border and what not.
>
> With Wicket, I'm having a hard time understanding how to do this. I
> think I need a TablePanel but what next?
>
> Thanks
> Ravi.
>
> -
>
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

--

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

--

___
Wicket-user mailing list
[EMAIL PROTECTED]://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] new pagemaps in same window

2007-05-18 Thread Jonathan Locke


somehow i'm getting a new pagemap every time i go to our home page (not with
browser refresh, with a link). it's probably my fault, but does anyone have
any idea how that might happen?  i thought window.name was being used to
detect whether a window is new and that a page map would only be created in
a new window.  somehow that check is not working out.

   jon

-- 
View this message in context: 
http://www.nabble.com/new-pagemaps-in-same-window-tf3781334.html#a10693797
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user