RE: quickstart POM has wrong artifactId for jetty maven plugin

2010-03-26 Thread dukehoops

FWIW, this is happening because  is omitted in generated pom.xml
 tag. To fix:

change


org.mortbay.jetty
maven-jetty-plugin


to 


org.mortbay.jetty
maven-jetty-plugin
${jetty.version}




TahitianGabriel wrote:
> 
> Had the same behavior when lauching maven in command line (OK within
> eclipse). Just add the jetty plugin with the version you want in your
> pom.xml :
> 
> 
>   org.mortbay.jetty
>   maven-jetty-plugin
>   6.1.4
> 
> 
> 
> 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://old.nabble.com/quickstart-POM-has-wrong-artifactId-for-jetty-maven-plugin-tp27555192p28047057.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: isVisibilityAllowed() not consulted before calling onBeforeRender()?

2008-11-23 Thread dukehoops

JIRA filed: https://issues.apache.org/jira/browse/WICKET-1954

Apologies, but I am not setup to create a quick-start. Hopefully,
description is precise enough.

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/isVisibilityAllowed%28%29-not-consulted-before-calling-onBeforeRender%28%29--tp20651326p20652229.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



isVisibilityAllowed() not consulted before calling onBeforeRender()?

2008-11-23 Thread dukehoops

I have a component whose parent does this:

class Parent extends Panel

private Component child;

onBeforeRender()
{
child.setVisibilityAllowed(false);
super.onBeforeRender();
}

I would expect child's onBeforeRender() to not be executed but it is,
because Component.internalBeforeRender calls isVisible() rather than
determineVisibility().

Is that by design? If so, why?

If this is a bug, should the following line in
Component.internalBeforeRender():

if ((isVisible() || callOnBeforeRenderIfNotVisible()) &&
!getFlag(FLAG_RENDERING) &&
!getFlag(FLAG_PREPARED_FOR_RENDER))

be this:

if ((determineVisibility() || callOnBeforeRenderIfNotVisible()) 
&&
!getFlag(FLAG_RENDERING) &&
!getFlag(FLAG_PREPARED_FOR_RENDER))

thanks
-nikita




-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/isVisibilityAllowed%28%29-not-consulted-before-calling-onBeforeRender%28%29--tp20651326p20651326.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: browser back button - shouldn't onBeforeRender() execute?

2008-11-17 Thread dukehoops

Timo,

Thanks for your reply. But shouldn't the headers I listed disable caching
already? Re-pasting below:
Here are A's initial response headers:
Server Apache-Coyote/1.1
Cache-Control no-cache, max-age=0, must-revalidate
Pragma no-cache
Content-Type text/html;charset=UTF-8
Content-Language en-US
Content-Length 13209 


Timo Rantalaiho wrote:
> 
> On Fri, 14 Nov 2008, dukehoops wrote:
>> -user clicks browser back button and lands on A without server being hit
>> at
>> all.
>> 
>> At this point I expected browser to issue GET /A and A's onBeforeRender
>> to
>> run. is my expectation correct? If not, what is the expected behavior.
>> 
>> The reason for my question, is that I want to prevent user from
>> "back"-ing
>> to A once on B. So I wanted to use A's onBeforeRender to evaluate state
>> and
>> redirect someplace else. If my expectation above is incorrect, could
>> someone
>> suggest a better approach?
> 
> That behaviour depends on the browser caching behaviour. 
> Some brosers on some settings get page A from their cache, 
> in which case the server is not being hit.
> 
> You might get it to work by adding non-caching HTTP headers
> on page A.
> 
> Best wishes,
> Timo
> 
> -- 
> Timo Rantalaiho   
> Reaktor Innovations Oyhttp://www.ri.fi/ >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/browser-back-button---shouldn%27t-onBeforeRender%28%29-execute--tp20508047p20544691.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



browser back button - shouldn't onBeforeRender() execute?

2008-11-14 Thread dukehoops

Hi,

I have two pages A and B:
-user lands on A (browser location says /A)
-user clicks on a form's SubmitLink, onSubmit() says setResponsePage(new
B(state))
--in Firebug, I see POST, followed by GET /B
-user lands on B ( location is /B)
-user clicks browser back button and lands on A without server being hit at
all.

At this point I expected browser to issue GET /A and A's onBeforeRender to
run. is my expectation correct? If not, what is the expected behavior.

The reason for my question, is that I want to prevent user from "back"-ing
to A once on B. So I wanted to use A's onBeforeRender to evaluate state and
redirect someplace else. If my expectation above is incorrect, could someone
suggest a better approach?


thanks
-nikita

I am using Firebug with FF3/Win and Wicket 1.3.5

