Re: Dynamic QR image

2014-02-12 Thread deliadavis...@hotmail.com
Apply an image barcode creating tool to  create 2d qr code
http://www.rasteredge.com/how-to/vb-net-imaging/barcode-generating-qrcode/  
as well as  generate pdf 417
http://www.rasteredge.com/how-to/vb-net-imaging/barcode-generating-pdf417/  
on image or document page. The supportable image file can be jpeg, bmp, gif,
png and the compatible document files are printable pdf, fax-exclusive tiff,
Microsoft word, excel and powerpoint.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dynamic-QR-image-tp4659029p4664383.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's @SpringBean and the autowire-candidate annotation

2014-02-12 Thread deliadavis...@hotmail.com
Using annotaiton to note, highlight or underline content on image or
document, including PDF is a common solution for document file markup
creation. 

Tag:  image annotation
http://www.rasteredge.com/how-to/vb-net-imaging/image-annotating/  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-s-SpringBean-and-the-autowire-candidate-annotation-tp1887084p4664384.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 Messages prevent DropDownChoice updating Textfields

2014-02-12 Thread Daniela L
Hi,
sometimes one doesn't see the obvious things,
I simply had to add a lastName.clearInput(); in the
onUpdate method and everything works as expected.
I hope that helps anybody having the same problem :-)
Best Regards
Daniela


Hi,
I am trying to implement a Feedback for every Form Component and
a catch all Feedback Panel in wicket 6.12.0. Everything works fine except
for the case
when a user causes a error which is shown in the Feedback Panel of the
Component,
e.g. the Textfield firstName is left empty. After that the select of the
DropDownChoice
does not update the Textfields anymore. Where is my mistake? Thanks a lot
in advance.
Daniela

Here is my code:

public class EditEmployeePage extends BasePage {
private FormComponentString firstName;
private DropDownChoiceEmployee employeeDDC;
private final FormEmployee employeListForm;
private ModelEmployee employeeModel;
private Employee employee;
@SpringBean(name=employeeService)
private EmployeeService employeeService;
private Button saveEmployeeButton;
private Button resetButton;

public EditEmployeePage(final PageParameters parameters) {
super();
employee = new Employee();
employeeModel = new ModelEmployee(employee);//for dropDownChoice
final CompoundPropertyModelEmployee employeeCpm = new
CompoundPropertyModelEmployee(employeeModel); //for form
employeListForm = new FormEmployee(employeListForm,
employeeCpm);
employeListForm.setOutputMarkupId(true);
add(employeListForm);
addEmployeeDropDown();
addFirstNameTextField();
//more fields
 }

private void addEmployeeDropDown() {
Label chooseEmployeeLabel = new Label(chooseEmployeeLabel,
Mitarbeiter wählen:*);
employeListForm.add(chooseEmployeeLabel);

// Employee DropdownChoice
LoadableDetachableModelListEmployee employeeValueChoices = new
LoadableDetachableModelListEmployee() {
private static final long serialVersionUID = 1L;

protected ListEmployee load() {
ListEmployee employees = Collections.emptyList();
employees = employeeService.findallEmployees(getCompany());
if (!employees.isEmpty()){
employeeModel.setObject(employees.get(0));
}
return employees;
}

};

employeeDDC = new DropDownChoiceEmployee(employee,
employeeModel,
employeeValueChoices.getObject(),
new TwoPropertiesChoiceRendererEmployee(employeeId,
lastName, firstName, ,));
employeeDDC.setLabel(new ModelString(Mitarbeiter
wählen));
employeeDDC.add(new
AjaxFormComponentUpdatingBehavior(onchange) {
@Override
protected void onUpdate(AjaxRequestTarget target) {
   target.add(employeListForm);
}
  });

employeeDDC.setRequired(true);
employeListForm.add(employeeDDC);
}

private void addFirstNameTextField() {
// first name label and field on page
Label firstNameLabel = new Label(firstNameLabel, Vorname:*);
employeListForm.add(firstNameLabel);
firstName = new TextFieldString(firstName);
firstName.setLabel(new ModelString(Vorname));
firstName.setOutputMarkupPlaceholderTag(true);
FeedbackPanel firstNameFeedback =  (FeedbackPanel) new
FeedbackPanel(firstNameFeedback, firstName).setOutputMarkupId(true);
employeListForm.add(firstNameFeedback);
employeListForm.add(firstName);
firstName.setRequired(true);
}
...
}

