Re: Adding comment tags outside the tags

2016-12-19 Thread Entropy
Nabble hid the tags.  Let's see if I can get it to show them:


  
 
  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-comment-tags-outside-the-HTML-tags-tp4676476p4676477.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



Adding comment tags outside the tags

2016-12-19 Thread Entropy
Our web designed is putting these comment tags to conditionlize the 
based on browser.  They are in EVERY page.  So I'd like to encapsulate that
in a parent class or something.  How can wicket write these out dynamically?









--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-comment-tags-outside-the-HTML-tags-tp4676476.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: Refreshingview vs ListView

2016-07-28 Thread Entropy
Thanks for the suggestion.  I think so.  

public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof Expense))
return false;
Expense castOther = (Expense) other;

if (this.getId() == null)
return false;
if (castOther.getId() == null)
return false;

return castOther.getId().equals(this.getId());
}

public int hashCode() {
int result = 17;

if (getId() != null)
result = result * getId().hashCode();

return result;
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Refreshingview-vs-ListView-tp4675224p4675236.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: Refreshingview vs ListView

2016-07-27 Thread Entropy
I replaced the RefreshingView with a PropertyListView again, and it fixed the
validation message issue.  All other changes were still there. 
Unfortunately, it also breaks my new feature as the ListView won't update on
Save.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Refreshingview-vs-ListView-tp4675224p4675226.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



Refreshingview vs ListView

2016-07-27 Thread Entropy
We have a section written by another developer who is gone that I am
attempting to modify.  It was a ListView where items are added via a plus
button, and all items are editable.  A new requirement came down to modify
some text in the fields on save.  

I modified the fields as we saved, then add the container to the target and
made the Listview a RefreshingView.  This gets the behavior I want, but now
our validation messages near the boxes no longer show (the message at the
top saying there ARE error does still show, so the validators are running,
just not showing).  Also, when I modify a box for update, and then hit our
plus button to add a row, the updates revert back to their last saved state.

I double checked, the ListView variant of the page did not have these
issues.  Looking at a beyond compare of the changes, I feel like the change
from listView to RefreshingView was far and away the most significant
change, and that is where I am focusing for now.  I notice his ListView had
setReuseItems(true).  I tried setting the
RefreshingView.setItemReuseStrategy to both the reuse and default strategies
and neither made a difference.

Can anyone give me a pointer?  Does this symptom make you suspect a
particular mistake I might have made?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Refreshingview-vs-ListView-tp4675224.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



Autocomplete has a bug

2016-07-21 Thread Entropy
We are running 6.20, and our test team reported a bug that corresponds to
this bugfix:

https://issues.apache.org/jira/browse/WICKET-5882

However, notice the last comment from ramesh valasa.  When we downloaded
6.23 and applied it to our app, we saw the same issue.  

Basically what happens is that you open the autocomplete, scroll a little,
then click away from the autocomplete to dismiss it.  The autocomplete does
not dismiss.  Instead, you must click in the textfield portion and THEN
click away to dismiss the autocomplete.

Is someone on this issue ramesh posted about?  We'd love to include a fix
for this in our upcoming release.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Autocomplete-has-a-bug-tp4675164.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 on the Amazon Cloud?

2016-05-02 Thread Entropy
We've done our last several apps in Wicket.  It's our framework.  But our
next app, the client has stated they want implemented on Amazon WebServices
Cloud.  Because of the automatic scaling, the advice seems to be that you
want to write your apps to be stateless.  But of course, Wicket is very
stateful.  

So the question here is, has anyone implemented Wicket in AWS Cloud in such
as way as to take advantage of the auto-scaling?  Any tips?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-on-the-Amazon-Cloud-tp4674520.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



StalePageException

2015-10-23 Thread Entropy
I am having a problem where I am always getting a StalePageException,
whenever the ajax request is sent for an AbstractDefaultAjaxBehavior. The
url for the callback to the AbstractDefaultAjaxBehavior is stored in a
HiddenField. This value apparently has a stale page version number(I suspect
this is the reason for StalePageException). How do I avoid this problem. I
don't believe that the page is made stale by a refreshing of the page etc,
since the trigger for callBack() on client-side is the first action taken.
What could cause this issue and what is the best practice for storing the
callback URL for an AbstractDefaultAjaxBehavior? 

thanks in advance for any help. 

java code: 

AbstractDefaultAjaxBehavior behaviorDisable = new
AbstractDefaultAjaxBehavior() { 
  
   private static final long serialVersionUID = 1L; 

   protected void respond(final AjaxRequestTarget target) { 
  System.out.println("here"); 
}   

}; 

form.add(behaviorDisable); 
String callback =
String.valueOf((behaviorDisable.getCallbackUrl())); 
HiddenField hiddenfield = new HiddenField("callBackUrl", new
Model(callback)); 
form.add(hiddenfield); 


html: 

  
  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/StalePageException-tp4672323.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 and warnings

2015-10-15 Thread Entropy
Eventually found it.  Somewhere deep in a re-usable panel written by a
co-worker who no longer works here a set visible was being done on the panel
that was looking for error level messages only.  Nobody knew it was there.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-and-warnings-tp4672235p4672247.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 and warnings

2015-10-15 Thread Entropy
We're using 6.12 if that makes a difference, but it sounds like you don't
think it should.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-and-warnings-tp4672235p4672246.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 and warnings

2015-10-14 Thread Entropy
We searched the code and we do not use the filter.  What's more, during
investigation of the issue, we created a filter that always returns true
from the accept() method of the filter just to see, and in fact when only
warnings are added, the accept method is never called, whereas in a mixture,
we see both warnings and error presents at the time the accept() method is
called.

Here's a sample of the validate method just to show what's going on as we
attempt to figure it out.  We also tried passing the feedback panel in here
and setting the visibility manually, but it gets overridden somewhere along
the way.

But somewhere between this method and the accept() something is dropping
warnings.  

@Override
public void validate(IValidatable validatable) {
String name =validatable.getValue();
ValidationError error = new
ValidationError();
//TODO remove the error application and keep
only the warnings
if (name.contains("St ") ||
name.contains("St.") || name.contains("Ft ") || name.contains("Ft.")) { 
validatable.error(error.addKey("1003")); 
comp.warn(comp.getString("1003"));
} else if (name.contains(".")) {
validatable.error(error.addKey("1004")); 
comp.warn(comp.getString("1004"));
} else if (!isTitleCaps(name)) {
validatable.error(error.addKey("1002"));   
comp.warn(comp.getString("1002"));
}
}  




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-and-warnings-tp4672235p4672239.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 and warnings

2015-10-14 Thread Entropy
Our feedbackpanels work fine, have for a while.  But we just got a new
requirement to add warnings.  We find that when there is at least one error
message, the panel shows all messages, regardless of their level, but when
there are only warnings, the panel remains hidden as if there were no
messages.

Is there a setting somewhere to turn this on?  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-and-warnings-tp4672235.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



Show warnings as yellow

2015-10-09 Thread Entropy
We have a feedback panel, and we want errors to be red and warnings to be
yellow.  I know to use warn() instead of error, but how can i make them show
different in color?  And I have a feeling that for 508 reasons, I may be
required to show something next to the warnings to indicate they are
warnings.  Is there a way I can specify that warnings get a little extra
snippet of HTML other than to provide it on each and every warning?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Show-warnings-as-yellow-tp4672205.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 Ajax Debug error

2015-10-08 Thread Entropy
You are correct.  I eventually tracked it down to a changed method in our
app layer.  But it threw me that the Wicket Ajax Debug reported it instead
of it manifesting as a plain old javascript error in firebug.

Brian

On Thu, Oct 8, 2015 at 6:01 AM, Martin Grigorov-4 [via Apache Wicket] <
ml-node+s1842946n4672170...@n4.nabble.com> wrote:

> Hi,
>
> They are not Wicket items.
> Whenever you press an Ajax submit button Wicket will try to collect the
> data (key=value) for the form elements and send them with Ajax. It breaks
> for some reason in your app.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Oct 8, 2015 at 1:29 AM, Entropy <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4672170&i=0>> wrote:
>
> > We have a feature that has been working for months.  We're not sure when
> it
> > stopped working, but it has.  It's an ajax button, and the event never
> gets
> > to the server event.  The wicket debug window flashes red and says:
> >
> > In firefox:
> > INFO: focus set on declineSharingButton
> > ERROR: An error occurred while executing Ajax request:TypeError: hidden
> is
> > null
> > INFO: focus removed from declineSharingButton
> >
> > In IE:
> > INFO: focus set on declineSharingButton
> > ERROR: An error occurred while executing Ajax request:TypeError: Unable
> to
> > get value of the property 'dom': object is null or undefined
> > INFO: focus removed from declineSharingButton
> >
> > Are these wicket items, hidden and dom that are null because of
> something I
> > did?
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-Debug-error-tp4672163.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4672170&i=1>
> > For additional commands, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4672170&i=2>
> >
> >
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-Debug-error-tp4672163p4672170.html
> To unsubscribe from Wicket Ajax Debug error, click here
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4672163&code=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0NjcyMTYzfC05NzMyODEwMzU=>
> .
> NAML
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-Debug-error-tp4672163p4672172.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 Ajax Debug error

2015-10-07 Thread Entropy
We have a feature that has been working for months.  We're not sure when it
stopped working, but it has.  It's an ajax button, and the event never gets
to the server event.  The wicket debug window flashes red and says:

In firefox:
INFO: focus set on declineSharingButton
ERROR: An error occurred while executing Ajax request:TypeError: hidden is
null
INFO: focus removed from declineSharingButton

In IE:
INFO: focus set on declineSharingButton
ERROR: An error occurred while executing Ajax request:TypeError: Unable to
get value of the property 'dom': object is null or undefined
INFO: focus removed from declineSharingButton

Are these wicket items, hidden and dom that are null because of something I
did?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-Debug-error-tp4672163.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 modal, change the parent page

2015-06-15 Thread Entropy
That is correct, my modal shows a page.  I wasn't aware a modal could show
just a panel.  I will look into this.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-modal-change-the-parent-page-tp4671163p4671168.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 modal, change the parent page

2015-06-15 Thread Entropy
Yes, the method is called, and yes the modal closes.  However, in the same
event as the closing modal, I need to let the parent page update itself
based on what the user did.  And that's the part that doesn't work.

A quickstart would be hard because this is in the middle of a large workflow
with lots of stuff that probably isn't relevant to the issue because it was
already there.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-modal-change-the-parent-page-tp4671163p4671167.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 modal, change the parent page

2015-06-14 Thread Entropy
I have a wicket modal that is used to let the user select from a couple
options on a popup button.  On close, depending on what button they hit on
the popup, I need to run a javascript event on the calling page as I close
the window, AND I need to alter a label and ExternalLink on the parent page.

But wicket is largely ignoring me.  I used target.appendJavascript() to
invoke the javascript method, yet it never gets invoked.  I also
setOutputMarkupId on the controls I need to update (and their parent
container in fact), and I added all to the target.  I changed their models
to affect their content.  So label.setDefaultModel(new Model("newValue"))
for example, and for the ExternalLink, I used the same to affect the url,
and used setBody("newValue") to change the body of the link.

Am I doing to wrong?  This is all in response to a button in the modal, so I
thought maybe the target is the wrong target.  I saw an example where
someone used ModalWindow.WindowClosedCallback, and so i moved the logic into
that event, using that target, and still, nothing seems to update on the
front end.

So I must be doing it wrong.  Advice?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-modal-change-the-parent-page-tp4671163.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



onchange control visibility according to multiple controls values

2015-03-31 Thread Entropy
I have a requirement to control the visibility of some controls and the
enabling of others based on certain legal combinations of values of various
controls on the page.  I attached AjaxEventBehaviors to each control that is
needed as input to this, but it seems like the values are other controls
aren't included, which is not terribly surprising.

How can I get wicket to supply those values so I can make the decision of
what to enable/show/hide/disable?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/onchange-control-visibility-according-to-multiple-controls-values-tp4670130.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: Radio buttons spread across page

2015-03-19 Thread Entropy
Picture a page with multiple sections.  Each section consists of multiple
form elements, but there is also a radio button per section that all belong
to a single radio group.  But the controls of those sections are not part
of the radio group so it seems to not make sense to me to make these
controls children of the radio group as well.  I have since made them
children of that group, and it works so far.  But it doesn't "feel right"
so if there's an alternative arrangement, i would be interested.

The radio buttons need to behave as a group, so they need to be children of
the radiogroup, but the controls near them shouldn't have to be part of
that group it seems to me.


Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and
wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx

On Thu, Mar 19, 2015 at 7:55 AM, Simon B [via Apache Wicket] <
ml-node+s1842946n4670044...@n4.nabble.com> wrote:

> Hi, are you still working on this?
>
> I'm not completely sure what you mean, could you clarify?
>
> So you select an option in the radio group and then the corresponding form
> inputs show and the others are hidden?
>
> I assume you want to do it with ajax is that right?
>
> Let me know and I'll try and help you.
>
> Cheers
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Radio-buttons-spread-across-page-tp4670011p4670044.html
>  To unsubscribe from Radio buttons spread across page, click here
> 
> .
> NAML
> 
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Radio-buttons-spread-across-page-tp4670011p4670045.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



Radio buttons spread across page

2015-03-16 Thread Entropy
We have a page wherein we have a radio group that has the user selecting
which "section" of the page applies to their situation with a different set
of fields under each.  I wan these radio buttons to behave as a group, but I
don't want to put a bunch of controls under the group that aren't really
part of the rafdio group (which by the way, will include another radio
group...albeit a more traditional one).

How does one do this?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Radio-buttons-spread-across-page-tp4670011.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



Wierd Validation

2015-01-23 Thread Entropy
We have a page where the client has made some odd demands for behavior and I
need to know if they are possible and if so, how one would do them.

The basic gist is that the user is filling out alot of data and may not know
it all right away.  So they can enter the record in a sort of "scratch" way,
leaving fields blank initially.  But, if they enter something, we will apply
full validation.  

However, we want to tell the user that the field is required...but save it
anyway.  So imagine the user fills out 50% of the fields, sees errors on
blur for format failures, then hits save.  The form puts yellow warning
messages on the component feedback panel instead of red error messages
saying "Field required" or whatever.

But, on the server, as long as all the red validations (the formats) are
satisfied, we still want to save the record so that the user can come back
and fill the rest later.

There are several things I don't know how to do here:
1) How do I add a different css class to a warning message as opposed to a n
error.
2) How do I get control if only warnings are issued so I can save.
3) I still want to show a message up top in the message panel that alerts
them to look at their controls for warnings/error.

