Re: property file location feature request (ComponentStringResourceLoader)

2010-02-04 Thread pete swulius
For future reference.
https://issues.apache.org/jira/browse/WICKET-2713


property file location feature request (ComponentStringResourceLoader)

2010-01-31 Thread pete swulius
Everyone,

I am curious.  Why are .properties files not located in the same way as
.html?  I've overridden:

[ResourceStreamLocator]
public IResourceStream locate( Class? clazz, String aPath, String aStyle,
Locale aLocale, String anExtension )

I notice that property file locating doesn't invoke this method, but only
invokes the lesser arg version with the style/variation/locale already
embedded in the path.  This is an inconvenience for me because I'm trying to
inspect the style during location.  Perhaps I shouldn't be doing what I'm
trying to do, but after reading the docs, I expected locating to work the
way it does for .html, but .properties threw me.

Thanks!  And again, thanks to all contributors for making such an awesome
product.

Peter Swulius


Logout on Internet Explorer (IE) causes 404

2009-11-27 Thread pete swulius
Internet Explorer and Android browser both report a 404 on execution of my
logout link:

Link logoutLink = new Link( logoutLink ) {
  @Override
  public void onClick()
  {
getsession().invalidate();
getRequestCycle().setRedirect( true );
setResponsePage( HomePage.class );
  }
};

Using wicket 1.4.3

Anyone know what happened with this?  I'm experiencing this problem where we
use the root context (ie: production):
http://issues.apache.org/jira/browse/WICKET-1449

--pete


Re: AttributeModifier relative path rendering in conflict

2009-09-29 Thread pete swulius
Ah, thank you.  I will look into using HeaderContributor instead.  I have a
good feeling that will take care of my problem.  I will post back my
findings this afternoon.

--pete


Re: AttributeModifier relative path rendering in conflict

2009-09-29 Thread pete swulius
HeaderContributor is the answer.

add( CSSPackageResource.getHeaderContribution( css/ + style.getName() +
/promo.css ) );

The javadocs explicitly state that a css location that does not begin will a
leading / (slash) will be have it's relative path prepended to it.
http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/CSSPackageResource.html

Thank you for the help!

--pete


AttributeModifier relative path rendering in conflict

2009-09-28 Thread pete swulius
All,

I am trying to use an AttributeModifier to change the stylesheet used on a
Page of mine.

WebComponent styleComponent = new WebComponent( style );
styleComponent.add( new SimpleAttributeModifier( href, css/ +
style.getName() + /stylesheet.css ) );
add( styleComponent );

The different stylesheets are located in sub-directories corresponding to
style.getName().  The problem I have is that whatever code prepends all
relative paths on the rendered page is not applying it to this 'modified
attribute'.  For instance:

I see this
link rel=shortcut icon type=image/x-icon href=favicon.ico
render as
link rel=shortcut icon type=image/x-icon href=../../favicon.ico

but my modified style just renders as such:
link wicket:id=style rel=stylesheet type=text/css
href=css/foobar/stylesheet.css/

Obviously this relative path swipe happens before the attributes are
modified.  Is there a better way to do what I'm trying to do?  Thank you!

--pete


Re: Testing ajax form behavior still confused me.

2009-09-02 Thread pete swulius
Okay, I'm on the trail of what is happening, but don't have the full answer
yet.  I doubt this is a defect, but rather a misuse of nested forms  ajax
components on my part.  Though I don't feel like I know enough about wicket
to make the call.

What I know is: the wrong AjaxButton is being selected as the
submittingComponent in Form.findSubmittingButton().

I have the following nesting:

panel-A
  form-1
 AjaxButton (foo)
 panel-B
form-2
AjaxButton (bar)

I'm calling executeAjaxEvent on 'foo', but it is not the first AjaxButton
encountered during my pages visitChildren().  At least in my situation, the
first AjaxButton encountered is 'bar' and it's selected and returned as
submittingComponent.  This seems to cause form-2 to be posted on the
request.

Any thoughts on this would be greatly appreciated!

--pete


Re: Testing ajax form behavior still confused me.

2009-09-02 Thread pete swulius
Wicket 1.4.1 resolved my issue.

I still had fun tracing through the wicket code though.  It's pristine in
there.

--pete


Testing ajax form behavior still confused me.

2009-08-31 Thread pete swulius
Hello everyone!

I have read a lot of forum posts and defects/feature requests around testing
form posts with ajax and am still confused.  The simple question I have is,
How do I invoke the behavior associated with an AjaxButton as well as the
form processing logic, like validation?  An even simpler question might be,
Should I be testing by driving the webapp (Selenium,etc...) instead of
WicketTester for Ajax form posts?

Read on for more details on my struggle...

I am using Wicket 1.3.5.

I have a form that is submitted via an AjaxButton, overriding onSubmit(
AjaxRequestTarget anAjaxTarget, Form aForm ).  I can easily invoke it's
behavior by using executeAjaxEvent( path, onclick ), but this obviously
doesn't make use of the FormTester.  I can explicitly set the model object
on each of my TextFields and then call executeAjaxEvent( path onclick ),
but this obviously bypasses the form validation logic.  Am I missing
something?  I hope someone out there has been through this already.  I
appreciate all of the help I've gotten so far, so thank you all.

--pete


Expired Session Routing

2009-07-24 Thread pete swulius
Hello everyone,

I am hoping for some advice on this.  Is there a way to obtain the original
target during a session expired scenario?  I know you can register a Page
class as a handler of this event, but I would like to know which Page the
originating request was destined for.

In case it matters, I am using a mounted bookmarkable page that I would like
to be stateless, but prefer strongly to add ajax behavior.  I think it's
acceptable to show the user a timeout screen with a link to go back to the
up-to-date page.

Maybe you specify a expired page for an individual page, like you can for
exceptions?  Or perhaps there is an API I need to discover.

Thank you so much in advance.  I've been scouring the web and the API
looking for anything like this and have not been successful.  Digging into
the RequestCycle has only shown me that the current request is my
ExpiredPage.  Thanks again!

--pete


Re: use a lable in several palces in a page

2009-07-24 Thread pete swulius
From what I've read about wicket, you must create the label multiple times.
Here's a recent discussion on that topic with some good reasons why:

http://www.nabble.com/HTML-can%27t-reference-a-component-(Label)-multiple-times--td21983670.html

--pete



On Fri, Jul 24, 2009 at 3:47 PM, tubin gen fachh...@gmail.com wrote:

 I created a label and I wabnt to use this label in seeral places in
 page , is it allowed , right now I getting exception

  [Component id = documentType] has the same wicket:id as another
 component already added at the same level

 so If want to show the same text  at 5 different places in markup do I
 have to create 5 label objects with the same model ?

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




Re: Tools for Managing a Wicket Project

2009-05-18 Thread pete swulius
It appears that using external html editors causes sync issues.  Apparently
eclipse doesn't monitor changes to the file system, except to warn you that
it's out of sync.  I would love the know the truth of it as I could very
well be missing something obvious.  In fact, I would bet that I am,
considering that eclispe is so cool.

I am currently using the Amateras plugin:
http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=EclipseHTMLEditor.
 I have no problems with it, but I use it only for the syntax coloring
and
the occasional content assist.

--pete


Re: Tools for Managing a Wicket Project

2009-05-18 Thread pete swulius
While we are on the topic, does anyone know if there's a super-secret
version of wicket-bench that plays well with the Eclipse 3.3 debugger?  If
not, how much effort would it take to get it up to date?  I would be glad to
contribute.

Or, alternatively, is there another option out there for minimizing the
hunt-n-clickathon?

--pete