public abstract class BasePage extends WebPage {
   private final FeedbackPanel pageFeedback = new
FeedbackPanel(feedback);
   public BasePage() {
  super();
  pageFeedback.setOutputMarkupId(true);
  add(pageFeedback);
   }


Re: How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-12 Thread Andrea Del Bene
Here is some code of a possible solution:


public class DropDownChoiceForStringT extends DropDownChoiceT {

private IModelString targetModel;

public DropDownChoiceForString(String id, IModelT model, IModelString 
targetModel, List? extends T choices,
IChoiceRenderer? super T renderer) {
super(id, model, choices, renderer);
this.targetModel = targetModel;
}

protected DropDownChoiceForString(String id, IModelT model, 
IModelString targetModel) {
this(id, model, targetModel, Collections.T emptyList(), null);
}

@Override
protected void onInitialize() {
super.onInitialize();
// load the initial choice.
setModelObject(convertChoiceIdToChoice(targetModel.getObject()));
}

@Override
protected void onDetach() {
super.onDetach();

targetModel.detach();
}

@Override
protected void onModelChanged() {
super.onModelChanged();

T newSelection = getModelObject();

int choiceIndex = getChoices().indexOf(newSelection);
// update the string source with the selected value.
targetModel.setObject(getChoiceRenderer().getIdValue(newSelection, 
choiceIndex));
}
}



 Hi,

 I needed something similar in a couple of projects. One solution is to
 create a custom DropDownChoice which takes also the string model to
 update. Then you can override onModelChanged to update the string
 model with the new value that can be extracted with the ChoiceRenderer.
 To make this easier to understand, let's say that I have a list of state
 abbreviations for example AL, AK, AZ, AR etcetera (the actual example
 has
 two letter abbreviations also, but much longer names). I need a
 DropDownChoice that shows the abbreviations for selection (e.g., AK) but
 will show the full name as a tooltip whenever the mouse hovers over
 one of
 the choice (e.g., AK shows Alaska).

  
 I have developed a solution that is based on the example presented here:
 http://stackoverflow.com/questions/12234738/wicket-dropdownchoice-titles-too

 ltips-for-options

 that develops a subclass of DropDownChoice and overrides 
 appendOptionHtml
 to append a title to the buffer. My class takes a StateDisplay
 object as
 its model, and the model has two fields, an id that is displayed in
 the
 list, and a fullName which is added as the title by the
 appendOptionHtml
 method.

  
 This works fine for displaying thedropdown with the  tooltip, but the
 problem is that the model is a complex object( StateDisplay) with two
 fields, but the underlying domain object needs a simple String with the
 state ID.

  
 Prior to implementing the tooltip, the DrowdownChoice was formed using:

  
 Item.add(new DropDownChoiceString(state, new
 PropertyModelString((CompanyDTO) item.getDefaultModelObject(),
 state),
 stateList)));

  
 Note: item is there because this is used in the populateItem method
 of a
 ListView.

  
 Now the code is:

  
 Model StateDisplay  selectedState = new Model();

  
 ChoiceRendererStateDisplay choiceRenderer = new
 ChoiceRendererModifierDisplayDto(id, id);


 Item.add(new StateDropDownChoice StateDisplay (state, selectedState,
 stateList, choiceRenderer));

  
 After the selection is made the model (selectedState) is set to the
 chosen
 StateDisplay, but there is no easy way to the simple String value set on
 the CompanyDTO.

  
 How can I make the dropdown selection update the domain model's simple
 String.

  
 Thanks

 Bruce





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



Re: Modular Wicket Application

2014-02-12 Thread Martin Grigorov
Hi,

You have to use Wicket libraries with the same major version.
wicket is 7.0.0-SNAPSHOT
but wicketstuff-annotation is 1.4

I'd recommend you to use 6.13 for both

Martin Grigorov
Wicket Training and Consulting