Help?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wierd-Validation-tp4669105.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: RadioGroup not updating in ajax event

2014-11-17 Thread Entropy
Nobody has ideas?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioGroup-not-updating-in-ajax-event-tp4668415p4668438.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



RadioGroup not updating in ajax event

2014-11-14 Thread Entropy
We have an ajax event initiated by one panel that affects the data, and needs
to force a redraw of a radiogroup in another panel.  The ajax event arrives,
we add the radiogroup to the target, update the model that backs the
ListView, but the populateItem method never re-fires to redraw.  Note that
this is in Wicket 1.4.7.

The following is the creation of the radio group.

group = new RadioGroup("roles", new Model(getDefaultBean()));
group.setOutputMarkupId(true);
group.setRenderBodyOnly(false);
add(group); 
appBean.setUmcOnlyRoles(umcOnlyRoles);

LoadableDetachableModel modelRoles =  new LoadableDetachableModel() {   
   protected Object load() {   
   return appBean.getUmcOnlyRoles();   
   }   
 };
// add all roles
ListView rolesList = new ListView("radioList",
modelRoles){

protected void populateItem(final ListItem item) {
  final KeyValueBean bean = item.getModelObject();
 
  @SuppressWarnings("rawtypes")
  Radio radio = new Radio("radio", item.getModel()) {
//snipped for brevity
  }
}
};
rolesList.setOutputMarkupId(true);
rolesList.setReuseItems(true);
 
group.add(rolesList);

In the ajax event we do this:
Panel app = (Panel)get("apps");  
UMCApplicationPanel umc = (UMCApplicationPanel)app.get("umcPanel");
RadioGroup rolesMarkup = (RadioGroup)umc.get("roles");   

//snipper for brevity

bean.setUmcOnlyRoles(umcOnlyRoles);
bean.seteShareChecked(eShareChecked);
target.addComponent(rolesMarkup);

The "bean" in this event is the same object as the "appBean" in the load
method of the detachable model in the constructor above.  I can confirm that
the detachable model load fires and the right data is in it.  Yet the
populateItem never runs...so the list is unchanged.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioGroup-not-updating-in-ajax-event-tp4668415.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 error page runs twice

2014-10-27 Thread Entropy
With a slight modification, that worked.  I used:

return new RenderPageRequestHandler(new PageProvider(new
ESPApplicationErrorPage(ex))); 

Thanks Martin!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-error-page-runs-twice-tp4668093p4668115.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 error page runs twice

2014-10-27 Thread Entropy
Okay, I found this, the first request URL and query string are:

/EquitableSharing/?19-1.IBehaviorListener.1-share-form-toolContainer-declineSharingButton

The second is:

/EquitableSharing/wicket/bookmarkable/gov.usdoj.afms.esp.application.ESPApplicationErrorPage

So it seems like even though the error page RUNS in the first request,
wicket is trying to redirect to it in order to make the URL bookmarkable. 
Of course, nobody wants a bookmarkable error page, that would just be silly. 
So I must be triggering this behavior by accident somewhere.

The error page itself just extends WebPage.  In the app init, the error page
is set up like so:

// set the error page
IApplicationSettings settings = getApplicationSettings();
settings.setInternalErrorPage(ESPApplicationErrorPage.class);
this.getRequestCycleListeners().add(new 
AbstractRequestCycleListener(){
public IRequestHandler onException(RequestCycle cycle, 
Exception ex) {
cycle.setMetaData(EXCEPTION_KEY, ex);
return null; 
//cycle.getRequestHandlerScheduledAfterCurrent();
}

});
   
getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);

We have some calls to mountPage in the app init, but the error page is not
involved.  Where is this behavior coming from I wonder?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-error-page-runs-twice-tp4668093p4668113.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 error page runs twice

2014-10-27 Thread Entropy
Well, you are definitely right that there are multiple requests for whatever
reason.  I can see WicketServlet doPost called, the method runs, throws the
error, the error page gets control with the exception, then a doGet occurs
and the error page runs again without the exception.

I can't really see the details as I don't have the source for Wicket 6.12.0. 
I went to http://www.apache.org/dyn/closer.cgi/wicket/6.12.0 and none of the
links work.  Where can I download 6.12.0 source so I can attach it to my
debugger?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-error-page-runs-twice-tp4668093p4668111.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 error page runs twice

2014-10-27 Thread Entropy
The exception occurred within an AjaxButton.  In this case, a service was not
responding, we want to show our error page, and put a custom message up
indicating that it is a service problem, call the help line or try again
later blah blah blah...

I don't think any redirects are involved.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-error-page-runs-twice-tp4668093p4668109.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 error page runs twice

2014-10-24 Thread Entropy
I have a requirement that when certain kinds of exceptions are thrown, I want
to customize my exception error page.  I stuffed the exception into the
requestcycle and retrieve it in the page like so:

Exception exception =
getRequestCycle().getMetaData(ESPApplication.EXCEPTION_KEY);

I watch through breakpoints or log statements and the exception is provided
the first time through, but after it processes it, the error page runs a
second time, this time with a null in that value.  the result is that my
error page is not getting what it needs, and renders without the needed
info.

Why would the error page run twice?  I don't see any additional exceptions
in the log, and the error page does render...it just renders as if the
exception object were null.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-error-page-runs-twice-tp4668093.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: URL to resource

2014-08-01 Thread Entropy
Nevermind, I found the urlFor method on the component.  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/URL-to-resource-tp4666839p4666842.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



URL to resource

2014-08-01 Thread Entropy
I have a javascript spellchecker dictionary file located in the package with
my re-usable SpellCheckBehavior that generated the javascript to apply
spellcheck to my text fields.  I want the generated javascript to have the
URL to that dictionary file.

I know I need a resource reference to it, but I don't see a geturl(), so I
am thinking I must be using the wrong class.  What am I supposed to do in
this situation?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/URL-to-resource-tp4666839.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: Excel spreadsheet and cache duration

2014-07-31 Thread Entropy
That workaround had occurred to us.  We thought there might be a better way,
but if that is the recommended solution, we feel better about it.  Just
didn't want to overlook a silver bullet.

While it isn't the exact same thing, I am also having an exception maybe
someone could shed light on in the same process.  This happens as we
download the file.  In fact, not until we select Opn/Save in the browser. 
This app was recently upgraded from 1.4 to 1.6, and we're fairly sure this
error didn't used to happen.

Note that it doesn't seem to actually stop the app from working, just
pollute the logs.  The feature still works.  Any ideas?  We're using WAS7,
and I've seen some google hits saying this is about something called WebDAV
and WAS 7 doesn't support it.  

[7/31/14 10:38:51:822 EDT] 0018 webappE
com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet
Error]-[Wicket]: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: Method
PROPFIND is not defined in RFC 2068 and is not supported by the Servlet API 
at
com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:637)
at
com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Excel-spreadsheet-and-cache-duration-tp4666828p4666831.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



