Wicket 1.5: IPageFactory and IAuthorizationStrategy.isInstantiationAuthorized related question

2010-10-22 Thread Vytautas Racelis

Hi,

wicket 1.4.x IPageFactory has a method:
C extends Page Page newPage(final ClassC pageClass);

wicket 1.4.x IAuthorizationStrategy has a method:
T extends Component boolean isInstantiationAuthorized(ClassT 
componentClass);

So, i was implementing IPageFactory.newPage(...)

and such action was correct:

public C extends Page Page newPage(final ClassC pageClass) {
if 
(!Session.get().getAuthorizationStrategy().isInstantiationAuthorized(pageClass)){ 
-- everything is fine
}
...
}

Now what we have in wicket 1.5:

IPageFactory has a method:
C extends IRequestablePage IRequestablePage newPage(final ClassC pageClass);

IAuthorizationStrategy has a method:
T extends Component boolean isInstantiationAuthorized(ClassT 
componentClass);

So, i am implementing IPageFactory.newPage(...)

and such implementation is not correct anymore:

public C extends Page Page newPage(final ClassC pageClass) {
if 
(!Session.get().getAuthorizationStrategy().isInstantiationAuthorized(pageClass)){ 
-- this does not compile
}
...
}

Bound mismatch: The generic method isInstantiationAuthorized(ClassT) of type IAuthorizationStrategy is not applicable for the arguments (ClassC). The inferred type C is not a valid substitute for 
the bounded parameter T extends Component	



Does anybody know how to solve such issue?

Thanks;)

--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
www.xaloon.org
www.allcarindex.com
www.leenle.com

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



Re: Forums tools ready-to-use?

2010-07-27 Thread Vytautas Racelis

Hi,
it's on top of JPA 2, Spring 3, wicket 1.4.9.
info is stored in database. Emails are not shown to end user. Comment form 
supports recaptcha.

Short demo might be generated using such maven command (this will give you all 
features of xaloon components):
mvn archetype:generate 
-DarchetypeCatalog=http://xaloon.googlecode.com/svn/trunk/archetypes/archetype-catalog.xml

later:
mvn jetty:run



On 07/27/2010 03:07 AM, Paolo wrote:

very good.
I could use comments panel to let users to let messages on my web site.
Does it need Spring integration?
Where is stored comments info: texts,emails,authors?
I need a database suppport?

I saw also a interesting ReCaptcha plugin.
But now I am interesting in ReCaptcha Mailhide (
http://www.google.com/recaptcha/mailhide/) wicket support.
I saw that Recaptha plugin doesn't supportt Mailhide function.
I need Mailhide, to hide email address of who write a comment on my web site
to spammers.


2010/7/26 Vytautas Racelisturi...@gmail.com


Thanks Josh;)
  Forum support is in feature plans, but it is not currently implemented.



Thank you!





--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
www.xaloon.org
www.leenle.com
www.allcarindex.com


On 07/26/2010 04:46 PM, Josh Kamau wrote:


Please check www.xaloon.org. This project contains some nice ready to use
components for wicket including:


- blog;
- comments panel;
- sports component;
- plugin administration console;
- registration and activation panel;

Regards.
Josh


On Sun, Jul 25, 2010 at 7:30 PM, Paoloirresistible...@gmail.com   wrote:

  I need a tool for a Forum in my web site.

I don't want use the classic php based tools, like phpForum, bbCode ecc.

But I would use WICKET!
Do you suggest me some wicket examples o ready-to-use forum tool?

Or if it doesn't exist, please suggest some guestbook or similar way to
posting message in a webpage.

thank you.
Paolo





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






--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
www.xaloon.org
www.leenle.com

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



Re: Forums tools ready-to-use?

2010-07-26 Thread Vytautas Racelis

Thanks Josh;)
 Forum support is in feature plans, but it is not currently implemented.


--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
www.xaloon.org
www.leenle.com
www.allcarindex.com

On 07/26/2010 04:46 PM, Josh Kamau wrote:

Please check www.xaloon.org. This project contains some nice ready to use
components for wicket including:


- blog;
- comments panel;
- sports component;
- plugin administration console;
- registration and activation panel;

Regards.
Josh


On Sun, Jul 25, 2010 at 7:30 PM, Paoloirresistible...@gmail.com  wrote:


I need a tool for a Forum in my web site.
I don't want use the classic php based tools, like phpForum, bbCode ecc.

But I would use WICKET!
Do you suggest me some wicket examples o ready-to-use forum tool?

Or if it doesn't exist, please suggest some guestbook or similar way to
posting message in a webpage.

thank you.
Paolo





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



Re: brix and blogs

2009-12-24 Thread Vytautas Racelis

Hi,
currently www.xaloon.org is based on brix-cms. it has some advantages 
and some issues, which i'me preparing to describe next year :)