On Sat, Feb 8, 2014 at 10:12 AM, IowA reginald...@gmail.com wrote:

 Hello all, I am new to Wicket. When I use Guice in Wicket's quickstart
 everything works like a charm and it is possible to deploy it on Tomcat.
 But
 when i use same code + write my module deploying to Tomcat ends with
 errors.
 Catalina - http://pastebin.com/CaFGzDta
 Tomcat - http://pastebin.com/prEU4RX5

 wicket module pom.xml - http://pastebin.com/zF0z2MiN
 domain module pom.xml - http://pastebin.com/bLkbwhsN
 parent pom.xml - http://pastebin.com/hC9sLpuJ

 Any ideas what I am doing wrong?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Modular-Wicket-Application-tp4664317.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 get wiki Framework Documentation for offline reading

2014-02-12 Thread Duke
Hi, Martin. Hi everyone!
What about a offline wicket api  documentation
http://ci.apache.org/projects/wicket/apidocs/6.x/  ? Sometime it's usefull
to get it without any internet connection.  Can we download it anyware?
Best regards,
Andrey

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-get-wiki-Framework-Documentation-for-offline-reading-tp4664374p4664411.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 get wiki Framework Documentation for offline reading

2014-02-12 Thread Martin Grigorov
http://central.maven.org/maven2/org/apache/wicket/wicket-core/6.13.0/wicket-core-6.13.0-javadoc.jar

Martin Grigorov
Wicket Training and Consulting


On Wed, Feb 12, 2014 at 4:57 PM, Duke warlock9...@gmail.com wrote:

 Hi, Martin. Hi everyone!
 What about a offline wicket api  documentation
 http://ci.apache.org/projects/wicket/apidocs/6.x/  ? Sometime it's
 usefull
 to get it without any internet connection.  Can we download it anyware?
 Best regards,
 Andrey

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-get-wiki-Framework-Documentation-for-offline-reading-tp4664374p4664411.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: Modular Wicket Application

2014-02-12 Thread IowA
Hello, I was not using annotations, so after removing it from pom.xml I am
still getting same error


Martin Grigorov-4 wrote
 Hi,
 
 You have to use Wicket libraries with the same major version.
 wicket is 7.0.0-SNAPSHOT
 but wicketstuff-annotation is 1.4
 
 I'd recommend you to use 6.13 for both
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Sat, Feb 8, 2014 at 10:12 AM, IowA lt;

 reginaldasr@

 gt; wrote:
 
 Hello all, I am new to Wicket. When I use Guice in Wicket's quickstart
 everything works like a charm and it is possible to deploy it on Tomcat.
 But
 when i use same code + write my module deploying to Tomcat ends with
 errors.
 Catalina - http://pastebin.com/CaFGzDta
 Tomcat - http://pastebin.com/prEU4RX5

 wicket module pom.xml - http://pastebin.com/zF0z2MiN
 domain module pom.xml - http://pastebin.com/bLkbwhsN
 parent pom.xml - http://pastebin.com/hC9sLpuJ

 Any ideas what I am doing wrong?

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

 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modular-Wicket-Application-tp4664317p4664413.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: Modular Wicket Application

2014-02-12 Thread Martin Grigorov
https://github.com/ReginaldasR/wicket-modular/pull/1

Martin Grigorov
Wicket Training and Consulting


On Wed, Feb 12, 2014 at 5:51 PM, IowA reginald...@gmail.com wrote:

 Hello, I was not using annotations, so after removing it from pom.xml I am
 still getting same error


 Martin Grigorov-4 wrote
  Hi,
 
  You have to use Wicket libraries with the same major version.
  wicket is 7.0.0-SNAPSHOT
  but wicketstuff-annotation is 1.4
 
  I'd recommend you to use 6.13 for both
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Sat, Feb 8, 2014 at 10:12 AM, IowA lt;

  reginaldasr@

  gt; wrote:
 
  Hello all, I am new to Wicket. When I use Guice in Wicket's quickstart
  everything works like a charm and it is possible to deploy it on Tomcat.
  But
  when i use same code + write my module deploying to Tomcat ends with
  errors.
  Catalina - http://pastebin.com/CaFGzDta
  Tomcat - http://pastebin.com/prEU4RX5
 
  wicket module pom.xml - http://pastebin.com/zF0z2MiN
  domain module pom.xml - http://pastebin.com/bLkbwhsN
  parent pom.xml - http://pastebin.com/hC9sLpuJ
 
  Any ideas what I am doing wrong?
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Modular-Wicket-Application-tp4664317.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail:

  users-unsubscribe@.apache

  For additional commands, e-mail:

  users-help@.apache

 
 



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Modular-Wicket-Application-tp4664317p4664413.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 make a Wiket DropDownChoice with complex a model return a simple String

