Re: Question on Links

2010-06-09 Thread Arjun Dhar

FYI I got a lot of help from 
http://ninomartinez.wordpress.com/2008/09/09/apache-wicket-javascript-integration/
nino martinez Blog 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Question-on-Links-tp2247045p2249923.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: gmail like file upload

2010-06-11 Thread arjun dhar
Check out:
https://www.ibm.com/developerworks/web/library/wa-aj-dwr/

--- On Fri, 6/11/10, Martin Grigorov mcgreg...@e-card.bg wrote:

From: Martin Grigorov mcgreg...@e-card.bg
Subject: Re: gmail like file  upload
To: users@wicket.apache.org
Date: Friday, June 11, 2010, 1:08 PM


http://wicketstuff.org/wicket14/upload/multi

On Thu, 2010-06-10 at 21:52 -0700, fachhoch wrote:
 I want to have gmail like file upload  in my application ,  I want to have
 ajax  multi file upload  , please suggest me  .



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




  

Apache Roller - Blog integration

2010-06-19 Thread Arjun Dhar

Hi,
 not sure if I should post this in Apache Roller or Wicket; but is there
any way to integrate Apache ROller and Wicket?

..are there any good blog engines with Wicket, or perhaps Some blog
components within Wicket?
Frankly I like ROllers feature set and I doubt wicket itself would have a
full fledged blogging engine, though worth asking about possibilities 
ideas!?

thanks!
Arjun
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Roller-Blog-integration-tp2261140p2261140.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



How to override container markup package loaction?

2010-06-30 Thread Arjun Dhar

How does one override container markup package loaction?

If I provide mysite.wicket.pages for my Java Wicket components, then the
html markup must be in the same package. I want the HTML to live in html.
So how can I override  mysite.wicket.pages with html when wicket
searches for components?

thanks, Arjun
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-override-container-markup-package-loaction-tp2274647p2274647.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: How to override container markup package loaction?

2010-07-01 Thread Arjun Dhar

Hey Ernesto,
 so I tried that. Application.getResourceSettings().addResourceFolder(xxx)
only works for resources.

So if I have a (Page A) extends (Page B). Then only the markup of Page A
comes; Wicket does not seem to respect Markup Inheritance etc. when adding
as resource.

My fear is that the PAGE may have to be part of classpath (in
/WEB-INF/classes) ..and thats not where i want my HTML / Dynamic Markup to
live :(

Help!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-override-container-markup-package-loaction-tp2274647p2276001.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: How to override container markup package loaction?

2010-07-04 Thread Arjun Dhar

Ernest, Igor -- thanks!

I had gone to that wiki earlier; I only focussed on the section that talked
about Wicket 1.3 (which only allows to change location in Classpath) so I
missed the point. I saw 1.2 and modified the code to pick up any file from
the ServletContext; and it works with the code as follows:


public ResourceStreamLocator getFileResourceStreamLocator(final
ServletContext sc) {
final IResourceStreamLocator defaultLocator =
super.getResourceSettings().getResourceStreamLocator();
return new ResourceStreamLocator(){
@Override
public IResourceStream locate(final Class? clazz, final String
path) { 
String fullPath = /html + path.replaceFirst(Your 
base package
name for WebPage components, ); //TODO: Cleanup!
log.debug([getFileResourceStreamLocator.locate] fullPath =
 + fullPath);
try {
final URL url = sc.getResource(fullPath);

if (url != null) {
return new UrlResourceStream(url);
}

} catch(MalformedURLException e) { }

return defaultLocator.locate(clazz, path); //Use default
locator
}
};
}


I also had a typo in the package name of my templates :) :p
(I'm using Markup inheritance; so my templates are put in another package.
Due to the typo of that package name, Wicket was unable to locate the
templates and causing issues).

All fixed. Thanks to your posts I went back and realized my mistakes.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-override-container-markup-package-loaction-tp2274647p2278053.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Single inheritence in parts

2010-07-04 Thread Arjun Dhar

Hi,
 all the examples etc suggest that Single inheritence is possible but I cant
break it up. The break up is essential when you want to merge common parts
of your MARKUP with multiple specific parts of the Child page.

Example:


HTML
HEADtitleBASE TEMPLATE / PARENT PAGE/title/HEAD

BODY
wicket:child /
br /
h2Some other Html common/h2
wicket:child /
/BODY
/HTML


---

HTML
HEADtitleCHILD PAGE 1/title/HEAD

BODY
wicket:extend
Part 1 specific to Child Page
/wicket:extend
Any HTML here can be ignored as conceptually anyway what appears in
extend is what should be rendered from a child page.
wicket:extend
Part 2 Specific to Child Page (will appear after common
HTML in parent page)
/wicket:extend
/BODY
/HTML


I tried this, only the first part renders. I'm wondering if we can add such
capability. Conceptually I don't see why not. If already possible do let me
know or consider as a feature request?!

-Thanks Arjun
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Single-inheritence-in-parts-tp2278064p2278064.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Single inheritence in parts

2010-07-06 Thread Arjun Dhar

cool ..something to look forward to (in response to other posts)

FYI I tried panel it requires some code to be written, not very clean.
(opposed pure markup based approach)

On a last note; ..am confusedmultiple inheritance generally means MANY
PARENT, ONE CHILD (child inherits from multiple parents). Here there is only
ONE PARENT MARKUP required and ONE CHILD markup. Maybe my perspective is not
right. I'll search more material on this and educate myself.

thanks a lot

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Single-inheritence-in-parts-tp2278064p2279786.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: wicket in a mobile application.

2010-07-13 Thread Arjun Dhar

Check out:
http://www.thebuzzmedia.com/apache-wicket-powers-mobile-walmart-com/

Also, keep in mind Wicket is a server side component framework and like all
such frameworks it produces HTML, BUT as you will read from the link that it
allows you maintain consistent server-side code for components that could
generate specialized HTML for each mobile device.
+ It's AJAX support is pretty comprehensive.

The question is a bit vague but hopefully the above will provide you with
some clues.
..am learning the ropes myself heh :)
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-in-a-mobile-application-tp2287273p2287300.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: UI Layout

2010-07-14 Thread Arjun Dhar

Hi bro,
 so I need to change page layout markup file( since markup files will have
my panels defines)

1. Use Inheritance: What I like about inheritance is you can template and
further sub-template without a single line of Java (except for empty class
files to represent the page ..I have a solution for this also.. read on).
(There is some debate on improving inheritance
http://apache-wicket.1842946.n4.nabble.com/Single-inheritence-in-parts-td2278064.html#a2278064;
but lets skip that)

layouts change just a little bit on every page, so having 100-200 different
layout files is crazy  -- With good designed templates this should be
avoidable. And if not, panels can be used.

2. I need to change page layout markup file (since markup files will have
my panels defines) -- So, you dont need to use PANEL's only. As explained
above I believe inheritance is powerful where there is a lot of common
stuff. The dynamic stuff like news, article, navigation are panels that too
embedded inside the template. So the combination should reduce your
combinatorial explosion!

3. Ah regarding Class files: Well this is something bothering me as well.
I'm looking at CGLIB byte code generation to read the file system for markup
files and auto generate java classes into the ClassLoader. So there is no
need to write dumb classes. ..but this is work in progress. Just sharing the
idea if anyone can beat me to it :)

Please note that Im relatively new to wicket too, but through my initial
frustrating experiences I learnt somethings that i hope will help you. If
not, am sure the more experienced guys here will be providing valuable
input.

-good luck!

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UI-Layout-tp1891867p2288432.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: UI Layout

2010-07-14 Thread Arjun Dhar

ok, so you mention wicket:id as if its some constant thing.
Conceptually a markup tahhed by wicket-id, is no less powerful than
injecting a scriptlet or any dynamic script you inject via JSP, PHP. Its
like a reference point/range.

Who says that anything between that wicket:id condemns you to the markup
there? Thats what components are for. There are plenty of bases level
components for you to choose, override and customize.

SO once we've go through inheritance, panels the 2% that us not
templatizable and falls under dynamic category will surely be replacable by
some component.

I'd recommend you read up on available components. I think this is an issue
of perception that anything between  wicket:id  is static!

Mabe Im wrong in understanding your real problem but I'd simply say there
isnt anything you can do with JSP, JSTL, PHP that you can do with wicket!
..ok a bold statement :p Guys mack me up! haha kidding.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UI-Layout-tp1891867p2288872.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Models and panel updates

2010-07-16 Thread Arjun Dhar

Help me understand this, An AjaxBased components send update events as
they change!

That means except for SAVE having to save the data in one ajax request you
dont need the other fields being AJAX based. See onAfterRender() this is
able to give you the updated value as it happens:


public ProductPanel(String id) {
super(id);
setOutputMarkupId(true);
add(new Label(id));
//add(new Label(cost));
AjaxEditableLabel costLabel = new 
AjaxEditableLabelString(cost) {
@Override
public void onEdit(AjaxRequestTarget target) {
super.onEdit(target); //Does the whole convert 
to text box magic
Float cost = 
(Float)getDefaultModel().getObject();

log.info([ProductPanel.AjaxEditableLabel.onEdit] cost prior to update =
 + cost);
}

@Override
public void onAfterRender() {
super.onAfterRender();
Float cost = 
(Float)getDefaultModel().getObject();

log.info([ProductPanel.AjaxEditableLabel.onAfterRender] cost after
update =  + cost); 
}
};
add(costLabel); //Updatable label

add(new AjaxLinkString(save) { //But are we saving for?? 
All the other
fields are already AJAX based and sending updates! 
@Override
public void onClick(AjaxRequestTarget target) {
log.info(saving product  );
//Line below gives -- WicketMessage: No get 
method defined for class:
class arjun.learning.data.Product expression: save
Product model = 
(Product)getDefaultModel().getObject(); //Will give
ERROR :(
log.info([ProductPanel.AjaxLink.onClick] cost 
=  + model.getCost());
}
});
}


..The model is updated on changing the value of the cost field itself.

Also, its perfectly understandable why the Model is not marshaling
(becausethere are fields other than the domain object , and obviously the
CompoundPropertyModel doesn't know the difference between a Domain Model
field and a field added to the panel for display. They are all part of the
model, some of which not in your domain model.

..So where am I missing the point? :) 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Models-and-panel-updates-tp2290043p2291094.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



How to autogenerate WebPage classes for static pages?

2010-07-22 Thread Arjun Dhar

Hi,
 a section of my website is static pages (template) but no need of injecting
any components 
[I prefer getting as much dine through inheritance cleanly over Panels].

Each markup has to have a corresponding WebPage in wicket. 
I'm exploring the ASM library with CGLIB to auto generate classes for static
templates ...is there any wicket way of doing this already? 

..or if someone has a Wicket way or even the CGLIB/JAVASSIST/ASM code ready
to go, I'd appreciate it.

thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-autogenerate-WebPage-classes-for-static-pages-tp2298749p2298749.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: How to autogenerate WebPage classes for static pages?

2010-07-23 Thread Arjun Dhar

Hi Martin,
 thanks. the tip was insightful.  though am confused about one point.
So the examples load resources via WebApplication. While your suggestion
seems to point towards WebPage. As in the code below, I've inserted the
MARKUP of the child page ..but then that is no inheritance. Is this what you
meant or something else?


/**
 * Principlebr /
 * Represent All generic Static pages (in a template) without the need to
build
 * a class for each Page explicitly.br /
 * This class will intercept the actual intended path
(codegetRequest().getPath()/code)
 * and then load the appropriate intended static resource.br /
 * Note: The page extends TemplatePage which defines a common template for
the static pages
 * , which may be a descendant of {...@link WebPage}.br /br /
 * 
 * Flowbr /
 * This class is invoked by the class that extends {...@link
WebApplication}.init();
 * by Mount-ing it:br /
 * codemount(new IndexedParamUrlCodingStrategy(/path/to/staticpages,
GenericStaticPage.class));/codebr /
 * On getting control, it delegates it to the appropriate resource as
described by principle.br /br /
 * 
 * 
 * @see
http://apache-wicket.1842946.n4.nabble.com/How-to-autogenerate-WebPage-classes-for-static-pages-td2298749.html#a2298749
 
 * @author arjun_dhar
 */
public class GenericStaticPage extends TemplatePage { //All static pages
following a particular template
private Logger log = LoggerFactory.getLogger(GenericStaticPage.class);
//sl4j logger

public GenericStaticPage() throws MalformedURLException {
String pageUrl = getRequest().getPath();
log.info(Requested page + pageUrl);

//Extract Resource name from path
String resName = pageUrl.substring(pageUrl.lastIndexOf('/'),
pageUrl.length());  

//Load resource
String resourceName = /html/+resName;
log.info(Resource Name =  + resourceName);
URL url = ((WebApplication)
getApplication()).getServletContext().getResource(resourceName);
log.info(Resource URL =  + url.toString());
add(new Include(childPageInsert, url.toString()));
}
}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-autogenerate-WebPage-classes-for-static-pages-tp2298749p2300505.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Passing raw value to html

2010-07-26 Thread Arjun Dhar

My 2 cents : I think the problem is more of inserting javaScript into markup
as key words perhaps ?! :)

http://ninomartinez.wordpress.com/2008/09/09/apache-wicket-javascript-integration
: Dont forget to check the video out if you have the time

http://apache-wicket.1842946.n4.nabble.com/Best-way-to-insert-inline-Javascript-td1930869.html#a1930870

..the first link + video is also a good explanation!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Passing-raw-value-to-html-tp2302502p2302555.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Passing raw value to html

2010-07-26 Thread Arjun Dhar


Lots of dynamic stuff?

If you have lots of dynamic stuff you can use a texttemplate to interpolate
your variables with it works really smooth, heres an example:


...
HashMap variables = new HashMap();
variables.put(alert, helloworld);
TextTemplate textTemplate=new TextTemplate();
textTemplate.interpolate(variables);
String js= textTemplate.asString();

…

corrosponding java script, notice the template signature ${…}

alert(${alert});

So above code will produce a javascript string ‘alert(“hello world”)’ very
useful.


 Thats in the first link I showed you; helps you put variables in
whatever markup you want. Am sure there are other approaches also, but have
a look before you think its not meant for you.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Passing-raw-value-to-html-tp2302502p2302561.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Integrating Wicket with Dojo/Jquery/Dwr/Ext Js

2010-07-28 Thread Arjun Dhar

This is more a question than an opinion.

Wicket is a View first framework, and also has the cleanest separation
between Markups and Code that I have seen so far.

I think What Scripting technology one uses should anyway never be tightly
coupled with whats on the server. I keep seeing questions on Mobile device,
JQuery etc. In design people should just focus on bare minimal to connect
the two and avoid strong coupling. (just enough to trigger events and pass
data)

So in a way questions specific to How wicket supports mobile devices, or
XYZ Scripting framework in the markup are not really relevant.

Would that be a fair way of thinking? ..or am over philosophizing this? :)
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Integrating-Wicket-with-Dojo-Jquery-Dwr-Ext-Js-tp2304474p2305142.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Closing of meta tags

2010-07-28 Thread Arjun Dhar

For some reason I'm getting what you want:

titlePage 2/title
!-- The following injected dynamically --
meta name=keywords content=This is picked from
classpath:Page2.properties/


My wicket.version1.4.8/wicket.version
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Closing-of-meta-tags-tp2305127p2305215.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



AutoLinkResolver WARNINGS

2010-08-20 Thread Arjun Dhar

Hi,I have my markups in another folder and am mounting static pages via a
generic template (so I don't have to use a new class for every static page).
The Static pages are in a Common template, that uses a common menu to
navigate and uses wicket:link to get the correct link from Wicket.

Works great; except I see the following in the log, which concerns me. I'd
like to suppress the cause of the log:

WARN  - AutoLinkResolver   - Did not find corresponding java class:
com.mysite.site.pages.templates.static_page_name


Code:
==
 In my extension of WebApplication.init() I have:

mount(new MixedParamUrlCodingStrategy(
/static, GenericStaticPage.class, new 
String[]{pageId} ));


I also have getResourceSettings().setResourceStreamLocator with the
following:
(to direct the location to the markup files: standard stuff)

public ResourceStreamLocator getFileResourceStreamLocator(final
ServletContext sc) {
final IResourceStreamLocator defaultLocator =
super.getResourceSettings().getResourceStreamLocator();
return new ResourceStreamLocator(){
@Override
public IResourceStream locate(final Class? clazz, final String
path) { 
String derivedPath = /html +
path.replaceFirst(com/mysite/site/pages, ); //TODO: Cleanup!

try {
URL url = sc.getResource(derivedPath);
if (url != null) {
log.debug([getFileResourceStreamLocator.locate]
derivedPath =  + derivedPath);
return new UrlResourceStream(url);
}
} catch(MalformedURLException e) { }

log.debug([getFileResourceStreamLocator.locate] default
path =  + path);
return defaultLocator.locate(clazz, path); //Use default
locator
}
};
}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AutoLinkResolver-WARNINGS-tp2332181p2332181.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: AutoLinkResolver WARNINGS

2010-08-22 Thread Arjun Dhar

Maybe related; but my real issue was different.

So I was mounting pages on a different path. It seems wicket:link uses
that AutoLinkResolver stuff and does not keep up with mount changes. So it
was not able to resolve the links on my Markup due to the changed mount
points  resource locator changes (in WebAppplication)

Am not sure if this is a bug, but if I make changes in my mount's in
WebApplication, I'd expect wicket:link to keep up. 

On the positive side I don't needwicket:link so my markups are now cleaner
as my Application understands the URL's directly; which also gets rid of the
warnings.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AutoLinkResolver-WARNINGS-tp2332181p2334613.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Dynamically invoke a page object (Reflection?)

2010-09-01 Thread Arjun Dhar

Use setResponsePage(newPageClassName(params));
params depends on the Constructor of the WebPage class extension.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dynamically-invoke-a-page-object-Reflection-tp2402302p2403066.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Intercept Wicket Parsing

2010-09-12 Thread Arjun Dhar

Hi,
 I want to understand how to intercept the Wicket markup Parser *in a clean
way*

I'm aware of org.apache.wicket.markup package. There is XMLPullParser,
MarkupParser, Filter. I like the look of using Markup but surprisingly the
WicketFilter directly uses XMLPullParser (looks more like a hack than a
clean approach).

So a good way to explain it would be a example code for something like:
Default Content. To make it work one needs a label or component called
component supplying the model to render the content. But, say we want to
intercept this so that if no component is available the default markup shows
else it picks it from a DataSource.
NOTE: The Use Case here is a weak example, I really don't care about the Use
case itself but more about how to use a parser to solve an example as above.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Intercept-Wicket-Parsing-tp2536131p2536131.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Java in CMS arena,..wicket to lead the way?!

2010-09-15 Thread Arjun Dhar

Summary:: 
This conversation is about Java in the CMS space, comparison to PHP and is
there a future to reduce turn around time with Java. Are we as a community
too elitist to be stuck on masturbating on frameworks rather than solutions
that affect direct outcome? ..and then technically I've centered this around
Brix  wicket.


Hi,
 I've been exploring lot of Java CMS solutions and also frameworks. BRIX,
Alfresco I feel are good for different reasons.

From a Web framework point of view, I feel Wicket  I guess Sling  cut the
mark pretty well (not much experience yet with Sling).

However, with Java Community the solutions (beyond framework) finish is not
comparable to the likes of PHP giants like Drupal, Wordpress etc. I operate
in the small business market a lot , and this really hurts. I really feel
the Java.

With earlier version of Java it would get tedious and too boilerplate to
produce anything quickly fast. But with the advent of scripting languages
galore, be it Server JavaScript, Groovy, Scala ... and so many wonderful
frameworks we have not taken it to the next level to producing quality CMS.

Brix apparently will not be evolved further. which is fine; for its intent
it does a good job but what about taking this to the next level. Also,
problem with most CMS is they are content centric (ok hence they are called
CMS) may seem dumb at a glance. 
..but I dont want my business model to go into a JCR repository. Perhaps the
intent of the site is to reflect the actual product  business model in a
neat way with WebDav. Lets call it PMS (hah) for lack of a better
abbreviation. Also the ability to customize the admin module to give a
Product centric view instead of Content centric view. This allows for
greater analytic s and also then using java as an integration platform to
integrate the business model with infinite things at the back end with
pluggable extensions.

I liked BRIX for many reasons. Am wondering if people are thinking about
what I mentioned above ..also if we can take Brix further (not core) but by
adding extensions and delivering a quality complete solution that could
rival something like Drupal in the near future ...or maybe eventually!


..sorry i don't have my own Blog. You see WordPress is in PHP *wink hehe.
Get the point?! :)


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-in-CMS-arena-wicket-to-lead-the-way-tp2541542p2541542.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Java in CMS arena,..wicket to lead the way?!

2010-09-16 Thread Arjun Dhar

Earlier I had written it off, but on you suggestion I am taking a fresh look
at it. It seems well supported and documented. Am studying it... will get
back on my findings. thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-in-CMS-arena-wicket-to-lead-the-way-tp2541542p2543363.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Java in CMS arena,..wicket to lead the way?!

2010-09-17 Thread Arjun Dhar

@Brian - 

