[ASK] Stripes with Popup Selection

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[ASK] Stripes with Popup Selection

Hari Christian
Hi,


I have requirement to make popup screen with selection.

For example, user click a button to call popup with list of country.
In this country popup, user also can have search, sort, and paging functionality.
When user select one of the country, it will return to parent screen and fill the data.

I already tried to combine with JQuery and put my popup inside div like this
<script>
// JQuery for code here
</script>
<s:form beanclass="com.test.EmployeeFormActionBean">
   Name: <s:text name="name"/>
   Country: <s:text name="country"/> <s:button id="btnCountryPopup"/>
</form>
<div id="countryPopup">
    <s:form beanclass="com.test.CountryPopupActionBean">
      <%@include file="popupCountry.jsp"%>
    </form>
   </div>

The problem is the compiler always look ArrayList data for popupCountry.jsp in
EmployeeFormActionBean.
I want to have the ArrayList in CountryPopupActionBean


Please do not suggest to do this with another technique. The requirement is using popup.

If someone could show me a good example i will be thankful


Regards,
Hari
Senior Java Developer    
  
PT Gunatronikatama Cipta (GASI)
THE PAYROLL SERVICE SPECIALIST
Suite 304, 3rd Floor, Plaza Aminta
Jl. TB Simatupang Kav 10, Jakarta -  Indonesia 12310
Office : +62 21750 2345 ext. 357 |  Fax :  +62 21 751 2081  Mobile: + 62. 817 097 6242
(http) : //www.ptgasi.com


Perhatian: E-mail ini (termasuk seluruh lampirannya, bila ada) hanya ditujukan kepada penerima yang tercantum  di atas. Jika Anda bukan penerima yang dituju, maka Anda tidak diperkenankan untuk memanfaatkan, menyebarkan, mendistribusikan, atau menggandakan e-mail ini beserta seluruh lampirannya. Mohon kerjasamanya untuk segera memberitahukan PT GASI di alamat email yang tercantum di atas serta menghapus e-mail ini beserta seluruh lampirannya. Semua pendapat yang ada dalam e-mail ini merupakan pendapat pribadi dari pengirim yang bersangkutan dan tidak serta merta mencerminkan pandangan PT GASI., kecuali telah terdapat kesepakatan antara pengirim dan penerima bahwa e-mail ini termasuk salah satu bentuk komunikasi kedinasan yang dapat diterima oleh kedua pihak.


Caution: The information enclosed in this email (and any attachments) may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message.  Unless it is made by the authorized person, any views expressed in this message are those of the individual sender and may not necessarily reflect the views of PT GASI.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: [ASK] Stripes with Popup Selection

levi_h

You could replace your (div and) jsp:include with a c:import (to an action that provides the popup div). This way, reusing the jsp with the popup form becomes easier as well (when a submit results in validation errors for instance).

Alternatively, you could remove the import altogether and load the popup when it's needed (that is: when the user clicks on the button). Depending on how many lookup data you have to load, this will be faster too.

Regards,
  Levi

Op 19 okt. 2013 15:42 schreef "Hari Christian" <[hidden email]>:
Hi,


I have requirement to make popup screen with selection.

For example, user click a button to call popup with list of country.
In this country popup, user also can have search, sort, and paging functionality.
When user select one of the country, it will return to parent screen and fill the data.

I already tried to combine with JQuery and put my popup inside div like this
<script>
// JQuery for code here
</script>
<s:form beanclass="com.test.EmployeeFormActionBean">
   Name: <s:text name="name"/>
   Country: <s:text name="country"/> <s:button id="btnCountryPopup"/>
</form>
<div id="countryPopup">
    <s:form beanclass="com.test.CountryPopupActionBean">
      <%@include file="popupCountry.jsp"%>
    </form>
   </div>

The problem is the compiler always look ArrayList data for popupCountry.jsp in
EmployeeFormActionBean.
I want to have the ArrayList in CountryPopupActionBean


Please do not suggest to do this with another technique. The requirement is using popup.

If someone could show me a good example i will be thankful


Regards,
Hari
Senior Java Developer    
  