2014-02-12 Thread Bruce Lombardi
Thanks Andrea,

I was trying what you sent in your previous  message and I was having
trouble figuring out how to get the value set on the target property model.

Your code here, especially this line:

targetModel.setObject(getChoiceRenderer().getIdValue(newSelection,
choiceIndex));

was really helpful and I was able to get everything working.

Thanks again. 
Have you ever consider making this available to the Wicket community? I see
a lot of questions related to DropDownChoice, but not many answers.

- Bruce


-Original Message-
From: Andrea Del Bene [mailto:an.delb...@gmail.com] 
Sent: Wednesday, February 12, 2014 4:31 AM
To: users@wicket.apache.org
Subject: Re: How to make a Wiket DropDownChoice with complex a model return
a simple String

Here is some code of a possible solution:


public class DropDownChoiceForStringT extends DropDownChoiceT {

private IModelString targetModel;

public DropDownChoiceForString(String id, IModelT model,
IModelString targetModel, List? extends T choices,
IChoiceRenderer? super T renderer) {
super(id, model, choices, renderer);
this.targetModel = targetModel;
}

protected DropDownChoiceForString(String id, IModelT model,
IModelString targetModel) {
this(id, model, targetModel, Collections.T emptyList(), null);
}

@Override
protected void onInitialize() {
super.onInitialize();
// load the initial choice.
setModelObject(convertChoiceIdToChoice(targetModel.getObject()));
}

@Override
protected void onDetach() {
super.onDetach();

targetModel.detach();
}

@Override
protected void onModelChanged() {
super.onModelChanged();

T newSelection = getModelObject();

int choiceIndex = getChoices().indexOf(newSelection);
// update the string source with the selected value.
targetModel.setObject(getChoiceRenderer().getIdValue(newSelection,
choiceIndex));
}
}



 Hi,

 I needed something similar in a couple of projects. One solution is to 
 create a custom DropDownChoice which takes also the string model to 
 update. Then you can override onModelChanged to update the string 
 model with the new value that can be extracted with the ChoiceRenderer.
 To make this easier to understand, let's say that I have a list of 
 state abbreviations for example AL, AK, AZ, AR etcetera (the actual 
 example has two letter abbreviations also, but much longer names). I 
 need a DropDownChoice that shows the abbreviations for selection 
 (e.g., AK) but will show the full name as a tooltip whenever the 
 mouse hovers over one of the choice (e.g., AK shows Alaska).

  
 I have developed a solution that is based on the example presented here:
 http://stackoverflow.com/questions/12234738/wicket-dropdownchoice-tit
 les-too

 ltips-for-options

 that develops a subclass of DropDownChoice and overrides 
 appendOptionHtml to append a title to the buffer. My class takes a 
 StateDisplay object as its model, and the model has two fields, an 
 id that is displayed in the list, and a fullName which is added 
 as the title by the appendOptionHtml method.

  
 This works fine for displaying thedropdown with the  tooltip, but the 
 problem is that the model is a complex object( StateDisplay) with two 
 fields, but the underlying domain object needs a simple String with 
 the state ID.

  
 Prior to implementing the tooltip, the DrowdownChoice was formed using:

  
 Item.add(new DropDownChoiceString(state, new
 PropertyModelString((CompanyDTO) item.getDefaultModelObject(), 
 state), stateList)));

  
 Note: item is there because this is used in the populateItem method 
 of a ListView.

  
 Now the code is:

  
 Model StateDisplay  selectedState = new Model();

  
 ChoiceRendererStateDisplay choiceRenderer = new 
 ChoiceRendererModifierDisplayDto(id, id);


 Item.add(new StateDropDownChoice StateDisplay (state, 
 selectedState, stateList, choiceRenderer));

  
 After the selection is made the model (selectedState) is set to the 
 chosen StateDisplay, but there is no easy way to the simple String 
 value set on the CompanyDTO.

  
 How can I make the dropdown selection update the domain model's 
 simple String.

  
 Thanks

 Bruce





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



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



