Re: Regarding "WARN - (WebPageRenderer.java:162)" v1.5.7

2012-09-24 Thread yesotaso
Created  WICKET-4780   



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-WARN-WebPageRenderer-java-162-v1-5-7-tp4651245p4652288.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: Regarding "WARN - (WebPageRenderer.java:162)" v1.5.7

2012-09-24 Thread yesotaso
Just tested with 6.0:

create new project: "mvn archetype:generate
-DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=6.0.0
-DgroupId=com.mycompany -DartifactId=myproject
-DarchetypeRepository=https://repository.apache.org/
-DinteractiveMode=false"

open WicketApplication.java and add following lines to init() method:
*setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
mountPage("/home", HomePage.class);*

read following from console:
*WARN  - WebPageRenderer- The Buffered response should be
handled by BufferedResponseRequestHandler*

Is it bad practice to have both MountedMapper and CryptoMapper?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-WARN-WebPageRenderer-java-162-v1-5-7-tp4651245p4652285.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: Regarding "WARN - (WebPageRenderer.java:162)" v1.5.7

2012-08-17 Thread yesotaso
Please  disregard above comment... I was trying to reproduce mentioned
warning with a staless page... with a straight 16 hours caffeinless brain...
still no caffein I'll try to open JIRA ticket if I can ever remember I did
all this...

Anyway, I created a  https://github.com/yeso112860/Wicket-Test1 Github Repo 
if that counts 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-WARN-WebPageRenderer-java-162-v1-5-7-tp4651245p4651335.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: Regarding "WARN - (WebPageRenderer.java:162)" v1.5.7

2012-08-17 Thread yesotaso
Will do, at the moment trying to isolate the incident.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-WARN-WebPageRenderer-java-162-v1-5-7-tp4651245p4651325.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



Regarding "WARN - (WebPageRenderer.java:162)" v1.5.7

2012-08-15 Thread yesotaso
Sorry for non-informative title. The whole warning is:
WARN  - (WebPageRenderer.java:162) - The Buffered response should be handled
by BufferedResponseRequestHandler
I know in various places it is said to be harmless and I dont know if other
people seeing this warning for the same reason as me...
Mine's cuase is as it seems "If I access a page via either a link or typing
adress to a mounted page this warning pops up. In addition I use
*org.apache.wicket.request.mapper.CryptoMapper* in my authorization strategy
class. Somehow root request mapper pass response twice and at second time
since the stored response is still in the buffer it complains."

Question is : Is there any solution to avoid this warning?

PS: if I remove authorization strategy this warning does not show up.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-WARN-WebPageRenderer-java-162-v1-5-7-tp4651245.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: java pojo/Bean to generate html (textfield, dropdown,radio buttons)

2012-07-05 Thread yesotaso
While I absolutely agree with Thomas, I'd suggest using a text generator
template like FTL, Ruby or even String#format will do as well :) Below is a
FTL piece.



> package ${class.package.name};
> 
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.panel.Panel;
> import org.apache.wicket.model.IModel;
> 
> public class ${class.simpleName}DisplayPanel extends Panel {
>   private static final long serialVersionUID = 1L;
>   public ${class.simpleName}DisplayPanel(String id,
> IModel<${class.simpleName}> model) {
>   super(id, model);
> <#foreach field in class.declaredFields>
> <#if !modifier.isFinal(field.modifiers) &&
> !modifier.isStatic(field.modifiers)>
>   <#assign generate = true>
>   <#foreach annotation in field.declaredAnnotations>
>   <#assign atype = annotation.annotationType().simpleName>
>   <#if atype == "ManyToOne" || atype == "OneToMany" || atype == 
> "Version"
> || atype == "Id">
>   <#assign generate = false>
>   
>   
>   <#if generate>
>   add(new Label("${field.name}"));
>   
> 
>}
> }
> 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-pojo-Bean-to-generate-html-textfield-dropdown-radio-buttons-tp4650368p4650387.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: how to connect elements - label and input (checkbox)

2012-07-05 Thread yesotaso
I am not exactly sure if it is what you want but I used a decoretor for
labeling task.
public class SimpleDecorator extends Behavior implements
IAjaxRegionMarkupIdProvider{
@Override
public String getAjaxRegionMarkupId(Component component){
// This method is overriden from IAjaxRegionMarkupIdProvider see its
@JavaDoc for details
return component.getMarkupId() + "_fd";
}

@Override
public void bind(Component component) {
component.setOutputMarkupId(true);
}

@Override
public void beforeRender(Component component) {
FormComponent fc = (FormComponent) component;
Response r = component.getResponse();
String label = (fc.getLabel() != null) ? 
fc.getLabel().getObject()  : null;

if(fc.getParent() instanceof FormComponent) {
label = null;
}

if (label != null) {
r.write("");
r.write(Strings.escapeMarkup(label));
if (fc.isRequired()) {
// You can put a "*" or something else if field is required
}
r.write("");
}
super.beforeRender(component);
}
@Override
public void afterRender(Component component) {
Response r = component.getResponse();
r.write("