but there's a lot of fragmented development and not a lot of investment
going back in. 
--- yes, this is what I sense. I'm not even aware of the Brix community
unlike Wicket which is more active. If you see the Brix architecture page i
put some comments but Looks pretty dead which is pretty de-motivating.

I would challenge you to create needs in the core by demonstrating those
needs 
--- No, I dont think the core needs to be changed as such, Simple is better
 should remain preserved. However we can upgrade the Wicket dependencies
from time to time? :) ?!
I ALSO like the idea it does NOT have a custom workflow etc built into core,
coz I'm a fan of Drools work flow  Rules Engines to allocate business logic
and workflows; Apache Camel  Spring Integration.

If you are worried about people having access to your assets
--- No sir, the more the merrier. I'd love to get into it once i'm sure to
commit time  effort.

From a using for commercial web sites perspective, issue is from a UI
perspective the Admin module has a poor finish compared to Alfresco and say
Hippo; its not just the CSS but the general layout sucks. ...I cant sell a
website  present that to the customer without significant effort. Something
I can look to contribute on.

thank you.


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-in-CMS-arena-wicket-to-lead-the-way-tp2541542p2543378.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Java in CMS arena,..wicket to lead the way?!

2010-09-17 Thread Arjun Dhar

@Richard

Apache Roller is a Java based blogging system, if you're looking for
something. 
--- I've used Roller and like it a lot functionally. But am circumspect of
its integration capabilities with other CMS, and also integration of its
Admin module to be a plugin-component into another CMS instead of a stand
alone system. Their Wiki isnt that insightful to tell me all this. So beyond
functionally what it does stand alone I'd like to understand its integration
capabilities more. If you guys know and are doing something in Lenya for
that, please share it. I'd love to understand first..and then possibly
contribute about things I've mentioned.

I think the basic point it to allow *integration*, scripting, plug-in 
capabilities and not have to provide everything under one roof. I like BRIX
for this reason; simple CORE and extend anywhere.. but it suffers from other
things I've mentioned above. Will give Leya a shot too.

thanks a lot.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-in-CMS-arena-wicket-to-lead-the-way-tp2541542p2543399.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and Spring Security question

2010-09-22 Thread Arjun Dhar

I have not gone too deep but @ a superficial level, following observations:
1. I dont see a ClassNotFound Exception. The Exception is NOT saying it
Cannot find it in your Classpath!

spring-security-web classes are not available dot not mean ClassNotFound.
Unfortunately I dont know what it exactly means, but it is not what you are
assuming, so I'd look beyond CLASSPATH for starters.

2. It clearly says Configuration problem: ;... Spring Security use Filter
Chain Maps. It is suggesting the issue is in the configuration in the chain
map. 

I think you are biasing your issue on ClassNotFound when that is not even
the issue. I'd start looking at the XML that defines your Spring Security
Context for starters.


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Spring-Security-question-tp2549867p2549883.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: instantiate panels in a spring bean

2010-10-01 Thread Arjun Dhar

Hey dont mean to arge here  but Why not? 

You can get beans in PROTOTYPE scope (does not have to be re-usable; this
aspect of Spring is all about IOC) and leverage IOC to inject panels rather
than hard wiring them in the code. I like the idea. fachhoch  can you
please paste the code, I'd like to work on the problem.

I'm a dud in Wicket compared to other geniuses around here but I'd like to
have a crack if you dont mind.
Note: Ensure your beans are PROTOTYPE not SINGLETON (default); since you
really should not retain references to Wicket components ...as Igor
mentioned in a recent post!

thanks.



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2952155.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: instantiate panels in a spring bean

2010-10-01 Thread Arjun Dhar

...lol I just realized both you guys have over 200 posts. haha ..well i'd
still like to have a crack at the problem :)
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2952156.html
Sent from the Users forum mailing list archive at Nabble.com.

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




Re: instantiate panels in a spring bean

2010-10-02 Thread Arjun Dhar

https://cwiki.apache.org/WICKET/spring.html

..As per my understanding @SpringBean is to inject context services (like
DAO's etc ..assumed to be SINGLETON's) and puts them in a ThreadLocal to be
available to Wicket Components. Its a convenient way to provide Context to
all Wicket components. The purpose seems clear Context sharing of
services.
I'd further assume these services to be stateless and also Non-Serializable.
Since its objects in a ThreadLocal, I guess one can also use it for
injecting components in theory. ..I've never tried it that way, if you have
please let me know.

Injecting components on the other hand is about Injecting serialized objects
(which should be replicatable across in a cluster; unlike your DAO's). ..ok,
lets not over complicate it by going that far. But from the problem
described it seems he wants to Inject Components not Services. ..and I
think that is fair.

My point is clear, if you want to inject components, then those have to be
in PROTOTYPE scope. @SpringBean is just an annotation for convenience but
all the documentation  examples point to it being convenient to provide
Inject Services to wicket components not Injected components. 

One is Stateless the other Stateful and serializable, I think conceptually
that is a big difference.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2952221.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: instantiate panels in a spring bean

2010-10-02 Thread Arjun Dhar

The point is that it's silly to use the init()   --- I agree! I never
mentioned init() :)
I think we were on different pages. I thought you were asking him Why would
you want to use spring to inject components ..you had a very short reply to
the intiial question :) . I missed the point that it was on the basis of
init() that you were opposing what he was doing. 

I understand your point.


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2952240.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: instantiate panels in a spring bean

2010-10-02 Thread Arjun Dhar

I think there has been a huge ball of confusion here created on my part due
to certain concepts i was focused on. The reference to  ThreadLocal
originated from here:

https://cwiki.apache.org/WICKET/spring.html
Application Object Approach
... Wicket allows you to provide a custom factory for creating this object,
the wicket-contrib-spring project provides such a factory
(SpringWebApplicationFactory) that, instead of creating an instance, pulls
it out of the spring application context. Wicket keeps the instance of the
application object in a threadlocal variable and provides various helper
methods in components to get to it, so it is easy to retrieve dependencies
in wicket components

So the ApplicationObject is bound to the ThreadLocal and I think the Spring
Dependencies are bound to the Applicaiton Object, so I made a logical
connection there.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2952889.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: instantiate panels in a spring bean

2010-10-03 Thread Arjun Dhar

May or may not be consequential, why is myInit not public? 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2953812.html
Sent from the Users forum mailing list archive at Nabble.com.

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



GridView for A-Symmetric tables - issues

2010-10-04 Thread Arjun Dhar

Hi,
 I'm playing with the following table/grid structure:

+--+-+-+
|  | | |
|  +-+-+
|  | | |
+--+-+-+
|| | | |
+--+-+-+ 

..where the top-left cell spans 2 rows  2 columns.

The GridView class in the protected void addItems(IteratorItemT items)
method has a do {...} while (); loop. This does not  respect the number of
rows specified when calling GridView Object.setRows();