Here are A's initial response headers:
Server  Apache-Coyote/1.1
Cache-Control   no-cache, max-age=0, must-revalidate
Pragma  no-cache
Content-Typetext/html;charset=UTF-8
Content-Languageen-US
Content-Length  13209


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/browser-back-button---shouldn%27t-onBeforeRender%28%29-execute--tp20508047p20508047.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Permgen OOM - *not* reloading context

2008-10-19 Thread dukehoops

Our production servers running tomcat6, JVM 1.6 and Wicket 1.3.4 are running
out of PermGen space after a couple of hours an a few thousands requests,
eventually resulting in "cannot detach Request from Session" exceptions
followed by PermGen OOM. We are NOT reloading app contexts - appservers are
fully restarted when needed. 

We are running spring 2 and Hibernate 3.3. We recently started using
Compound Property Models extensively. Model objects are DTOs that are NOT
Hibernate entities. 

Any advice on how to go about debugging this? If i undetstand basics of
permgen correctly, oom means something keeps loading new classes (not simply
class instances) Should we be looking at wicket's persistent store 

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/Permgen-OOM---*not*-reloading-context-tp20060589p20060589.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: list of possible message resource keys?

2008-10-14 Thread dukehoops

Is it whatever AbstractValidator.resourceKey() returns?



dukehoops wrote:
> 
> Is there a list of all possible message bundle resource keys that wicket
> 1.3.4 recognizes? 
> 
> I thought it's: name of class implementing IValidator sans trailing
> "Validator" but then there are "Required" and "LengthValidator" keys so I
> guess not...
> 
> 
> 
> thanks!
> -nikita
> 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/list-of-possible-message-resource-keys--tp19980430p19980686.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



list of possible message resource keys?

2008-10-14 Thread dukehoops

Is there a list of all possible message bundle resource keys that wicket
1.3.4 recognizes? 

I thought it's: name of class implementing IValidator sans trailing
"Validator" but then there are "Required" and "LengthValidator" keys so I
guess not...

thanks!
-nikita

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/list-of-possible-message-resource-keys--tp19980430p19980430.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



markup for component extending RadioGroup?

2008-10-09 Thread dukehoops

Hi,

I created a component MyRadioGroup that extends RadioGroup (has two Radios
inside). I cannot figure out what to put in MyRadioGroup.html. The following
does not work because it expects MyRadioGroup to be a Panel:

 
 


Is the lesson here to only extend Panels (or FormComponentPanels) when
creating custom components that simply encapsulate other components?

thanks,
-nikita

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/markup-for-component-extending-RadioGroup--tp19904068p19904068.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Example of pseudo-ajax file uploading using iframes

2008-10-09 Thread dukehoops

Does anyone have a copy of this (or any other) Ajax file upload example? 

The attachment mentioned below does not open.

thanks
-nikita


Carlos Pita-4 wrote:
> 
> Hi all,
> 
> here is a hopefully functional example showing how to use an iframe to
> upload a file and afterwards call a behavior on a component belonging to
> the
> top frame, so that an ajax action could be carried on in consequence
> (maybe
> to get rid of the iframe, or to show an informative message, or whatever).
> This is along the same venue as other examples that are around the web,
> like
> http://www.air4web.com/files/upload/. I don't have the time to write a
> proper wiki page just right now, so I simply attach the example here. Hope
> it helps.
> 
> Regards,
> Carlos
> 
>  
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/Example-of-pseudo-ajax-file-uploading-using-iframes-tp12400088p19902269.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: please review my CompoundPropertyModel use

2008-10-07 Thread dukehoops

I thought that as well, but turns out in that case
MyFormComponent.getModelObject() returns MyPojo, and NOT MyProperty. That
presents two problems:
-MyFormComponent does not really need to know of MyPojo to begin with (what
if MyProperty is obtained some other way)
-in MyFormComponent.convertInput, I need to eventually
setConvertedInput(MyProperty), and in onBeforeRender the corollary
getModelObject.  


Ned Collyer wrote:
> 
> You should be able to do
> 
> Form form = new Form("form", new CompoundPropertyModel(MyPojo));
> page.add(form);
> 
> form.add(new MyFormComponent("myProperty"));
> 
> 
> See
> http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-CompoundPropertyModels
> 
> 
> 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/please-review-my-CompoundPropertyModel-use-tp19868935p19870526.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



please review my CompoundPropertyModel use

2008-10-07 Thread dukehoops

The following code works (have unit tests) but I would appreciate a code
review from someone.

Legend
MyPojo - bean backing up form 
MyProperty - another POJO that is property of MyPojo (MyPojo has field
'myProperty' of type MyProperty)
MyFormComponent - custom form component that displays/manipulates MyProperty
(myProperty == myFormComponent.getModelObject())