PT Gunatronikatama Cipta (GASI)
THE PAYROLL SERVICE SPECIALIST
Suite 304, 3rd Floor, Plaza Aminta
Jl. TB Simatupang Kav 10, Jakarta -  Indonesia 12310
Office : +62 21750 2345 ext. 357 |  Fax :  +62 21 751 2081  Mobile: <a href="tel:%2B%2062.%20817%20097%206242" value="+628170976242" target="_blank">+ 62. 817 097 6242
(http) : //www.ptgasi.com


Perhatian: E-mail ini (termasuk seluruh lampirannya, bila ada) hanya ditujukan kepada penerima yang tercantum  di atas. Jika Anda bukan penerima yang dituju, maka Anda tidak diperkenankan untuk memanfaatkan, menyebarkan, mendistribusikan, atau menggandakan e-mail ini beserta seluruh lampirannya. Mohon kerjasamanya untuk segera memberitahukan PT GASI di alamat email yang tercantum di atas serta menghapus e-mail ini beserta seluruh lampirannya. Semua pendapat yang ada dalam e-mail ini merupakan pendapat pribadi dari pengirim yang bersangkutan dan tidak serta merta mencerminkan pandangan PT GASI., kecuali telah terdapat kesepakatan antara pengirim dan penerima bahwa e-mail ini termasuk salah satu bentuk komunikasi kedinasan yang dapat diterima oleh kedua pihak.


Caution: The information enclosed in this email (and any attachments) may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message.  Unless it is made by the authorized person, any views expressed in this message are those of the individual sender and may not necessarily reflect the views of PT GASI.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: [ASK] Stripes with Popup Selection

Hari Christian
Hi Levi,


Thanks for the hints, i will try soon.
Btw i just want to ask, have you ever implement popup in your application?

I ask this because it seem so hard to find the example in Internet.
Usually i am good at Googling, but this one i cannot find the good article or example.

In your opinion, do you think popup is the best practice if using Stripes?



Regards,
Hari
Senior Java Developer    
  
PT Gunatronikatama Cipta (GASI)
THE PAYROLL SERVICE SPECIALIST
Suite 304, 3rd Floor, Plaza Aminta
Jl. TB Simatupang Kav 10, Jakarta -  Indonesia 12310
Office : +62 21750 2345 ext. 357 |  Fax :  +62 21 751 2081  Mobile: + 62. 817 097 6242
(http) : //www.ptgasi.com


Perhatian: E-mail ini (termasuk seluruh lampirannya, bila ada) hanya ditujukan kepada penerima yang tercantum  di atas. Jika Anda bukan penerima yang dituju, maka Anda tidak diperkenankan untuk memanfaatkan, menyebarkan, mendistribusikan, atau menggandakan e-mail ini beserta seluruh lampirannya. Mohon kerjasamanya untuk segera memberitahukan PT GASI di alamat email yang tercantum di atas serta menghapus e-mail ini beserta seluruh lampirannya. Semua pendapat yang ada dalam e-mail ini merupakan pendapat pribadi dari pengirim yang bersangkutan dan tidak serta merta mencerminkan pandangan PT GASI., kecuali telah terdapat kesepakatan antara pengirim dan penerima bahwa e-mail ini termasuk salah satu bentuk komunikasi kedinasan yang dapat diterima oleh kedua pihak.


Caution: The information enclosed in this email (and any attachments) may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message.  Unless it is made by the authorized person, any views expressed in this message are those of the individual sender and may not necessarily reflect the views of PT GASI.


On Sun, Oct 20, 2013 at 6:23 AM, Levi Hoogenberg <[hidden email]> wrote:

You could replace your (div and) jsp:include with a c:import (to an action that provides the popup div). This way, reusing the jsp with the popup form becomes easier as well (when a submit results in validation errors for instance).

Alternatively, you could remove the import altogether and load the popup when it's needed (that is: when the user clicks on the button). Depending on how many lookup data you have to load, this will be faster too.

Regards,
  Levi

Op 19 okt. 2013 15:42 schreef "Hari Christian" <[hidden email]>:
Hi,