..On overriding this class and making the loop restrict to Number of rows
strict, on Pagination the following issues come:
1. [SOLVED] The DataProvider, the public Iterator? extends Product
iterator(int first, int count) needs to be adjusted to accommodate that
first will correspond to an adjusted value (less my the number of cells
merged.
Example: In a Table where one call is 2x2. Then 1 cell occupies 4 cells.
Therefore Num of merged cells = 3. That means This table can accommodate 2
less items from the Dataprovider.
I'm able to fix this also by adjusting the calculation to calculate the
actual first

2. [NOT SOLVED YET] The Size the DataProvider @Override public int size()
returns cannot change to other than the actual size. But the Paginator stops
short and the remaining Data Items are cut off.

..Am not sure where the issue is conceptually: Grid, paginator,
DataProvider.


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/GridView-for-A-Symmetric-tables-issues-tp2953859p2953859.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: GridView for A-Symmetric tables - issues

2010-10-08 Thread Arjun Dhar

Hi,
 I've solved this problem by writing a new implementation of DataViewBase.
GridView did not seem appropriate to simply extend due to a few reasons. (It
assumes Symmetry for the most in its code).

This Code can merge areas within the GRID and extract data from the data
model accordingly and can be further customized for Assymetric Grids.

I want to sumit this code for review and then into the code base. What is
the process?
Note: This code was over 1.4.9 so I'll take the latest update to see if
there are any changes I need to factor in, but in the mean time lemme know!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/GridView-for-A-Symmetric-tables-issues-tp2953859p2968709.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Dunamic neted List Views

2010-10-10 Thread Arjun Dhar

Hi,
 I just developed a Menu; that is nested many levels. At the point of
rendering in my code I'm slightly confused. ok, Let the code talk:

(The following code assumes a domain model with MenuItemState which is
hiararchial has children. And each child node is a MenuItemState. The
child can either have null or further children.
The renderMenu() is called by a Panel.)


@Override
public void renderMenu() {
IModelMenuItemState modelState = getState();
MenuItemState state = modelState.getObject();
//Add all menu state objects as Ordered List / sub lists.

add(new ListViewMenuItemState(menuItems, 
state.getChildren()) {
@Override
public void populateItem(final ListItemMenuItemState
wrappedChildComponent) {
final MenuItemState childItemState =
wrappedChildComponent.getModelObject();
wrappedChildComponent.add(new Label(name,
childItemState.getMenuItem().getName()));
wrappedChildComponent.add(new 
StaticImage(img, 
new 
Model(childItemState.getMenuItem().getImg())) );
wrappedChildComponent.add(new 
StaticImage(rollOverImg, 
new 
Model(childItemState.getMenuItem().getRollOverImg())) );
wrappedChildComponent.add(new Label(selected,
Boolean.toString(childItemState.isSelected(;
}
});

.. now I can add the children like:

wrappedChildComponent.add(new
ListView(nestedItemsFor_+childItemState.getMenuItem().getName(), 
 childItemState.getChildren() {...} );


Code: Current markup code::

table
tr wicket:id=menuItems
td/td
td /td
td /td
td /td
/tr
/table

..but how will the above markup code generate the name for the nestedItem
Component  know if the item has children. Should I just inject markup
mylsef or using ListView can achieve this cleanly?
I want to introduce nesting from my Model into the markup using ListView!

Ideas?! (I dont wanna keep posting answers to my own questions so quick
replies would help :) ) heh

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dunamic-neted-List-Views-tp2970644p2970644.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Dunamic neted List Views

2010-10-10 Thread Arjun Dhar

!...@#$ The subject was meant to be Dynamic Nested List Views! Apologies
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dunamic-neted-List-Views-tp2970644p2970646.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Dunamic neted List Views

2010-10-11 Thread Arjun Dhar

ok as usual I bet myself to it, here is the answer :

Basically use a ListView over a ListView!


@Override
public void renderMenu() {
IModelMenuItemState modelState = getState();
final MenuItemState rootState = modelState.getObject();

//Add all menu state objects as Ordered List / sub lists

//Model MenuItems per Level (layer) 
ListListMenuItemState menuLayers = new
ArrayListListMenuItemState();   
{
MenuItemState state = rootState;
do {
menuLayers.add(state.getChildren());
state = menuHelper.getFirstFertileChild(state);
} while(state != null); //Keep going (DFS) till Menu 
node bares no child
}

//Render:
final ListViewListMenuItemState multiLevelMenuContainer = 
new
ListViewListMenuItemState(menuContainer, menuLayers) {
@Override
protected void populateItem(final 
ListItemListMenuItemState
menuLayerComponent) {
//Add levels layer by layer (each layer in a 
different div on mark-up.
Items in same layer get same styling
//TODO : Work on mark-up styling for final 
render details.
menuLayerComponent.add(new 
ListViewMenuItemState(menuItems,
menuLayerComponent.getModelObject()) {
@Override
public void populateItem(final 
ListItemMenuItemState
childMenuComponent) {
final MenuItemState 
childItemState =
childMenuComponent.getModelObject();

childMenuComponent.add(new Label(name,
childItemState.getMenuItem().getName()));

childMenuComponent.add(new StaticImage(img, 
new 
Model(childItemState.getMenuItem().getImg())) );

childMenuComponent.add(new StaticImage(rollOverImg, 
new 
Model(childItemState.getMenuItem().getRollOverImg())) );

childMenuComponent.add(new Label(selected,
Boolean.toString(childItemState.isSelected(;
}
}); 
}

};
add(multiLevelMenuContainer);
}


Markup code looks like this:

table wicket:id=menuContainer border='1'
trtd
ul wicket:id=menuItems
li/li
li /li
li /li
li /li
/ul
/td/tr
/table

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dunamic-neted-List-Views-tp2970644p2989287.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Link onclick setMarkupId doesn't work

2010-10-17 Thread Arjun Dhar

I was about to complain about the same thing. I also use
SimpleAttributeModifier to get around the issue.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-onclick-setMarkupId-doesn-t-work-tp2998815p2998836.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Link onclick setMarkupId doesn't work

2010-10-17 Thread Arjun Dhar

BTW before I get into a ball of mis understandings; I'm just complaining
about setMarkupId here in general :)
It works with MarkupContainers like with div tag etc. But not with td, li
etc. id is an attribute that can represent any DOM element to my mind,
hence the complaint.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-onclick-setMarkupId-doesn-t-work-tp2998815p2998838.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Using JavaScript to check a field by id, when Wicket will change the id

2010-10-20 Thread Arjun Dhar

In my opinion; wicket doesn't mess with the id attribute till you tell it
to. There are multiple means to change the id. but by default the id is not
touched.

Note: wicket:id is not the same as id of the HTML DOM element. So if you
define an id in the markup it should stick.

As per your quote::
because if the field is controlled by Wicket, the id will change.  -- You
can choose what attributes are controlled by wicket. its not like an all or
nothing scenario.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-JavaScript-to-check-a-field-by-id-when-Wicket-will-change-the-id-tp3004266p3004281.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Using JavaScript to check a field by id, when Wicket will change the id

2010-10-20 Thread Arjun Dhar

@Jeremy : my bad then. 

I've never seen the id's come on their own unless I do setmarkupId(true)  or
add it by SimpleAttributeModifier() or tag.put(id, ...) in
onComponent(Tag). I guess i need to check it out again.

thanks.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-JavaScript-to-check-a-field-by-id-when-Wicket-will-change-the-id-tp3004266p3004324.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: GridView for A-Symmetric tables - issues

2010-10-22 Thread Arjun Dhar

Hi, sorry was really busy with stuff and I didnt no want to put the code into
JIRA or anywhere till I cleaned it out aor matured it enough for the more
senior members to do code review. But who can say No to a thirsty man :))

..so I've made some changes all over but the most important change is in the
following snipped I'm putting here. I've used this extensively and tested it
though to be COMMIT grade I need to do more diligence (it has some TODOs and
isnt very Tidy ATM). Just a Disclaimer. For now here goes :) 

/**
 * Support A-Symmetric Grid Views. A verbatim copy of {...@link GridView} in
most places; except those that required tweaking and were
 * proving weird to override cleanly.
 * 
 * 
 * Issues with {...@link GridView} that make it unfit for extension:br /
 * 
 * The {...@link GridView} class assumes Symmetry of Rows x Cols. In addition
due to certain
 * non standardized API methods being final or private the setRows() 
setCols() have been overriden
 * completely to circumvent the use of {...@link GridView#updateItemsPerPage}
(which uses internalSetRowsPerPage)
 * , the name of the method is not appropriate and in the future should be
able to override it with 
 * asymmetric implementations. (perhaps they had that for standard Loop
scenarios and re-used the same method so the name stuck!)
 * 
 * Also, columns  rows is private. If getters  setters of columns  rows
were simple bean methods those could have been used.
 * But since they involve complex logic that requires visibility of the
variables this too becomes unfit for consumption.
 * 
 * @author Arjun Dhar
 *
 * @param T
 */
public abstract class AssymetricGridViewT extends DataViewBaseT {
 
 

/**
 * The Grid here is not a regular Symmetrical Grid; hence overriding
 * certain aspects of Grid. To know which Item is part of Merged space
 */
abstract protected boolean currentCellMerged(int currentRow, int
currentCol);

/**
 * The Grid here is not a regular Symmetrical Grid; hence overriding
 * certain aspects of Grid. To know which Item is part of Merged space
and 
 * should not pick content from the specified {...@link IDataProvider}.
 */
abstract protected boolean currentCellEmpty(int currentRow, int
currentCol);

   /**
 * NOTE CHANGE : Accounts for Assymetrical Structures
 * @param items as {...@link Iterator  Item  T  }
 */
@Override
protected void addItems(IteratorItemT items) {
if (items.hasNext())
{
final int cols = getColumns();

//int row = 0;
//do - original impl does not restrict on basis of rows 
but item length
//allRows   : Boolean type, if All rows from
DataProvider are demanded. Like View All scenario
for (int row=0; ( (!allRows  rowgetRows()) || 
(allRows 
items.hasNext()) ); row++)
{
// Build a row
Item? rowItem = newRowItem(newChildId(), row);
RepeatingView rowView = new 
RepeatingView(cols);

//Added Attribute Modifiers/Decorators : TODO: 
Abstract out perhaps
rowItem.add(new SimpleAttributeModifier(id, 
productRow+row));

rowItem.add(rowView);
add(rowItem);

// Populate the row
for (int col = 0; col  cols; col++)
{
final ItemT cellItem;
if (items.hasNext() 
 !currentCellEmpty(row, col)) { 
//Line Added--- Change
cellItem = items.next();
if (cellItem != null) {
//TODO: hack: Due to 
assymetrical nature, the pagination count is
limiting it to the Symmetric
//Hence certain items 
are getting trimmed towards the end. The Data
Model will include nulls to match
//Symmetry. Those nulls 
will be ignored by the implementation.

//Attribute 
Modifiers/Decorators Added
customizeCell(cellItem, 
row, col); //Just custom decoration if
required

if 
(currentCellMerged(row, col

Resource caching, Deployment Mode Re-visited

2010-11-04 Thread Arjun Dhar

Hi,
 I'm trying to understand wickets ability to cache and how to optimize of
the deployment mode etc.

I wanna keep it in production (DEPLOYMENT MODE). However, when a resource is
uploaded (like an image or a CSS) I want the system to allow me to refresh
that particular resource.

Some of the resources are added via the Wicket Code dynamically and some are
references via the Markup. Is there a difference in how these two are
treated?

In Reference[2], at the end of the post a guy mentioned about what about
activating JMX and clearing the cache with it's help ..that may be cool?
..or even via a API Call.


References:
1. https://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment
2.
http://apache-wicket.1842946.n4.nabble.com/Refresh-resources-in-deployment-mode-td1867352.html

Thoughts and further reading appreciated!

Thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Resource-caching-Deployment-Mode-Re-visited-tp3027244p3027244.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Resource caching, Deployment Mode Re-visited

2010-11-07 Thread Arjun Dhar

My resources are images. To be accurate I define them by adding a Custom
WebComponent in my WicketCode:
http://developme.wordpress.com/2010/05/25/wicket-image-tag-linking-to-an-external-resource/
(The blog suggests the use of it for an external component. My images are a
mixed bag ..some local F.System and some on an external system so I went
with this)

..but the problem is that when I display the images and I then want to
change the ones on the local F.S, the JVM seems to have a handle on the
file-system (F.S) for that image and replacement becomes an issue (I have
not understood really why). 

Can you suggest a better approach? ..or a way that I can ensure that i can
change the image.

thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Resource-caching-Deployment-Mode-Re-visited-tp3027244p3031498.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Need Wicket Book

2010-11-11 Thread Arjun Dhar

I've been playing with Wicket for a while now and i think in certain areas
(specially internal architecture) i need to still connect the dots at a
larger scale so was researching books.

Wicket In Action  Enjoying Web Development with Wicket  seem to emerge.

Wicket In Action -- Seems more conceptual (Deeper understanding)
Enjoying Web Development with Wicket -- For practical programming and
explaining existing components etc.

Anyone who has read both?
As a test I did not find the concept of Versioning mentioned in the TOC
atleast.

..and how come Igor hasn't written a book?, his answers are never more than
2 lines (except when he is pissed off)  heh :)

.anyway I dont mind buying both but one has to also read  them ;) [Phew i
prefer to Hack and try]
Any suggestions ?

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Need-Wicket-Book-tp1888069p3037727.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Whats the best way to prevent handle 404?

2010-11-22 Thread Arjun Dhar

Hi,
 Q1) Using mount paths can we prevent 404 by using RegEx? Is there is a
better way?

 Q2) Instead of preventing 404, if we go reactive , how can we trap it?
(I was unsuccessful playing with WebRequestCycle)

Q3) Part of my application is User facing, part Admin. For exceptions
depending on which page it came I want to redirect to appropriate Error
Page. I tried doing this in the Application level, (where mounts are
specified) but is there a way to control/delegate this at Template level, so
I can section how exceptions are handled?

..Some examples or 2 , 3 lines of code would help. Maybe I'm doing it wrong.

thanks,
Arjun
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Whats-the-best-way-to-prevent-handle-404-tp3053827p3053827.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Whats the best way to prevent handle 404?

2010-11-22 Thread Arjun Dhar

I think Q1)  Q2) could have been answered by:
http://apache-wicket.1842946.n4.nabble.com/How-to-catch-all-404s-Page-Not-Found-and-reroute-to-a-Page-or-strategy-td1862982.html


However the link provided by the replier is not working   :(
Somewhere I saw the use of RegEx in mount Paths but I cant seem to find it.

Regarding Q3) I think http://blog.jteam.nl/2010/02/24/wicket-root-mounts/
looks promising,along with a recent thread (Virtual contexts):
http://apache-wicket.1842946.n4.nabble.com/how-to-have-one-app-at-multiple-root-contexts-td3054122.html
..but thats all 1.5 

Anyway, if anyone got a ready made ref to answers for Q1)  Q2) would
appreciate it.

thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Whats-the-best-way-to-prevent-handle-404-tp3053827p3054830.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to catch all 404s (Page Not Found) and reroute to a Page or strategy

2010-11-22 Thread Arjun Dhar

Hi that link seems to be deleted. Can you post it again if it aint too much
trouble.
thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-catch-all-404s-Page-Not-Found-and-reroute-to-a-Page-or-strategy-tp1862982p3054834.html
Sent from the Users forum mailing list archive at Nabble.com.

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



setVersioned setStatelessHint

2010-11-24 Thread Arjun Dhar

Hi,
 if I have BookMarkable pages and they are pretty much stateless, does it
buy me much to do:

setStatelessHint(false); for every component? 
imo Adds a bit of verbosity to the code; though must be a reason why it
exists.

Please advice best practice

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setVersioned-setStatelessHint-tp3057412p3057412.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Ajax Panel Update

2010-11-24 Thread Arjun Dhar

Hi,
 I have a Tree (representing a product line) and an adjacent Panel
representing Product listing within a category/line.

On click of the Link the Panel updates. I have the following code, all works
except am not sure how to go about refreshing the Panel with updated
DataModel:

... In following code: See  //TODO: Not sure how to update Panel with
latest Product. So on click I am getting the correct object in Prod
(ProductReference). However I'm failing to translate that into updating the
Panel Model  Refreshing the Panel on UI more importantly.


@Override
protected final LinkTree createLinkTree(String id, TreeModel treeModel) 
{
return new LinkTree(id, treeModel) {
//node = Name of Link
protected final void onNodeLinkClicked(Object node, 
BaseTree tree,
AjaxRequestTarget target) {
Object o = 
((DefaultMutableTreeNode)node).getUserObject();
if (o instanceof ProductReference) {
ProductReference prod =
(ProductReference)((DefaultMutableTreeNode)node).getUserObject();
log.info([createLinkTree]  + prod);

targetUpdatePanel.setVisible(true);
//TODO: Not sure how to update Panel
with latest Product
}
}
 ...


(targetUpdatePanel.setVisible(true); is used because initially the Panel is
blank when nothing is selected  placeholder markup is used -- FYI)

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Panel-Update-tp3057421p3057421.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Ajax Panel Update

2010-11-24 Thread Arjun Dhar

Thanks Jc, I employed that.

In addition, the model was inserting a DataTable that was fetching its data
from a DataProvider. So it was necessary to refresh not only the model but
the DataTable; so I separated the initialization of the DataTable as
follows:


/*
 * Separating the initialization of the DataTable, as it will be 
updated by
Ajax Requests
 */
public void onInitialize() {
super.onInitialize();
Component dataTable = get(productTable);
if (dataTable != null) {
remove(dataTable);
}
add(getProductListing(productTable,
(ProductReference)getDefaultModel().getObject()));
}



..and in the code mentioned pervious for the TODO: now I have:

targetUpdatePanel.setVisible(true);
targetUpdatePanel.modelChanging();
targetUpdatePanel.setDefaultModel(new 
Model(prod));
targetUpdatePanel.modelChanged();
targetUpdatePanel.onInitialize();
target.addComponent(targetUpdatePanel); 


..and It works. Maybe it can be more efficient  clean but its worked out. 
Thanks !
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Panel-Update-tp3057421p3057739.html
Sent from the Users forum mailing list archive at Nabble.com.

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



java.lang.NoClassDefFoundError: org/apache/wicket/util/lang/WicketObjects

2010-11-25 Thread Arjun Dhar

Hi,
 I'm on wicket (core  extension) 1.4.12   (Wicket Spring  IOC 1.5-M1).

On the following scenario I get the error trace :

java.lang.NoClassDefFoundError: org/apache/wicket/util/lang/WicketObjects
at
org.apache.wicket.spring.SpringBeanLocator.getBeanType(SpringBeanLocator.java:222)
at
org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:243)
at
org.apache.wicket.proxy.LazyInitProxyFactory$CGLibInterceptor.intercept(LazyInitProxyFactory.java:317)
at
WICKET_com.neurosys.pms.site.wicket.model.ProductSortableDataProvider$$EnhancerByCGLIB$$b2f1a79d.detach(generated)
at
org.apache.wicket.markup.repeater.data.DataViewBase.onDetach(DataViewBase.java:150)
at
org.apache.wicket.extensions.markup.html.repeater.data.grid.AbstractDataGridView.onDetach(AbstractDataGridView.java:159)
at org.apache.wicket.Component.detach(Component.java:1221)
at
org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1680)
at org.apache.wicket.Component.detach(Component.java:1243)
at
org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1680)
at org.apache.wicket.Component.detach(Component.java:1243)
at
org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1680)
at org.apache.wicket.Component.detach(Component.java:1243)
at
org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1680)
at org.apache.wicket.Component.detach(Component.java:1243)
at
org.apache.wicket.request.target.component.PageRequestTarget.detach(PageRequestTarget.java:80)
at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1122)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1462)
...
...


I have a DataTree, (mentioned in
http://apache-wicket.1842946.n4.nabble.com/Ajax-Panel-Update-td3057421.html
- Ajax Panel Update). On clicking a node, it refreshes an adjacent Panel
(Lets call it PRODUCT LISTING).

On that Adjacent panel, when I click on an entry It create a popup using
pseudo-code :

Link link = new BookmarkablePageLink (id, productDetails.class,
params); 
link.setPopupSettings(PopupSettings Object);


On onInitialize of the panel PRODUCT LISTING ; uses a DataProvider that
detaches. It is here where this exception gets generates. As is evident from
the Trace.

I found that org/apache/wicket/util/lang/WicketObjects is not there in any
of the Wicket/Wicket-Spring JAR's I have. Any clues on this?

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-lang-NoClassDefFoundError-org-apache-wicket-util-lang-WicketObjects-tp3058851p3058851.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: java.lang.NoClassDefFoundError: org/apache/wicket/util/lang/WicketObjects

2010-11-25 Thread Arjun Dhar

Oh! ..Coz I'm silly to have assumed that the Spring+IOC versioning was
somehow independent of Wicket Core+Extensions and until now it never bit me.

Thanks for pointing it out :)
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-lang-NoClassDefFoundError-org-apache-wicket-util-lang-WicketObjects-tp3058851p3058870.html
Sent from the Users forum mailing list archive at Nabble.com.

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