In particular, I want to ensure that when MyComponent's modelObject is
updated, so is formBean's property (to be more precise, that the two
reference the same object)

//inside page:

IModel formModel = new CompoundPropertyModel(MyPojo);
Form form = new Form("form", formModel);
page.add(form);

MyFormComponent myComp = new MyFormComponent("myProperty", new
PropertyModel(formModel, "myProperty"));
form.add(myComp);

and constructor:
MyFormComponent(wicketId, model)
{
super(wicketId, model);
}

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/please-review-my-CompoundPropertyModel-use-tp19868935p19868935.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Custom Radio component with children?

2008-10-07 Thread dukehoops

I have run the page in Tomcat and narrowed down the problem to the following:
- FCP's convertInput is NOT called only when radio tied to drop down is
selected. 

I think the problem has something to do with both PublicLocationRadio and
PublicLocationDropDownChoice sharing the same model (publicLocationModel).
Here's what is happening (in actual order) during form submit:
-FormComponent.convertInput() called on Radio Group. at end of method
'convertedInput' is null (THIS IS BECAUSE SELECTED PublicLocationRadio's
model object is null)
-FormComponent.convertInput() called on PublicLocationDropDown. convertInput
is corrrectly updated to new PublicEventLocation model object
-FromComponent.convertInput() is NOT called at all. As the matter of fact,
FCP is NOT visited with ValidationVisitor created inside
Form.validateComponents()


So, I clearly made a wrong assumption that DropDownChoice would be evaluated
before PublicLocationRadio. I thought dropdown would update
publicLocationModel to own selected value and when RadioGroup's convertValue
calls publicLocationradio.getModelObject(), publicLocationModel would return
newly updated model object.

But I still do not understand why FCP's is not visited in
Form.validateComponents() or its' convertInput method called.

my RadioGroup is setRequired(true) and yet, because of the above problem,
its' convertInput is set to null. Would that be the reason why FCP is not
visited?

thanks,


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/Custom-Radio-component-with-children--tp19804341p19864220.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Custom Radio component with children?

2008-10-06 Thread dukehoops

It is not easy for me to check whether this component functions outside of
test harness at the moment (dependency issues) but I will do so tomorrow.

In the mean time, debugging the unit test further I can tell that:
radioGroup and DropDownChoices are the only components that get called by
validate(FormComponent) method inside Form.validateComponents().
LocationSelectionPanel does not (even though all three are children of form)


BTW, FormComponentPanel overrides checkRequired() but - contrary to javadocs
on checkRequired() - does NOT call isRequired() first. Unsure what that
means though...

-nikita


igor.vaynberg wrote:
> 
> does this work without wickettester?
> 

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/Custom-Radio-component-with-children--tp19804341p19849085.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Custom Radio component with children?

2008-10-06 Thread dukehoops

Sure, here it is below. Test selects a non-default value from
'publicLocationChoices' drop down. Problems are:
-on form submit, LocationSelectionPanel.convertInput() is not called (have
breakpoint there)
-in debugger, I can see dropDown's rawInput changing on form submit, but
model's object ('data') value is never updated

Test
public void testLocationSelectionPanel_SelectCohost() {
final WicketTester t = getTester();
final VirtualEventFormBean formBean = new VirtualEventFormBean();
formBean.setEventId(EVENT_ID);
formBean.setOrganizerId(currentUser.getId());
final EventLocation initialLocation =
virtualEventService.getCustomSpaceEventLocation(currentUser.getId());
formBean.setLocation(initialLocation);

LocationSelectionPanelTestPage p = new
LocationSelectionPanelTestPage(formBean);
t.startPage(p);
t.assertRenderedPage(LocationSelectionPanelTestPage.class);

DropDownChoice publicLocationsChoice = (DropDownChoice)
t.getComponentFromLastRenderedPage("form:location:publicLocationChoices");
//selecting component

FormTester ft = t.newFormTester("form");

//select cohost
ft.select("location:publicLocationChoices", 1); //select 1st public
location

//submit 
ft.submit();
EventLocation newLocation = p.getFormBean().getLocation();
assertNotSame(initialLocation, newLocation);
assertTrue(newLocation instanceof PublicEventLocation);
}

