java wickets menu on image button

2016-09-28 Thread ASHU_JAVA
I'm trying to create a image button. When this button clicked, a drop down
menu should appear with External Links to other websites.

Till now, I've managed to create drop down menu with External links but on
navigation bar as provided in example:
http://tomaszdziurko.pl/2012/03/wicket-and-twitter-bootstrap-navbar/. 

HTML: 
 
Code:
public Builder withMenuItemAsDropdown(MenuItemEnum menuItem, String
pageToLink, String label) {
//BookmarkablePageLink link = new
BookmarkablePageLink("link", pageToLink);
   ExternalLink linkExternal = new ExternalLink("link", pageToLink,
label); 
   linkExternal.setBody(new Model(label));
   linksMap2.put(menuItem, linkExternal);

return this;
}

And then in Base JAVA class:
add(new TwitterBootstrapNavBarPanel.Builder("navBar", HomePage.class,
"Example Web App", getActiveMenu())
.withMenuItem(MenuItemEnum.CLIENTS, ClientsPage.class)
 .withMenuItemAsDropdown(MenuItemEnum.PRODUCTS2, "Sample_URL", "Product 1")
.withMenuItemAsDropdown(MenuItemEnum.PRODUCTS2,  "Sample_URL",
"Product 2")
.withMenuItemAsDropdown(MenuItemEnum.PRODUCTS2,  "Sample_URL",
"Product 3")
   .build());


Now to add a Image, I've added the code:-

final ContextImage image=new ContextImage("image","IMAGE.png");
ExternalLink link = new ExternalLink("link", "SAMPLE_URL");
 //Image image = new Image("img", new
SharedResourceReference(BasePage.class,
"/wicket-bootstrap/img/QuestionMark_2.png"));
 link.add(image);
 add(link);

But I'm unable to add the drop down menu to this Image button. Kindly
suggest some inputs.

Thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-wickets-menu-on-image-button-tp4675602.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 wickets menu on image button

2016-09-29 Thread ASHU_JAVA
Hi Martin,

Thanks for your response. I need to create the following kind of image
button.


 

On clicking this Image button, a dropdown should appear containing External
Links to other web applications.

Kindly suggest solutions for this issue.
Thanks in advance. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-wickets-menu-on-image-button-tp4675602p4675605.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 wickets menu on image button

2016-09-29 Thread ASHU_JAVA
Hi Martin,

Thanks for your response.
Please find below the JSFiddle URL of what I want to achieve in Java
Wickets.
JSFiddle Example   

Kindly suggest solution to achieve this requirement.
Thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-wickets-menu-on-image-button-tp4675602p4675607.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 wickets menu on image button

2016-10-02 Thread ASHU_JAVA
Hi Martin,

Thanks a lot for your suggestion.

My requirement is nearly complete, the only issue I'm facing right now is
*how to open the List link in new tab ?*.
Please find below my current code:

/SamplePage.Java/
add(new LinkPanel("navBar"));

/SamplePage.html/


/LinkPanel.Java/



/LinkPanel.html/



/style.css/



The output looks like below image:
 

So, when I click on link it open in the same window. 

I tried to change the *"LinkPanel.java" *code as below:-

The output now looks like below image:
 

I'm able to now open the links in different tabs but the appearance is now
not in the list.

I think if the LinkPanel.Java code can generate an HTML like below it will
become perfect according to my requirement:-


Kindly suggest inputs on how to achieve it in my current code.
Thanks in advance.




You need to add the dropdown to the  element.
In the blog article you mentioned in your first email this is:  

The blog uses:

 <#> 
 **

   
 
   
 

You need to remove * and use   instead of .
In the Java code replace:

itemContainer.add(new Label("label", currentMenuItem.getLabel()));

with

itemContainer.add(new ContextImage("img", ...));

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-wickets-menu-on-image-button-tp4675602p4675620.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 wickets menu on image button

2016-10-11 Thread ASHU_JAVA
Hi Martin,

I've implemented the External Links as shown in below code


Can you please suggest how to provide a Pop-up if the External link doesn't
work i.e. if a link is clicked and the link is an invalid URL, it should
open a pop-up with error message instead of a new tab?

Thanks in advance.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-wickets-menu-on-image-button-tp4675602p4675739.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 wickets menu on image button

2016-10-13 Thread ASHU_JAVA
Hi Martin,

I tried adding following Javascript in HTML file like below:-


And modify the code in corresponding JAVA file:-




But I'm unable to get Javascript function trigger when the link is clicked.

Can you please propose some suggestions.
Thanks in advance

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-wickets-menu-on-image-button-tp4675602p4675754.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Java Wickets Dynamic DataView

2017-02-02 Thread ASHU_JAVA
Hello All,

I'm trying to have a dynamic list view which will get updated dynamically on
a button click.
I've to implement the functionality like below:-

 

