A few Wicket Questions

2008-04-08 Thread mraible

1. Is it possible to load templates from a remote server/url/jar?

2. Is it possible to set breakpoints in templates and debug them using an
IDE?

3. Does Wicket have any support for REST?

4. Does Wicket declare OSGi meta-data in its JARs?

5. Can I write a Wicket application that spans several WARs and has the
ability to navigate from one WAR to the next (essentially have a central URL
mechanism)? Most Wicket apps I've seen require page classes in the classpath
to navigate from one page to the next.

6. Is there any support for component degradation, where you can disable a
component at runtime (to compensate for high-load and such)?

Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/A-few-Wicket-Questions-tp16576719p16576719.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: A few Wicket Questions

2008-04-08 Thread mraible



Michael Mehrle wrote:
 
 Regarding the debugging:
 
 Debugging is very easy in Wicket since most of the meat is in Java
 (instead of tags). What do you mean by setting breakpoints in templates?
 I assume that it 'might' be possible to debug the component tag
 rendering process, but then one would have to skip the jars and load
 Wicket as a source module. 
 
 In general, Wicket does a great job of giving your trace output of your
 template when something goes awry, including the component inheritance
 and suggestions as to what could be wrong.
 
 Regarding loading remote templates - wouldn't that be a potential
 security concern and be prevented by the underlying app server?
 
 Michael
 
 -Original Message-
 From: mraible [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 08, 2008 5:09 PM
 To: users@wicket.apache.org
 Subject: A few Wicket Questions
 
 
 1. Is it possible to load templates from a remote server/url/jar?
 
 2. Is it possible to set breakpoints in templates and debug them using
 an
 IDE?
 
 3. Does Wicket have any support for REST?
 
 4. Does Wicket declare OSGi meta-data in its JARs?
 
 5. Can I write a Wicket application that spans several WARs and has the
 ability to navigate from one WAR to the next (essentially have a central
 URL
 mechanism)? Most Wicket apps I've seen require page classes in the
 classpath
 to navigate from one page to the next.
 
 6. Is there any support for component degradation, where you can disable
 a
 component at runtime (to compensate for high-load and such)?
 
 Thanks,
 
 Matt
 
 

It's a security concern if you don't trust your developers or
infrastructure. On my project, that's not a problem. The current application
I'm working on uses JSP, but it has a customized Resource loader that allows
templates to be loaded from a JAR on a remote server. This means a single
JAR can be updated (it contains static pages with mostly text) and all 50
front-end servers will pick up the content change transparently. The JSP
compile is also used to process e-mails since it's not tied to the Servlet
API. I'm curious to see if Wicket has a similar mechanism. It's nice to have
a single view technology for rendering dynamic, static and e-mail content.
FreeMarker seems to offer this ability.

Thanks,

Matt

-- 
View this message in context: 
http://www.nabble.com/A-few-Wicket-Questions-tp16576719p16577000.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Is it possible to escape HTML in a feedback message?

2008-03-12 Thread mraible

I have the following in a page:



If the feedback message contains XML, it doesn't get escaped. Is there any
way to turn on HTML escaping?

Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16008403.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Is it possible to escape HTML in a feedback message?

2008-03-12 Thread mraible

lt;span wicket:id=feedback class=message/spangt;


igor.vaynberg wrote:
 
 what ever was after I have the following in a page: got stripped
 
 -igor
 
 
 On Wed, Mar 12, 2008 at 9:56 AM, mraible [EMAIL PROTECTED] wrote:

  I have the following in a page:



  If the feedback message contains XML, it doesn't get escaped. Is there
 any
  way to turn on HTML escaping?

  Thanks,

  Matt
  --
  View this message in context:
 http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16008403.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16009950.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Is it possible to escape HTML in a feedback message?

2008-03-12 Thread mraible

Yes it does - thanks!

FeedbackPanel feedback = (FeedbackPanel) backPage.get(feedback);
feedback.setVisible(true);
feedback.setEscapeModelStrings(true);

Is there anyway to make escapeModelStrings on by default?

Thanks,

Matt


igor.vaynberg wrote:
 
 does feedbackpanel.setescapemodelstrings(true) do it?
 
 -igor
 
 
 On Wed, Mar 12, 2008 at 10:34 AM, mraible [EMAIL PROTECTED] wrote:

  lt;span wicket:id=feedback class=message/spangt;




  igor.vaynberg wrote:
  
   what ever was after I have the following in a page: got stripped
  
   -igor
  
  
   On Wed, Mar 12, 2008 at 9:56 AM, mraible [EMAIL PROTECTED]
 wrote:
  
I have the following in a page:
  
  
  
If the feedback message contains XML, it doesn't get escaped. Is
 there
   any
way to turn on HTML escaping?
  
Thanks,
  
Matt
--
View this message in context:
  
 http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16008403.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context:
 http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16009950.html


 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16012617.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Upgrading ResourceModel to 1.3.0-rc1

2007-11-27 Thread mraible

Thanks - this is what I ended up doing. When using 1.2.6, I was doing some
weird logic to set the page title from child pages.

http://tinyurl.com/3dvc37

With 1.3, I'm simply doing the following in my pages. I don't why I was
setting titles in Java before.

titlewicket:message key=userForm.title//title

Thanks again,

Matt


Martijn Dashorst wrote:
 
 Why not use the ResourceModel that is available in Wicket 1.3?
 http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/model/ResourceModel.html
 
 
 Martijn
 
 
 On Nov 27, 2007 8:49 AM, mraible [EMAIL PROTECTED] wrote:
 

 I'm trying to upgrade an application from 1.2.6 to 1.3.0-rc1. I've read
 the
 documentation, upgrade guide and mailing list archives. However, I don't
 seem to grasp how to upgrade the following class to 1.3.0:

 import org.apache.wicket.Component;
 import org.apache.wicket.model.AbstractReadOnlyModel;

 /**
  * A simple model that represents a resource by its key
  *
  * @author ivaynberg
  */
 public class ResourceModel extends AbstractReadOnlyModel {
private String key;

/**
 * Constructor
 *
 * @param key of the resource this model represents
 */
public ResourceModel(String key) {
this.key = key;
}

/**
 * @see wicket.model.AbstractReadOnlyModel#getObject(wicket.Component)
 */
public Object getObject(Component component) {
return component.getLocalizer().getString(key, component);
}
 }

 Most of the documentation seems to indicate I don't need this class
 anymore.
 Is that true?

 Thanks,

 Matt
 --
 View this message in context:
 http://www.nabble.com/Upgrading-ResourceModel-to-1.3.0-rc1-tf4880269.html#a13966244
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Upgrading-ResourceModel-to-1.3.0-rc1-tf4880269.html#a13966761
Sent from the Wicket - User mailing list archive at Nabble.com.


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



DateField renders twice in 1.3.0-rc1

2007-11-27 Thread mraible

For some reason, when using the new extensions.yui.calendar.DateField, I end
up with two text fields on my page. I'm sure it's something I'm doing wrong,
but I can't see the solution at 2 a.m. (and I haven't even been drinking!).
;-)