Test Page
public class LocationSelectionPanelTestPage extends AbstractWebPage {

@SpringBean private VirtualEventService virtualEventService;

private final VirtualEventFormBean formBean;
private CompoundPropertyModel model;

public LocationSelectionPanelTestPage(VirtualEventFormBean formBean) {
assert formBean != null;
this.formBean = formBean;
model = new CompoundPropertyModel(formBean);
Form form = new Form("form", model);
add(form);

//location selection
final CustomSpaceEventLocation organizerLocation =
virtualEventService.getCustomSpaceEventLocation(formBean.getOrganizerId());
//assemble cohost models
List cohostLocations = new
ArrayList();
for (Serializable cohostId : formBean.getCohosts()) {
CustomSpaceEventLocation cohostLocation =
virtualEventService.getCustomSpaceEventLocation(cohostId);
cohostLocations.add(cohostLocation);
}

LocationSelectionPanel locationSelectionPanel = new
LocationSelectionPanel(
"location",
organizerLocation,
cohostLocations,
virtualEventService.getPublicEventLocations(),
formBean);

form.add(locationSelectionPanel);
}

public VirtualEventFormBean getFormBean() {
return formBean;
}
}

Custom Component In Question
public class LocationSelectionPanel extends FormComponentPanel {

//final private PublicLocationRadio publicLocationRadio;
final private RadioGroup locationGroup;
final private PublicLocationDropDownChoice publicLocationDropDown;
final private VirtualEventFormBean formBean;
//final private BoundCompoundPropertyModel model;
//final static String LOCATION_PROPERTY = "location";
final private Model publicLocationModel = new Model();
final private Model locationGroupModel = new Model();
final private CustomSpaceEventLocation organizerLocation;

public LocationSelectionPanel(
String wicketId,
CustomSpaceEventLocation organizerLocation,
List cohostLocations,
List publicLocations,
VirtualEventFormBean formBean) {

super(wicketId);
assert organizerLocation != null;
assert cohostLocations != null;
assert publicLocations != null;
assert formBean != null;

this.formBean = formBean;
this.organizerLocation = organizerLocation;

this.setRequired(true);

//model = new BoundCompoundPropertyModel(formBean);
this.setModel(new Model(formBean.getLocation()));
//model.bind(this, LOCATION_PROPERTY);


//group will default to location specified in formBean.location
locationGroup = new RadioGroup("locationGroup", locationGroupModel);
locationGroup.setRequired(true);
add(locationGroup); //bind RadioGroup's model object to location
property of this.model's formBean

// organizer's apt
CustomSpaceRadio organizerRadio = new
CustomSpaceRadio("organizerLocation", organizerLocation);
locationGroup.add(organizerRadio);

//co-hosts' places
//create radio controls for cohosts' locations
ListView participantChoices = new
CohostLocationListView("cohostLocationChoices", cohostLocations);
locationGroup.add(participantChoices);

//drop down for public locations
p

Re: Custom Radio component with children?

2008-10-06 Thread dukehoops

I made my component a subclass of FormComponentPanel and overrode
convertInput(). However when form containing this formComponentPanel is
submitted, panel's convertInput method is never called. 

As result panel displays correctly, but changes are lost on submission. Any
ideas?

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/Custom-Radio-component-with-children--tp19804341p19844805.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Custom Radio component with children?

2008-10-03 Thread dukehoops

You mean "check the convertedinput() of radiogroup" not radio, correct?
 

igor.vaynberg wrote:
> 
> the easiest way to do this would be to make your component a
> formcomponentpanel
> 
> then you have
> 
> formcomponentpanel
> -radiogroup
> --radio1
> --radio2
> -dropdown
> 
> and in your fcp's convertinput() check the convertedinput() of radio
> and based on that call setconvertedinput() with either the radio's or
> the dropdown's value
> 
> -igor
> 

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/Custom-Radio-component-with-children--tp19804341p19806392.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Custom Radio component with children?

2008-10-03 Thread dukehoops

I'd like to create a component that consists of:
-radio
-dropdown choice

The component would be part of a RadioGroup, drop down should only be
enabled when radio is selected. The component, radio, and dropdown's
getModelObject() would return same MyBean pojo (Dropdown's is displaying a
list of MyPojos) - because that model would be used by owning RadioGroup

What model class should I use?

Also what should the component type be? Should this component be a:
-panel
-FromComponentPanel
-or subclass of Radio?

Radio is a MarkupContainer which means I should be able to extend Radio and
add DropDownChoice as a child. However, radio's markup is [input/] which
AFAIK does not allow children. So, if the answer to above is "subclass
Radio" what to do with HTML?

thanks
-nikita

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/Custom-Radio-component-with-children--tp19804341p19804341.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: why does ExternalLink generate instead of a simple

2008-08-07 Thread dukehoops



igor.vaynberg wrote:
> 
> you can add the link to a fragment, and then add the fragment to the
> column.
> 

I did the above and it worked like a charm. Thanks and -again - nice job on
the framework!

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/why-does-ExternalLink-generate-%3Cspan%3E-instead-of-a-simple-%3Ca%3E-tp18841070p18865401.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Invalid Spring Context with ERROR dispatcher?

2008-08-06 Thread dukehoops

The problem may be same as here:
http://jira.springframework.org/browse/SPR-4480

Unfortunately, Spring's fix created seems to be JSF-specific, so I guess it
is not possible to have a Wicket error page that accesses Spring context and
is forwarded to using ERROR dispatcher because:
- RequestContextListener is thread local
- thread handling filter in case of ERROR dispatching is distinct from
thread servicing initial request, at least in glassfish (?! The latter makes
little sense to me but that's what the JIRA discussion seems to indicate)

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/Invalid-Spring-Context-with-ERROR-dispatcher--tp18858223p18859140.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: why does ExternalLink generate instead of a simple

2008-08-05 Thread dukehoops

I see, but in this case I didn't provide any markup. ExternalLink is being
added in a PropertyColumn.populateItem method to a (cell) Item of
PropertyColumn of a DataTable. The markup is solely this:

[table wicket:id="filter-data" cellspacing="0"
cellpadding="2" class="grid">
 
> you need to do [a wicket:id="link"] rather then [span wicket:id="link"]
> 
> wicket does not mutate your markup
> 
> 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/why-does-ExternalLink-generate-%3Cspan%3E-instead-of-a-simple-%3Ca%3E-tp18841070p18841190.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



why does ExternalLink generate instead of a simple

2008-08-05 Thread dukehoops

This code:
ExternalLink profileLink = new ExternalLink(componentId,
profileURL, dto.getUserName());
profileLink.setPopupSettings(new PopupSettings());

Produces this markup:
NOTE: '<,>' replaced with '[,]'

[span onclick="var w =
window.open('http://localhost:8080/app/profile/user/TESTHETJNFCB/', '',
'scrollbars=no,location=no,menuBar=no,resizable=no,status=no,toolbar=no');
if(w.blur) w.focus(); return false;">TESTHETJNFCBhttp://www.nabble.com/why-does-ExternalLink-generate-%3Cspan%3E-instead-of-a-simple-%3Ca%3E-tp18841070p18841070.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



ChoiceFilteredPropertyColumn does not filter out; where to debug?

2008-08-04 Thread dukehoops

I have a ChoiceFilteredPropertyColumn displaying enum values (as part of
AjaxFallbackDefaultDataTable). Column itself renders same enum as bean
property. On dropdown update form submits, and - via debugger - I can see
that filter state gets updated to new enum selection. However rows with
non-matching enum values are NOT filtered out. And I cannot tell why.

Where in wicket / wicket-extensions source should I look for code that
actually does the filtering:
-compares value from filterState to row bean's property value
-hides/removes row from data table when values do not match?

I am using wicket 1.3.4.

thanks,
-nikita

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/ChoiceFilteredPropertyColumn-does-not-filter-out--where-to-debug--tp18817950p18817950.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: ajax request timeout different from Session timeout?

2008-07-26 Thread dukehoops

Excellent point! Perhaps (assuming that code review for non-serializable
state is not possible in the near term) we should replace DiskPageStore with
InMemoryPageStore (that we'd write). Do you know where DiskPageStore
actually stores this data - I'd like to check out that file size in our
application to determine whether we could fit that data in memory.

thanks!
-nikita


Martijn Dashorst wrote:
> 
> check your logs for serialization errors. Wicket isn't able to
> retrieve the page from the page cache if there are serialization
> errors. This often causes the page expiration message to appear.
> 
> Martijn
> 
> 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/ajax-request-timeout-different-from-Session-timeout--tp18660284p18669960.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



ajax request timeout different from Session timeout?

2008-07-25 Thread dukehoops

Hi,

My webapp's  is set to 30 minutes but some ajax requests
result in PageExpiredExceptions if AjaxSubmitLinks are clicked after about 5
minutes of inactivity. 

Is there a timeout value for ajax requests (or page expiration timeout
values) that is distinct from HttpSession's timeout value? If so where is it
set and how can it be read/changed?

thanks
-nikita

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/ajax-request-timeout-different-from-Session-timeout--tp18660284p18660284.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



recommend a CMS to integrate w/our wicket-based webapp?

2007-10-27 Thread dukehoops

Hi,

We're developing our (social networking ;- ) site using wicket talking to
our Spring-managed services layer. We're going to need to provide content
management features for our internal users (admins, moderators, marketers)
and I'm exploring possible solutions. 

I realize we can build our own CMS but I wonder whether any of the existing
(mature) systems would play nicely with a wicket based app. 

I see pages on our site being divided into three groups: 
1. dynamic pages composed and rendered by wicket (ex: user profile page)
2. static pages composed and rendered by some CMS (say opencms, joomla or
whatever else) (ex: faq, legal section, static promo)
3. hybrid pages: a wicket page that someone "includes" a cms-managed module.
(ex: marketing wants to add  and mange a promo area to user profile pages)

What I'd like to avoid is to have the CMS dictate the way our dynamic
(wicket-based) pages are built.

Have you added a pre-made CMS to your wicket-based webapp? Or, in other
words, do you have a site where pages divide into the above 3 catogories? If
so, could you please share with CMS did you choose and how did you
integrate?

thanks
-nikita
-- 
View this message in context: 
http://www.nabble.com/recommend-a-CMS-to-integrate-w-our-wicket-based-webapp--tf4704210.html#a13446376
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: redirect request for Page A to page B without contructing A?

2007-10-17 Thread dukehoops

Implemented a SimplePageAuthorizationStrategy; works but there is a gotcha:

Say the home page has a (non-ajax) login form:
1. unauthenticated users navigates to home page and is authorized
2. user submits valid login info.
3. At this point I'd assumed Home page would be re-requested (does wicket do
Redirect-after-form-submit?)
4. However, Home page is redisplayed and isAuthorized method is never
executed after form submit.

Workaround seems to be doing setResponsePage in onSubmit method. This,
however, seems to complicate creating a reusable LoginPanel which would
return user to same page.

-nikita


public class HomePageAuthorizationStrategy extends
SimplePageAuthorizationStrategy{

public HomePageAuthorizationStrategy(){
super(HomePage.class, ProfilePage.class);
}

/**
 * if user's signed-in redirect request for Home Page to user's
dashboard/profile
 */
protected boolean isAuthorized() {
this.getLogger().info("checking auth for home page access...");
return ! ((MySession)Session.get()).isLoggedIn();
}

public Logger getLogger() {
return Logger.getLogger(this.getClass().getName());
}
}


Eelco Hillenius wrote:
> 
>> If an already logged-in user types in our home URL we'd like the site to
>> redirect him/her to own profile page. If user's not logged in, they do
>> land
>> on home page. This is not to compel someone to sign in.
>>
>> So, for example below, PageA = site home page; PageB = user's own profile
>> page
> 
> Sounds like a custom authorization strategy would work great here.
> 
> Eelco
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/redirect-request-for-Page-A-to-page-B-without-contructing-A--tf4636621.html#a13262795
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: redirect request for Page A to page B without contructing A?

2007-10-16 Thread dukehoops

The use case is this:

If an already logged-in user types in our home URL we'd like the site to
redirect him/her to own profile page. If user's not logged in, they do land
on home page. This is not to compel someone to sign in.

So, for example below, PageA = site home page; PageB = user's own profile
page

-nikita



Eelco Hillenius wrote:
> 
> If it is intercepting what you're after (like you'd do when enforcing
> authorization), look at IComponentInstantiationListener. What is your
> use case?
> 
> Eelco
> 
> 
> On 10/16/07, dukehoops <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I'd like to redirect requests for page A to page B without constructing
>> page
>> A. Typically I'd use URL parsing in a servlet filter to accomplish this
>> but
>> would like to figure out an OO way to do so.
>>
>> In my RequestCycle I tried:
>>
>> @Override
>> protected void onBeginRequest() {
>>   if(PageA.class.equals(this.getResponsePageClass()) &&
>> someCondition)
>> {
>> this.setResponsePage(pageB);
>> }
>> super.onBeginRequest();
>> }
>>
>> The problem is that this.getResponsePageClass() is null in
>> onBeginRequest.
>>
>> Is overriding a RequestCycle method the right way to address this
>> problem?
>> If so which method should I override given that:
>> -I need to ascertain that intended request target is PageA
>> -I'd like to avoid constructing page A
>>
>> thanks
>> -nikita
>> --
>> View this message in context:
>> http://www.nabble.com/redirect-request-for-Page-A-to-page-B-without-contructing-A--tf4636621.html#a13241857
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/redirect-request-for-Page-A-to-page-B-without-contructing-A--tf4636621.html#a13244889
Sent from the Wicket - User mailing list archive at Nabble.com.


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



redirect request for Page A to page B without contructing A?

2007-10-16 Thread dukehoops

Hi,

I'd like to redirect requests for page A to page B without constructing page
A. Typically I'd use URL parsing in a servlet filter to accomplish this but
would like to figure out an OO way to do so.

In my RequestCycle I tried:

@Override
protected void onBeginRequest() {
  if(PageA.class.equals(this.getResponsePageClass()) && someCondition)
{
this.setResponsePage(pageB);
}
super.onBeginRequest();
}

The problem is that this.getResponsePageClass() is null in onBeginRequest.

Is overriding a RequestCycle method the right way to address this problem?
If so which method should I override given that:
-I need to ascertain that intended request target is PageA
-I'd like to avoid constructing page A

thanks
-nikita
-- 
View this message in context: 
http://www.nabble.com/redirect-request-for-Page-A-to-page-B-without-contructing-A--tf4636621.html#a13241857
Sent from the Wicket - User mailing list archive at Nabble.com.


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



cannot focus on location bar after adding AjaxFormValidatingBehavior

2007-10-08 Thread dukehoops

I'd added:

userNameTF.setRequired(true);
//input must be at least 3 characters
userNameTF.add(StringValidator.minimumLength(3));
AjaxFormValidatingBehavior.addToAllFormComponents(loginForm, "onblur");

to a simple login page and now the following happens 100% of the time:

1. I focus on 'userName' TextField
2. I click into browser's location bar but focus is immediately returned to
username TF as "onblur" behavior executes, so it is impossible to focus in
location bar if previous focus was on AJAX-ified input. 

Is there a way to amend behavior:
a) not to regain focus on offending tag (eg one failing validation)? OR
b) do a) only if focus is transferred off page - to location bar or another
window (as opposed to other tag on same page)?

b) would  be better.