onSubmit sequence call with AjaxFormSubmitBehavior

2010-11-26 Thread Arjun Dhar

On reading some material, it explains that when a Button is within a Form,
the Buttons onSubmit should be called before the Forms onSubmit. (if not
configured otherwise). Which makes perfect sense.

However; when I add AjaxButton to the Form, and have it within the Form. I
see the order of calling reversed by default implementation. 

As I interrogated, it is how the code is written in AjaxFormSubmitBehavior. 
Notice: getForm().getRootForm().onFormSubmitted() called before
onSubmit(target); -- See code pasted from that class below. being a pure
Ajax call the form is never actually submitted to it allows it to carry on
to the onSubmit(target);.

The question is, why is there a reverse in the concept?

Is it because target is loosely associated with Any target and we dont
care if it belongs to the form and hence is a third grade citizen? (hence
comes after the main forms onSumit()) ? ; that makes sense imo thinking
aloud.

(since method is not final I dont think this will ever be an issue but I
just want to confirm the thought process)


/**
 * 
 * @see
org.apache.wicket.ajax.AjaxEventBehavior#onEvent(org.apache.wicket.ajax.AjaxRequestTarget)
 */
@Override
protected void onEvent(AjaxRequestTarget target)
{
getForm().getRootForm().onFormSubmitted();
if (!getForm().isSubmitted())
{ // only process the form submission if the form was actually 
submitted
- needs to be
// enabled and visible
return;
}
if (!getForm().hasError())
{
onSubmit(target);
}
if (getForm().findParent(Page.class) != null)
{
/*
 * there can be cases when a form is replaced with 
another component in
the onsubmit()
 * handler of this behavior. in that case form no 
longer has a page and
so calling
 * .hasError on it will cause an exception, thus the 
check above.
 */
if (getForm().hasError())
{
onError(target);
}
}
}


Thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/onSubmit-sequence-call-with-AjaxFormSubmitBehavior-tp3061241p3061241.html
Sent from the Users forum mailing list archive at Nabble.com.

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



mount QueryStringUrlCodingStrategy issue when coming via Apache

2010-12-02 Thread Arjun Dhar

Hi,
 I'm getting a wierd issue.

Have this code: mount(new QueryStringUrlCodingStrategy(admin/login.html,
login.class));
So there is an Admin module for our Web App. All Login  Admin pages are
distinctly relative to admin/.

On tomcat this works fine, but when the request comes via Apache I get a
404.

I have also overridden public IResourceStream locate(final Class? clazz,
final String path) {} so that the Package based names are translated to a
folder location for HTML markups outside the classpath.

Any ideas?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/mount-QueryStringUrlCodingStrategy-issue-when-coming-via-Apache-tp3069010p3069010.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: mount QueryStringUrlCodingStrategy issue when coming via Apache

2010-12-04 Thread Arjun Dhar

The issue seemed to be only on my Host Providers Servers. On my local APache
- tomcat setup I did not get this issue.

However, because its the Hosting that counts and I do not have much access
into their environment, i changed the URL structure from
site/admin/login to site/admin.login and that solved the issue.

The best i got; just incase anyone ever faces this issue.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/mount-QueryStringUrlCodingStrategy-issue-when-coming-via-Apache-tp3069010p3072412.html
Sent from the Users forum mailing list archive at Nabble.com.

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



FeedbackPanel messages in a Loop (Dynamic Form)

2011-01-08 Thread Arjun Dhar

Hi,
 I have a form where the number of fields are not fixed so have a Loop where
i add the fields. All these are mandatory. In a loop, your field id is keeps
the same AFAIK. So when there is a validation error the standard message
mentions the component id ..which isnt good enough in a loop, like this:


ListView horizontalSegments = new
ListViewHorizontalSegment(horizontalSegments, hsegs) {
@Override
protected void populateItem(ListItemHorizontalSegment 
item) {
String key = 
item.getModelObject().getDisplayName();
item.add(new Label(name, key));
item.add(new NameableTextFieldDouble(value, 
new 
Model(getMeasurementValue(mp.getHorizontalMeasurements(),
item.getModelObject())), 
Double.class,
MarshalUtils.toAlphaNumeric(item.getModelObject().name()))
.setRequired(true));

}
};
add(horizontalSegments);


When I submit the form and say 5 of them are blank. I get 5 messages saying
Field 'value' is required.
Thats understandable because the FeebackMessage in the FeedbackPanel feeds
of the component ID.

While debugging I see FeedbackMessage apparently maintains some reference to
the 'Reporter'. 
When I look at the code I see a ton of final methods etc, and having some
trouble modifying the method that creates the message. My reporter component
(NameableTextField) knows the correct name.

Can someone provide simple way of overriding that message

thank you.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-messages-in-a-Loop-Dynamic-Form-tp3204893p3204893.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: FeedbackPanel messages in a Loop (Dynamic Form)

2011-01-08 Thread Arjun Dhar

Beautiful; it worked. Thank you
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-messages-in-a-Loop-Dynamic-Form-tp3204893p3205636.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: FeedbackPanel messages in a Loop (Dynamic Form)

2011-01-08 Thread Arjun Dhar

There seems to be another problem.

On error the form values are not retained. The same form also has some
normal fields (outside the loop). The notmal form fields that are NOT in a
loop retain their values (on re-load)

I even removed my own NameableTextField and am using standard  simple
TextField in the above code but its not retaining the values (when there
are errors). 

Am debugging it but in the mean time if someone has an idea or even a did
you try this? please let me know.

P.S: This problem does not seem related to .setLabel(name). Its something
else and has something to do with the components being the loop.

thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-messages-in-a-Loop-Dynamic-Form-tp3204893p3205706.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: FeedbackPanel messages in a Loop (Dynamic Form)

2011-01-08 Thread Arjun Dhar

DOH! (As Mr. Homer Simpson would say)

I forgot about ListView and reuse Items!!

hence by adding this to my loops it worked out:

@Override
public boolean getReuseItems() {
return true;
}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-messages-in-a-Loop-Dynamic-Form-tp3204893p3205716.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: GridView for A-Symmetric tables - issues

2011-01-12 Thread Arjun Dhar

Sorry for such a long delay on creating a JIRA, was trying to earn a living
:)
https://issues.apache.org/jira/browse/WICKET-3327
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/GridView-for-A-Symmetric-tables-issues-tp2953859p3215230.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: What already redirecting error?

2011-01-13 Thread Arjun Dhar

Hi,
 I have a very very Dynamic Form. In the public void onSubmit() {...}, due
to some Change in a Drop Down the entire Form changes.

To keep it simple I just decided to Re-Load the entire page.
but looks like from onSumbit() you cannot call
getRequestCycle().redirectTo(...) or you get the exception:
Already redirecting to '?wicket:interface=:12'. Cannot redirect more
than once.

Frankly, I'd like to replace the Form Components in the OnSubmit() given a
Choice instead of a redirect. But addOrReplace components in the Form doesnt
have any effect. Apparently, only Changing the Model of Components already
added works!

Q1) So for starts whats the best way to re load the page in this case
Q2) Even Better, can I Replace Form elements in onSubmit()? ..or somewhere
close? (This is better as I can use the FeedbackPanel to convey messages
after the form has changed)

thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/What-already-redirecting-error-tp1890181p3216471.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: What already redirecting error?

2011-01-13 Thread Arjun Dhar

DOH! the answer to Q1) was RestartResponseException. As mentioned in the
above post
Am still curious to know the answer to Q2) if someone already knows!

thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/What-already-redirecting-error-tp1890181p3216501.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: multiple feedback panels in same page

2011-01-14 Thread Arjun Dhar

Hey i think this is documented, thats who I got to know.

Basically a 2 step process. You create a Behavior like:

/**
 * This class defines a behavior so that in Feedback (on validation errors)
individual
 * fields can be marked by the markup provided by the {@link
this#getErrorMarkup()}
 * @author Arjun Dhar
 *
 * @param T
 */
public class MarkErrorFieldBehaviorT extends AbstractBehavior {
private static final long serialVersionUID = 1L;

@SuppressWarnings(unchecked)
@Override
public void onRendered(Component component) {
FormComponentT fc = (FormComponentT) component;
if (!fc.isValid()) {
Response response = component.getResponse();
response.write(getErrorMarkup());
}
}

/**
 * Provide HTML markup to mark the error fieldbr/
 * Example: lt;span style='color: red'gt;*lt;/spangt;
 * 
 * @return
 */
protected String getErrorMarkup() {
return nbsp;X;
}
}

..and for your field all you have to do is .add(new
MarkErrorFieldBehaviorDouble()) -- add the behavior to it.

In my case I'm happy with X appearing. Adapt it to put the field name or
whatever text you want!
-Arjun
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/multiple-feedback-panels-in-same-page-tp1886384p3217575.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Changing/Accessing name of ListItem in ListView

2011-01-14 Thread Arjun Dhar

Hi,
 when using a ListView, the name uses the following format to Render. loop
name:index:field id

In onSubmit(..); this is fine if you know the order of the list. However say
if the primary data Structure is a hashmap then its more convenient/elegant
to retrieve by Name. I can change the name of the attribute but Wicket does
not recognize it when one does get(componentId).

Using ListView.getList() I can access the Model, but this does not help
getting the access to the individual components.

Looks like the only way is to use a numberic counter and construct the
Component ID's to access it one my one.

Is there a way to change the component Id ..or perhaps access these by name?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Changing-Accessing-name-of-ListItem-in-ListView-tp3218777p3218777.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Changing/Accessing name of ListItem in ListView

2011-01-15 Thread Arjun Dhar

I was hoping on the lines, where you do get(component id); Wicket returns
the Component.
So if there was a way to customize the nomenclature of what the names of
the fields are in a loop then it would be easy to refer to components via
name directly.

... I can't do [IN CONCEPT] get(additionalFeatures).get(My naming
convention Sub Item component Id).getDefaultModelObject() or something.
-- I was asking if there was any magical way like that.

Not a big deal , I worked around . For the sake of discussion my ListItem is
defined by the following:

ListView additionalFeatures = new ListViewString(additionalFeatures,
additionalFeaturesKeyList) {
...
@Override
protected void populateItem(ListItemString item) {
String key = item.getModelObject(); //Assume 
this to be the Name / Id of
something
item.add(new Label(name, new Model(key)));

String modelKeyName = 
MarshalUtils.toAlphaNumeric(key);
final Feature feature = 
additionalFeaturesMap.get(key);
item.add(new TextArea(value, new 
Model(feature.getValue().toString()))
.setLabel(new 
Model(modelKeyName))
.setMarkupId(key));
}
...
}



What I went with at the end was:

ListView listView = 
(ListView)get(additionalFeatures);
for (int x=0; 
xlistView.size(); x++) {
ListItem 
additionalFeatureField = (ListItem)listView.get(x);

//Now I work
with the ListItem however I want to and derive what I want :)
 ...
}

..Which works also, but not as elegant as I hoped. But I realize its a LIST,
so my expectations are perhaps unjustified and iteration of the list is
logical and inescapable.



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Changing-Accessing-name-of-ListItem-in-ListView-tp3218777p3219010.html
Sent from the Users forum mailing list archive at Nabble.com.

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



TextField Double type introduces commas

2011-01-15 Thread Arjun Dhar

Hi,
 maybe this is really basic but I cant find it documented.
I force a TextFieldDouble.

When it renders, it introducrs commas (,)  like 45000 = 45,000
I wanna get rid of the commas!

P.S Sorry if this really a RTFM question!
thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TextField-Double-type-introduces-commas-tp3219013p3219013.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: TextField Double type introduces commas

2011-01-15 Thread Arjun Dhar

So the getConverter() is deprecated and there is no setter. WHich confused me
a bit. 
Overriding the converter seemed like an overkill than setting a custom one
on the Field, so was not sure.

Thanks to your post, I'm clear on what to do.
https://cwiki.apache.org/WICKET/using-custom-converters.html

thank you very much
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TextField-Double-type-introduces-commas-tp3219013p3219365.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Changing/Accessing name of ListItem in ListView

2011-01-15 Thread Arjun Dhar

Your bet was right, it was onSubmit()! I understand better now.

On a funny note; I can  imagine Igor exasperated ...This guys on a
different tangent... :)


Don't worry - it's probably the most common mistake Wicket newbs make! 
It's
definitely the thing I stress understanding the most in my Wicket classes. 

 thanks, honestly it comforting to know I'm not a complete moron :)


On a technical Note (further understanding):
I had read about Bindgen and it highlighted the issues with using
PropertyModels, and Bindgen is a bit more inconvenient. So I guess I
somewhere lost my track. Now I realize the pitfall of not following either.
...valuable lesson.

Thanks guys, very much appreciated!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Changing-Accessing-name-of-ListItem-in-ListView-tp3218777p3219725.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Multipart issues in Wicket 1.4.15

2011-01-18 Thread Arjun Dhar

Hi am not sure if a user vote is going on here. 

My 2 cents for my own insecurities: Leave it as is! Its good enough.
I'm pretty much screwing around with FileUpload in many ways and overall its
great.

thanks

-
Don't take life too seriously, your'e not getting out it alive anyway!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Multipart-issues-in-Wicket-1-4-15-tp3221308p3224563.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wicket : Articles Blogs

2011-01-28 Thread Arjun Dhar

Hi, I am looking to incorporate a section on client websites for Articles 
Blogs. 
I've used Roller independently, but I feel its too bulky and self centered
to integrate with a site.

Do we have ready made components in  Wicket that can help here? 
What do you guys use with Brix?
Can I rip it off and use with my own Wicket based framework?

Anything on: Spring, Wicket  JPA is ideally welcome.

thanks

-
Don't take life too seriously, your'e not getting out it alive anyway!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Articles-Blogs-tp3245765p3245765.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Best practice on i18n

2011-01-29 Thread Arjun Dhar

The only relevant technical point here is Inheritance. If Component A
inherits Component B, then the properties would have to be repeated in the
property file corresponding to the inherited Component as i don't think
properties follow inheritance rules (imo).

Regarding Gobal vs Local: This is so open to perception probably not worth
debating ,..just imo if one is following a component oriented approach
(specially in product development); maintaining a Global property list
cannot be a good thing. For service oriented projects one can argue since
its about preferences; like ease of maintenance etc. for clients.

thanks

-
Don't take life too seriously, your'e not getting out it alive anyway!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Best-practice-on-i18n-tp3245918p3246828.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Dynamic Tag substitution