Fernando Wermus wrote:

Haiko,
Your work is great because it is right know the only way to decide to
use brix. I wonder if there is a way to create users as pages' owners, etc.
Because this is the minimal requirement I need to implement it.

continue publishing about brix; your article was very clear. I will follow
yours.



On Tue, Dec 22, 2009 at 7:11 PM, haiko hvdsch...@gmail.com wrote:


Fernando,

I have written a blog entry on the basic elements of brix. See it here
http://www.cybersnippet.nl/blog/entry/brixcms. In the entry is also a
link to a live brix demo app. Let me know what you think about it.

Greetings,

Haiko

On Tue, 2009-12-22 at 18:17 -0200, Fernando Wermus wrote:

Hi all,
 I would like to know if there is someone writing about brix in some
blog. As the info in brix page is poor, I am looking for another way to
undersand better the cms.

Thanks in advance.




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








--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
www.xaloon.org
www.leenle.com

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



Re: wicketstuff.org Confluence error

2009-12-09 Thread Vytautas Racelis

This thing does not look compatible with wicket stuff also

http://wicketstuff.org/confluence/display/~family+incest+orgy+free+3d+incest+taboo+sex+movies/Home

it's on first page of wicket stuff

http://wicketstuff.org/confluence/dashboard.action

Johan Compagner wrote:

somehow the disks where full again
i deleted as much logging as i can and some old stuff
so we should be able to go on

Biggest problem is as always but nobody seems to be able to fix that shitty
maven:

http://www.wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.5-SNAPSHOT/

It still generates unique snapshots.. Why cant nobody fix that stupid maven
build behavior..

johan


On Wed, Dec 9, 2009 at 10:31, Stefan Blanke stefbla...@googlemail.comwrote:


Hi,

does somebody know what happened to wicketstuff.org?



I get the following error message:



You cannot access Confluence at present. Look at the table below to
identify
the reasons

Database is being updated by an instance which is not part of the current
cluster. You should check network connections between cluster nodes,
especially multicast traffic.



Best regards,

Stefan











--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
www.xaloon.org
www.leenle.com

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



Re: LinkTree

2009-11-04 Thread Vytautas Racelis

Hi,
 you should have a container and add that container into target.

 This is how i've done this:

http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-jpa-components/src/main/java/org/xaloon/wicket/component/tree/TreePanel.java

jahid wrote:

Hi,

I have a LinkTree on a page, that page also contains a panel. First time 
the page will be loaded with an empty panel. But if user clicks on link, 
then i wanted to replace the empty panel with a new panel. but it seems 
like its not  working. Below is the part of my code-


  1. public ListContractsPage() {
  2. add(prepareTree());
  3. add(new
 EmptyPanel(detailsPanel,).setOutputMarkupId(true));
  4. }
  5. private BaseTree prepareTree() {
  6. DefaultMutableTreeNode rootNode = new
 DefaultMutableTreeNode(Contracts);
  7. TreeModel treeModel = new DefaultTreeModel(rootNode);
  8. assembleContracts(rootNode);
  9. final LinkTree linkTree=new LinkTree(tree, treeModel){
 10. @Override
 11. protected void onNodeLinkClicked(Object node, BaseTree
 tree, AjaxRequestTarget target) {
 12. Object userObject = ((DefaultMutableTreeNode)
 node).getUserObject();
 13. Panel targetPanel;
 14. if (userObject instanceof ServiceHandle) {
 15. targetPanel = new
 ServiceDetailsPanelServiceHandle(detailsPanel, (ServiceHandle)
 userObject);
 16. } else if (userObject instanceof ContractHandle) {
 17. targetPanel = new
 ContractDetailsPanelContractHandle(detailsPanel,
 (ContractHandle) userObject);
 18. } else {
 19. throw new AssertionError(Expected: master,
 sub or service handle, but found:  +
 userObject.getClass().getSimpleName());
 20. }
 21. targetPanel.setOutputMarkupId(true);
 22. target.addComponent(targetPanel);
 23. }
 24. };
 25. return linkTree;
 26. }


The panel which is added on line3, will be replaced by line15 or line17. 
But it seems like its not replacing. I actually debugged, and the 
control reaches over there and executes upto line22. But the new panel 
was never rendered on browser.


I am using wicket 1.4.2.

Anyone have any idea why new panels are not rendered?

Thanks in advance.

Jahid

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




--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
e-mail: turi...@gmail.com
www.xaloon.org
www.leenle.com

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



Re: mount recursive

2009-11-02 Thread Vytautas Racelis

Hi,
you may look at usage of
http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-components/src/main/java/org/xaloon/wicket/component/mounting/MountPageGroup.java


@MountPageGroup(context=/pages)
class Parent {}