Java:

add(new DateField(birthday), new ResourceModel(user.birthday));

HTML:

tr
thwicket:message key=user.birthdayBirthday/wicket:message:/th
td
input type=text wicket:id=birthday class=text small
size=11/
[birthday feedback]
/td
/tr

The rendered markup has two input fields. Any ideas how to fix?

tr
thBirthday:/th
td
input type=text class=text small size=11 name=birthday
  
input value=11/13/07 type=text size=8 name=birthday:date
id=date3/
nbsp;
resources/org.apache.wicket.extensions.yui.calendar.DatePicker/icon1.gif 
  
/input

  

/td
/tr

I've attached a screenshot of what it looks like.

Thanks,

Matt

http://www.nabble.com/file/p13967061/twodatefields.png 
-- 
View this message in context: 
http://www.nabble.com/DateField-renders-twice-in-1.3.0-rc1-tf4880492.html#a13967061
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DateField renders twice in 1.3.0-rc1

2007-11-27 Thread mraible

Changing the HTML from:

input type=text wicket:id=birthday class=text small size=11/

To:

div wicket:id=birthday/

Solved my problem.

Unfortunately, there doesn't seem to be a way (from markup) to add my class
classes (text small) to the input field rendered by this component.

Matt


mraible wrote:
 
 For some reason, when using the new extensions.yui.calendar.DateField, I
 end up with two text fields on my page. I'm sure it's something I'm doing
 wrong, but I can't see the solution at 2 a.m. (and I haven't even been
 drinking!). ;-)
 
 Java:
 
 add(new DateField(birthday), new ResourceModel(user.birthday));
 
 HTML:
 
 tr
 thwicket:message
 key=user.birthdayBirthday/wicket:message:/th
 td
 input type=text wicket:id=birthday class=text small
 size=11/
 [birthday feedback]
 /td
 /tr
 
 The rendered markup has two input fields. Any ideas how to fix?
 
 tr
 thBirthday:/th
 td
 input type=text class=text small size=11 name=birthday
   
 input value=11/13/07 type=text size=8 name=birthday:date
 id=date3/
 nbsp;
 resources/org.apache.wicket.extensions.yui.calendar.DatePicker/icon1.gif 
   
 /input
 
   
 
 /td
 /tr
 
 I've attached a screenshot of what it looks like.
 
 Thanks,
 
 Matt
 
  http://www.nabble.com/file/p13967061/twodatefields.png 
 

