SelectOneRadio inside a columnEx
Hello,
I need to render a radio buttons in a table, one button for each row, to allow selection of the row for the user.
How can I do that if "dataTableEx" is used for rendering the table ?
If I simply put selectOneRadio into hx:columnEx, each row contains independent set of buttons.
This issue has been solved by using the latest tomahawk-SVN version!
Peter
Similar Messages
-
SelectOneRadio inside datatable?
How do I put a <h:selectOneRadio> inside a datatable> Ie if I wanted to rank names from 1 to 3?
<h:dataTable value="#{bean.myNames}"
var="n"
>
<h:column>
<f:facet name="header">
<h:outputText value="Function Name"/>
</f:facet>
<h:outputText value="#{n.Name}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Rank"/>
</f:facet>
<h:selectOneRadio binding="#{bean.selectOneRank}" >
<f:selectItem itemValue="1" />
<f:selectItem itemValue="2" />
<f:selectItem itemValue="3" />
</h:selectOneRadio>
</h:column>
</h:dataTable>
How do I in the bean say that name y got rank z?Worked thanks...
I wish you could iterate though two items at one time in a data table... like this
List temp;
List temp2;
for (int i=0; i<temp.size(); i++){
temp.get(i);
if (temp2.get(i)) temp2.get(i);
But in a datatable....
I also found this
http://www.javaworld.com/javaworld/jw-02-2007/jw-02-jsf.html?page=2
That would work better IMHO
Thanks for your help. -
hx:commandExButton inside hx:dataTableEx doesn't work
I have a very strange case. If I put my <hx:commandExButton> outside of <hx:dataTableEx>, when I click on the button backend (page bean) code triggers (doButton1Action method), but when I put my <hx:commandExButton> inside <hx:dataTableEx> (inside <hx:columnEx>) and I click on that button - backend code (doButton1Action method) doesn't trigger (execute), but the form only submits/refresh and the same form shows again.
My code is simple:
<hx:dataTableEx id="tableOsebe" value="#{pc_vseOsebe.osebeList}" var="varosebeList">
<hx:columnEx id="columnPodrobnosti">
<f:facet name="header">
<h:outputText styleClass="ap_head" value="Potrdila" />
</f:facet>
<hx:requestLink styleClass="requestLink" id="link1" action="#{pc_vseOsebe.doLink1Action}">
<h:outputText id="text1" styleClass="outputText" value="Podrobnosti"></h:outputText>
</hx:requestLink>
<hx:commandExButton type="submit" value="Submit"
styleClass="commandExButton" id="button1" action="#{pc_vseOsebe.doButton1Action}"></hx:commandExButton>
</hx:columnEx>
</hx:dataTableEx>
public String doButton1Action() {
int index = getTableOsebe().getRowIndex();
return "";
public String doLink1Action() {
int index = getTableOsebe().getRowIndex();
return "";
}As you can see, I have also tried adding <hx:requestLink> and its backing doLink1Action() method into <hx:columnEx> of <hx:dataTableEx> and situation is a little better. The code executes, but getTableOsebe() always return null which causes NullPointerException.
Strange thing is that I have similar code in another JSF page and it works fine. I have spent days trying to find differences, but those two pages are very the same and I have failed to spot any important differences.
Please help.
P.S. I am using IBM implementation of JSF through Rational Application Developer 7 and WebSphere 6.1milantomic123 wrote:
I have a very strange case. If I put my <hx:commandExButton> outside of <hx:dataTableEx>, when I click on the button backend (page bean) code triggers (doButton1Action method), but when I put my <hx:commandExButton> inside <hx:dataTableEx> (inside <hx:columnEx>) and I click on that button - backend code (doButton1Action method) doesn't trigger (execute), but the form only submits/refresh and the same form shows again.Put the bean in session scope. If it works, then either your data loading logic is wrong, or there is a conversion/validation error occurred which missed your attention. To fix the first, just make sure that getOsebeList() returns exactly the same during the apply request values phase of the form submit request as it returned during the render response phase of the previous request for display. To fix the second, add <h:messages /> to the page to take note of them all. If you're using JSF 1.2, then you should be able to note the missing message in the appserver logs.
P.S. I am using IBM implementation of JSF through Rational Application Developer 7 and WebSphere 6.1IBM doesn't have a JSF implementation. It only has some simple component libraries. If I am correct, RAD7 by default ships with an early Sun JSF RI 1.1. Not really related to your problem, but I'd recommend to upgrade this to at least 1.x_02, available here: [http://javaserverfaces.dev.java.net]. Get 1.1_02 if you're using Servlet 2.4, or get the newest 1.2_x if you're using Servlet 2.5. -
hx:fileUpload doesn't work with hx:commandExButton
I am using WebSphere Studio and created a Faces file with a FileUpload Control and CommandLinkButton.
source:
<f:view>
<hx:scriptCollector id="scriptCollector1">
<h:form styleClass="form" id="form1">
<%-- jsf:codeBehind language="java" location="/JavaSource/pagecode/UploadFile.java" --%><%-- /jsf:codeBehind --%>
<LINK rel="stylesheet" type="text/css" href="theme/stylesheet.css"
title="Style">
<P><hx:fileupload styleClass="fileupload" id="fileupload1">
<hx:fileProp name="fileName" />
<hx:fileProp name="contentType" />
</hx:fileupload></P>
<hx:commandExButton type="submit" value="Upload"
styleClass="commandExButton" id="uploadButton"
action="#{pc_UploadFile.doUploadButtonAction}"></hx:commandExButton>
</h:form>
</hx:scriptCollector>
</f:view>
I have a System.out.println statement in my doUploadButtonAction. This never gets invoked. If I remove the fileupload control from the page. The action works. Any help will be apprecitated.milantomic123 wrote:
I have a very strange case. If I put my <hx:commandExButton> outside of <hx:dataTableEx>, when I click on the button backend (page bean) code triggers (doButton1Action method), but when I put my <hx:commandExButton> inside <hx:dataTableEx> (inside <hx:columnEx>) and I click on that button - backend code (doButton1Action method) doesn't trigger (execute), but the form only submits/refresh and the same form shows again.Put the bean in session scope. If it works, then either your data loading logic is wrong, or there is a conversion/validation error occurred which missed your attention. To fix the first, just make sure that getOsebeList() returns exactly the same during the apply request values phase of the form submit request as it returned during the render response phase of the previous request for display. To fix the second, add <h:messages /> to the page to take note of them all. If you're using JSF 1.2, then you should be able to note the missing message in the appserver logs.
P.S. I am using IBM implementation of JSF through Rational Application Developer 7 and WebSphere 6.1IBM doesn't have a JSF implementation. It only has some simple component libraries. If I am correct, RAD7 by default ships with an early Sun JSF RI 1.1. Not really related to your problem, but I'd recommend to upgrade this to at least 1.x_02, available here: [http://javaserverfaces.dev.java.net]. Get 1.1_02 if you're using Servlet 2.4, or get the newest 1.2_x if you're using Servlet 2.5. -
How to use h:selectOneRadio tag inside h:dataTable tag
Hi All,
Can any one tell me how to use <h:selectOneRadio> tag inside <h:dataTable> tag and how to get selected radio button value in bean ?JSF<h:selectOneMenu value="#{myBean.selectedItem}">
<f:selectItems value="#{myBean.selectItems}" />
</h:selectOneMenu>MyBeanprivate String selectedItem;
public String getSelectedItem() {
return selectedItem;
public void setSelectedItem(String selectedItem) {
this.selectedItem = selectedItem;
public List getSelectItems() {
List selectItems = new ArrayList();
selectItems.add(new SelectItem("key1", "value1"));
selectItems.add(new SelectItem("key2", "value2"));
selectItems.add(new SelectItem("key3", "value3"));
return selectItems;
}String selectedItem should contain the key (key1, key2 or key3) when selected. The values (value1, value2 and value3) are the options as shown in the list. -
Not able to use selectOneRadio from LOV in TreeTable
I am on Jdev ADF 11.1.1.3.0 version.
I have QuestionVO which has attribute called selectYesNo. This attribute has LOV of type Radio Group.
This VO has master detail relationship with master VO called CategoryVO.
In my JSF page, I want to drop this as TreeTable from the datacontrol However, when I try to show selectYesNo as selectOneRadio it does not work. When I drop other attributes in the VO as outputText, their values are bound to #{node.questionNum}, #{node.questionDescr} and so on. But when I drop the seletYesNo attribute as selectOneRadio it shows the value binds to #{bindings.selectYesNo}
Simply changing the binding to #{node.selectYesNo} does not work and gives this exception:
<RegistrationConfigurator><handleError> Server Exception during PPR, #1
javax.el.PropertyNotFoundException: Target Unreachable, 'selectYesNo' returned null
at com.sun.el.parser.AstValue.getTarget(AstValue.java:88)
at com.sun.el.parser.AstValue.isReadOnly(AstValue.java:126)
at com.sun.el.ValueExpressionImpl.isReadOnly(ValueExpressionImpl.java:230)
at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:481)
at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.cacheReadOnly(EditableValueRenderer.java:411)
at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.beforeEncode(LabeledInputRenderer.java:116)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:334)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.renderDataCell(BaseColumnRenderer.java:1213)
at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.encodeAll(BaseColumnRenderer.java:103)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer.encodeChild(TreeTableRenderer.java:747)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.renderDataBlockRows(TableRenderer.java:1932)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._renderSingleDataBlock(TableRenderer.java:1601)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._handleDataFetch(TableRenderer.java:1003)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:504)
at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer.encodeAll(TreeTableRenderer.java:600)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:529)
at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1515)
How do I display selectOneRadio based on LOV inside of TreeTable component?
Please help.
Edited by: Shah23 on Aug 3, 2011 6:51 PM
Edited by: Shah23 on Aug 3, 2011 6:51 PMDoing so did not work.
Convert to.. and selecting Select Boolean Radio simply converts the outputText to selectOneRadio without changing the value binding.
Value binding still shows "#{node.selectYesNo}.
Running the page with this does not show any data. The tree node expands with blank rows.
Another observation I had is:
Under expression builder I see,
JSP Objects
>node
>SelectYesNo
>bindings
>SelectYesNo
What is the difference between node and node.bindings attributes?
I could not find any documentation related to this topic.
Please suggest.
Edited by: Shah23 on Aug 4, 2011 10:39 AM -
Breadcrumb in BSP is not working when application is called inside Portal.
Dear All,
We have implemented SAP Learning Solution by integrating it with SAP EP 7.0.
We called the BSP Application HCM_LEARNING inside portal using BSP iView template.
The problem we are facing is, the breadcrumbs in the BSP application "HCM_LEARNING" is working fine when it is called as a standalone application. But the same is not working when it is called inside portal framework page.
Enterprise Portal breadcrumbs are working fine.
How could we resolve this.?
Regards,
Eben Joyson.this is the radio button
<af:selectOneRadio value="#{bindings.Gender1.inputValue}"
label="#{bindings.Gender1.label}"
required="#{bindings.Gender1.hints.mandatory}"
shortDesc="#{bindings.Gender1.hints.tooltip}"
id="sor5">
<f:selectItems value="#{bindings.Gender1.items}" id="si7"/>
</af:selectOneRadio>
i use this sample
http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADF_Insider_Essentials/ADF_Insider_Essential_YesNoRadio/ADF_Insider_Essential_YesNoRadio.html -
Hi!
I've got the following code:
<h:selectOneRadio id="sortOrder" layout="pageDirection">
<f:selectItem itemValue="1" itemLabel="note" />
<f:selectItem itemValue="2" itemLabel="name" />
<f:selectItem itemValue="3" itemLabel="postcode" />
</h:selectOneRadio>which renders to the following HTML output:
<table id="form:sortOrder">
<tr>
<td>
<label>
<input type="radio" name="form:sortOrder" value="1"> note</input>
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="form:sortOrder" value="2"> name</input>
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="form:sortOrder" value="3"> postcode</input>
</label>
</td>
</tr>
</table>Firstly, my HTML validator (Firefox validator plugin) marks the use of the <input> element inside the <label> element as wrong. Secondly, what I think is far more annoying, the "for" attributes of the <label> elements are not set!
While in Firefox you still can click on the label and thereby mark the radiobutton, in Internetexplorer this doesn't work (which is correct behaviour, as I think).
So, does anyone know why the "for" attribute isn't rendered? Or better, does anyone know a solution against this?
BTW, I'm using JSF 1.1_01 (on Tomcat 5.0.28 on Windows if that helps).Hmm, the subject somehow got truncated. What I originally typed was:
h:selectOneRadio lacks "for" attribute in label element and produces invalid HTML -
H:selectOneRadio layout issue
All,
I'm new to JSF and am wondering if anyone had tackled a layout issue that I am running into.
I have a h:selectOneRadio tag inside which, I have a couple of f:selectItem items. I want to show some text fields and then show the last f:selectItem item. Is it possible in JSF?
<br>
In plain html terminology, I want :
radio
radio
textfield
radio
Code in html:
<br>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3" WIDTH="550">
<TR>
<TD COLSPAN="2" WIDTH="100%">
<b>Payment Method</b>
</TD>
</TR>
<TR>
<TD WIDTH="26%">
</TD>
<TD WIDTH="74%">
<p class="body"><input type="radio" name="card" value="VI">Visa</p>
</TD>
</TR>
<TR>
<TD WIDTH="26%">
</TD>
<TD WIDTH="74%">
<p class="body"><input type="radio" name="card" value="MC">MasterCard</p>
</TD>
</TR>
<TR>
<TD WIDTH="26%" align="right">
<p class="body">Credit Card Number:</p>
</TD>
<TD WIDTH="74%">
<input type="text" name="ccnum" maxlength="26" size="40" value="">
</TD>
</TR>
<TR>
<TR tal:replace="CVV2">
<TD WIDTH="26%" align="right">
<p class="body">Security Code:</p>
</TD>
<TD WIDTH="74%">
<input type="text" name="cvv2" maxlength="4" size="5" value="">
</TD>
</TR>
<TR>
<TD WIDTH="26%" align="right">
<p class="body">Expiration:</p>
</TD>
<TD WIDTH="74%">
<p class="body"><input type="text" name="ccexmo" maxlength="2" size="2" value=""> <input type="text" name="ccexyear" maxlength="4" size="4" value=""> For example, 03/2007</p>
</TD>
</TR>
<!-- The follow row should only be displayed if Billing is an option -->
<TR tal:replace="BILLME">
<td width="26%" align="right">
<p class="body">Other Payment:</p>
</td>
<TD width="74%">
<p class="body"><input type="radio" name="card" value="BILL">Please send me a bill.</p>
</TD>
</TR>
</TABLE> Thanks
Jimyou can build this type of behaviour by creating a custom class.
I think this is not possible by building the select items.
PL,post the solution if you find any.
-- raju -
SelectOneRadio layout issues...
Hey all,
Just started using JSF a few weeks ago, and I'm building a jsp that has a selectOneRadio list with 15 items. Right now it is one long column. I would like to divide these items into 2 columns. I've tried doing it with HTML tables, but to no avail. I've also tried working with <h:column> and <f:facet> tags, but they seem to want to display <h:> tags as opposed to the <f:> tags I'm using.
How can I do this?
Thanks!quick and easy answer to the first question, if you nest your smaller panel, inside a panel with a BorderLayout, and add it to the NORTH pane, then it squashes it to the top nicely instead of stretching it tall. You may want to try a GridBag Layout with all the complexities of the GB constraints to make it look exactly how you like it, or even nest inside another BorderLayout an put it into the WEST pane to squash it over to the left hand side.
Second Question - sorry - unsure on this one.
Simon -
How to use SelectOneRadio within a DataTable
Hi,
I have a requirement to have a radio button for each row in the datatable. It is to enable selecting one row(only one row) from the table and proceed to the next page. The table should look like
o Name1 address1 city1 state1
o Name2 address2 city2 state2
o Name3 address3 city3 state3
o Name4 address4 city4 state4
Next>>
The data structure I have is a collection on objects of type person.
Class person
String id;
String name;
String address;
String city;
String state;
getters and setters
I tried to use SelectOneRadio within a Column, but that didnt help. As obvious it treats each rows radio button as a seperate radio group.
<h:datatable var="person" value="#{personList}>
<h:column>
<h:selectOneRadio>
<f:selectItem itemValue="#{person.id}"/>
</h:selectOneRadio>
</h:column>
<h:column>
<h:outputText value="#{person.name}"\>
</h:column>
</h:datatable>
I am new to JSF. I searched thru some JSF websites and book, but couldnt find a solution. Can someone help me solve this.
Thanks in advance
RaniHi,
after some time probing into this issue I think none of the many proposed sollutions really solves the underlying problem: Working around the issue becomes much to complicated for JSFs stated design goal of easing development. Certainly for such a common case scenario no workaround should be neccessary, especially given the fact that JSTL is easily able to model this without the need for workarounds!
In my opinion JSF TagLib implementations should attempt to solve this in a coming version.
One part of the sollution might be to make <f:selectItem> search it's parent element recursively, i.e. allow the expected container element to be the nearest direct or indirect parent that's suitable. This would allow developers to envelope a <h:dataTable> tag with a <h:selectOneRadio> element. Any <f:selectItem> element inside would therefore be part of a single choice radio button selection, regardless of them being distributed over multiple rows or columns.
Another part of the sollution might be to allow <h:selectOneRadio> and similar tags to be substitutes for <h:column> tags inside tables. This way a complete column of radio buttons could be used to chose a single value, thereby allowing multiple columns of radio buttons to choose multiple values within the same table.
Please forward this suggestion for enhancement in kind to the expert group working on the further development of the JSF taglibs. I guess many people besides me already use it as a classical example of complications using JSF during lectures about the tomic, and at least in this case the problem seems completely solvable.
Kind regards,
Sascha Baumeister
software architect, university lecturer and former JCP spec lead JSR086 -
h:selectOneRadio "Style buzzle"
Greetings for all members;
I have the following code
<h:selectOneRadio value="#{configBean.phiscianAjaxFeature}" id="physicainAjaxSetting" styleClass="radioTBw" >
<f:selectItem id="physInfoEnabled" itemLabel="Enabled" itemValue="true" />
<f:selectItem id="physInfoDisabled" itemLabel="Disabled" itemValue="false" />
</h:selectOneRadio>Note that the style class for this component is "radioTBW" and it is:
.radioTBw {
BORDER-RIGHT: #9999ff 1px solid;
BORDER-TOP: #9999ff 1px solid;
FONT-SIZE: 12px;
BORDER-LEFT: #9999ff 1px solid;
BORDER-BOTTOM: #9999ff 1px solid;
FONT-FAMILY: Tahoma;
width:90%;
padding-top: 1px;
padding-right: 4px;
padding-bottom: 1px;
padding-left: 4px;
.radioTBw td {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
width: 25%; <<<<<<<<<<<<<<<<<<<<<<<<<<<See this please
color: #003366;
}In the generated output I got only two columns as expected but each column (each one with its one radio button) has *50%* of width and not *%25* as wanted, but when I add another two ( <f:selectItem ) so the total is 4 inside this component, I got 25% for each. I want the first case (with only two <f:selectItem) to have each column 25% and not 50% ?
RegardsThanks Faisal;
Actaullay, I need to have them aligned belwo each other like this:
Log Level: OptionOne OptionTwo
User Type: OptionOne OptionTwo OptionTree OptionFour
Others: OptionOne OptionTwo OptionOne But what I got is:
Log Level: OptionOne (a space here) OptionTwo
User Type: OptionOne OptionTwo OptionTree OptionFour
Others: OptionOne OptionTwo OptionOne Note all of them have the same style class shown above . (
Regards
Edited by: Hope_Seeker on Nov 1, 2009 3:33 AM
Edited by: Hope_Seeker on Nov 1, 2009 3:33 AM -
How to find a point lies inside circle
Hi,
How do I find a point (x,y) is lies inside a circle? I trying to do a small shooting game.
If the user clicks inside the circle they get a point. I am using the Pythagoras theorem to achieve this. But I can't.
Please advice me.
Here is my code
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Shoot extends JFrame implements MouseListener, MouseMotionListener
private int winWidth = 300;
private int winHeight = 300;
private MyCanvas canvas = null;
private int ballX = 50;
private int ballY = 50;
private int ballW = 50;
private int ballH = 50;
private int ballR = ballW / 2;
private int curX = 0;
private int curY = 0;
private int left = 0;
private int top = 0;
public Shoot()
Cursor c = new Cursor(Cursor.CROSSHAIR_CURSOR);
this.setCursor(c);
canvas = new MyCanvas();
packIt();
left = getInsets().left;
top = getInsets().top;
private void packIt()
setTitle("My first game!");
setPreferredSize(new Dimension(winWidth, winHeight));
setSize(new Dimension(winWidth, winHeight));
setContentPane(canvas);
addMouseListener(this);
addMouseMotionListener(this);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//setUndecorated(true);
setLocation(300, 0);
setVisible(true);
public void mouseClicked(MouseEvent e)
int x = e.getX() - left - ballX;
int y = e.getY() - top - ballY;
int r = ballR;
System.out.println("x :" + x + "\ty :" + y);
//Trying to implememt Pythagoras theorem. But I am missing something.
System.out.println(((x * x) + (y * y)) + "\t=\t" + (r * r));
System.out.println();
public void mousePressed(MouseEvent e)
public void mouseReleased(MouseEvent e)
public void mouseEntered(MouseEvent e)
public void mouseExited(MouseEvent e)
public void mouseDragged(MouseEvent e)
public void mouseMoved(MouseEvent e)
curX = e.getX() - left;
curY = e.getY() - top;
canvas.repaint();
private class MyCanvas extends JPanel
public MyCanvas()
setBackground(Color.BLACK);
setBorder(BorderFactory.createLineBorder(Color.yellow));
public void paintComponent(Graphics g)
super.paintComponent(g);
g.setColor(Color.WHITE);
g.drawString("x :" + curX, 10, 20);
g.drawString("y :" + curY, 10, 30);
g.setColor(Color.RED);
g.fillOval(ballX, ballY, ballW, ballH);
public static void main(String[] asd)
new Shoot();
}public boolean isPointInCircle(){
double x= circle.getWidth/2.0+circle.getX();
double y= circle.getHeight/2.0+circle.getY();
double distance=getDistance(x,y,pointX,PointY);
return (distance<= circle.getWidth/2.0); //if the distance from the point to the center of the circle is less than the radius of the circle return true
double getDistance(double x1, double y1, double x2, double y2){
return math.sqrt((x1-x2)(x1-x2) + (y1-y2)(y1-y2));
}Edited by: ghostbust555 on Jan 23, 2011 3:20 PM -
Remote Access VPN Clients Cannot Access inside LAN
I have been asked to set up remote access VPN on an ASA 5505 that I previously had no invlovement with. I have set it up the VPN using the wizard, they way I normally do, but the clients have no access to anything in the inside subnet, not even the inside interface IP address of the ASA. Thay can ping each other. The remote access policy below that I am working on is labeled VPNPHONE, address pool 172.16.20.1-10. I do not need split tunneling to be enabled. The active WAN interface is the one labeled outside_cable.
: Saved
ASA Version 8.2(1)
hostname ASA5505
domain-name default.domain.invalid
enable password eelnBRz68aYSzHyz encrypted
passwd eelnBRz68aYSzHyz encrypted
names
interface Vlan1
nameif inside
security-level 100
ip address 192.168.100.1 255.255.255.0
interface Vlan2
nameif outside
security-level 0
pppoe client vpdn group dataDSL
ip address 76.244.75.57 255.255.255.255 pppoe
interface Vlan3
nameif dmz
security-level 50
ip address 192.168.9.1 255.255.255.0
interface Vlan10
nameif outside_cable
security-level 0
ip address 50.84.96.178 255.255.255.240
interface Ethernet0/0
switchport access vlan 2
interface Ethernet0/1
switchport access vlan 10
interface Ethernet0/2
switchport access vlan 3
interface Ethernet0/3
interface Ethernet0/4
interface Ethernet0/5
interface Ethernet0/6
interface Ethernet0/7
ftp mode passive
clock timezone CST -6
clock summer-time CDT recurring
dns server-group DefaultDNS
domain-name default.domain.invalid
same-security-traffic permit intra-interface
object-group service Netbios udp
port-object eq 139
port-object eq 445
port-object eq netbios-ns
object-group service Netbios_TCP tcp
port-object eq 445
port-object eq netbios-ssn
object-group network DM_INLINE_NETWORK_1
network-object host 192.168.100.177
network-object host 192.168.100.249
object-group service Web_Services tcp
port-object eq ftp
port-object eq ftp-data
port-object eq www
port-object eq https
object-group network DM_INLINE_NETWORK_10
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network DM_INLINE_NETWORK_11
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network DM_INLINE_NETWORK_2
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network DM_INLINE_NETWORK_3
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network DM_INLINE_NETWORK_4
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network DM_INLINE_NETWORK_5
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network DM_INLINE_NETWORK_6
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network DM_INLINE_NETWORK_7
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network DM_INLINE_NETWORK_8
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network DM_INLINE_NETWORK_9
network-object host 192.168.9.10
network-object host 192.168.9.4
object-group network VPN
network-object 192.168.255.0 255.255.255.0
access-list outside_access_in extended permit icmp any host 76.244.75.61
access-list outside_access_in extended permit tcp any host 76.244.75.61 eq ftp
access-list outside_access_in extended permit tcp any host 76.244.75.61 eq ftp-data
access-list outside_access_in extended permit tcp any host 76.244.75.62 eq www
access-list outside_access_in extended permit tcp any host 76.244.75.62 eq https
access-list outside_access_in extended permit tcp any host 76.244.75.59 eq www
access-list outside_access_in extended permit tcp any host 76.244.75.59 eq https
access-list outside_access_in extended permit tcp any host 76.244.75.60 eq www
access-list outside_access_in extended permit tcp any host 76.244.75.60 eq https
access-list outside_access_in extended permit tcp any host 76.244.75.58 eq www
access-list outside_access_in extended permit tcp any host 76.244.75.58 eq https
access-list dmz_access_in remark Quickbooks
access-list dmz_access_in extended permit tcp object-group DM_INLINE_NETWORK_6 host 192.168.100.5 eq 56719
access-list dmz_access_in remark Quickbooks range
access-list dmz_access_in extended permit tcp object-group DM_INLINE_NETWORK_7 host 192.168.100.5 range 55333 55337
access-list dmz_access_in extended permit udp object-group DM_INLINE_NETWORK_8 host 192.168.100.5 eq 1434
access-list dmz_access_in extended permit tcp object-group DM_INLINE_NETWORK_9 host 192.168.100.5 eq 49398
access-list dmz_access_in remark QB
access-list dmz_access_in extended permit tcp object-group DM_INLINE_NETWORK_10 host 192.168.100.5 eq 8019
access-list dmz_access_in extended permit udp object-group DM_INLINE_NETWORK_2 host 192.168.100.5 eq 2638
access-list dmz_access_in extended permit udp object-group DM_INLINE_NETWORK_11 host 192.168.100.5 object-group Netbios
access-list dmz_access_in extended permit tcp object-group DM_INLINE_NETWORK_3 host 192.168.100.5 object-group Netbios_TCP
access-list dmz_access_in extended deny ip host 192.168.9.4 host 192.168.100.5 inactive
access-list dmz_access_in extended permit udp object-group DM_INLINE_NETWORK_4 any
access-list dmz_access_in extended permit tcp object-group DM_INLINE_NETWORK_5 any
access-list dmz_access_in remark Printer
access-list dmz_access_in extended permit ip 192.168.9.0 255.255.255.0 object-group DM_INLINE_NETWORK_1
access-list dmz_access_in extended permit tcp 192.168.9.0 255.255.255.0 any object-group Web_Services
access-list dmz_access_in extended permit udp 192.168.9.0 255.255.255.0 any eq domain
access-list dmz_access_in extended permit icmp 192.168.9.0 255.255.255.0 192.168.255.0 255.255.255.0 echo-reply
access-list dmz_access_in extended permit icmp 192.168.9.0 255.255.255.0 192.168.100.0 255.255.255.0 echo-reply log disable
access-list dmz_access_in remark QB probably does not need any udp
access-list dmz_access_in extended permit udp host 192.168.9.4 host 192.168.100.5 eq 55333 inactive
access-list dmz_access_in remark QB included in other rule range
access-list dmz_access_in extended permit tcp host 192.168.9.4 host 192.168.100.5 eq 55333 inactive
access-list dmz_access_in remark May be required for Quickbooks
access-list dmz_access_in extended permit icmp host 192.168.9.4 host 192.168.100.5
access-list CAD_capture extended permit ip host 192.168.9.4 host 192.168.100.5
access-list CAD_capture extended permit ip host 192.168.100.5 host 192.168.9.4
access-list inside_nat0_outbound extended permit ip any 192.168.255.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip any 192.168.255.0 255.255.255.240
access-list inside_nat0_outbound extended permit ip any 172.16.10.0 255.255.255.240
access-list inside_nat0_outbound extended permit ip any 172.16.20.0 255.255.255.240
access-list cad_supplies_RAVPN_splitTunnelAcl standard permit 192.168.100.0 255.255.255.0
access-list cad_supplies_RAVPN_splitTunnelAcl standard permit 192.168.9.0 255.255.255.0
access-list dmz_nat0_outbound extended permit ip any 192.168.255.0 255.255.255.0
access-list outside_cable_access_in extended permit icmp any host 50.84.96.182
access-list outside_cable_access_in extended permit tcp any host 50.84.96.182 eq ftp
access-list outside_cable_access_in extended permit tcp any host 50.84.96.182 eq ftp-data
access-list outside_cable_access_in extended permit tcp any host 50.84.96.183 eq www
access-list outside_cable_access_in extended permit tcp any host 50.84.96.183 eq https
access-list outside_cable_access_in extended permit tcp any host 50.84.96.180 eq www
access-list outside_cable_access_in extended permit tcp any host 50.84.96.180 eq https
access-list outside_cable_access_in extended permit tcp any host 50.84.96.181 eq www
access-list outside_cable_access_in extended permit tcp any host 50.84.96.181 eq https
access-list outside_cable_access_in extended permit tcp any host 50.84.96.179 eq www
access-list outside_cable_access_in extended permit tcp any host 50.84.96.179 eq https
access-list Local_LAN_Access standard permit host 0.0.0.0
access-list vpnusers_spitTunnelACL extended permit ip 192.168.100.0 255.255.255.0 any
access-list nonat-in extended permit ip 192.168.100.0 255.255.255.0 172.16.20.0 255.255.255.0
pager lines 24
logging enable
logging buffered informational
logging asdm informational
mtu inside 1500
mtu outside 1500
mtu dmz 1500
mtu outside_cable 1500
ip local pool VPN_IP_range 192.168.255.1-192.168.255.10 mask 255.255.255.0
ip local pool VPN_Phone 172.16.20.1-172.16.20.10 mask 255.255.255.0
no failover
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
nat-control
global (outside) 10 interface
global (outside_cable) 10 interface
nat (inside) 0 access-list nonat-in
nat (inside) 10 0.0.0.0 0.0.0.0
nat (dmz) 0 access-list dmz_nat0_outbound
nat (dmz) 10 0.0.0.0 0.0.0.0
static (inside,outside) 76.244.75.62 192.168.100.25 netmask 255.255.255.255 dns
static (dmz,outside) 76.244.75.61 192.168.9.123 netmask 255.255.255.255 dns
static (dmz,outside) 76.244.75.59 192.168.9.124 netmask 255.255.255.255 dns
static (dmz,outside) 76.244.75.58 192.168.9.4 netmask 255.255.255.255 dns
static (inside,dmz) 192.168.100.0 192.168.100.0 netmask 255.255.255.0
static (dmz,outside) 76.244.75.60 192.168.9.10 netmask 255.255.255.255 dns
static (inside,outside_cable) 50.84.96.183 192.168.100.25 netmask 255.255.255.255 dns
static (dmz,outside_cable) 50.84.96.182 192.168.9.123 netmask 255.255.255.255 dns
static (dmz,outside_cable) 50.84.96.180 192.168.9.124 netmask 255.255.255.255 dns
static (dmz,outside_cable) 50.84.96.179 192.168.9.4 netmask 255.255.255.255 dns
static (dmz,outside_cable) 50.84.96.181 192.168.9.10 netmask 255.255.255.255 dns
access-group outside_access_in in interface outside
access-group dmz_access_in in interface dmz
access-group outside_cable_access_in in interface outside_cable
route outside_cable 0.0.0.0 0.0.0.0 50.84.96.177 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
dynamic-access-policy-record DfltAccessPolicy
http server enable
http 192.168.1.0 255.255.255.0 inside
http 192.168.100.0 255.255.255.0 inside
http 204.107.173.0 255.255.255.0 outside
http 204.107.173.0 255.255.255.0 outside_cable
http 0.0.0.0 0.0.0.0 outside_cable
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set TRANS_ESP_3DES_SHA esp-3des esp-sha-hmac
crypto ipsec transform-set TRANS_ESP_3DES_SHA mode transport
crypto ipsec transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
crypto ipsec transform-set ESP-DES-SHA esp-des esp-sha-hmac
crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto ipsec transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto ipsec transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
crypto ipsec transform-set ESP-AES-192-SHA esp-aes-192 esp-sha-hmac
crypto ipsec transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set pfs
crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
crypto map outside_cable_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map outside_cable_map interface outside_cable
crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map outside_map interface outside
crypto map inside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map inside_map interface inside
crypto isakmp enable inside
crypto isakmp enable outside
crypto isakmp enable outside_cable
crypto isakmp policy 10
authentication pre-share
encryption 3des
hash sha
group 2
lifetime 86400
crypto isakmp policy 30
authentication pre-share
encryption 3des
hash md5
group 2
lifetime 86400
telnet 192.168.100.0 255.255.255.0 inside
telnet timeout 5
ssh 192.168.100.0 255.255.255.0 inside
ssh 204.107.173.0 255.255.255.0 outside
ssh 204.107.173.0 255.255.255.0 outside_cable
ssh 0.0.0.0 0.0.0.0 outside_cable
ssh timeout 15
console timeout 0
vpdn group dataDSL request dialout pppoe
vpdn group dataDSL localname [email protected]
vpdn group dataDSL ppp authentication pap
vpdn username [email protected] password *********
dhcpd address 192.168.100.30-192.168.100.99 inside
dhcpd dns 192.168.100.5 68.94.156.1 interface inside
threat-detection basic-threat
threat-detection statistics port
threat-detection statistics protocol
threat-detection statistics access-list
threat-detection statistics tcp-intercept rate-interval 30 burst-rate 400 average-rate 200
webvpn
group-policy DefaultRAGroup internal
group-policy DefaultRAGroup attributes
dns-server value 192.168.100.5
vpn-tunnel-protocol IPSec l2tp-ipsec
group-policy cad_supplies_RAVPN internal
group-policy cad_supplies_RAVPN attributes
vpn-tunnel-protocol IPSec
split-tunnel-policy tunnelspecified
split-tunnel-network-list value cad_supplies_RAVPN_splitTunnelAcl
group-policy VPNPHONE internal
group-policy VPNPHONE attributes
dns-server value 192.168.100.5
vpn-tunnel-protocol IPSec
split-tunnel-policy excludespecified
split-tunnel-network-list value Local_LAN_Access
client-firewall none
client-access-rule none
username swinc password BlhBNWfh7XoeHcQC encrypted
username swinc attributes
vpn-group-policy cad_supplies_RAVPN
username meredithp password L3lRjzwb7TnwOyZ1 encrypted
username meredithp attributes
vpn-group-policy cad_supplies_RAVPN
service-type remote-access
username ipphone1 password LOjpmeIOshVdCSOU encrypted privilege 0
username ipphone1 attributes
vpn-group-policy VPNPHONE
username ipphone2 password LOjpmeIOshVdCSOU encrypted privilege 0
username ipphone2 attributes
vpn-group-policy VPNPHONE
username ipphone3 password LOjpmeIOshVdCSOU encrypted privilege 0
username ipphone3 attributes
vpn-group-policy VPNPHONE
username oethera password WKJxJq7L6wmktFNt encrypted
username oethera attributes
vpn-group-policy cad_supplies_RAVPN
service-type remote-access
username markh password nqH+bk6vj0fR83ai0SAxkg== nt-encrypted
username markh attributes
vpn-group-policy cad_supplies_RAVPN
tunnel-group DefaultRAGroup general-attributes
default-group-policy DefaultRAGroup
tunnel-group DefaultRAGroup ipsec-attributes
pre-shared-key *
tunnel-group DefaultRAGroup ppp-attributes
authentication ms-chap-v2
tunnel-group cad_supplies_RAVPN type remote-access
tunnel-group cad_supplies_RAVPN general-attributes
address-pool VPN_IP_range
default-group-policy cad_supplies_RAVPN
tunnel-group cad_supplies_RAVPN ipsec-attributes
pre-shared-key *
tunnel-group VPNPHONE type remote-access
tunnel-group VPNPHONE general-attributes
address-pool VPN_Phone
default-group-policy VPNPHONE
tunnel-group VPNPHONE ipsec-attributes
pre-shared-key *
class-map inspection_default
match default-inspection-traffic
policy-map type inspect dns preset_dns_map
parameters
message-length maximum 1500
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect rsh
inspect rtsp
inspect sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
service-policy global_policy global
prompt hostname context
Cryptochecksum:8b25ecc61861a2baa6d2556a3679cc7c
: endHi,
You have your "group-policy" set so that you have excluding some networks from being tunneled.
In this access-list named Local_LAN_Access you specify "0.0.0.0"
Doesnt this mean you are excluding all networks from being tunneled? In other words no traffic goes to your tunnel.
This access-list should only contain your local LAN network from where you are connecting with the VPN Client. If you dont need to access anything on your local LAN while having the VPN on, you don't even need this setting on. You could just tunnel all traffic instead of excluding some networks.
- Jouni -
How can I permit all traffic from inside-dmz-outside on asa5505
Scenario :
Servers are in DMZ, Internal LAN Users should access ports Specified (5000 & 2048). Router 2801 is facing Leased line; from there it’s connected to firewall.
Router LAN IP: 83.111.X.X - 255.255.255.X
ASA Version 7.2(4)
hostname ciscoasa
domain-name default.domain.invalid
enable password 2KFQnbNIdI.2KYOU encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
interface Vlan1
nameif inside
security-level 100
ip address 192.168.X.X 255.255.255.0
interface Vlan2
nameif outside
security-level 0
ip address 83.111.X.X 255.255.255.240
interface Vlan3
nameif dmz
security-level 100
ip address 192.168.100.1 255.255.255.0
interface Ethernet0/0
switchport access vlan 2
interface Ethernet0/1
interface Ethernet0/2
switchport access vlan 3
interface Ethernet0/3
interface Ethernet0/4
interface Ethernet0/5
interface Ethernet0/6
switchport access vlan 3
interface Ethernet0/7
ftp mode passive
dns server-group DefaultDNS
domain-name default.domain.invalid
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
pager lines 24
logging asdm informational
mtu inside 1500
mtu outside 1500
mtu dmz 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-524.bin
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0
route outside 0.0.0.0 0.0.0.0 83.111.x.x
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd auto_config outside
dhcpd address 192.168.1.2-192.168.1.254 inside
dhcpd enable inside
class-map inspection_default
match default-inspection-traffic
policy-map type inspect dns preset_dns_map
parameters
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect rsh
inspect rtsp
inspect esmtp
inspect sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
service-policy global_policy global
prompt hostname context
Cryptochecksum:5663409d6ba3ad0bcd163e691f032f76
: endHi Ben,
Thank you for the response. I followed the link and tried reading everything you posted on AEs but I'm afraid that I didn't understand it all. It seems that each AE example had a single input and a single output (e.g. a double). Is this the case?
What I have is a couple of front panel clusters containing (approximately) 18 control doubles, 8 indicator doubles, 5 boolean radio button constructs and 26 boolean control discretes. I clusterized it to make it readable. In addition I'll eventually have a cluster of task references for hardware handles.
All I want to do is update the front panel values like I would do in a C, VB or any other language. I've tried referencing the cluster and using the reference from inside the loops. I've tied using local variables. Neither works. I'm experimenting with globals but it seems that I have to construct the front panel in the gloabal and then I wouldn't know how to repoduce that on the front panel of the main VI. Sometimes it seems that more time is spent getting around Labview constructs than benefitting from them.
I hope the 'Add Attachment' function actuals puts a copy of the VI here and not a link to it.
Thanks again for the suggestion,
Frank
Attachments:
Front Panel Reference.vi 33 KB
Maybe you are looking for
-
The screen on my ipod touch is stuck zoomed in. I don't know how it happened I just looked down and it was like that. I have turned it off and back and even reset it but it still keeps zooming back in each time I turn it on. I can't unlock it because
-
Please help -- Encore CS3 crashes often on a new PC
Read below the typical problem report from Vista problem history -- it's French to me. The whole report would not fit here. Have had numerous crashes in Encore, and few times in Bridge, Premiere and After Effects. The programs just "stopped working"
-
Help needed in spooling a file
hello gurus , i have a table emp consist of values like name place phno abcd ksla 123 errd lkis 456 ertw asd 324 reqq lsd 432 then i did was spool d:/file1/empdetails.xls select * from emp then the file got spooled but the output was not exactly wat
-
To save to the server, correct the invalid or missing required fields.
We have a SharePoint 2010 document library that has a required field that is from an external data source. When we open existing Excel documents, a ribbon appears stating "To save to the server, correct the invalid or missing required fields.". If
-
How do you get Ical to List for more than 12 months on your Ipad? I have used Advanced settings which accomplish this but the Listing disappear overnight!