Support for javascript variable selection

9 views
Skip to first unread message

Brian Reilly

unread,
Jun 16, 2010, 9:03:06 AM6/16/10
to gwt-multipage
Greetings,

I just found out about gwt-multipage and it is pretty much exactly
what I need. I had created my own dispatching entry point, but it was
going to get to be a burden to maintain. Making it use GWT.runAsync()
meant that it would have to be edited for every new page added rather
than using some sort of configuration data structure.

Where my requirements are different, however, is in the selection of
the entry point. I'm integrating with an existing Tapestry 4
application that doesn't use "pretty" URLs, so I can't rely on URL
patterns. Instead, I had been using the javascript variable selection
technique (the first option listed at
http://claudiushauptmann.com/a-framework-for-gwt-multipage-applications.html).
I don't see any reason why gwt-multipage couldn't support multiple
selection schemes.

I've started work on adding support for this and will hopefully have a
patch to submit in the next week or so. It's likely that there will be
opportunities to make improvements and tweaks to the interface, but at
least it'll be a place to start.

I wasn't sure whether I should add an attribute to the existing
MultipageEntryPoint annotation or create a new annotation. For now, I
went with adding a pageKey attribute (maybe it should be jsPageKey?),
making both it and urlPattern optional. However, I think it might be
better to have separate annotations for each selection strategy. That
way, the attribute can be required and, if we call it "value", we
don't even have to name the attribute when using it, e.g.:
@UrlPatternEntryPoint("(index.html)?(\\\\?
gwt.codesvr=127.0.0.1:9997)?");. Anyone have any opinions on that?

I'm also planning to add support for displaying a list of links to all
of the configured entry points in the case where none of the selection
criteria are satisfied. It's something that I had in my hand-written
dispatching entry point and is helpful during development and for
debugging selection issues.

-Brian

Claudius Hauptmann

unread,
Jun 16, 2010, 10:34:09 AM6/16/10
to gwt-multipage
Hi Brian,

sounds great! I really should add you to the list of committers.

thanks!
Claudius


On 16 Jun., 15:03, Brian Reilly <brian.irei...@gmail.com> wrote:
> Greetings,
>
> I just found out about gwt-multipage and it is pretty much exactly
> what I need. I had created my own dispatching entry point, but it was
> going to get to be a burden to maintain. Making it use GWT.runAsync()
> meant that it would have to be edited for every new page added rather
> than using some sort of configuration data structure.
>
> Where my requirements are different, however, is in the selection of
> the entry point. I'm integrating with an existing Tapestry 4
> application that doesn't use "pretty" URLs, so I can't rely on URL
> patterns. Instead, I had been using the javascript variable selection
> technique (the first option listed athttp://claudiushauptmann.com/a-framework-for-gwt-multipage-applicatio...).

Brian Reilly

unread,
Jul 8, 2010, 3:30:50 PM7/8/10
to gwt-multipage
Thanks. I committed my changes to /branches/issue_16. It's fully
backward compatible, but also includes UrlPatternEntryPoint like I
suggested in my original post. There were enough code changes that I
didn't want to commit straight to trunk without having some review
first. Would you be able to take a look and let me know what you
think? Thanks.

-Brian

On Jun 16, 10:34 am, Claudius Hauptmann

Claudius Hauptmann

unread,
Jul 9, 2010, 3:49:42 AM7/9/10
to gwt-multipage
Hi Brian!

thank you so much! awesome! I wrote a comment about your code but I
can't find it any more, perhaps something went wrong while I committed
it. Please feel free to merge into trunk! And don't forget to add
yourself to the list of contributors in the parent pom.xml.

http://code.google.com/p/gwt-multipage/issues/detail?id=18

Best regards,
Claudius
> > > -Brian- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Brian Reilly

unread,
Jul 11, 2010, 8:59:57 AM7/11/10
to gwt-multipage
Cool. I've merged the branch into trunk. I found your comment on the
code review issue (18). I left the MultipageEntryPoint annotation in
for now but marked it as deprecated with a pointer to
UrlPatternEntryPoint. Should probably leave it like that for 1.0 since
the previous releases are marked as beta.

One thing that I'd still like to do (probably before a final 1.0) is
to make sure it works with RootLayoutPanel. I'm using RootPanel, and
even added a configuration parameter for the div when displaying a
menu. However, that doesn't really apply when using RootLayoutPanel,
and the menu itself is hard-wired to use RootPanel. I may add another
configuration parameter for that... not sure yet.

Actually, I just thought of a bit of a different approach to building
that menu. I'll work on it in the next couple days and see how it
works out.

-Brian

On Jul 9, 3:49 am, Claudius Hauptmann

Claudius Hauptmann

unread,
Jul 14, 2010, 2:07:56 PM7/14/10
to gwt-multipage
Hi Brian,

I think we can remove MultipageEntryPoint before a 1.0.0 since there
are only beta versions and producing a version 1.0.0 with a deprecated
class/annotation could be uncommon.

We could deploy a Beta5 including your enhancements, do you agree?

The Menu is a good idea for development!

Claudius

Brian Reilly

unread,
Jul 14, 2010, 2:51:12 PM7/14/10
to gwt-mu...@googlegroups.com
I generally think of beta as feature (or API) lock. It's a very easy migration, though, so I'm fine either way. Your call.

I would love to see a Beta5 build. :)

As for the menu enhancements I had in mind, it wasn't quite working out the way I originally wanted it to. It could just be a known issue for now that what's there now only works with RootPanel... at least until I find some more time to work on it.

-Brian

--
Sie haben diese Nachricht erhalten, da Sie der Google Groups-Gruppe gwt-multipage beigetreten sind.
Wenn Sie Nachrichten in dieser Gruppe posten möchten, senden Sie eine E-Mail an gwt-mu...@googlegroups.com.
Wenn Sie aus dieser Gruppe austreten möchten, senden Sie eine E-Mail an gwt-multipag...@googlegroups.com.
Besuchen Sie die Gruppe unter http://groups.google.com/group/gwt-multipage?hl=de, um weitere Optionen zu erhalten.


Reply all
Reply to author
Forward
0 new messages