thanks,
-nikita
-- 
View this message in context: 
http://www.nabble.com/cannot-focus-on-location-bar-after-adding-AjaxFormValidatingBehavior-tf4589906.html#a13102162
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket:container beta3 and post snapshots

2007-10-05 Thread dukehoops

once I fixed my markup typo everything worked fine - so nothing to fix here.

-nikita


igor.vaynberg wrote:
> 
> submit a quickstart and make sure you are trying against trunk
> 
> -igor
> 
> 
> On 10/5/07, dukehoops <[EMAIL PROTECTED]> wrote:
>>
>> Duh, my markup was wrong! should have been > wicket:id>
>>
>>
>>
>>
>> dukehoops wrote:
>> >
>> > I'm seeing the same problem.
>> >
>> > My markup:
>> > 
>> >
>> > <__span wicket:id="userNameLabel">[userName]
>> >
>> > 
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/wicket%3Acontainer-beta3-and-post-snapshots-tf4360832.html#a13068614
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wicket%3Acontainer-beta3-and-post-snapshots-tf4360832.html#a13068713
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket:container beta3 and post snapshots

2007-10-05 Thread dukehoops

Duh, my markup was wrong! should have been 




dukehoops wrote:
> 
> I'm seeing the same problem.
> 
> My markup:
> 
> 
> <__span wicket:id="userNameLabel">[userName]  
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wicket%3Acontainer-beta3-and-post-snapshots-tf4360832.html#a13068614
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket:container beta3 and post snapshots