I have requirement to make popup screen with selection.

For example, user click a button to call popup with list of country.
In this country popup, user also can have search, sort, and paging functionality.
When user select one of the country, it will return to parent screen and fill the data.

I already tried to combine with JQuery and put my popup inside div like this
<script>
// JQuery for code here
</script>
<s:form beanclass="com.test.EmployeeFormActionBean">
   Name: <s:text name="name"/>
   Country: <s:text name="country"/> <s:button id="btnCountryPopup"/>
</form>
<div id="countryPopup">
    <s:form beanclass="com.test.CountryPopupActionBean">
      <%@include file="popupCountry.jsp"%>
    </form>
   </div>

The problem is the compiler always look ArrayList data for popupCountry.jsp in
EmployeeFormActionBean.
I want to have the ArrayList in CountryPopupActionBean


Please do not suggest to do this with another technique. The requirement is using popup.

If someone could show me a good example i will be thankful


Regards,
Hari
Senior Java Developer    
  
PT Gunatronikatama Cipta (GASI)
THE PAYROLL SERVICE SPECIALIST
Suite 304, 3rd Floor, Plaza Aminta
Jl. TB Simatupang Kav 10, Jakarta -  Indonesia 12310
Office : +62 21750 2345 ext. 357 |  Fax :  +62 21 751 2081  Mobile: <a href="tel:%2B%2062.%20817%20097%206242" value="+628170976242" target="_blank">+ 62. 817 097 6242
(http) : //www.ptgasi.com


Perhatian: E-mail ini (termasuk seluruh lampirannya, bila ada) hanya ditujukan kepada penerima yang tercantum  di atas. Jika Anda bukan penerima yang dituju, maka Anda tidak diperkenankan untuk memanfaatkan, menyebarkan, mendistribusikan, atau menggandakan e-mail ini beserta seluruh lampirannya. Mohon kerjasamanya untuk segera memberitahukan PT GASI di alamat email yang tercantum di atas serta menghapus e-mail ini beserta seluruh lampirannya. Semua pendapat yang ada dalam e-mail ini merupakan pendapat pribadi dari pengirim yang bersangkutan dan tidak serta merta mencerminkan pandangan PT GASI., kecuali telah terdapat kesepakatan antara pengirim dan penerima bahwa e-mail ini termasuk salah satu bentuk komunikasi kedinasan yang dapat diterima oleh kedua pihak.


Caution: The information enclosed in this email (and any attachments) may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message.  Unless it is made by the authorized person, any views expressed in this message are those of the individual sender and may not necessarily reflect the views of PT GASI.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: [ASK] Stripes with Popup Selection

levi_h
Hello Hari,