So, the user will pass either a single name or upload a file containing many
names, an addition in database is performed in the background by clicking
the button "ADD".
On success, the DataView should update the list of names as shown in tabular
form in above image with the newly added one.

I'm using a model window that contain this form and would like to update the
list (DataView) section on clicking the ADD button.

Kindly suggest your inputs/code sample to achieve this.

Thanks in advance.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Dynamic-DataView-tp4676976.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 Wickets Dynamic DataView

2017-02-07 Thread ASHU_JAVA
Thanks Padro for your response.
I'm a newbie to Java Wickets, so can you please share some more insights
regarding this.

I'm using below code:-




I'm able to add user to database, but unable to refresh the list with new
list entry.

Kindly provide your inputs.

Thanks in advance.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Dynamic-DataView-tp4676976p4677010.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Java Wickets Delete and Checkbox

2017-02-07 Thread ASHU_JAVA
Hello All,

I'm a newbie to Java Wickets and want to implement following functionality:-

 

I want to use checkbox to select one, multiple or all rows and on "Delete"
button click, the users entry from Database Table gets removed and table
gets updated with remaining rows.

Can you please share some code samples to provide more insights to achieve
this functionality.

Thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Delete-and-Checkbox-tp4677014.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 Wickets Delete and Checkbox

2017-02-07 Thread ASHU_JAVA
Thanks Marcel for the link.
I'm able to add checkbox group as provided in this link.
However, I'm unable to refresh the list view once the item is deleted in the
database.

Can you please guide how to accomplish the task to refresh the listview
(dataview)?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Delete-and-Checkbox-tp4677014p4677040.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 Wickets Delete and Checkbox

2017-02-09 Thread ASHU_JAVA
Hello All,

Here's a brief about my scenario:-

1) I've a Page with a custom Datatable that contains a list of category.
2) Onclick of any one category, a pop-up appears (I'm using model window for
this).
3) In the model window, we can view, add and delete users belonging to the
particular category. (I'm using Panel component).

4) Task to do:-

a) Delete one, multiple, and all users (Checkbox and Delete button)
b) Refresh the DataView of users (On addition/deletion of Users)

HTML code:-




Java Wicket Code:



Kindly provide inputs to perform these tasks.
Thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Delete-and-Checkbox-tp4677014p4677093.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 Wickets Delete and Checkbox

2017-02-12 Thread ASHU_JAVA
Hello Jeremy,

I've provided my code. Can you please review and let me know, where I need
to make an update.

Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Delete-and-Checkbox-tp4677014p4677102.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 Wickets Delete and Checkbox

2017-02-22 Thread ASHU_JAVA
Thanks Martin.
It worked now.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Delete-and-Checkbox-tp4677014p4677159.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Java Wickets Delete Multiple Entries CheckboxGroup

2017-02-22 Thread ASHU_JAVA
Hello All,

I've been using CheckBoxGroup in my application and followed the below
example URL:-
http://examples7x.wicket.apache.org/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.CheckGroupPage;jsessionid=A65260928022BEDC4A2943D0F5FD6996?0

  

I need to remove single, multiple or all entries from database by selecting
checkbox.

 

On clicking the delete button, I was able to fetch the corresponding entries
like "Manoj", "Neeraj" and then I performed below operation in my panel:-



For first username record, deleteUserStoreDomain() method return TRUE but
for each next username record it returns FALSE.

Thus, I'm unable to perform 'multiple' and 'all' username records deletion.

Kindly suggest solutions for this issue.
Thanks in advance. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Delete-Multiple-Entries-CheckboxGroup-tp4677171.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Java Wickets Refresh Model Window

2017-04-04 Thread ASHU_JAVA
Hello All,

I'm having a table containing a button on each row.
Onclick of this button, a model window appear, providing user two options,
either use text field for single record or upload a file for multiple
records and then click "Add Details" button to save the record(s) in
database.

The issue is if a user enter data in text field OR upload file then the user
input's reference remains existent even after the clicking of "Add Details"
button.
Thus, the data remains present and if the user clicks on "Add details"
button again, it executes the last performed operation again "single record
entry using text field input" OR "multiple record entry using File upload".

What I want to achieve is to refresh the model window after clicking the
"Add details" button, remove the reference of last executed operation and
make sure that the user enter the text field or upload the file again to
repeat the ADD DETAILS operation.
Currently I've to close the model window and refresh the Parent page to
reload everything.

The Page view looks like the below attached image.

 

Can anyone please share some input to achieve this functionality?

thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Refresh-Model-Window-tp4677602.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



Message Scroll Banner in Wickets

2017-07-16 Thread ASHU_JAVA
Hello All,