2007-10-05 Thread dukehoops

I'm seeing the same problem.

My markup:

[userName]



Code:

//in page constructor
WebMarkupContainer loginInfoContainer = new
WebMarkupContainer("loginInfoContainer");
Label userNameLabel = new Label("userNameLabel", new
PropertyModel(this.getUserWebState(), "userName"));
this.loginInfoContainer.add(userNameLabel);

//exception:
org.apache.wicket.markup.MarkupException: Failed to handle:


BTW, using  instead works.

-nikita



igor.vaynberg wrote:
> 
> works fine for me
> 
> WebMarkupContainer container = new WebMarkupContainer("container");
> add(container);
> container.add(new Label("label", "hello"));
> 
>  wicket:id="label">
> 
> -igor
> 
> On 8/31/07, Evan Chooly <[EMAIL PROTECTED]> wrote:
>>
>> I suddenly started getting errors using wicket:container saying it failed
>> to
>> handle it.  Is anyone else seeing this or is my env just really busted?
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wicket%3Acontainer-beta3-and-post-snapshots-tf4360832.html#a13068497
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: webpage instance scope?

2007-10-04 Thread dukehoops

I think I understand your explanations yet I struggle to see how scenario I
was describing is optimization-only. Consider these scenarios:

Shopping w/o signing in.
1.I go to amazon.com and fill my shopping cart with stuff without signing
in. 
2.I navigate away to somewhere else and short time later (< HttpSession
timeout) type in 'amazon.com' to go back. At this point I'd still expect to
see my cart's content.