you could look at Bootstrap for an example (http://getbootstrap.com/javascript/#modals). There are several other examples online of course (such as http://api.jqueryui.com/dialog/); the oldest examples will use window.open, more recent ones will provide abstractions on top of that.

And sure, Stripes can be used in combination with popups.

Kind regards,
  Levi


2013/10/20 Hari Christian <[hidden email]>
Hi Levi,


Thanks for the hints, i will try soon.
Btw i just want to ask, have you ever implement popup in your application?

I ask this because it seem so hard to find the example in Internet.
Usually i am good at Googling, but this one i cannot find the good article or example.

In your opinion, do you think popup is the best practice if using Stripes?



Regards,
Hari
Senior Java Developer    
  
PT Gunatronikatama Cipta (GASI)
THE PAYROLL SERVICE SPECIALIST
Suite 304, 3rd Floor, Plaza Aminta
Jl. TB Simatupang Kav 10, Jakarta -  Indonesia 12310
Office : +62 21750 2345 ext. 357 |  Fax :  +62 21 751 2081  Mobile: <a href="tel:%2B%2062.%20817%20097%206242" value="+628170976242" target="_blank">+ 62. 817 097 6242
(http) : //www.ptgasi.com


Perhatian: E-mail ini (termasuk seluruh lampirannya, bila ada) hanya ditujukan kepada penerima yang tercantum  di atas. Jika Anda bukan penerima yang dituju, maka Anda tidak diperkenankan untuk memanfaatkan, menyebarkan, mendistribusikan, atau menggandakan e-mail ini beserta seluruh lampirannya. Mohon kerjasamanya untuk segera memberitahukan PT GASI di alamat email yang tercantum di atas serta menghapus e-mail ini beserta seluruh lampirannya. Semua pendapat yang ada dalam e-mail ini merupakan pendapat pribadi dari pengirim yang bersangkutan dan tidak serta merta mencerminkan pandangan PT GASI., kecuali telah terdapat kesepakatan antara pengirim dan penerima bahwa e-mail ini termasuk salah satu bentuk komunikasi kedinasan yang dapat diterima oleh kedua pihak.


Caution: The information enclosed in this email (and any attachments) may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message.  Unless it is made by the authorized person, any views expressed in this message are those of the individual sender and may not necessarily reflect the views of PT GASI.


On Sun, Oct 20, 2013 at 6:23 AM, Levi Hoogenberg <[hidden email]> wrote:

You could replace your (div and) jsp:include with a c:import (to an action that provides the popup div). This way, reusing the jsp with the popup form becomes easier as well (when a submit results in validation errors for instance).

Alternatively, you could remove the import altogether and load the popup when it's needed (that is: when the user clicks on the button). Depending on how many lookup data you have to load, this will be faster too.

Regards,
  Levi

Op 19 okt. 2013 15:42 schreef "Hari Christian" <[hidden email]>:
Hi,


I have requirement to make popup screen with selection.

For example, user click a button to call popup with list of country.
In this country popup, user also can have search, sort, and paging functionality.
When user select one of the country, it will return to parent screen and fill the data.

I already tried to combine with JQuery and put my popup inside div like this
<script>
// JQuery for code here
</script>
<s:form beanclass="com.test.EmployeeFormActionBean">
   Name: <s:text name="name"/>
   Country: <s:text name="country"/> <s:button id="btnCountryPopup"/>
</form>
<div id="countryPopup">
    <s:form beanclass="com.test.CountryPopupActionBean">
      <%@include file="popupCountry.jsp"%>
    </form>
   </div>

The problem is the compiler always look ArrayList data for popupCountry.jsp in
EmployeeFormActionBean.
I want to have the ArrayList in CountryPopupActionBean


Please do not suggest to do this with another technique. The requirement is using popup.

If someone could show me a good example i will be thankful


Regards,
Hari
Senior Java Developer    
  
PT Gunatronikatama Cipta (GASI)
THE PAYROLL SERVICE SPECIALIST
Suite 304, 3rd Floor, Plaza Aminta
Jl. TB Simatupang Kav 10, Jakarta -  Indonesia 12310
Office : +62 21750 2345 ext. 357 |  Fax :  +62 21 751 2081  Mobile: <a href="tel:%2B%2062.%20817%20097%206242" value="+628170976242" target="_blank">+ 62. 817 097 6242
(http) : //www.ptgasi.com


Perhatian: E-mail ini (termasuk seluruh lampirannya, bila ada) hanya ditujukan kepada penerima yang tercantum  di atas. Jika Anda bukan penerima yang dituju, maka Anda tidak diperkenankan untuk memanfaatkan, menyebarkan, mendistribusikan, atau menggandakan e-mail ini beserta seluruh lampirannya. Mohon kerjasamanya untuk segera memberitahukan PT GASI di alamat email yang tercantum di atas serta menghapus e-mail ini beserta seluruh lampirannya. Semua pendapat yang ada dalam e-mail ini merupakan pendapat pribadi dari pengirim yang bersangkutan dan tidak serta merta mencerminkan pandangan PT GASI., kecuali telah terdapat kesepakatan antara pengirim dan penerima bahwa e-mail ini termasuk salah satu bentuk komunikasi kedinasan yang dapat diterima oleh kedua pihak.


Caution: The information enclosed in this email (and any attachments) may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message.  Unless it is made by the authorized person, any views expressed in this message are those of the individual sender and may not necessarily reflect the views of PT GASI.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users