-- 
View this message in context: 
http://www.nabble.com/DateField-renders-twice-in-1.3.0-rc1-tf4880492.html#a13967084
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Upgrading ResourceModel to 1.3.0-rc1

2007-11-26 Thread mraible

I'm trying to upgrade an application from 1.2.6 to 1.3.0-rc1. I've read the
documentation, upgrade guide and mailing list archives. However, I don't
seem to grasp how to upgrade the following class to 1.3.0:

import org.apache.wicket.Component;
import org.apache.wicket.model.AbstractReadOnlyModel;

/**
 * A simple model that represents a resource by its key
 * 
 * @author ivaynberg
 */
public class ResourceModel extends AbstractReadOnlyModel {
private String key;

/**
 * Constructor
 * 
 * @param key of the resource this model represents
 */
public ResourceModel(String key) {
this.key = key;
}

/**
 * @see wicket.model.AbstractReadOnlyModel#getObject(wicket.Component)
 */
public Object getObject(Component component) {
return component.getLocalizer().getString(key, component);
}
}

Most of the documentation seems to indicate I don't need this class anymore.
Is that true?

Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/Upgrading-ResourceModel-to-1.3.0-rc1-tf4880269.html#a13966244
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Matt Raible's ApacheCon presentation

2007-11-15 Thread mraible

FWIW, I'd like to replace the pros and cons (my opinions) with some that are
more accurate. As users of Wicket, I'd love to hear from you and get your
opinions on the top 3 pros and cons of Wicket. 

Here's the ones I currently have:

Pros:

* Great for Java developers, not web developers
* Tight binding between pages and views
* Active community - support from the creators

Cons:

* HTML templates live next to Java code
* Need to have a good grasp of OO
* The Wicket Way - everything done in Java

IMO, there's no need to debate whether these are valid or not. If they're
not - please suggest new ones. James Ward of Flex had a nice and honest
comment this morning pointing out Flex's cons:

http://tinyurl.com/yvybnm

Thanks,

Matt


Sean Sullivan-3 wrote:
 
 fyi
 
 http://raibledesigns.com/rd/entry/comparing_jvm_web_frameworks_presentation
 

-- 
View this message in context: 
http://www.nabble.com/Matt-Raible%27s-ApacheCon-presentation-tf4815955.html#a13780071
Sent from the Wicket - User mailing list archive at Nabble.com.


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



NotSerializableException for SLF4JLocationAwareLog with Wicket 1.2.6

2007-09-13 Thread mraible

I noticed the following in my logs today when using Wicket 1.2.6. Is this a
known issue?

Thanks,

Matt

Sep 14, 2007 1:19:59 AM org.apache.catalina.session.StandardSession
writeObject
Sep 14, 2007 1:19:59 AM org.apache.catalina.session.StandardSession
writeObject
WARNING: Cannot serialize session attribute wicket:/app:p:null:1 for session
8900AC5E8B0DBAD32BF7C00EACC22B19
WARNING: Cannot serialize session attribute wicket:/app:p:null:1 for session
8900AC5E8B0DBAD32BF7C00EACC22B19
java.io.NotSerializableException:
org.apache.commons.logging.impl.SLF4JLocationAwareLog
java.io.NotSerializableException:
org.apache.commons.logging.impl.SLF4JLocationAwareLog
-- 
View this message in context: 
http://www.nabble.com/NotSerializableException-for-SLF4JLocationAwareLog-with-Wicket-1.2.6-tf4439139.html#a12665645
Sent from the Wicket - User mailing list archive at Nabble.com.


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