My Home Page is a portal
1. My home page is my.yahoo.com. When I launch my browser I get
authenticated via a previously-stored cookie.
2.During the course of the same browser session I can navigate away to
another site and then hit CTRL+H to go to my home page again.
3.As I land on my.yahoo.com seems that I am *not* re-authenticated from a
persistent cookie - instead a cookie issued in #1 is used to locate my
server-side state.

In both of these scenarios NOT retrieving state from steps #1 is not merely
a non-optimization - but 
unexpected behavior. Do you agree? 

How would a Wicket-based app address these scenarios?

If there is no out-of-the-box support for the above would something like the
following be reasonable:

1. say my home page is defined by Home.java w/ mountPath of /Home. So going
to app root:
host/MyApp/app/ would redirect to host/MyApp/app/Home.1

2. User does something to alter state of this page -> redirected to
host/MyApp/app/Home.2

3. User navigates away and returns by issuing /MyApp/app/
As it stands, seems like Wicket would:
-'new' Home.java
-redirect to /MyApp/app/Home.3 (not 2)

But what would instead, given Home.class we'd find the latest stored
instance in SessionStore. If does not exist -> create new; else redirect to
that one. Thus in step 3 we'd find and redirect to /Home.2.

Would that not address above scenarios? If it would, why would this not make
sense as default behavior?