2011-02-17 Thread Arjun Dhar

Hi,
 Im creating a Decorator/Wrapper Panel that will show EDIT/DELETE options on
the content if the user is authorized to do so.

The markup simply put, is like this:

?xml version=1.0 encoding=utf-8?
html
body
wicket:panel
table
trtd DELETE /tdtd EDIT /td/tr
trtd colspan=2div
wicket:id='container'***TAG_TYPE***wicket:id='component'
//div/td/tr
/table
/wicket:panel
/body
/html



The issue is that the Wrapper by design can consume any Component and
decorate it. However, the TAG type depends on the component inserted. I'd
liek to control that programatically. Is there any way I can do that?

..the corresponding code is like :

public abstract class EditableComponentWrapper extends Panel {
private static final long serialVersionUID = 1191322949129480444L;

private boolean allowDelete, allowEdit;

  public EditableComponentWrapper(String id) {
super( id );
WebMarkupContainer container = new WebMarkupContainer(container);
add(container); 
container.add(addComponent(component));
  }
  
  /**
   * Add custom Component to the container. Use the id passed to construct
the component.
   * 
   * @param componentId as String
   */
  public abstract Component addComponent(String componentId);
  
  public void onInitialize() {
  super.onInitialize();
  
  addOrReplace(new AjaxLink(delete) { 
@Override
public void onClick(AjaxRequestTarget target) {
onDelete(target);
}
}
.setOutputMarkupId(true)
.setEnabled(allowDelete)
.setVisible(allowDelete));  

   addOrReplace(new AjaxLink(edit) {
@Override
public void onClick(AjaxRequestTarget target) {
onEdit(target); 
}   
}
   .setOutputMarkupId(true)
   .setEnabled(allowEdit)
   .setVisible(allowEdit));
  }
...
...



-
Don't take life too seriously, your'e not getting out it alive anyway!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dynamic-Tag-substitution-tp3311189p3311189.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Dynamic Tag substitution

2011-02-17 Thread Arjun Dhar

One correction I'd make to my own code is instead of allowing to add a
Component; I'd enforce WebComponent. That would make the case stronger for
using and enforcing HTML tags.

..the issue remains, hwow do I make the markup here dynamic to suit the
WebComponent being wrapped! :(

-
Don't take life too seriously, your'e not getting out it alive anyway!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dynamic-Tag-substitution-tp3311189p3311199.html
Sent from the Users forum mailing list archive at Nabble.com.

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



DropDown replacing text field

2011-03-04 Thread Arjun Dhar
Hi,
 i have a markup (Loop) for a couple of fields. Its a dynamic form and all
the fields are text except one or two,
Sample Markup:












Now in the Java code, for the exceptional case I want to replace that
'input' with 'select', so I did:

field = new DropDownChoice(value, new Model(myBooleanvar),
Arrays.asList(Boolean.FALSE, 
Boolean.TRUE)) {
//Default is text type, change 
to select
@Override  
public void 
onComponentTag(ComponentTag tag) {

tag.setName(select);

tag.remove(type);

super.onComponentTag( tag );
  }
};  


..this results in a Blank Drop Down Box withotu any values.

In the markup if I make it select it obviously works.
What else do I need to to do to get the options, in the list in such a
case?



-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDown-replacing-text-field-tp3336347p3336347.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: DropDown replacing text field

2011-03-05 Thread Arjun Dhar
Thanks...but curiosity : why wont that work in the first place?

-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDown-replacing-text-field-tp3336347p3336426.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: DropDown replacing text field

2011-03-05 Thread Arjun Dhar
(And whats wrong with Nabble ..its got this annoying Ajax interface) :(
Ugh!!!

-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDown-replacing-text-field-tp3336347p3336427.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Externalizing Page Mounts Via Spring

2011-03-09 Thread Arjun Dhar
Hi,
 I wanted to externalize the Page Mounts using Spring.

Earlier in my Application class the code was like:

mount(new QueryStringUrlCodingStrategy(login, loginPage.class));


So What I did was:

...
//Scan for All IMountLoaders in the context and get the
Mount points from them automatically
Map mountLoadersMap =
springContext.getBeansOfType(IMountLoader.class);
List mountPoints = ... Get Mount Points from Spring ...
for (IRequestTargetUrlCodingStrategy mountPoint : mountPoints) {
mount(mountPoint);
}
...


: SPRING FILE CORRESPONDING CONFIG :





  
 
  




However this leads to an Exception:
.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [com.me.loginPage]: Constructor threw exception; nested exception
is java.lang.IllegalStateException: you can only locate or create sessions
in the context of a request cycle:

java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle
at org.apache.wicket.Session.findOrCreate(Session.java:209)
at org.apache.wicket.Session.get(Session.java:253)
at
org.apache.wicket.Application$1.onInstantiation(Application.java:299)
at
org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:1093)



I wanna keep the code fluid and dont wanna wire it to any specific
@SpringBean kinda config. Is there an easy way out here?




-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Externalizing-Page-Mounts-Via-Spring-tp3343247p3343247.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Externalizing Page Mounts Via Spring

2011-03-09 Thread Arjun Dhar
Both very helpful answers

@Mike ManderThe wicket-stuff thing is very cool indeed.
However, I'd like to mounting to be controlled by some
strategy/configuration in most cases which wont help if i have the
Annotation within the WebPage (but yes very very cool to know it exists).

@Attila Király : Yah worked, though one doesnt need index values since they
are in order; but using the String value instead of the object did the
trick!

thank you





-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Externalizing-Page-Mounts-Via-Spring-tp3343247p3343358.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Caching Streamed Images on browser

2011-03-19 Thread Arjun Dhar
Hi,
 I have a resource (an Image which exists on the File System outside the Web
Context).
I stream the image resource. The problem really is that while the speed to
download an image within web-context and outside is the same  the one
within Web-Context is always cached by the browser.

Am not sure this is a pure wicket question, but anyone know the rules for
browser caching images? As long as the src link is the same and
independent of session why would the browser not cache it?

I also created a simple DownloadServlet and same result. URL --
/DownloadServlet?file=abc.


-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Caching-Streamed-Images-on-browser-tp3389269p3389269.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Caching Streamed Images on browser

2011-04-08 Thread Arjun Dhar
Hey, thanks for the response ... though i think there is more to it.
When I look at the header of a normal image in web context, he server
returns 302 (NO MODIFIED).

Despite me changing the HTTP cache controls, a HTTP/1.1 200 OK still makes
the browser stream the image from the server. Using HTTP live Headers i
ensured the HTTP headers match that of normal image Ditto. This (200 vs 302)
is the only noticeable difference. Am unable to force a 302 for some reason
(...am looking at that)


Any ideas?

Will some sort of UrlCodingStrategy to avoid params in my URL trick the
browser and tomcat server in thinking its a genuine image resource?
like : /my/synthetic/image/image1.jpg instead of Download?image=image1.jpg.

Any ideas?




-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Caching-Streamed-Images-on-browser-tp3389269p3436023.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Caching Streamed Images on browser

2011-04-08 Thread Arjun Dhar
Got it!

As per ETag specs in Firefox Docs,:

The Last-Modified response header can be used as a weak validator.  It is
considered weak because it only has 1-second resolution. 
If the Last-Modified header is present in a response, then the client can
issue an If-Modified-Since request header to validate the cached document.

When a validation request is made, the server can either ignore the
validation request and response with a normal 200 OK, or it can return 304
Not Modified to instruct the browser to use its cached copy. 
The 304 response can also include headers that update the expiration time of
the cached document.


Setting 'Last-Modified' did the trick for me.

thanks

-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Caching-Streamed-Images-on-browser-tp3389269p3436099.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Complex Grid with Wicket

2011-04-20 Thread Arjun Dhar
Some time back I created a similar complicated grid structure and also
submitted a rather rag-tag JIRA suggestion:

http://apache-wicket.1842946.n4.nabble.com/GridView-for-A-Symmetric-tables-issues-td2953859.html
This post explains how I did it conceptually with pseudo code.

Now, many months later here is what I feel:

IF YOUR JAVASCRIPT SKILLS ARE GOOD :: If you can get away with producing
JSON or any form of object notation and deliver that the the page, and have
the Page decide via JQuery, Javascript + DHTML or some other pure client
based solution then ...Do that!

It gives you more maintainable and flexible code* and clear Server/Client
abstraction. I've realized Table rendering is one of those things that are
best left to client pages (if you are ok with a JavaScript solution).

...if not, you can scrape from my earlier work on that post. Its your choice
, your neck! :)

* For most reasons, ~~~ Browser specific JavaScript is a Pain and best
avoided ~~~, but I've found table handling etc. one can write pretty much
standard and consistent JavaScript that beats writing code server side.
Again, it about your JavaScript skills Vs Wicket skills perhaps and a
personal choice. I know many people will cringe at this comment but being
honest about my frustrations and what works for me ;)

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Complex-Grid-with-Wicket-tp3464266p3465107.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: GridView for A-Symmetric tables - issues

2011-05-07 Thread Arjun Dhar
Someone asked me for the HTML code also and I had similar off forum queries
earlier on this post. Fwiw adding HTML sample code to compliment the Java
code for this use case:


table id='grid'
tr wicket:id=gridView
td class='tdShell' wicket:id=cols
div class='tableCell'
center
div

/div

div style='border:0px solid transparent'
wicket:id=mergedCell

/div
/center
/div
/td
/tr
/table


..hope its useful for anyone else looking for the same.

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/GridView-for-A-Symmetric-tables-issues-tp2953859p3506434.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Graceful Session Expiry

2011-06-09 Thread Arjun Dhar
Hi,
 I want to be able to show a Warning message appear when the session is
about to expire (say 5 minutes before) and if the session has expired then
on the UI it should come. This is to ensure a User does not enter any data
and lose it when they click Submit.

Use Case I wanna prevent: Lazy User goes for Coffee, comes back completes
Form, presses Submit ...curses me!

thanks

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Graceful-Session-Expiry-tp3584660p3584660.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Graceful Session Expiry

2011-06-09 Thread Arjun Dhar
I just had an idea to solve both the problems. (please see if it makes sense)

Well, what if we on every Page request tell the Browser how much time it has
left = Session Duration. (Pass it via some param or header script variable)
And let the Browser do house keeping for that window session.

I'll put a script via WebPage.setHeader(...) in my base class; extended by
all pages that use a session.
The rest is taken care by the client.

..though am not sure if there is a way for me to inject into all pages that
use a particular session object automatically or I should keep it simple and
put it in the base WebPage class?
(All WebPages may not share a common parent)


thanks

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Graceful-Session-Expiry-tp3584660p3584943.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Graceful Session Expiry