Excel spreadsheet and cache duration

2014-07-31 Thread Entropy
We have an ajax button that submits a form that, if the parameters are right,
will download an excel file.  The developers who wrote the page used an ajax
behavior and then write the request out as javascript like so:

target.appendJavaScript((CharSequence) ("window.location.href='" +
getCallbackUrl() + "';"));

After building the byte array resource and sticking it in place via:

getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(new
ResourceRequestHandler(rptRS, null));

The problem with this is that when a person changes the parameters and
resubmits the form to get a different dynamically generated excel, there's
some caching in play and they get the same one they downloaded earlier.  

We put getResourceSettings().setDefaultCacheDuration(Duration.NONE); in the
application init and it seemed to solve it.  But setting to no cache for the
whole app seems like overkill.  We'd like to set it for this one download. 
I've seen forum posts that suggest there is a setCacheDuration on some
specific objects, but none of the ones I seem to try.

How would I set the cache to none for THIS object/URL?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Excel-spreadsheet-and-cache-duration-tp4666828.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: InvalidUrlException

2014-07-28 Thread Entropy
It turns out our ops team runs a script every ten minutes to test whether the
app was up.  The script was issuing this wierd URL a couple times per run
due to it being broken.

However, to protect against the future possibility, i implemented the
forward to HomePage thingy discussed above.  For posterity, here's how:

In the application object, I did the below and it worked fine.  Now that we
know real users weren't doing it, maybe this is overkill, but we're trying
to clean up our logs a bit.

@Override
protected IRequestCycleProcessor newRequestCycleProcessor() {
  return new WebRequestCycleProcessor() {
  @Override
  protected IRequestCodingStrategy newRequestCodingStrategy() {
WebRequestCodingStrategy.Settings stratSettings = new
WebRequestCodingStrategy.Settings();
stratSettings.setMountsCaseSensitive(false);
return new WebRequestCodingStrategy(stratSettings) {
  @Override
  protected void addBookmarkablePageParameters(final Request
request, final RequestParameters parameters) {
final String requestString =
request.getParameter(WebRequestCodingStrategy.BOOKMARKABLE_PAGE_PARAMETER_NAME);
if (requestString != null) {
  final String[] components = Strings.split(requestString, ':');
  if (components.length != 2) {
throw new RestartResponseException(HomePage.class);
  } else {
super.addBookmarkablePageParameters(request, parameters);
  }
}
  }
};
  }
  };
}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/InvalidUrlException-tp4666755p4666771.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: InvalidUrlException

2014-07-28 Thread Entropy
I am considering subclassing WebRequestCodingStrategy to override that one
method (and otherwise just call super() everywhere) and forward that
condition to the HomePage instead of exceptioning.  But I am a little unsure
how to get my subclassed WebRequestCodingStrategy into use.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/InvalidUrlException-tp4666755p4666767.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



InvalidUrlException

2014-07-26 Thread Entropy
We're getting alot of these in the logs from a Wicket 1.4.7 app.  I presume
that it came from some link somewhere that built improperly.  Our classes
aren't on the stack, so it's hard to know where in the app it's coming from. 
Any suggestions on how to track this down?

I do know that by modifying the URL on the address bar to:

http://localhost:9080/ManagementCenter/?wicket:bookmarkablePage=:

I can create the error.  But why would someone do that?  Moreover we see
quite a few of these, so it's not like one mistake.  If you remove less
(leaving an incorrect page class name) you get 404.  Remove more (the equals
seems to be the key character) you get redirected to the HomePage.  I'd be
fine with either of those behaviors.  Instead, this gets an exception that
shows on the log, and presumably some user gets redirected to the error
page.

I see this comes from the WebRequestCodingStrategy class.  But what would
create a broken link like that?  I certainly had no luck just clicking
around the app. 

[7/25/14 16:46:39:844 EDT] 007c SystemOut O ERROR [WebContainer :
12] (RequestCycle.java:1521) - org.apache.wicket.WicketRuntimeException:
Internal error parsing wicket:interface = 
org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.WicketRuntimeException: Internal error parsing
wicket:interface = 
at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:232)
at org.apache.wicket.Request.getRequestParameters(Request.java:183)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:858)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:936)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:985)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:670)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3742)
at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:929)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:178)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at
com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1772)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
Caused by: 
org.apache.wicket.WicketRuntimeException: Internal error parsing
wicket:interface = 
at java.lang.Throwable.(Throwable.java:67)
at
org.apache.wicket.WicketRuntimeException.(WicketRuntimeException.java:41)
at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInt

Re: Behavior to modify attributes

2014-07-21 Thread Entropy
Oh, I just tried it in my common page's onBeforeRender.  Evidently I can do
this from the page.onBeforeRender, just not from the behavior
onBeforeRender.  Which is probably what you meant.  Okay, I can work with
that.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Behavior-to-modify-attributes-tp487p4666715.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: Behavior to modify attributes

2014-07-21 Thread Entropy
> Instead of doing: 
>   page.add(new MyBehavior(components)) 
> do 
>  Behavior b = AttributeModifier.append(); 
>  for (Component c : components) { 
> c.add(b) 
>  } 

Certainly that would work,  I am trying to create a re-usable Behavior for
my app that any page wishing to incorporate this feature can add.  I thought
behaviors would be perfect for this, but it seems one event is to early (the
components may not have been all added yet) and another too late (not
allowed to add AttributeModifiers).

I have a common abstract page class from which all my classes extend, and I
certainly could put a method on there, but I'd be relying on the individual
programmer to call the method last in his constructor, rather than relying
on an event which guarantees it.

Seems like there ought to be a goldilocks place to put this...not too early,
not too late.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Behavior-to-modify-attributes-tp487p4666714.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



Behavior to modify attributes

2014-07-18 Thread Entropy
I have a third party js library I am applying to my page.  I have to mark the
fields I want excluded with a particular HTML attribute.  So I am
implementing a custom behavior to do the work, and I want the behavior to
act like it's an opt-in behavior instead of opt-out.

So I wrote my behavior to take a set of components in it's constructor and
then, I want it to iterate through the text areas and text fields on the
components to mark the ones NOT provided wit the opt-out attribute.  

However, when I add an AttributeModifier to a tag in beforeRender I get an
exception:

org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
after render phase has started (page version cant change then anymore)
at org.apache.wicket.Component.checkHierarchyChange(Component.java:3595)
~[wicket-core-6.12.0.jar:6.12.0]

I could move the code to the bind I suppose, but then user's of my component
would have to make sure they added the behavior after ALL components, even
the ones that are going to be excluded, have been created.

Is there an event between these two?  Something the behavior can hook into
to do it's work after the construction of the components would be done, but
before beforeREnder since that seems to create issues?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Behavior-to-modify-attributes-tp487.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: Error page stack trace

2014-06-04 Thread Entropy
Nevermind, I figured out from other examples that they tend to share the key
in a static constant so that it becomes the object identity that allows you
to access the meta data object.  I wonder if that is really the intended
use, but intended or not, it works.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119p4666129.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: Error page stack trace

2014-06-04 Thread Entropy
The meta data facility looks intriguing but is a bit confusing.  How is this
supposed to work?  I was expecting something like a map, but the key has to
be this abstract object that takes an arrya of entry objects?  And each
entry object demands reference back to it's key?  This is a confusing
object, and the examples I see online haven't been very illuminating.  How
would I store and retrieve the exception from this collection by a simple
string constant?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119p4666127.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



Error page stack trace

2014-06-04 Thread Entropy
We set our error page via setInternalErrorPage on IApplicationSettings in
1.6.  I'd like to bury the stack trace in a comment in the rendered page in
our staging and dev environments to save time.  But I have no idea how to
get the originating trace in the error page.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119.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: ComponentFeedbackPanel near radio group not working

2014-06-04 Thread Entropy
DOH!  I should have responded earlier.  This turned out to be a cut &
paste error.  A different part of the code was doing something
similar, the code was cut & pasted, but the ID was unchanged, and so a
different ComponentFeedbackPanel was ALSO bound to that control, and,
I presume, was taking the errors away from the one that was supposed
to get them.

Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx


On Tue, Jun 3, 2014 at 10:26 PM, Paul Bors [via Apache Wicket]
 wrote:
> Do you use any custom feedback filters?
>
> Have a great day,
> Paul Bors
>
>> On May 31, 2014, at 9:29 AM, Entropy <[hidden email]> wrote:
>>
>> On the group.  It's the required rule.  You can see group is set to
>> required.
>> And group is bound to the component feedback panel.
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077p4666079.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> -
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
> ~ Thank you,
> p...@bors.ws
>
>
> 
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077p4666109.html
> To unsubscribe from ComponentFeedbackPanel near radio group not working,
> click here.
> NAML


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077p4666118.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: ComponentFeedbackPanel near radio group not working

2014-05-31 Thread Entropy
On the group.  It's the required rule.  You can see group is set to required. 
And group is bound to the component feedback panel.  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077p4666079.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



ComponentFeedbackPanel near radio group not working

2014-05-30 Thread Entropy
I am mystified.  I have an error panel at the top of my page that show the
errors for the page, but near each control is ALSO a ComponentFeedbackPanel
to show the error near the control.  These work fine for every control
except this radio group.  The error shows up top, has the right label, but
does not show near the control.  The tag is there, the component is added to
the hierarchy.  I looked a view source and could see the error messages near
the other controls, but not this one.  I scanned to see if I accidentally
hide the thing anywhere, and it does not appear so.

HTML:


wall of text deleted for brevity
 


Yes


No