Error in Modal opening two diffrent instances of Wicket applicaiton.

2014-02-12 Thread eaglei22
Hello, I am having an issue when I have my application opened in two separate
tabs in IE or FireFox. 

Here is the problem:

I have a page called User, and in this page you can open a Modal window to
search for a user. Once a user is found, you select it, and the Modal window
closes, and that User object and its attributes is used and displayed to the
User page. 

The problem is if I have tab open on the User page and run a search in the
Modal window for another user, and while this is taking place, I open
another tab and goto another instance of the application and to the user
page, and then perform a search using the same scenerio.. The latest opened
instance of the application will return the search results to the page just
fine; and the first instance of the application and the running search will
close the page, and nothing will happen, or the page will reset itself
loading the defaulted information. This only happens when I open a new tab
and instance of the application while a current instance is already running
a search in the modal window of User page. If I open two different sessions
of the application before running any searches, then run a search in each
session everything is fine. 


Some background:
The modal class uses the PageReference passed in through its constructor. I
use this to interact with the calling pages variables. Once the modal window
closes using window.close(target);  the calling class will continue its page
update via:

modalReference.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback()
{
   public void onClose(AjaxRequestTarget target)
   {
   ..make changes to page here.




Here is what happens just before the modal window closes:

   public void onClick(AjaxRequestTarget target)
   {
   setCurrentUserFromLite(item.getModelObject());
   
((UserPage)modalWindowPage.getPage()).addUserInformation(selectedUser.getLastName(),
selectedUser.getFirstName(),
selectedUser.getMiddleName(), selectedUser.getBemsid(), );

((UserPage)modalWindowPage.getPage()).setFindUserFromModal(true);

((UserPage)modalWindowPage.getPage()).setCurrentUser(selectedUser);
window.close(target);
}



Any ideas what is happening? Or is there a way to maybe check to see if the
same functionality is being used in another instance and prevent the user
from running a search? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-in-Modal-opening-two-diffrent-instances-of-Wicket-applicaiton-tp4664418.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 in Modal opening two diffrent instances of Wicket applicaiton.

2014-02-12 Thread eaglei22
I have made a few changes to my original explanation:

Here is the edited version:
The problem is if I have tab open on the User page and run a search in the
Modal window for another user, and while this is taking place, I open
another tab and goto another instance of the application and to the user
page, and then perform a search using the same scenerio.. The latest opened
instance of the application will return the search results to the page just
fine; and the first instance of the application and the running search will
close the modal after its done processing, and nothing will happen to the
calling page, or the calling page will reset itself loading the defaulted
information. This only happens when I open a new tab and instance of the
application while a current instance is already running a search in the
modal window of User page. If I open two different sessions of the
application before running any searches, then run a search in each session
everything is fine. 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-in-Modal-opening-two-diffrent-instances-of-Wicket-applicaiton-tp4664418p4664419.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 in Modal opening two diffrent instances of Wicket applicaiton.

2014-02-12 Thread eaglei22
Here is some more information on my initializating of the modal window:


add(userPageFindUserModal = new 
ModalWindow(findUserModalWindow));

userPageFindUserModal.setResizable(false);
userPageFindUserModal.setInitialHeight(23);
userPageFindUserModal.setInitialWidth(69);
userPageFindUserModal.setWidthUnit(em);
userPageFindUserModal.setHeightUnit(em);
userPageFindUserModal.setUseInitialHeight(false);

userPageFindUserModal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);

userPageFindUserModal.setPageCreator(new 
ModalWindow.PageCreator()
{
public Page createPage()
{
return new 
FindUserModal(UserPage.this.getPageReference(), 
userPageFindUserModal, server);
}
});

// on modal window close, this method will be called
userPageFindUserModal.setCloseButtonCallback(new
ModalWindow.CloseButtonCallback()
{
public boolean onCloseButtonClicked(AjaxRequestTarget 
target)
{
return true;
}
});

userPageFindUserModal.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback()
{

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-in-Modal-opening-two-diffrent-instances-of-Wicket-applicaiton-tp4664418p4664420.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