@MountPage(path=/page_1) //result /pages/page_1
class A extends Parent {}

@MountPage(path=/page_2) //result /pages/page_2
class B extends Parent {}

This shows how to inject page scanner:
http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-demo/xaloon-demo-jackrabbit/src/main/java/org/xaloon/wicket/demo/repository/XaloonDemoApplication.java

Scanner configuration:
http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-demo/xaloon-demo-jackrabbit/src/main/resources/META-INF/application-context.xml

Giambalvo, Christian wrote:

Hi all,

 


is it possible to mount a package recursivly?

Let's assume following classes:

 


com.test.pages.TestClass1

com.test.pages.TestClass2

com.test.pages.subpackage.TestClass3

com.test.pages.subpackage.TestClass4

 


now i'd like to do mount(/pages,
PackageName.forClass(TestClass1.class)); to make all Pages under
com.test.pages available under /pages/ and pages/subpackage.

 


Kind regards.

Chris

 



  



--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
e-mail: turi...@gmail.com
www.xaloon.org
www.leenle.com


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



Re: Bookmarkable images from db

2009-11-01 Thread Vytautas Racelis

Hi,
you may find this class useful for your requirements:

http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-repository/src/main/java/org/xaloon/wicket/component/resource/ImageLink.java

This class takes image from JCR and shows as image.

Peter Dotchev wrote:

Hi,

My app allows users to upload images and I store them in JCR 
http://en.wikipedia.org/wiki/Content_repository_API_for_Java. I can 
get InputStream for each one of them.
I want to display images in specific pages and I want image URLs to be 
stable/bookmarkable. Also I don't want these pages to use the session 
in any way.
I checked again chapter 9 about images from Wicket In Action but such 
use case is not addressed there.


I found that SharedResources allows for stable URLs, but I cannot 
register each individual image.


What approach would you suggest?

Best regards,
Peter






--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
e-mail: turi...@gmail.com
www.xaloon.org
www.leenle.com


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



Re: Showing session-stored messages in another window/tab

2009-10-19 Thread Vytautas Racelis
Well, Component.info takes WebPage as reporter. 
Session.info reporter is null.
As i understand this will be rendered in session scope instead of single 
page.

But i may be wrong :)


Esteban Masoero wrote:
But as I see in org.apache.wicket.Component.info(String), that method 
already adds that message to the session. Wouldn't be the same?


Vytautas Racelis escribió:

Hi,
maybe getSession().info http://this.info/(User account activated);
would help


On Mon, Oct 19, 2009 at 8:08 PM, Esteban Masoero
emaso...@getsense.com.arwrote:

 

Hi:

We've implemented the classic registration process:
- user registers
- app sends him an email with a generated link
- user clicks that link, which it's oppened in a new window/tab
- The UserActivationPage that responds to that link request does:
this.info(User account activated); setResponsePage(LoginPage.class);
(so the user can log in for the first time)

The problem is that the message is only shown when the link is 
oppened in
the same window/tab the user has previously registered. After trying 
a few

things, we ended up doing
this.getPageSettings().setAutomaticMultiWindowSupport(false); in
MyApplication, which seems to work (we think is related to wicket 
using the

same session, but we're not sure).

However, we're not sure whether it's the best way of solving this. Any
other ideas or comments?

Thanks,

Esteban

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






  


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




--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
e-mail: turi...@gmail.com
www.xaloon.org
www.leenle.com


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



Re: Open Source projects using Wicket

2009-10-16 Thread Vytautas Racelis

Hi,
i've been working with Wicket for a while.
It is not my primary job, but i've implemented some ideas at  
http://www.xaloon.org/blog such as:
* enhanced @MountPage annotation in order to generate sitemap.xml for 
google, dynamic menu with spring security

* VirtualPageFactory - to mount panels as pages
* other additional stuff
Currently i am working on open source sports betting component:
http://www.xaloon.org/blog/xaloon-sports-betting-open-source-sports-component-for-apache-wicket
First release may be found at http://www.leenle.com

Since it is my first email to this group this might sound like 
introduction of myself :)



Dave B wrote:

Hi,

I'm in the process of evaluating Wicket (after an arduous JSF project,
that has made us re-evaluate our web platform.)

I've read Wicket in Action and whole bunch of blog and mailing list
posts, done some proof-of-concept work and am now interested in
reading source code from a project using Wicket, since I want to see
Wicket in the wild. I know Artifactory uses Wicket, but their
Subversion access instructions seem to be out of date.

Does anyone know of an open source project using Wicket, so that I can
peruse the source code?

Many thanks,
Dave




--
Regards,
Vytautas Racelis
---
phone:+370-600-34389
e-mail: turi...@gmail.com
www.xaloon.org
www.leenle.com


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