Java:
//TASK FORCE
WebMarkupContainer taskForceContainer = new
WebMarkupContainer("taskForceContainer"){
@Override
public boolean isVisible() {
return isEnabledInHierarchy() && 
super.isVisible();
}
};
oagForm.add(taskForceContainer);
RadioGroup group = new
RadioGroup("taskForceRadio", new
PropertyModel(request, "sharingTAAgreement")){
@Override
public boolean isVisible() {
return isEnabledInHierarchy();
}
};
group.setRequired(true);
group.setLabel(new Model("Task Force Agreement"));
taskForceContainer.add(group);
taskForceContainer.setVisible(!isFCF());
group.add(new Radio("taskForceRadioYes", new 
Model("Y")));
group.add(new Radio("taskForceRadioNo", new 
Model("N")));
taskForceContainer.add(new Label("taskForceRadioReadOnly", new
Model(decodeYesNo(request.getSharingTAAgreement( {
@Override
public boolean isVisible() {
return 
!this.getParent().get("taskForceRadio").isEnabledInHierarchy();
}
});
taskForceContainer.add(new 
ComponentFeedbackPanel("errTaskForce",
group).setEscapeModelStrings(false));

You can see that I am adding the group to the componentfeedbackpanel and so
forth.  Any idea why this control isn't whoing the messages?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077.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



Link in Feedback Message

2014-05-02 Thread Entropy
I am currently putting a link into one of our feedback messages so give the
user a quick way to navigate in response to a particular condition.  I am
doing it by just writing the tags into the message like so:String url =
this.urlFor(SearchResultPage.class, new PageParameters().set("newSearch",
"True")).toString();error("The selected records have been successfully
updated.   Search case for updated records <" + url + ">  .");this
works...about 90% of the way.  But I recently discovered that I need to do a
little work before that link navigates away.  I need to get the onclick
event.  How can I get an event on the server that the link has been clicked
and react to it?I am considering a workaround wherein I could provide an
extra parameter that the target page detects, and causes it to run my code
there.  But that's not ideal.  I'd rather keep this page's code in this
page.  Is there a way to do this?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-in-Feedback-Message-tp4665648.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: Feedback panel title area

2014-04-25 Thread Entropy
I just tried putting some text inside the feedback panel's html like so:

This is a
test

That didn't work.  "This is a test" was overwritten when the feedback panel
rendered.  Which is exactly what I expected it to do.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Feedback-panel-title-area-tp4665580p4665583.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



Feedback panel title area

2014-04-25 Thread Entropy
Is it possible to put some HTML inside the feedback panel that isn't
messages?  Possibly for some formatting or a title/instructions?  The stuff
would become visible at the same time as the error panel, but is static
content otherwise outside the messages?  I tried just sticking some HTML in
there, but wicket overwrote it as expected.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Feedback-panel-title-area-tp4665580.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



Feedback Panel Request

2014-04-22 Thread Entropy
My analysis team has made some requests on how to show errors that I'd like
some advice on how to accomplish in wicket.

We have a page level feedback panel as well as a component level feedback
panel.  Currently, errors show in both and as plain text.

Request #1 - Can we put links in the page feedback panel only to jump to the
control for that message.  So a  in each message, but ONLY on the top
feedback panel.

Request #2 - Show required messages in page feedback panel, but NOT in the
component feedback panel.  As there will be little required asterisks, these
messages are redundant at the control level, and they'd like to only show
them in the page level feedback panel.

I've no idea how to do either of these. <#SomeControl> 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Feedback-Panel-Request-tp4665536.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: AjaxButton does not respect return false on client side

2014-04-21 Thread Entropy
Nevermind.  This secondary issue was caused by one of my many experiments to
solve the original issue.  Further, I also found that if I had needed to do
this, the method to override is getOnClickScript().

I will say, that I am a little uncertain if this new style is a good thing. 
Traditionally, Wicket has seemed to work pretty hard to make HTML things
stay in HTML and Java things stay in Java.  I now seem forced to put
javascript code that controls buttons in Java.  

I've put javascript in my java before of course, but usually only when the
javascript needed dynamic elements from the server.  Now this seemingly
client-side behavior is pulled into the server.

But my problems is resolved.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxButton-does-not-respect-return-false-on-client-side-tp4665497p4665499.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: AjaxButton does not respect return false on client side

2014-04-21 Thread Entropy
So I figured out that what's happening is that evidently wicket 6 doesn't put
the javascript inline, but uses event listener registration or whatever. 
And it seems like this overwrites my inline event in an AjaxButton.  The
solution:

@Override
protected void 
updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
AjaxCallListener listener = new 
AjaxCallListener();
listener.onPrecondition("return copyClick();");
attributes.getAjaxCallListeners().add(listener);
}

However, no sooner do I solve this, then I find that one of my submit
buttons (which is just a new Button, not AjaxButton) is having a similar
problem.  But the above method does not exist on mere Button.  How can I do
something similar?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxButton-does-not-respect-return-false-on-client-side-tp4665497p4665498.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



AjaxButton does not respect return false on client side

2014-04-21 Thread Entropy
I have an ajax button that launches a modal form.  It binds to:



I've replace the javascript call that checks the condition with a flat
return false to simplify things.  This still launches the event, and renders
the modal window.  

The button code itself:

AjaxButton btnCopy = (AjaxButton) new AjaxButton("btnCopy") {
private static final long serialVersionUID = 1L;
@Override
public void onSubmit(AjaxRequestTarget target, Form 
arg1) {
onSRTabCopy(target);
}

@Override
public boolean isEnabled() {
return true;
}
}.setDefaultFormProcessing(false); 

Is wicket doing something to get in front of my return false?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxButton-does-not-respect-return-false-on-client-side-tp4665497.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



Modal Window and RestartResponseException

2014-04-17 Thread Entropy
I have an ajaxlink on my modal window that takes the user to a new page, one
the modal window is not on.  I have traditionall done stuff like this with
RestartResponseException.  But when I use that from the modal window, the
new page renders INSIDE the modal window.  Not the desired behavior.

I tried adding a ModalWindow.closeCurrent(target); above the exception, but
the exception seems to swallow that up...which makes sense.

How can I close the window AND redirect in one fell swoop?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-Window-and-RestartResponseException-tp4665442.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



Two Questions

2014-04-14 Thread Entropy
1) I have a feedback panel and when i add messages under info(), they do not
show up.  When I add the message via error(), it shows as expected.  Why
might this be?

2) I am using the @SpringBean annotation, works fine.  But I want to inject
a string property value that came from the properties file my spring reads. 
How would I get that?  I tried ${myProp} in the @SpringBean, but that
doesn't work...and I kinda thought it would be a longshot.  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Two-Questions-tp4665394.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: Modal Popup JS errors on close

2014-04-09 Thread Entropy
Just discovered that this happens in Firefox, not in IE, and even then only
when firebug is open.  So maybe not a real problem?  But it is a little
alarming to me that I get it even then.  I'd still like to solve it, but
obviously, that makes it less important.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-Popup-JS-errors-on-close-tp4665319p4665320.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



Modal Popup JS errors on close

2014-04-09 Thread Entropy
We have a modal popup in an app that uses Wicket 1.4.7.  We recently upgraded
out first app to Wicket 6.8, and we want to add a modal popup to it. 
However, and it comes up okay, but on close, I get a JS error.

Firebug says: this.content.contentWindow.Wicket.Window is undefined on line
785 of modal-ver-[a long number].js.  I'm presuming the number is dynamic
and meaningless on that.

Note that we do replace the jQuery inside wicket with 1.8.2 in the
application object.  But everything works until this point, so I don't
particularly have any reason to suspect it.

Here's the part of the head where the script includes are being done.









Copy Sharing Request To Other Assets In Same Case -
04192011-02








--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-Popup-JS-errors-on-close-tp4665319.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: One field enabled in a disabled container

2014-03-27 Thread Entropy
Yeah, I considered that.  Unfortunately the hierarchy is such that these two
are in the middle and buried a bit in the HTML hierarchy.  In a simpler
situation, that would've worked spendidly.  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/One-field-enabled-in-a-disabled-container-tp4665156p4665160.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



One field enabled in a disabled container

2014-03-27 Thread Entropy
A wierd requirement was just handed to me.  We have a form that gets
enabled/disabled depending on business rules as normal.  However, now I am
being told to disable ALL BUT TWO fields in a particular state.  Is my only
option here to leave the form enabled and then disable EVERY other control
explicitly like:

form.get("A").setEnabled(true);
form.get("B").setEnabled(true);
form.get("C").setEnabled(true);
form.get("D").setEnabled(true);
[...etc]

Or is there a way to disable the container, and spare specific fields?  I
suspect I'll have to do the former, but there's quite a few fields and I am
hoping there's some wicket trick.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/One-field-enabled-in-a-disabled-container-tp4665156.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 event not quite working as planned

2014-03-24 Thread Entropy
I solved my button issue by creating two buttons and toggling their
visibility rather than changing the label on a single button.  i still think
the original solution should have worked, but I have fixed the problem.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ajax-event-not-quite-working-as-planned-tp4665083p4665100.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 event not quite working as planned

2014-03-23 Thread Entropy
Setting that AND adding the form that contains the list to the target (which
was inspired by that bit of text) seems to have solved issue #2, the
collapse.  Thanks!

However, issue #1, the button label, is still not working correctly.  Any
insight there?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ajax-event-not-quite-working-as-planned-tp4665083p4665085.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 event not quite working as planned

2014-03-23 Thread Entropy
I have a listview where each row has an expandable section in it to show
additonal detail on some rows.  That works.  But two aspects aren't working.

1) I am trying to change the + on the button to a -, and then back again
when we collapse.  My code looks like:
if(invokingButton.getLabel().getObject().equals("+"))
invokingButton.setLabel(new Model("-"));
else
invokingButton.setLabel(new Model("+"));
target.add(invokingButton);

The label never changes.  From stepping in, I can say that yes, the label
set to "-" line does run when expected.  yes, outputmarkupId is set to true.

Button code when created:
item.add(new AjaxButton("btnExpander"){
private static final long 
serialVersionUID = 1L;
public void onSubmit(AjaxRequestTarget 
target, Form form) {
onActivityLogExpansion(target, 
this, activity);
}
}.setLabel(new Model("+"))
 .setOutputMarkupId(true).setVisible(showReject || 
showSubmit)
 .setOutputMarkupPlaceholderTag(true));


2) When I go to collapse the row, the event gets to the server, things seem
to work stepping through the code, but then the region does not collapse and
I get the following in the wicket ajax debug:

INFO: 

ERROR: Wicket.Ajax.Call.processComponent: Component with id
[[expandableWhenReject4c]] was not found while trying to perform markup
update. Make sure you called component.setOutputMarkupId(true) on the
component whose markup you are trying to update.
INFO: Response processed successfully.
INFO: refocus last focused component not needed/allowed
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink

The container being hidden is created as:
WebMarkupContainer expandableReject = new
WebMarkupContainer("expandableWhenReject", new
Model((ShareActivityPlusDecode)
item.getDefaultModel().getObject()));
expandableReject.setVisible(false);
expandableReject.setOutputMarkupId(true);

expandableReject.setOutputMarkupPlaceholderTag(true);

and in the event:

WebMarkupContainer wmc = (WebMarkupContainer)
invokingButton.getParent().get("expandableWhenReject");
wmc.setVisible(!wmc.isVisible());
target.add(wmc);

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ajax-event-not-quite-working-as-planned-tp4665083.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: Show textfield as plaintext when disabled?

2014-03-20 Thread Entropy
Of course the instant I submit the question, I thought of something else to
try.  I stopped overriding onComponentTag and changed the body to:

@SuppressWarnings("unchecked")
public void onComponentTagBody(final MarkupStream markupStream, final
ComponentTag openTag) { 
if (!isEnabledInHierarchy()) { 
replaceComponentTagBody(markupStream, openTag,
convertValueToRender((T)getDefaultModelObject())); 
}
super.onComponentTagBody(markupStream, openTag);
} 