I'm a beginner in Wickets and want to know how to implement an auto
scrolling banner in Wickets.
I've to create a banner in my Website to display 3 rows from the database.
The text of these 3 database rows should be displayed in a auto-scrolling
banner, something like this:-

http://www.javafile.com/tickers/scroll.php
  

The scrolling time should be configurable.

Can anyone please guide me how to achieve this in Apache Wicket?

Thanks in advance.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245.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: Message Scroll Banner in Wickets

2017-07-25 Thread ASHU_JAVA
Hello Martin,

I'm trying to use  "Jquery Marquee"
to implement the required
functionality.

I've made an  HTML sample    (JSfiddle),
which is working fine but I'm unable to replicate the same in Java Wickets.

Here's my code:-

HomePage.html




HomePage.Java

add(new MyPanel("newsDetails"));

MyPanel.Html


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>



 














 







MyPanel.Java

public class MyPanel extends Panel {

private static final long serialVersionUID = -7322692526459024428L;
@SpringBean(name = "manageMyApplication")
protected ManageMyApplication manageApp;
private List list;

public MyPanel (String id)
{
super(id);

RepeatingView repeatingView = new RepeatingView("news");
List results = getAllItem(); //Getting List from 
database
if(results!=null){
MyBeanvalues = results.get(0);

if(StringUtils.isNotEmpty(values.getList1())){
repeatingView.add(new
Label(repeatingView.newChildId(),values.getList1()));
}
if(StringUtils.isNotEmpty(values.getList2())){
repeatingView.add(new
Label(repeatingView.newChildId(),values.getList2()));
}
if(StringUtils.isNotEmpty(values.getList3())){
repeatingView.add(new
Label(repeatingView.newChildId(),values.getList3()));
}
}
  
   add(repeatingView); 
 }

  
}

MyResourceInitialize.java file contains javascript reference to load:

@Override
public void renderHead(final IHeaderResponse response) {
response.renderJavaScriptReference(new
JavaScriptResourceReference(LocateResources.class,
"js/vendor/jquery.marquee.min.js"));

response.renderJavaScriptReference(new
JavaScriptResourceReference(LocateResources.class,
"js/newMarquee.js"));
super.renderHead(response);
}

The Javascript code has been added to "newMarquee.js" file as given below:-

$(function () {
$('.marquee').marquee({

duration: 15000,
duplicate: false,
delayBeforeStart:2000,

allowCss3Support: true,
gap: 600,

});
});


But the issue is the Javascript file "newMarquee.js" and the css mentioned
in MyPanel.html fails to load.
I've tried using AjaxEventBehavior to append Javascript in Wickets code but
that too didn't work.

Can you please share some inputs on how to achieve this?
Thanks in advance.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678280.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: Message Scroll Banner in Wickets

2017-07-25 Thread ASHU_JAVA
Hello Martin, 

I've added alerts on newMarquee.js file and they didn't get executed. 
By not loading, I meant to say no CSS style effects and Javascript method
for marquee gets executed.

I don't receive any error.
The HTML just display the mypanel content as a list instead of scrolling
marquee. 

Please share your inputs.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678283.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: Message Scroll Banner in Wickets

2017-07-25 Thread ASHU_JAVA
Hello Martin,

Ok, I've corrected the error (*missing :*) on loading the newMarquee.js.
But even after successful loading of "newMarquee.js" (I've checked with
alert), no marquee appears(as shown in below image) :-
 

It will just display it as normal List Items.

The HTML generated is as shown in below image:-

 

Can you please share some inputs on how I can make the Javascript
(newMarquee.js) and CSS (MyPanel.html) execute successfully in a wicket
Panel?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678304.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: Message Scroll Banner in Wickets

2017-07-27 Thread ASHU_JAVA
Hello All,

I've resolved my issue by overriding the renderHead() method inside
MyPanel.java as below:-

@Override
public void renderHead(IHeaderResponse response) {

response.renderString("");
response.renderOnDomReadyJavaScript("$(function () { 
$('.marquee').marquee({ duration: 15000,duplicate: false,
delayBeforeStart:2000,  allowCss3Support: true, gap: 600, pauseOnCycle: true, 
pauseOnHover: true });});");

} 

Thanks everyone.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Message-Scroll-Banner-in-Wickets-tp4678245p4678315.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



Form Children values

2017-07-27 Thread ASHU_JAVA
Hello All,

I wanted to fetch the current value of 3 checkbox's on the submit button.
The "Checkbox" is not part of my form, instead its part of a Wicket Panel
called inside the form.

The hierarchy of checkbox values inside form object is shown in below
screenshot:-

 

On Submit button of my form, I wanted to fetch all checkbox values and
update in database.
Here's the onSubmit method
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form form){
}

Can anyone please suggest how I can fetch these checkbox values inside
onSubmit() method by form object?

Thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-Children-values-tp4678317.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