thanks again,

-nikita



Eelco Hillenius wrote:
> 
> 
>> How can I get Wicket to reuse object from #2 in step 3?
> 
> You typically don't unless you have a very specific reason for it. But
> if you want, you can implement a custom page factory for instance.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/webpage-instance-scope--tf4564224.html#a13049622
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: webpage instance scope?

2007-10-03 Thread dukehoops

Sorry, I am still a bit unclear:

1.say I go to an app at localhost/MyApp/app
2.App's home page is HomePage.class; its' constructor executes
3.I do browser reload, HomePage's contructor is executed again (so I'm
getting a new object and not one costructed in #2)

How can I get Wicket to reuse object from #2 in step 3?

thanks
-nikita



Johan Compagner wrote:
> 
> pages are stored in the session (if they are statefull, that means they
> have
> callbacks)
> 
> A stateless page could maybe been seen as a request scope object.
> 
> there is no such thing as a combination of those 2.
> 
> johan
> 
> 
> 
> On 10/3/07, dukehoops <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi,
>>
>> I'm evaluating Wicket as a potential replacement for JSF and have a
>> question
>> (tried searching, read wiki):
>>
>> What is the lifespan of a WebPage / Panel subclass instance? In JSF,
>> page-backing beans can be request/session/app scoped. I read that Wicket
>> is
>> an "unmanaged" framework. Does that mean the objects are request-scoped?
>>
>> If so, how how does one implement a session-persistent header (as Panel)
>> +
>> request-scoped body scenario?
>>
>> If this is documented in reference, please kindly point me to the
>> specific
>> section - I could not find anything relevant
>>
>> thanks
>> -nikita
>> --
>> View this message in context:
>> http://www.nabble.com/webpage-instance-scope--tf4564224.html#a13027317
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/webpage-instance-scope--tf4564224.html#a13029062
Sent from the Wicket - User mailing list archive at Nabble.com.


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



is wicket well-suited for integrating JS widgets?

2007-10-03 Thread dukehoops

I'm a complete newbie to wicket (coming from JSF, Swing world) and am in
process of building small examples as part of framework eval. 

I'm looking for a framework that'd make it easy to integrate arbitrary JS ui
components. Let's say Y!UI  or Script.aculo.us develops a new
super-accordion (or autocomplete 2.0) widget?

Is Wicket designed in a way that'd make integrating this widget relatively
easy? Or is this not considered an important use case?

If it is an important use could, could someone please elaborate why Wicket
has own implementation of an Autocomplete widget (rather than integrating an
existing one)?

thanks
-nikita
-- 
View this message in context: 
http://www.nabble.com/is-wicket-well-suited-for-integrating-JS-widgets--tf4564309.html#a13027622
Sent from the Wicket - User mailing list archive at Nabble.com.


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



webpage instance scope?

2007-10-03 Thread dukehoops

Hi,

I'm evaluating Wicket as a potential replacement for JSF and have a question
(tried searching, read wiki):

What is the lifespan of a WebPage / Panel subclass instance? In JSF,
page-backing beans can be request/session/app scoped. I read that Wicket is
an "unmanaged" framework. Does that mean the objects are request-scoped? 

If so, how how does one implement a session-persistent header (as Panel) +
request-scoped body scenario?

If this is documented in reference, please kindly point me to the specific
section - I could not find anything relevant

thanks
-nikita
-- 
View this message in context: 
http://www.nabble.com/webpage-instance-scope--tf4564224.html#a13027317
Sent from the Wicket - User mailing list archive at Nabble.com.


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