it turns out the prior error was when the item was enabled.  The super lets
me get past the enabled phase and to when it is disabled.  At which point
the below error happens.  This error is much more to the point.  It doesn't
like that I have children and am erasing my body.  But that's actually what
I want to do.  How can I tell wicket that I really do want that?

And of course the TextArea question still stands.

This results in 
org.apache.wicket.markup.MarkupException: Expected close tag for
'' Possible attempt to embed
component(s) '' in
the body of this component which discards its body



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Show-textfield-as-plaintext-when-disabled-tp4664723p4665062.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: Show textfield as plaintext when disabled?

2014-03-20 Thread Entropy
*bump*  

I still need help making this technique work for TextAreas whose
onComponentTagBody methods are final.  I have also discovered the need for
this in a RadioGroup.  I apply RadioGroup to a  which
wraps some markup that includes my radio buttons.  Works fine.  In readonly,
I wanted to display just the text of the selected radio button.  I applied
similar styles and got the below error.  Can anyone advise on what I am
doing wrong?

CODE:
public String convertValueToRender(T curValue) {
if(curValue == null)
return "";
else
return curValue.toString();
}

public void onComponentTag(ComponentTag tag) { 
super.onComponentTag(tag); 
if (!isEnabledInHierarchy()) { 
tag.setName("span"); 
tag.setType(TagType.OPEN); 
} 
} 

@SuppressWarnings("unchecked")
public void onComponentTagBody(final MarkupStream markupStream, final
ComponentTag openTag) { 
if (!isEnabledInHierarchy()) { 
replaceComponentTagBody(markupStream, openTag,
convertValueToRender((T)getDefaultModelObject())); 
}
} 

HTML:


  

Yes
  
  

No
  




Error:
org.apache.wicket.markup.MarkupException: Expected close tag for

at
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.Component.renderClosingComponentTag(Component.java:4253)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2557)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.internalRender(Component.java:2379)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.render(Component.java:2307)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1484)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1683)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.internalRender(Component.java:2379)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.render(Component.java:2307)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Page.onRender(Page.java:876)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:142)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.internalRender(Component.java:2379)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.render(Component.java:2307)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Page.renderPage(Page.java:1010)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:121)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:274)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861)
~[wicket-core-6.12.0.jar:6.12

Expandable section in ListView

2014-03-18 Thread Entropy
I have a list view that will have a button on the left to expand or contract
a section that starts out hidden.  this section will have some additional
details.  Code and HTML below.  

When I click the button, the event arrives in my onActivityLogExpansion, and
the wicket ajax debug control turns red.  The log says the following, that I
did not setOutputMarkupdId to true.  But I did as you can see in the code.

INFO: focus set on ui-id-3
INFO: focus removed from ui-id-3
INFO: focus set on btnExpander8
INFO: focus removed from btnExpander8
INFO: Received ajax response (771 characters)
INFO: 

ERROR: Wicket.Ajax.Call.processComponent: Component with id [[expandable17]]
was not found while trying to perform markup update. Make sure you called
component.setOutputMarkupId(true) on the component whose markup you are
trying to update.
INFO: Response processed successfully.
INFO: refocus last focused component not needed/allowed
INFO: focus set on btnExpander8
INFO: focus removed from btnExpander8
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink


CODE:
PropertyListView activityLog = new
PropertyListView("activityLog", activities) {
private static final long serialVersionUID = 1L;

@Override
protected void populateItem(ListItem 
item)
{
ShareActivityPlusDecode activity = 
(ShareActivityPlusDecode)
item.getDefaultModelObject();
item.add(new Label("CREATION_TIMESTAMP"));
item.add(new Label("ACTIVITY_DC"));
item.add(new ExternalLink("mailTo", "mailto:"; +
activity.getEMAIL_ADR()).add(new Label("CREATED_BY_USER_ID")));
item.add(new Label("USER_PH"));
item.add(new AjaxButton("btnExpander"){
private static final long 
serialVersionUID = 1L;
public void onSubmit(AjaxRequestTarget 
target, Form form) {
WebMarkupContainer wmc = 
(WebMarkupContainer)
this.getParent().get("expandable");
onActivityLogExpansion(target, 
wmc, this);
}
}).setOutputMarkupId(true);

WebMarkupContainer expandable = new 
WebMarkupContainer("expandable", new
Model((ShareActivityPlusDecode)
item.getDefaultModel().getObject()));
expandable.add(new 
Label("EMAIL_ADR").setOutputMarkupId(true));
expandable.add(new 
Label("COMMENT").setOutputMarkupId(true));
boolean reject =
item.getModelObject().getACTIVITY_CD().equals(ACTIVITY_REJECT) ||
item.getModelObject().getACTIVITY_CD().equals(ACTIVITY_PENDING_AMENDMENT);
expandable.add(new Label("rejectionReasons", new
Model("")).setVisible(reject).setEnabled(reject).setOutputMarkupId(true));
expandable.setVisible(false);
expandable.setOutputMarkupId(true);
item.add(expandable);
}
};
logForm.add(activityLog);

[...]

private void onActivityLogExpansion(AjaxRequestTarget target,
WebMarkupContainer wmc, AjaxButton invokingButton) {
Label rejectionReasons = (Label) wmc.get("rejectionReasons");
ShareActivityPlusDecode activity = (ShareActivityPlusDecode)
wmc.getDefaultModelObject();
if(rejectionReasons.isEnabled() &&
rejectionReasons.getDefaultModelObjectAsString().length()==0) {
//populate rejection reasons as this is a rejection 
activity and the
value isn't set yet
List reasonDecodes =
this.sharingService.fetchRejectionReasons(activity.getACTIVITY_CD());
StringBuilder sb = new StringBuilder();
for(String reason:reasonDecodes)
sb.append(reason).append(", ");
if(sb.length()>=2)
sb.delete(sb.length()-2, sb.length());
Model model = (Model) 
rejectionReasons.getDefaultModel();
model.setObject(sb.toString());
}
wmc.setVisible(!wmc.isVisible());
target.add(wmc);
if(wmc.isVisible())
invokingButton.setLabel(new Model("-"));
else
invokingButton.setLabel(new Model("+"));
}



HTML:





Date
Activity
  

Re: Show textfield as plaintext when disabled?

2014-03-10 Thread Entropy
Igor,

This was great.  Exactly what I needed.  I applied this to my TextField and
DropDownChoice with a few tweaks and it's perfect.  But when I went to do
the same to TextArea, I am told that onComponentTagBody is final and cannot
be overridden.

So i tired without that method overidden like so:

public void onComponentTag(ComponentTag tag) { 
super.onComponentTag(tag); 
if (!isEnabledInHierarchy()) { 
tag.setName("label"); 
tag.remove("type"); 
tag.remove("value"); 
tag.remove("disabled");
tag.setType(TagType.OPEN); 
} 
} 

//  public void onComponentTagBody(final MarkupStream markupStream, final
ComponentTag openTag) { 
//  if (!isEnabledInHierarchy()) { 
//  replaceComponentTagBody(markupStream, openTag,
getDefaultModelObjectAsString()); 
//  }
//  } 

And that produced the following exception:
org.apache.wicket.markup.MarkupException: Component [narrative] (path =
[4:oagForm:narrative]) must be applied to a tag of type [textarea], not: 
'' (line 0, column 0)
at
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.checkComponentTag(Component.java:3550)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.markup.html.form.TextArea.onComponentTagBody(TextArea.java:65)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.internalRender(Component.java:2379)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.render(Component.java:2307)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1484)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1683)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.internalRender(Component.java:2379)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.render(Component.java:2307)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
~[wicket-core-6.12.0.jar:6.12.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Page.onRender(Page.java:876)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:142)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.internalRender(Component.java:2379)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Component.render(Component.java:2307)
~[wicket-core-6.12.0.jar:6.12.0]
at org.apache.wicket.Page.renderPage(Page.java:1010)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:121)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:274)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861)
~[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
~[wicket-request-6.12.0.jar:6.12.0]
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
[wicket-core-6.12.0.jar:6.12.0]
at
org.apache.wicket.request.cycle.RequestCycle.pr

RE: Show textfield as plaintext when disabled?

2014-03-04 Thread Entropy
What a great bunch of ideas.  I'll be implementing at least one of them. 
Thanks for all your ideas.  Does anyone have similar techniques for
dropdowns?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Show-textfield-as-plaintext-when-disabled-tp4664723p4664771.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



Show textfield as plaintext when disabled?

2014-02-28 Thread Entropy
Is there a way to have my textfield show as plain text when in a readonly
mode rather than as a disabled textbox?

Backup question: I can imagine making a panel to do this...having a
textfield and label and hiding whichever I didn't want, but I would want my
panel to bind to a textbox in the parent page and replace that tag
(otherwise I would have two textboxes, right).  How would I go about that?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Show-textfield-as-plaintext-when-disabled-tp4664723.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



SpringBean and properties file.

2014-02-11 Thread Entropy
I think this is a problem in spring and wicket working together.  This is in
1.4.7.  

In spring:









This bean is injected into a wicket page with @SpringBean.  Using
breakpoints I can see spring insantiating this bean, and setting the
properties.  The values are there.  This happens on application startup.  

But when I got to get the injected bean, the constructor fires again, but
the init method and the setting or properties are NOT called, and despite
the scope=singleton, a second completley different instance is being
instantiated and injected.  And it's empty, which is no good.

Any ideas on this?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SpringBean-and-properties-file-tp4664377.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: Invoke Wicket from JavaSctipt

2014-01-29 Thread Entropy
Thanks.  Using the "advanced" method worked.  Though I wasn't repeating
parameters, so I am not sure why the previous didn't work.  But it doesn't
matter now.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Invoke-Wicket-from-JavaSctipt-tp4664043p4664050.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



Invoke Wicket from JavaSctipt

2014-01-29 Thread Entropy
I want a javascript method to wrap the wicket invocation.  I passed the
following to Wicket.Ajax.ajax.  This is what I see in firebug.

attrs { 
  c="grid6", 
  u="./?3-6.IBehaviorListene...ent-assetListTable-grid", 
  ep=[{action="cellClick"}, 
{key="8"}, 
{column="caseNumber"}
  ]
}

But on the server, in the behavior I do the following:

final IRequestParameters parms =
requestCycle.getRequest().getRequestParameters();
String val = parms.getParameterValue("action").toString();

val is null.  So I must not be providing the parameters correctly.  What am
I doing wrong?  This seems to match the examples I see.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Invoke-Wicket-from-JavaSctipt-tp4664043.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 6 - JavaScriptHeaderItem renders too early

2014-01-29 Thread Entropy
For posterity, the solution that eventually worked for me:

response.render(JavaScriptHeaderItem.forReference(new
JavaScriptResourceReference(ExtGrid.class, "ExtGridSupport.js"))); 
response.render(OnDomReadyHeaderItem.forScript(writeGridJS())); 

The on dom ready delays my init long enough to serve my purposes.  I never
did get the filter solution working.  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-JavaScriptHeaderItem-renders-too-early-tp4663910p4664042.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 6 - JavaScriptHeaderItem renders too early

2014-01-24 Thread Entropy
I am still having this problem.  The wicket:container solution leads me to
the following exception.  Note that this exception is different than the one
in the prior post.  I think I had a publish/refresh quirk.  This is the
exception that is occurring now.

java.lang.IllegalStateException: No FilteringHeaderResponse is present in
the request cycle.  This may mean that you have not decorated the header
response with a FilteringHeaderResponse.  Simply calling the
FilteringHeaderResponse constructor sets itself on the request cycle
at
org.apache.wicket.markup.head.filter.FilteringHeaderResponse.get(FilteringHeaderResponse.java:165)
at
org.apache.wicket.markup.head.filter.HeaderResponseContainer.onComponentTagBody(HeaderResponseContainer.java:64)
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
... 80 more



Entropy wrote
> Browser giving me a little trouble.  Apologies if I double-submitted this.
> My respoonse:
> 
> I didn't even know such a website existed.  Thanks.
> 
> I am trying to implement the HeaderResponseContainer and filter
> suggestion.  In my component I added the container:
> 
> add(new HiddenField(INTERNAL_HIDDEN_ROWS_SELECTED, new
> Model("")).setOutputMarkupId(true).setMarkupId(INTERNAL_HIDDEN_ROWS_SELECTED));
> add(new HiddenField(INTERNAL_HIDDEN_COLUMN_SYNCH, new Model("")));
> add(new HeaderResponseContainer("gridCode", "gridCodeFilter"));
> 
> I added the HTML to my component (notice same level as those hiddens)
> 
>  
> 
>   
>  />
>   
> 
>   
> 
> 
>  
> 
>  
> 
> 
> And in the renderHead I do:
> @Override
> public void renderHead(Component comp, IHeaderResponse response) {
>   super.renderHead(comp, response);
> 
>   callbackUrl = behavior.getCallbackUrl().toString();
> //JS
>  response.render(JavaScriptHeaderItem.forReference(new
> JavaScriptResourceReference(ExtGrid.class, "ExtGridSupport.js")));
>  response.render(new
> FilteredHeaderItem(JavaScriptContentHeaderItem.forScript(writeGridJS(),
> getId() + "_js"), "gridCodeFilter"));
> }
> 
> But I am getting:
> Failed to handle: 
> 
> . It might be
> that no resolver has been registered to handle this special tag.  But it
> also could be that you declared wicket:id=gridCode in your markup, but
> that
> you either did not add the component to your page at all, or that the
> hierarchy does not match.
>  MarkupStream: [markup =
> file:/C:/views/EquitShare_Development/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/AFMSShared/gov/usdoj/afms/shared/wicket/ext/grid/ExtGrid.html
> 
>  
> 
>   
>  id="_gridRowsSelected"/>
>   
> 
>   
> 
> 
>  
> 
>  
> 
> 
> , index = 6, current =  '
>  wicket:id="gridCode"/>
> ' (line 0, column 0)]
>  at
> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1409)
>  at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
>  at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529)
>  at
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:689)
>  at
> org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76)
>  at
> org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112)
>  at
> org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
>  at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
>  at org.apache.wicket.Component.internalRender(Component.java:2379)
>  at org.apache.wicket.Component.render(Component.java:2307)
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
>  at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
>  at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529)
>  at
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:689)
>  at
> org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76)
>  at
> org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112)
>  at
> org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
>  at org.apache.wicket.