2011-06-09 Thread Arjun Dhar
Sorry I meant , make base class implement
IHeaderContributor.renderHead(IHeaderResponse response) , inject script via
that.

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Graceful-Session-Expiry-tp3584660p3584955.html
Sent from the Users forum mailing list archive at Nabble.com.

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



How to Obfuscate content?

2011-06-13 Thread Arjun Dhar
Hi,
 my question has following parts:
1. What is the best JavaScript / HTML API based obfuscator one can recommend
to use?

2. How/Where would one integrate that with Wicket?

3. Do these obfuscators have any practical impact on performance (Silly Q,
admitted :) ) .. better; can the page results be cached?

4. What if I want to Obfuscate the results of a Panel? Can I apply any
strategy to a WebComponent rather than to the entire page? --- This maybe
useful as certain sections of the page may need to be obfuscated rather than
the whole page.


thanks



-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Obfuscate-content-tp3593501p3593501.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to Obfuscate content?

2011-06-13 Thread Arjun Dhar
AbstractTransformerBehavior  looks cool. ...As for caching, will address that
separately. Thanks

Why do you need this at all ?  -- Mainly technical curiosity and I also
Obfuscation and Compression of JavaScript/HTML is pretty much in demand, so
writing stuff to cater to those demands without being too performance heavy.

Example: Wicket in Production mode has the setting to remove White Spaces,
this is itself a trivial form of compression/obfuscation to begin with; I
guess as an analogy :)


-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Obfuscate-content-tp3593501p3593570.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: idiosyncratic interfaces such as IModel, IVisitor

2011-06-21 Thread Arjun Dhar
An interface is a piece of code one writes when they are too lazy to think of
the implementation.

An abstract Class is one where you have no idea how the hell you will
complete the rest!

An idiosyncratic interface is 1 to 1 relation with your class because the
programmer did not have the guts to stand by his class and use it as a type
directly (Interface as a Type)

:)

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/idiosyncratic-interfaces-such-as-IModel-IVisitor-tp3613440p3613551.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Pre Publish Wicket Pages

2011-07-20 Thread Arjun Dhar
Hi,

Is there some way for me to Hack the Wicket parser to pre-publish Wicket
based pages before they are even rendered?

Context:
==
 I have a system where I'm using velocity to generate pages that do not
change over a period of time. Futhermore their content can be cached using
EhCache (More interesting as based on events one may update thee cache also,
so for semi dynamic content also its great). This is really performant and
great for other reasons.

..However since i love wicket and templating using inheritance in Wicket
etc., I want to pre-publish my core wicket pages also (which render
dynamically on screen on request). 

I'm perhaps confusing/mixing the purpose of a Templating engine with Wicket.
But who cares :) , ... I think it would be cool to pre-publish certain
Wicket pages also.

How would that be possible? 
There would be no Request, no Session. So some hacking of the parser would
be required. 


-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pre-Publish-Wicket-Pages-tp3682723p3682723.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: E-commerce site built on Wicket

2011-07-21 Thread Arjun Dhar
Looks pretty nice. 

Did you guys use any CMS (say wicket based like BRIX) .. or simply coded it
straight up?

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/E-commerce-site-built-on-Wicket-tp3682832p3682897.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: using saml2 for authentication

2011-07-25 Thread Arjun Dhar
I dont think its justified to expect Wicket to directly provide that Auth
support.

My 2 cents to put you in the right directions AFAIK:

Typically, one should have an IDP or SP setup at either ends. For instance,
Shibboleth has good support for SAML2. Once you have that setup, you can use
any java based app to interact with your SSO.

Note: I've tried both CAS and Shibboleth. CAS current version for SAML2 is
not reliable. So you should get familiar with Shibbolth I guess. I have
tried it for SalesForce Cloud, not directly via wicket but it will be an
interesting Blog for Wicket users, if you do figure it out!

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-saml2-for-authentication-tp3680988p3691811.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Technical Limit on Mount Points

2011-07-27 Thread Arjun Dhar
Hi,
 I fave a ton of possible dynamic content where for each content I have to
associate a Mount Point.
im thinking of a strategy to do that efficiently.

To cater to it, following questions:
1). What decides the technical limit to the number of Mount points possible?
(Does it load all the mount points into memory, or applies some sort of
caching that can use persistence if required)?

Example usage per mount point: application.mount(new
MixedParamUrlCodingStrategy(myPageX, pageTemplateClass, new
String[]{pageId}));

2). Would a considerable number of Mount points degrade performance? 

thanks

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Technical-Limit-on-Mount-Points-tp3699113p3699113.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Technical Limit on Mount Points

2011-07-27 Thread Arjun Dhar
On my own investigation :-
WebRequestCodingStrategy$MountsMap :

/** backing map */
private final TreeMaplt;String, 
IRequestTargetUrlCodingStrategygt; map;

... that decides the data structure for the mounts, imo/

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Technical-Limit-on-Mount-Points-tp3699113p3700408.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: RFC: Ten things every Wicket programmer must know?

2011-07-28 Thread Arjun Dhar
From my experience, stuff where I screwed up or wasted time:

1. Wicket is a UI framework, delegate as much as possible to your own
neutral code base service and components. Data Models etc. Both Server and
Client Side. Client Side:: Don't wrestle with Grids etc in Wicket; if you
can get away with a cheap JavaScript/DHTML implementation instead.

2. Wicket Data Models should ideally wrap you native business objects.
Wicket wotks over the native business objects; your business objects POJOs
are not designed for wicket.

3. Use Detachable models effectively. (Am still learning the meaning of
*effectively*). Example: Everyone talks about using it, but it depends on
the underlying business objects in use. If they are poorly designed and load
in an in-effiient manner, then load() will mess with re-loading stuff each
time.

4. Do not try to instantiate Wicket Components via Spring. there is no sane
reason to do this; this was an area of special interest and very tempting.
One can rely on Spring for native objects and develop better mechanisms for
Components to instantiate over the Spring defined layer.

5. @SpringBean is bloody useful

6. Learn to hack Mount Paths. The default Markup Page classpath relating to
the component is Web non-intuitive. Its great if you can live with the
default setup but learn to mess around with mounting.

7. Learn to the differences between Markup Inheritance, Use of Panels and
Include when it comes to designing reusable templates and reducing
boilerplate markup code.

8. Mess around with Fragments; they are useful. Like Anonamous classes ; but
just in the markup world.

9. Learn atleast one other Web Framework like Struts, appreciate the beauty
of Wicket.

10. Learn to respect velocity templates and the co-existence of Wicket with
Velocity. Wicket-Velocity project.



-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RFC-Ten-things-every-Wicket-programmer-must-know-tp3699989p3700814.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Advanced Mounting Markup Location

2011-07-29 Thread Arjun Dhar
When Locating the Markup for a Page, I want to know the corresponding class
(associated with the page/markup).
Currently Im directing Wicket to my Custom Markup location with the
following code in Application:

...
final IResourceStreamLocator defaultLocator =
super.getResourceSettings().getResourceStreamLocator();
return new ResourceStreamLocator(){
@Override
public IResourceStream locate(final Class? clazz, final String
path) {
   ...
   //Figure alternate path by reading path
   
   //if valid URL not found use the defaultLocator
   ...
}
...


I want to get the associated Component class. I know the String path
represents the ClassPath, but its still a String and contains Locale Junk 
an extension with it. 
Is there someway I can get Class? directly so I don't have to do String
manipulations?


Another thing I want is, when the dynamicPage (which --extends--
TemplatePage --extends--  WebPage) appears it knows its associated
Template DataStructure details.
TemplatePage - Wicket Component
Template - Data Structure

TemplatePage --- Template

When Mounting, on init() in Application:
application.mount(new QueryStringUrlCodingStrategy(pagePath, [Templace
Class] ));

During the mount itself, is there anyway for me to associate/pass models to
the pages which will be constructed?
Wicket uses no-arg Contstructors for WebPage, but what if I want to pass a
WebPage contexutal info specific to the Page while mounting? (Can i do
this?) -- I believe this would be efficient


-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Advanced-Mounting-Markup-Location-tp3705032p3705032.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Advanced Mounting Markup Location

2011-07-29 Thread Arjun Dhar
ok its embarassing to have to post the answers to your questions, heh but
this is one is for less fortunate:

In my application I could pass the Class of the MarkupContainer (rather than
the class that loads the markup)

/**
 * The {@link 
DefaultMarkupResourceStreamProvider#getMarkupResourceStream};
derives the path 
 * from the Class? containerClass and passes it to the {@link
IResourceStreamLocator#locate} method.br /
 * It also passes the MarkupContainer class to the {@link
IResourceStreamLocator#locate} method. This class is useless in our case,
 * and there is more value in getting the actual Class? 
containerClass.
Simple swap which class is passed to the locate mothod.
 */
protected void tweakMarkupCacheStreamProvider() {
getMarkupSettings().setMarkupCache(new MarkupCache(this) {
private IMarkupResourceStreamProvider 
markupResourceStreamProvider;

/**
 * Get the markup resource stream provider to be used
 * 
 * @param container
 *The MarkupContainer requesting the markup 
resource stream
 * @return IMarkupResourceStreamProvider
 */
protected IMarkupResourceStreamProvider 
getMarkupResourceStreamProvider(
final MarkupContainer container)
{
if (container instanceof 
IMarkupResourceStreamProvider)
{
return 
(IMarkupResourceStreamProvider)container;
}

if (markupResourceStreamProvider == null)
{
/*
 * Most of the code of the original 
{@link
DefaultMarkupResourceStreamProvider} is untouched,
 * except the line that calls the 
locate(...) method!
 */
markupResourceStreamProvider = new
DefaultMarkupResourceStreamProvider() {
public IResourceStream 
getMarkupResourceStream(final MarkupContainer
container, Class? containerClass)
{
...
...
//container.getClass() 
replaced with containerClass below :::
IResourceStream 
resourceStream = locator.locate(containerClass, path,
style, locale, ext); 
...
...
}   

};
}
return markupResourceStreamProvider;
}   
});
}


Request to the Developers ::
One particularly disturbing thing I've seen in certain wicket components
(maybe an oversight); is that if you dont have POJO style getter() 
setter() on your components; then non final variables should be declared
protected not private. There is no point providing overriding methods that
use private variables, to which the child class has no access.

thanks


-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Advanced-Mounting-Markup-Location-tp3705032p3705848.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Downloader for files outside Web Context

2011-08-07 Thread Arjun Dhar
Hi,
do we have a pre written Downloader that can allow links on a web page to
download files which are saved outside the Web Context?

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Downloader-for-files-outside-Web-Context-tp3726061p3726061.html
Sent from the Users forum mailing list archive at Nabble.com.

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



  1   2   >