Hi all,
You can easily use a List in struts2 select tag, but is there a way to use Map in tag?? If it is possible please provide a sample code...
thanx !
I was trying to access existing within Head tag.
What I was doing to achieve that,
foreach (Control ctrl in Header.Controls)
{
Response.Write(lc.GetType() + "<br/>");
}
It gives me the reference of "title", "meta" and "literal" control. How can I get the control and get the "src" attribute of that tag.
I have a custom should macro in my test_helper.rb which looks like this.
def self.should_require_login(actions = [:index])
if (actions.is_a? Symbol)
actions = [actions]
end
context "without user" do
actions.each do |action|
should "redirect #{action.to_s} away" do
get action
assert_redirected_to login_path
end
end
end
if block_given?
context "active user logged in" do
setup do
@user = Factory.create(:user)
@user.register!
@user.activate!
login_as(@user)
end
yield
end
end
end
I would like to use it like this:
should_require_login(:protected_action) do
should "do something" do
...
end
end
And I am expecting the "do something" test to run in the "active user logged in" context, but the test executes in the top context, like the "active user logged in" context never existed and I fail to see the reason why.
Is there a way to check if a template tag exists before using the template tag?
In other words, I would like to be able to do something like this:
{% load my_custom_tags %}
...
{% ifloaded my_custom_tags %}
{% some_custom_tag %}
{% endifloaded %}
I want to have a DropDown List / < Select HTML Tag behaviour with AutoComplete Feature using Twitter Bootstrap TypeAhead. The link here achieves the feature of Combo Box where user can provide his own input also. I want to restrict the User to select only from the option provided. Is there any way to tweek the Twitter Bootstrap TypeAhead Plugin to emulate the behaviour of DropDown List / Tag with Autocomplete Feature.
I have referred the Following question before posting
Adding a dropdown button to Twitter bootstrap typeahead component
How do i set a tag for a button programmatically?
I later want to compare to tags for a conclusion
ive tried this
-(IBAction)buttonPressed:(id)sender{
NSLog(@"%d", [sender tag]);
}
but that just crashes the app.... :(
any other ideas?
Cheers Guys
Sam
I'm writing a custom iterator for a Matrix class, and I want to implement the increment method, which gets called when the iterator is incremented:
void MatrixIterator::increment()
{
// go to the next element
}
Suppose the iterator has been incremented too many times and now points to past the end of the matrix (i.e. past the one-past-the-end point). What is the best practice for this situation? Should I catch this with an assert, or should I just say it's the user's responsibility to keep track of where the iterator is pointing and it's none of my business?
hi,
I am creating a line in canvas tag using jquery drawing library. After the line drawn the
<div id="cool"><canvas id="canid"></canvas></div>
Then on click the below code executed.
$('#canid').remove();
What happens in IE after removing, dom with canvas end tag and also line is not removed.
Please help me out!.
I want to bind a custom property of a windows form to a second property, so when I update the former the latter gets the same value.
This is the simplest example of what I'm trying to do:
public partial class Form2 : Form
{
public string MyTargetProperty { get; set; }
public string OtherProperty { get; set; }
public Form2()
{
InitializeComponent();
this.DataBindings.Add("MyTargetProperty", this, "OtherProperty");
}
private void button1_Click(object sender, EventArgs e)
{
MyTargetProperty = "test";
Console.WriteLine("OtherProperty " + OtherProperty);
}
}
When I click button1 I should be able to see that 'OtherProperty' has the same value as 'MyTargetProperty'. Am I doing something wrong? Do I miss something?
Hi all
I have a sql query in formula tag inside property tag.
In that query i am creating alias name but the hibernate appends table name and throwing me error.
select sum(e.salary) as sal from employee e
but hibernate changes to
select sum(e.salary) as employee.sal from employee e
how to avoid this ....
it should recognise as sal inside of employee.sal !!!
when validating a site using w3c validator it tells me the tag is not valid markup. So i take it out and it works on safari/chrome but not firefox(3.5.x) but validates fine. Is there something in the tag i must add in order for firefox to display flash.
I want to add a unique attribute say "ind" to every tag in the xml. How do i do it using xsl. It need'nt be a sequence number. As long it is unique for every tag it is sufficient.
Input:Some textSome other textSome other text
Expected output: Some textSome other textSome other text
Hi,
Just wondering if it's possible to pass a global javascript array value into a html tag, specifically inside a img (title) tag?
Basically want to know if I can do this:
<img src="_info.gif" height="26" width="37" title=myArray[5]/>
If so, how and if not, can people possibly provide other suggestions.
Thanks
Hi,
I want to attach a click event at the document level with
$(document).click();
And on clicking the element i would like to find out whether it is an anchor tag. If it is an anchor tag, then i will call a method to do something. How can that be done? Any idea?
Hi,
I am working on an iphone application in which I am consuming a webservice.
So i am parsing the XML file data. any idea about how to parse self closing tag
like: State/ and how to read data of self tag like: Contact Email="[email protected]" Name="PhD" Phone="123-521-3388" Source="location"/
I am parsing xml file using NSXMLPARSER class methods and library
Thanks,
hi all,
I am new to HTML 4 validations, in that if I put HEAD runat="server" tag
I am getting this error - Error Line 6, Column 82: character data is not allowed here
…lesheet" type="text/css" media="all" /
In the head tag I have called css files.
So if any one know about thin can help me,how to solve this error?
Thanks in advance.
Is it possible to get the decorated class' type inside of the custom attribute's class?
For example:
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false)]
public class ViewAttribute : ExportAttribute
{
public object TargetRegion { get; set; }
public Type ViewModel { get; set; }
public Type Module { get; set; }
public ViewAttribute()
: base(typeof(UserControl))
{
Module = GetDecoratedClassType(); //I need this method
}
}
In the following example GetDecoratedClassType() would return HomeView
[View]
HomeView MyHomeView { get; set; }
In Display tag, on giving a property in the display:column tag, that property gets printed as a column. What should I do if we want to fix the table header as it's dont scroll with the column?
I have add a custom plugin that insert custom tags into my tinyMCE editor of the format:
title
I want the custom tags to be rendered with some styles when viewed in the WYSIWYG view. I have seen one response to a similar question :
http://topsecretproject.finitestatemachine.com/2010/02/how-to-custom-tags-with-tinymce/
but this doesn't work - they tags are not stripped out but they are not styled either??
I have a custom template tag:
def uploads_for_user(user):
uploads = Uploads.objects.filter(uploaded_by=user, problem_upload=False)
num_uploads = uploads.count()
return num_uploads
and I'd like to do something like this, so I can pluralize properly:
{% with uploads_for_user leader as upload_count %}
{{ upload_count }} upload{{ upload_count|pluralize }}
{% endwith %}
However, uploads_for_user leader doesn't work in this context, because the 'with' tag expects a single value - Django returns:
TemplateSyntaxError at /upload/
u'with' expected format is 'value as name'
Any idea how I can get round this?
Please bear in mind that I've read all the instructions I could find about adding component icon to my custom component. And I am able to do this when we talk about the icon size which is 24x24 pixels. I see the icon when a component is dropped on the form. However I can not see the small 16x16 icon which should be displayed when browsing Tool Palette.
I've read that I should name my two other BMP files which are contained in DCR file like this:
MyComponentName16 [for 16x16 BMP file]
MyComponentName32 [for 32x32 BMP file]
Unfortunately this does not seem to work, I've tried to restart Delphi few times in hope that it might be the case of not refreshing something, but without any success.
Any ideas?
Hi How can I define and use in my phtml file customtag block like this:
for example this tag create the list of all entries and show the title of them?
I would like to dump all css key/value pairs for an html tag.
In particular, I would like to learn the css properties for <audio> tag, so I can try to customize the look.
document.getElementById('myaudio').style returns a CSSStyleDeclaration object but length returns 0 and I cannot figure out to iterate over the key/value pairs.
Thank you