Re: Wicket 6 - JavaScriptHeaderItem renders too early

2014-01-23 Thread Entropy
112)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
 at org.apache.wicket.Component.internalRender(Component.java:2379)
 at org.apache.wicket.Component.render(Component.java:2307)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
 at org.apache.wicket.Page.onRender(Page.java:876)
 at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:142)
 at org.apache.wicket.Component.internalRender(Component.java:2379)
 at org.apache.wicket.Component.render(Component.java:2307)
 at org.apache.wicket.Page.renderPage(Page.java:1010)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:121)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:219)
 at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
 at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861)
 at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
 at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
 at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)



Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and
wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx


On Thu, Jan 23, 2014 at 9:30 AM, Martin Grigorov-4 [via Apache Wicket] <
ml-node+s1842946n466391...@n4.nabble.com> wrote:

> Hi,
>
> Read http://wicketinaction.com/2012/07/wicket-6-resource-management/
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Thu, Jan 23, 2014 at 4:24 PM, Entropy <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4663911&i=0>>
> wrote:
>
> > Hello, I am just converted to Wicket 6, and I have a line like this in
> one
> > component:
> >
> > response.render(JavaScriptHeaderItem.forScript(writeGridJS(), getId() +
> > "_js"));
> >
> > That writes some custom javascript which in turn run when Ext.onReady()
> is
> > ready.  However, this script generated so early that not only is the DOM
> > not
> > ready, Ext itself hasn't even been defined.  My header item is the
> second
> > item in the , and the Ext include is 3rd from last.  Even moving
> the
> > ext include to the top of the .html, it is still well below the code and
> > does not run in time.
> >
> > How can I make my header item render at the BOTTOM of the  instead
> of
> > at the top?
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-JavaScriptHeaderItem-renders-too-early-tp4663910.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=4663911&i=1>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=4663911&i=2>
> >
> >
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-JavaScriptHeaderItem-renders-too-early-tp4663910p4663911.html
> To unsubscribe from Wicket 6 - JavaScriptHeaderItem renders too early, click
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4663910&code=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0NjYzOTEwfC05NzMyODEwMzU=>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-JavaScriptHeaderItem-renders-too-early-tp4663910p4663913.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 6 - JavaScriptHeaderItem renders too early

2014-01-23 Thread Entropy
Hello, I am just converted to Wicket 6, and I have a line like this in one
component:

response.render(JavaScriptHeaderItem.forScript(writeGridJS(), getId() +
"_js")); 

That writes some custom javascript which in turn run when Ext.onReady() is
ready.  However, this script generated so early that not only is the DOM not
ready, Ext itself hasn't even been defined.  My header item is the second
item in the , and the Ext include is 3rd from last.  Even moving the
ext include to the top of the .html, it is still well below the code and
does not run in time.

How can I make my header item render at the BOTTOM of the  instead of
at the top?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-JavaScriptHeaderItem-renders-too-early-tp4663910.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: AjaxLazyLoadPanel in wicket 6

2013-12-20 Thread Entropy
Hi, Does anyone have some insight on this?  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-in-wicket-6-tp4663083p4663163.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: 1.4.7 app form does not submit on server when panel is not visible.

2013-12-19 Thread Entropy
SOLVED

I don't know why i didn't see this earlier, but the issue was using the
 tag instead of .  Somewhere along the line,
someone started using button tags in our shop and we've noticed quirky
behavior from them before (though nothing this quirky).  Changed it to input
control type button and it works.

Though I do not understand why it behaved differently on the server than in
localhost.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-4-7-app-form-does-not-submit-on-server-when-panel-is-not-visible-tp4663114p4663134.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: 1.4.7 app form does not submit on server when panel is not visible.

2013-12-19 Thread Entropy
I can now add that if only the addSelected button is added, the problem
happens, likewise if only addAll is included.  So it appears that any of the
four buttons creates the problem.

add(new AjaxButton("addSelected") { 
private static final long serialVersionUID = 1L; 

@SuppressWarnings({ "rawtypes" }) 
@Override 
protected void onSubmit(AjaxRequestTarget target,
Form form) { 
onAddSelected(target); 
} 
}.setDefaultFormProcessing(false)); 

>

I should mention that nabble turned my greater than into a literal greater
than and same with less than.  So if it looks like I have too many closing
tags in the button HTMLs, it's not true.  I am using those character as
button captions.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-4-7-app-form-does-not-submit-on-server-when-panel-is-not-visible-tp4663114p4663133.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: 1.4.7 app form does not submit on server when panel is not visible.

2013-12-19 Thread Entropy
New Info:

So I've been promoting over and over, having backed the panel out and slowly
building it back up.  When I don't build the buttons in the middle, the page
submits normally.  The html for the buttons is:

  
>
>>
<
<<
  

the java is:
add(new AjaxButton("addSelected") {
private static final long serialVersionUID = 1L;

@SuppressWarnings({ "rawtypes" })
@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form) {
onAddSelected(target);
}
}.setDefaultFormProcessing(false));

add(new AjaxButton("addAll") {
private static final long serialVersionUID = 1L;

@SuppressWarnings({ "rawtypes" })
@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form) {
onAddAll(target);
}
}.setDefaultFormProcessing(false));

add(new AjaxButton("removeSelected") {
private static final long serialVersionUID = 1L;
@SuppressWarnings({ "rawtypes" })
@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form) {
onRemoveSelected(target);
}
}.setDefaultFormProcessing(false));

add(new AjaxButton("removeAll") {
private static final long serialVersionUID = 1L;
@SuppressWarnings("rawtypes")
@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form) {
onRemoveAll(target);
}
}.setDefaultFormProcessing(false));





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-4-7-app-form-does-not-submit-on-server-when-panel-is-not-visible-tp4663114p4663132.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: 1.4.7 app form does not submit on server when panel is not visible.

2013-12-19 Thread Entropy
Yeah, I get that.  The problem with that is that I can't reproduce the issue
locally with the FULL APPLICATION, so I am reasonably certain that I won't
be able to reproduce it with a quickstart.  It only happens on the server
AND when this panel is visible.  I attached the panel as a file if that
would help.  I did this through nabble's upload file interface, so I am not
sure how that arrives to you...I would hope as an email attachment?

My next step was that I set all org.apache.wicket to DEBUG in log4j.  This
produces quite alot of noise, but I am mostly confident that I got the
statements for that request figured out.  There's a bunch of these before
and after:

2013-12-19 07:27:57,035 - org.apache.wicket.util.thread.Task - DEBUG - Run
the job: org.apache.wicket.util.watch.ModificationWatcher$1@65586558
2013-12-19 07:27:57,036 - org.apache.wicket.util.thread.Task - DEBUG -
Finished with job:
org.apache.wicket.util.watch.ModificationWatcher$1@65586558

But i don't think those are relevant.  The block then begins:

2013-12-19 07:27:57,054 - org.apache.wicket.Session - DEBUG - Getting page
[path = 6:form, versionNumber = 0]
2013-12-19 07:27:57,055 - org.apache.wicket.Component - DEBUG - Begin render
[Page class = gov.usdoj.afms.umc.modules.UM10.Step2_Criteria, id = 6,
version = 0]
2013-12-19 07:27:57,056 - org.apache.wicket.MarkupContainer - DEBUG -
Rendering raw markup
2013-12-19 07:27:57,056 - org.apache.wicket.MarkupContainer - DEBUG - Add
_header_16 to [Page class = gov.usdoj.afms.umc.modules.UM10.Step2_Criteria,
id = 6, version = 0]
2013-12-19 07:27:57,056 - org.apache.wicket.Component - DEBUG - Begin render
[MarkupContainer [Component id = _header_16]]
2013-12-19 07:27:57,057 - org.apache.wicket.MarkupContainer - DEBUG -
Rendering raw markup
2013-12-19 07:27:57,057 - org.apache.wicket.MarkupContainer - DEBUG - Add
_relative_path_prefix_17 to [MarkupContainer [Component id = _header_16]]

After the first line, this "Begin Render" pattern repeats itself many times
with varying components.  But what I found interesting is that the only line
between the modifcation block and the render block was that "Getting page"
line.  This implies to me that wicket didn't forward the event to any
application code, it just repainted the page as if it were a refresh.

I also notice that the URL never changes.  It is:
http://dev-catsapp-01:9085/ManagementCenter/?wicket:interface=:6 both
before and after the request.  I am used to seeing wicket increment that
number, like a request counter, excepting when I am on a bookmarkable page. 
That is how it works in localhost as well.

DocTypeSelect.java
  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-4-7-app-form-does-not-submit-on-server-when-panel-is-not-visible-tp4663114p4663130.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.4.7 app form does not submit on server when panel is not visible.

2013-12-18 Thread Entropy
This is in one of our Wicket 1.4.7 apps that we have not converted yet.  The
problem does not happen in localhost test environments, but does happen on
the server.  Moreover, the problem only happens when a data condition causes
a particular panel to be visible.

When this panel is visible (and I pick that because it is the only major
difference between it working and failing), the page does not submit.  I hit
the submit button, and rather than advancing to the next page, the current
page redisplays with no validation errors displayed.  

Loig statements at the top of every event do not fire.  Log statements at
the top of the validate methods of the three validators applied to the form
do not fire.

The panel itself seems fairly nondescript:
private void buildEDocPanel() {
WebMarkupContainer wmc = new WebMarkupContainer("eDocsWrapper");
DocTypeSelect docTypes = new DocTypeSelect("eDocTypes",
model.geteDocTypes()) {
private static final long serialVersionUID = 1L;
@Override
public List loadDocumentTypes() {
return 
lookupService.fetchFilterValuesByFilterName("Document Type");
//Document Type
}
};
form.add(wmc);
wmc.add(docTypes);

wmc.setVisible(model.getApplicationCode().equals(UMCConstants.APPL_EDOCS));
}

DocTypeSelect is a custom panel that implements a wizard-y control where one
side has a master list and you pick which ones to add to the right side's
list with add/remove buttons in the middle.  The code for this panel is
below.  Based on the log, the onAddSelected method and onSelectionChange
method fire, but both of those are BEFORE the page submit.

The HTML for the submit button is:


The onclick is for a "are you sure you want to leave since you have made
changes" kind of warning in javascript.  It doesn't interfere in localhost
or if the panel is not visible, and when it prevent departure, the page
wouldn't reload, so i am mostly sure that isn't the problem, but I present
that it is an input type submit since that has sometimes made a difference
during my experience with wicket.


public abstract class DocTypeSelect  extends Panel {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(DocTypeSelect.class);
private List selected;
private ListMultipleChoice ddAvailable;
private ListMultipleChoice ddSelected;

public DocTypeSelect(String id, List selectedDocTypes) {
super(id);
selected = selectedDocTypes;
init();
}

private void init() {
buildLeftSide();
buildCenter();
buildRightSide();
}

public abstract List loadDocumentTypes();
public void onSelectionChange(AjaxRequestTarget target, 
List
selected) {
log.debug("onSelectionChange()");
}

@SuppressWarnings({ "unchecked", "rawtypes" })
private void buildLeftSide() {
List docTypes = loadDocumentTypes();
ddAvailable = new 
ListMultipleChoice("docTypesAvailable", 
new Model(new ArrayList()),
docTypes, 
new IChoiceRenderer() {
private static final long 
serialVersionUID = 1L;
@Override
public Object 
getDisplayValue(FilterValue arg0) {
return 
arg0.getFilterValueDecode();
}
@Override
public String getIdValue(FilterValue 
arg0, int arg1) {
return arg0.getFilterValue();
}
});
add(ddAvailable);
}


private void buildCenter() {
add(new AjaxButton("addSelected") {
private static final long serialVersionUID = 1L;

@SuppressWarnings({ "rawtypes" })
@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form) {
onAddSelected(target);
}
}.setDefaultFormProcessing(false));

add(new AjaxButton("addAll") {
private static final long serialVersionUID = 1L;

@SuppressWarnings({ "rawtypes" })
@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form) {
   

Re: AjaxLazyLoadPanel in wicket 6

2013-12-17 Thread Entropy
I think so.  Here's the output.  It seems like the component id is wrong.
Indeed, I DO see that show up.  But that isn't the full set of what should
show.  Because the method I referenced previously was not called, the data
that should be part of this isn't ever retrieved.

I also notice that the id here says "assetInfosc".  The real id is
"assetInfos".  I presume wicket is rewriting this stuff like always and that
isn't a worry?

INFO: Received ajax response (1661 characters)
INFO: 

INFO: Response processed successfully.
INFO: refocus last focused component not needed/allowed
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-in-wicket-6-tp4663083p4663091.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



AjaxLazyLoadPanel in wicket 6

2013-12-17 Thread Entropy
Hi, it's me again, and I am still converting from 1.4.7 to 6.12.  I think I
am starting to get down to the last few errors.

I have an AjaxLazyLoadPanel that loads a grid of data that takes a little
time to load.  It worked fine in the 1.4.7 version of the app, though there
are code changes from the conversion, they seem to have been driven by the
compile differences.

Anyway, here's what it looks like:
add (new AjaxLazyLoadPanel("assetInfos"){
@Override
public Component getLazyLoadComponent(String id);
EQShareInfoPanel myPanel = new EQShareInfoPanel(id,
getSharingInfos(searchBean), false);
myPanel.setOutputMarkupId(true);
return myPanel;
}
});

  

  

I put a breakpoint in the getLazyLoadComponent methods above and the
breakpoint is never reached.  I already removed the jQuery-min reference
from this page as that had blocked the other ajax control on this page (as
might be remembered from my thread yesterday).  So the code inside that
method isn't the problem.

Any ideas where to start looking?  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-in-wicket-6-tp4663083.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: AutoComplete stopped working in 6.12

2013-12-16 Thread Entropy
Solved.

Not long after posting this I found
http://stackoverflow.com/questions/14481767/wicket-autocomplete-in-wicket-6-2-0
which explains that Wicket now includes it's own jQuery...which I'd read,
but hadn't made the connection to this problem.  When I took out the jQuery
base js include, the situation resolved itself.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AutoComplete-stopped-working-in-6-12-tp4663047p4663049.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



AutoComplete stopped working in 6.12

2013-12-16 Thread Entropy
Converting from 1.4.7 to 6.12.  The page runs, but the autocomplete field has
stopped working.  It never produces an autocomplete, acting as if it were
simply a normal .  More strangely, no code in the containing panel was
changed, nor do I see anything in the migration guide about
AutoCompleteTextField.  I put the page into IE's debugger and no errors were
thrown.

Code snippet:
agcyCombo = new AutoCompleteTextField("code", 
new PropertyModel(saveCriteria, "SearchString")) {
protected Iterator getChoices(String input) {
if (Strings.isEmpty(input))  {
return Collections.EMPTY_LIST.iterator();
}

List curMatchingList = 
CodeFilter.filter(getAgcyFedList(),
input);
if (curMatchingList.size() > MAX_NUM_CHOICE) {
return curMatchingList.subList(0, 
MAX_NUM_CHOICE - 1).iterator();
}
return curMatchingList.iterator();
}
};

wmcAgcy.add(agcyCombo.setLabel(new Model("Agency")));
add(wmcAgcy);
return wmcAgcy;
}

HTML snippet:

Agency (required):



In the 1.4.7 version of the app, the input field looked like:


In 6.12 it produces:


So no apparent difference, but I don't see an onKeyPress event in either, so
i am not sure where to go to stick a breakpoint for that.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AutoComplete-stopped-working-in-6-12-tp4663047.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: Converting 1.4.7 to 6.12 - Login Error

2013-12-13 Thread Entropy
Thanks Martin, that did it.  It now works with the class instead of an
instantiated page.  I guess now pages passed through that exception must be
mounted?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4663000.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: Converting 1.4.7 to 6.12 - Login Error

2013-12-12 Thread Entropy
I just tried replacing the exception line with:

try {
throw new RestartResponseAtInterceptPageException((Page)
getLoginPageClass().newInstance());
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

And it "works".  Works is in quotes because although the LoginPage renders,
something downstream of it breaks when I try to submit, but when I send in a
Class it treats it like a string URL.  When I send in an instnatiated
Page, it works.  Anyone know why that might be?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4662961.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: Converting 1.4.7 to 6.12 - Login Error

2013-12-12 Thread Entropy
I know it is a web container page.  I may not have been clear on this before. 
The URL I hit is:
http://localhost:9080/EquitableSharing
Wicket the forwards me to:
http://localhost:9080/EquitableSharing/gov.usdoj.afms.esp.modules.login.LoginPage?1

But Wicket is involved because the WicketFilter is running and getting us to
the wicket page code, and what's more most of this code is the same as it
was when it worked before my version upgrade.  Which tells me that most
likely I either screwed something up in the upgrade, or missed something.

Anyway, I am narrowing my focus on the line:

throw new RestartResponseAtInterceptPageException(getLoginPageClass());

because I changed the return value of getLoginPageClass() from
LoginPage.class to SearchPage.class, and sure enough, now it tries to
forward to the SearchPage's full name as if it were a URL, just like it was
doing for LoginPage.  The redirected URL in the browser is:

http://localhost:9080/EquitableSharing/gov.usdoj.afms.esp.modules.es01.SearchPage

So clearly, when I throw that RestartResponseAtInterceptPageException, the
class passed is having it's class name used as the URL to redirect to.  That
URL isn't right of course, the class is a wicket page, not a URL.

But this is exactly how the 1.4.7 version of the code used this exception (I
did a compare to check).  So I am confused.  It's almost like the meaning of
that exception's parameters changed, but that doesn't appear to be the case. 
They still take Class.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4662960.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: Converting 1.4.7 to 6.12 - Login Error

2013-12-12 Thread Entropy
So, the app worked before I made my 1.4.7 -> 6.12 changes.  The general flow
is that when I hit the URL for the app (with no parameters...that 404 URL is
not something I typed from the browser) it goes to the
Application.getHomePage(), which returns the home page (not the login page).

We have a common block in all our pages that check if the user has
authenticated, and if not, forwards to the login page like so:

throw new RestartResponseAtInterceptPageException(getLoginPageClass());

And then I can see the control enter my LoginPage class.  So it found the
java.  I walk through the LoginPage initialization.  Nothing blows up,
everything looks kosher.  Then after control returns to the wicket layer
above me, it evidently can't find something...I presume the HTML since it
already found the java, and I get the exception I mentioned.  And not my
custom error page.

I set my error page up like:

IApplicationSettings settings = getApplicationSettings();
settings.setInternalErrorPage(ESPApplicationErrorPage.class);
   
getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);

and that block runs, but no code in the error page is ever reached.   

I don't understand how the java can be found and not the HTML for the
LoginPage when 1.4.7 found them fine, and the HTML is in the same package as
the java, just like before.  And unfortunately, the error really doesn't
give me alot to go on.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4662954.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



Converting 1.4.7 to 6.12 - Login Error

2013-12-11 Thread Entropy
So I am past my compile errors and am now running my shiny new 6.12
application.  But it breaks down before I can get it off the dealer's lot. 
:(

The problem is that the error is kind of ambiguous.  The console says:

[12/11/13 14:47:30:437 EST] 0026 servlet   I
com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I:
[EquitableSharingEAR] [/EquitableSharing] [FilterProxyServlet]:
Initialization successful.
[12/11/13 14:47:30:440 EST] 0026 webappE
com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page
Exception  The server cannot use the error page specified for your
application because of the exception printed below.
[12/11/13 14:47:30:442 EST] 0026 webappE
com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page
Exception: 

So instead of using the error page, or printing the stack trace in the
console, the following shows up in the browser.  I stepped through in debug
and the error happens after our code.  So contrary to the claim, it DID find
the java.  The html is right next to it as usual.  No method in our error
page is invoked, though I can see that we do set it with the following:

IApplicationSettings settings = getApplicationSettings();
settings.setInternalErrorPage(ESPApplicationErrorPage.class);
   
getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);

The error:

Original Exception: 
Error Message: SRVE0190E: File not found:
/gov.usdoj.afms.esp.modules.login.LoginPage
Error Code: 404
Target Servlet: DefaultExtensionProcessor
Error Stack: 
java.io.FileNotFoundException: /gov.usdoj.afms.esp.modules.login.LoginPage 
 at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572)
 
 at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933) 
 at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) 
 at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931) 
 at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) 
 at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) 
 at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
 
 at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
 
 at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
 
 at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
 
 at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
 
 at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
 
 at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
 
 at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
 at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 
 at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 
 at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 
 at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) 
Error Page Exception: 
Error Message: SRVE0190E: File not found: /404
Error Code: 404
Target Servlet: DefaultExtensionProcessor
Error Stack: 
java.io.FileNotFoundException: /404 
 at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572)
 
 at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:353)
 
 at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:3368) 
 at
com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:634)
 
 at
com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1187)
 
 at
com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyServlet.java:139)
 
 at
com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxyServlet.java:62)
 
 at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
 
 at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
 
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
 
 at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:263)
 
 at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
 
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) 
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
 
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
 
 at
com.ibm.ws.webcont

Converting 1.4.7 to 6.12

2013-12-10 Thread Entropy
Hi, it's me again.  I'm still converting to 6.12 from 1.4.7.  Thanks for your
help on previous questions.  Here's the next item I didn't see in the
conversion docs.  In one of our pages, someone did this:

setResponsePage(getApplication().getSessionSettings().getPageFactory().newPage(loginService.getHomePage(uInfo),(PageParameters)
null));

The part the compiler complains about is
getApplication().getSessionSettings().  Sure enough, looking at the v6
javadoc, it isn't there.  But in this javadoc page:
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/Application.html
under the Settings bullet, it specifically mentions the method as if it
exists.

So if this method no longer exists.  What is it's v6 equivalent?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-tp4662892.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: response headers in Wicket 6

2013-12-10 Thread Entropy
Thanks Francois,

Second question:

In 1.4.7 the page object supported a removePersistedFormData() method and
the TextField has a method setPersistent() on it.  Both appear gone, and I
don't see anything in the 6 or 1.5 conversion guides about them.  What is
the replacement? 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/response-headers-in-Wicket-6-tp4662864p4662888.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: response headers in Wicket 6

2013-12-09 Thread Entropy
Second question (the first is still open), in 1.4.7 the page object supported
a removePersistedFormData() method and the TextField has a method
setPersistent() on it.  Both appear gone, and I don't see anything in the6
or 1.5 conversion guides about them.  What is the replacement?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/response-headers-in-Wicket-6-tp4662864p4662866.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



response headers in Wicket 6

2013-12-09 Thread Entropy
Hi, I'm converting one of our apps from 1.4.7 to 6.12.  the old code extended
WebResource.  I changed it to extend ByteArrayResource.  I changed
setheaders to setResponseHeaders.  But the code inside, I am not sure how to
change to Wicket 6 as the parameters are very different.

@Override
protected void setResponseHeaders(AbstractResource.ResourceResponse 
data,
IResource.Attributes attributes) {
super.setResponseHeaders(data, attributes);
response.setAttachmentHeader(defaultFileName);
response.setHeader("Cache-Control", "No-Cache"); 
response.setHeader("Cache-Control", "No-Store");
}

How can I adapt the last three lines to Wicket 6?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/response-headers-in-Wicket-6-tp4662864.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 event response headers - redirect

2013-09-14 Thread Entropy
In jQuery:

var ajax = $.ajax({
type: "GET",
url: 'http://your.site.here/something',
success: function () {
  alert(ajax.getAllResponseHeaders());
}
  });

In just bare bones ajax:

req.onreadystatechange = function (aEvt) {
   if (this.readyState == 4) {
test123 = this.getAllResponseHeaders();
}
  };



Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx


On Sat, Sep 14, 2013 at 12:58 AM, Martin Grigorov-4 [via Apache
Wicket]  wrote:
> how you would do it with naked Ajax?
> On Sep 13, 2013 10:50 PM, "Entropy" <[hidden email]> wrote:
>
>> We have alot of ajax events in our app.  Wicket makes it very easy to do
>> so.
>> However, all of our applications have Novell Access Manager (NAM) in front
>> of them for single-sign-on.  When the NAM session times out, it sends a
>> redirect to the browser to bring them to a login page.  But for ajax
>> events
>> this just means the page breaks.
>>
>> So I would like to slip some code in to our ajax events as a standard bit
>> of
>> code to detect ajax responses that contain redirect headers, and issue
>> them
>> to the page.  However, I am not sure where to hook into such an event in
>> wicket.  I know how I would do it in naked ajax, but not within wicket.
>>  Can
>> someone fill me in?
>>
>>
>>
>> --
>> View this message in context:
>>
>> http://apache-wicket.1842946.n4.nabble.com/AJAX-event-response-headers-redirect-tp4661308.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> 
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-wicket.1842946.n4.nabble.com/AJAX-event-response-headers-redirect-tp4661308p4661314.html
> To unsubscribe from AJAX event response headers - redirect, click here.
> NAML




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AJAX-event-response-headers-redirect-tp4661308p4661319.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 event response headers - redirect

2013-09-13 Thread Entropy
We have alot of ajax events in our app.  Wicket makes it very easy to do so. 
However, all of our applications have Novell Access Manager (NAM) in front
of them for single-sign-on.  When the NAM session times out, it sends a
redirect to the browser to bring them to a login page.  But for ajax events
this just means the page breaks.

So I would like to slip some code in to our ajax events as a standard bit of
code to detect ajax responses that contain redirect headers, and issue them
to the page.  However, I am not sure where to hook into such an event in
wicket.  I know how I would do it in naked ajax, but not within wicket.  Can
someone fill me in?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AJAX-event-response-headers-redirect-tp4661308.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 1.4.7 request listener

2013-07-18 Thread Entropy
1) Many of those suggestions appear to be 1.5 or greater.  I am in 1.4.7.
2) A simple filter does indeed get me the events, but at that point, how am
I to know what page is being worked with?

My objective is to set some properties that our database code picks up for
the audit log.  We want this to happen uniformly for all pages/requests, but
would prefer not having to modify every page.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4-7-request-listener-tp4660248p4660341.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 1.4.7 request listener

2013-07-12 Thread Entropy
My project uses wicket 1.4.7.  We need to run some standard code before and
after every request (including ajax).  How can I register sucha  listener?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4-7-request-listener-tp4660248.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: Injecting proxy services in page.

2013-06-05 Thread Entropy
At the risk of turning this into a Spring discussion on a Wicket forum, how
does one control that?  I would like to try your suggestion, but am not sure
what knob to twist.

We just implement ApplicationContextAware, and point to our spring config
file in web.xml.  I don't set anywhere asking for a particular KIND of
appcontext to be used.  When it hands it to me, it is
XmlWebApplicationContext.  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Injecting-proxy-services-in-page-tp4659209p4659245.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



Injecting proxy services in page.

2013-06-03 Thread Entropy
We are doing the "annotation based approach" described in this link
(https://cwiki.apache.org/WICKET/spring.html).  At least, we think we are.

We get:
[6/3/13 8:26:00:907 EDT] 0023 SystemOut O ERROR [WebContainer : 0]
(RequestCycle.java:1521) - Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
java.lang.RuntimeException: Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
at 
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435)
at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
at org.apache.wicket.Session.getPage(Session.java:779)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
[trimmed for brevity]
Caused by: 
*java.io.InvalidClassException: gov.usdoj.afms.umc.services.LogTransService;
could not resolve class [gov.usdoj.afms.umc.services.LogTransService] when
deserializing proxy*at
org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[trimmed for brevity]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
at 
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:413)
... 39 more

I thought this might be because that particular service is in the parent
page object and annotated there as well, but I moved it to the child class
and saw no change in behavior.  It is a hibernate service and is annotated
in the page like so:

@SpringBean(name="LogTransService")
private LogTransService userTransService;   

The exception happens when I go to the page, do a few things (which involve
submitting and redisplaying the page), and then hit the browser back button. 
This, as I understand it, causes wicket to deserialize the page from memory. 
But shouldn't it see the @SpringBean and re-inject a new service?

Out app object does this:
addComponentInstantiationListener(new SpringComponentInjector(this,
ctx, true));

Ideas?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Injecting-proxy-services-in-page-tp4659209.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: IE7 Submit button stops working

2013-05-17 Thread Entropy
SOLUTION:

It was the  tags.  Replace them with  and
it works fine.  What a simple little cause of a wierd @ss problem.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IE7-Submit-button-stops-working-tp4658857p4658907.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   3   >